summaryrefslogtreecommitdiffstats
path: root/parse.c
AgeCommit message (Collapse)Author
2022-02-21regex: Wrap the POSIX API in a facadeTavian Barnes
2022-02-04regex: Add support for emacs and grep typesTavian Barnes
2022-01-30parse: Add support for ed and sed regexesTavian Barnes
They're apparently the same as POSIX basic regexes.
2022-01-29Standardize WITH_* make variables for configuring dependenciesTavian Barnes
2022-01-24Simplifyingdata-man
2022-01-24Using Oniguruma library (optionally)data-man
2022-01-18util: New close() wrappers to check for EBADF and preserve errnoTavian Barnes
2021-10-19parse: Switch back to O_TRUNC from explicit ftruncate()Tavian Barnes
O_TRUNC is not equivalent to an unconditional ftruncate(), e.g. for device files. This reverts the behaviour change from 78944c81, which was never released and is not supported in other find implementations.
2021-10-19parse: Fix UAF + double-free when ftruncate() failsTavian Barnes
2021-10-01tests: Add tests for parsing invalid integersTavian Barnes
And give some better error messages.
2021-09-26Don't truncate files until we know they're not duplicatesTavian Barnes
2021-09-21util: New xfopen() utilityTavian Barnes
And use it to pass O_CLOEXEC to all FILE*'s, so the files opened for -fprint etc. don't get passed to the programs run by -exec etc.
2021-09-21ctx: Also deduplicate the standard streamsTavian Barnes
This fixes some potential missing output when the same file is used in a redirection and something like -fprint. The main benefit is smarter handling of /dev/stdout, which will now share the CFILE* with cout.
2021-09-15Fix the order of -fprintf FILE FORMAT in the docsTavian Barnes
2021-09-15Implement -files0-from FILETavian Barnes
See https://savannah.gnu.org/bugs/?60383 for the development of the corresponding GNU find feature.
2021-09-02eval: Use 512-byte blocks for -ls when POSIXLY_CORRECT is setTavian Barnes
This matches the behaviour of GNU find, and allows bfs to match the output of BSD find as well. Fixes #77.
2021-06-13parse: More -help pager improvementsTavian Barnes
If $PAGER is unset, we now try less if it exists, then fall back to more. Colors are only used if less is the used pager, since more on non-coreutils platforms doesn't always handle colors. Finally, less's configuration is given on the command line, which works better if the user has $LESS already set. Fixes https://github.com/tavianator/bfs/issues/76.
2021-06-09util: Rename fallthrough to BFS_FALLTHROUGHTavian Barnes
This avoids shadowing the actually standard name fallthrough.
2021-06-02Implement time units for -{a,B,c,m}timeTavian Barnes
From FreeBSD find. Closes #75.
2021-06-02Enable -Wimplicit-fallthroughTavian Barnes
2021-04-14parse: launch_pager(): set the LESS environment variable if it is empty.Markus F.X.J. Oberhumer
2021-04-13parse: check if PAGER environment variable is empty.Markus F.X.J. Oberhumer
2021-03-06Support -flags on all the BSDsTavian Barnes
2021-03-06Implement -flags, from FreeBSD findTavian Barnes
This is the last BSD-specific primary I'm aware of. Fixes #14.
2021-02-05Update copyright datesTavian Barnes
2021-01-28dir: New DIR* facadeTavian Barnes
2021-01-24parse: Fix the token type of -nowarnTavian Barnes
2021-01-13-perm: Use +t instead of ug+tTavian Barnes
The chmod spec says that ug+t is unspecified, and only +t or a+t is guaranteed to actually set the sticky bit. In practice GNU tools respect o+t as well, but ignore u+t/g+t. Fix the implementation to match GNU, and only test the POSIX required parse.
2020-12-02Give messages to unconditional assertion failuresTavian Barnes
2020-12-02parse: Clean up debug flag parsing/printingTavian Barnes
2020-11-28parse: Don't pass an uninitialized regex_t to regerror()Tavian Barnes
2020-11-12Include what I useTavian Barnes
Thanks to https://github.com/include-what-you-use/include-what-you-use
2020-11-03New -status option to display a status barTavian Barnes
2020-10-06exec: Adjust some calling conventionsTavian Barnes
2020-10-06printf: Adjust some calling conventionsTavian Barnes
2020-10-05diag: New bfs_perror() functionTavian Barnes
2020-10-04parse: Fail if -color is passed and the colors couldn't be parsedTavian Barnes
2020-10-04parse: More accurate error reporting for cfdup()Tavian Barnes
2020-10-04parse: Report errors when failing to add a rootTavian 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-09-18stat: Rename bfs_stat_flag to _flagsTavian Barnes
Flags enums should be plural.
2020-08-13Implement -xattrnameTavian Barnes
From macOS find.
2020-07-29bftw: Make some flag names more explicitTavian Barnes
2020-07-29bftw: Rename bftw_typeflag to bftw_type, and make it not a bitmaskTavian Barnes
2020-06-16Implement exponential deepening searchTavian Barnes
2020-06-07parse: Color the optimization level differently in dump_cmdline()Tavian Barnes
2020-06-07opt: Dump the command line before optimizing with -D optTavian Barnes
2020-06-07parse: Prohibit actions inside -excludeTavian Barnes
2020-06-07Treat -nohidden like -exclude -hiddenTavian Barnes
Fixes #30.
2020-06-07Implement -exclude, a special form for convenient exclusionsTavian Barnes
Fixes #8.