summaryrefslogtreecommitdiffstats
path: root/main.c
AgeCommit message (Collapse)Author
2021-02-05Update copyright datesTavian Barnes
2021-01-28main: Add some new source files to the top-level commentTavian Barnes
2020-11-12Include what I useTavian Barnes
Thanks to https://github.com/include-what-you-use/include-what-you-use
2020-10-01main: Preserve errno over close() in redirect()Tavian Barnes
2020-10-01util: Move redirect() and isopen() to main.cTavian Barnes
2020-09-27Rename struct cmdline to bfs_ctxTavian Barnes
The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab.
2020-04-22pwcache: Rename from passwd.[ch]Tavian Barnes
2020-02-29passwd: Cache the user/group tablesTavian Barnes
This is a significant optimization for conditions that need these tables: Benchmark #1: ./bfs ~/code/linux -nouser >/dev/null Time (mean ± σ): 232.0 ms ± 2.5 ms [User: 44.3 ms, System: 185.0 ms] Range (min … max): 228.7 ms … 238.7 ms 12 runs Benchmark #2: ./bfs-1.6 ~/code/linux -nouser >/dev/null Time (mean ± σ): 1.050 s ± 0.012 s [User: 544.2 ms, System: 500.0 ms] Range (min … max): 1.025 s … 1.063 s 10 runs Benchmark #3: find ~/code/linux -nouser >/dev/null Time (mean ± σ): 1.040 s ± 0.012 s [User: 533.6 ms, System: 500.6 ms] Range (min … max): 1.017 s … 1.054 s 10 runs Summary './bfs ~/code/linux -nouser >/dev/null' ran 4.48 ± 0.07 times faster than 'find ~/code/linux -nouser >/dev/null' 4.52 ± 0.07 times faster than './bfs-1.6 ~/code/linux -nouser >/dev/null'
2020-02-13time: Split out time-related functions from utilTavian Barnes
2019-09-12main: Add darray.[ch] to the indexTavian Barnes
2019-06-16main: Update comment for fsadeTavian Barnes
2019-03-17main: Add pointer to trie.[ch]Tavian Barnes
2019-02-09Add some documentation commentsTavian Barnes
2019-02-06Turn on -Wstrict-prototypesTavian Barnes
2019-02-01main: Fix closed standard stream handlingTavian Barnes
bfs >&- should complain about a missing file descriptor, rather than silently succeeding.
2017-10-21Report errors that occur when closing filesTavian Barnes
Otherwise we miss write errors that occur when flushing the cache.
2017-09-16opt: Separate optimization from parsingTavian Barnes
2017-07-27Re-license under the BSD Zero Clause LicenseTavian Barnes
2017-07-20main: Call setlocale() at startup to use the system localeTavian Barnes
2017-07-20Implement -exit [STATUS]Tavian Barnes
From NetBSD again.
2017-05-06main: Fix error checking of redirect()Tavian Barnes
2016-11-24Update some copyright dates.Tavian Barnes
2016-11-13Redirect stdin from /dev/null for -ok and -okdir.Tavian Barnes
2016-10-18main: IN is read, OUT is write.Tavian Barnes
Oops :/
2016-10-16main: Make sure that STD{IN,OUT,ERR}_FILENO are open.Tavian Barnes
Otherwise invocations like bfs >&- may do weird things like try to write to directory descriptors.
2016-02-13More s/cl/cmdline/.Tavian Barnes
2016-02-04Don't use typedefs to avoid struct/enum tags.Tavian Barnes
2015-11-29Split out parsing code.Tavian Barnes