summaryrefslogtreecommitdiffstats
path: root/parse.c
Commit message (Collapse)AuthorAgeFilesLines
* parse: Add support for -D all to enable all debug flagsTavian Barnes2018-11-021-0/+3
|
* parse: Improve -D diagnosticsTavian Barnes2018-11-021-12/+26
|
* Update copyright datesTavian Barnes2018-09-241-1/+1
|
* Add some missing fallthrough commentsTavian Barnes2018-08-161-0/+1
|
* parse: Add some missing failure messagesTavian Barnes2018-07-061-0/+2
|
* parse: Don't leave expr->mode_cmp uninitializedTavian Barnes2018-06-181-1/+1
| | | | | | | | | When adding support for -perm +7777, I introduced an unconditional break that should have been conditional. The bug was observable with $ ./tests.sh --verbose --bfs="valgrind $PWD/bfs" test_perm_leading_plus_symbolic Fixes: 7f8bacca4c2b1d35bb65ddf8cbf70fadf1adf66e
* printf: Add %w and %Wk for file birth timesTavian Barnes2018-01-201-1/+6
| | | | | %w and %W were chosen to match the format specifiers for file birth times from stat(1)
* stat: New wrapper around the stat() familyTavian Barnes2018-01-081-64/+45
| | | | | This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times.
* parse: Minor cleanups from af7878c/7da0d28Tavian Barnes2018-01-061-6/+2
|
* Keep track of required FDs per-exprTavian Barnes2017-12-151-11/+14
|
* color: Implement %m for cfprintf()Tavian Barnes2017-11-131-6/+6
|
* exec: Recover from E2BIGTavian Barnes2017-11-121-2/+6
|
* cmdline: Account for files opened during/between evaluations more carefullyTavian Barnes2017-11-121-7/+21
|
* Add support for file birth/creation times on platforms that have itTavian Barnes2017-11-051-34/+71
| | | | Fixes #19
* parse: Support -perm +7777, for compatibility with BSD and old GNU findTavian Barnes2017-11-051-0/+6
|
* parse: Keep track of what files are already openTavian Barnes2017-10-211-40/+99
| | | | Fixes #22
* Report errors that occur when closing filesTavian Barnes2017-10-211-7/+30
| | | | Otherwise we miss write errors that occur when flushing the cache.
* Add a man pageTavian Barnes2017-10-151-15/+22
| | | | Fixes #31
* parse: Document the bfs meaning of -O in -helpTavian Barnes2017-09-171-2/+15
|
* opt: Separate optimization from parsingTavian Barnes2017-09-161-328/+19
|
* parse: Don't reorder or remove tests with potential side effectsTavian Barnes2017-09-061-3/+21
| | | | | | -empty and -xtype may have side effects like reporting permission errors, which even affect the exit status of bfs. We shouldn't remove these effects without -Ofast.
* parse: Factor out common initialization code for -print and friendsTavian Barnes2017-09-061-35/+30
|
* Implement -D searchTavian Barnes2017-09-021-0/+3
|
* Implement cost-based optimizationTavian Barnes2017-08-271-43/+210
|
* Avoid multiple extra stat()s of broken symlinks for -xtypeTavian Barnes2017-08-221-1/+1
|
* Unify broken symlink handlingTavian Barnes2017-08-121-1/+1
| | | | | | | | | Rather than open-code the fallback logic for broken symlinks everywhere it's needed, introduce a new xfstatat() utility function that performs the fallback automatically. Using xfstatat() consistently fixes a few bugs, including cases where broken symlinks are given as arguments to predicates like -samefile.
* parse: Don't allow negative optimization levelsTavian Barnes2017-08-101-1/+1
|
* Re-license under the BSD Zero Clause LicenseTavian Barnes2017-07-271-10/+15
|
* Represent never returning as always_true && always_falseTavian Barnes2017-07-211-29/+31
| | | | | | | | | | Expressions that never return are vacuously always both true and false. Using this representation lets us take advantage of existing truth-based optimizations, which gets us optimizations of command lines like bfs -name foo -quit -print for free.
* Fix a couple terrible optimizer bugsTavian Barnes2017-07-211-2/+2
| | | | | | | Just because an expression is always true or false, doesn't mean we can execute it more often than it otherwise would be, unless it's also pure. But that's equivalent to being identically -true/-false, so just check that.
* Implement -printxTavian Barnes2017-07-211-0/+16
| | | | Also from NetBSD.
* Implement -exit [STATUS]Tavian Barnes2017-07-201-0/+23
| | | | From NetBSD again.
* Implement -rm as an alias for -deleteTavian Barnes2017-07-201-0/+4
| | | | From NetBSD.
* parse: Ask for confirmation in some casesTavian Barnes2017-07-161-108/+154
|
* parse: Warn if -depth and -prune are used togetherTavian Barnes2017-07-091-0/+19
|
* -perm: Handle permcopy (e.g. u=rw,g=u) correctlyTavian Barnes2017-06-151-5/+16
|
* parse: Make some error messages redTavian Barnes2017-06-031-2/+4
|
* parse: Set always_true for some actions that never return falseTavian Barnes2017-05-171-3/+25
|
* Add colors to -D treeTavian Barnes2017-05-151-37/+44
|
* Optimize based on reachability due to -quitTavian Barnes2017-05-151-43/+83
|
* Don't make -quit disable the implicit -printTavian Barnes2017-05-111-1/+1
|
* Implement -D execTavian Barnes2017-05-091-1/+6
|
* Don't parse the mount table until it's neededTavian Barnes2017-04-291-8/+7
|
* Release 1.01.0Tavian Barnes2017-04-241-1/+1
|
* Implement -fstypeTavian Barnes2017-04-231-2/+28
| | | | Fixes #6!
* Make -help output prettier and more completeTavian Barnes2017-04-161-37/+207
|
* Implement -XTavian Barnes2017-04-161-0/+10
|
* Implement -exec/-execdir ... +Tavian Barnes2017-04-151-22/+13
|
* Respect -nocolor for -fprint /dev/stdoutTavian Barnes2017-03-161-2/+16
|
* Give struct expr a CFILE* instead of just a FILE*Tavian Barnes2017-03-161-11/+18
| | | | This unifies the behaviour of -print and -fprint /dev/stdout.