summaryrefslogtreecommitdiffstats
path: root/ctx.c
Commit message (Collapse)AuthorAgeFilesLines
* expr: Store auxilliary data in a unionTavian Barnes2022-03-251-2/+2
| | | | And rename struct expr to bfs_expr.
* ctx: Factor out exec flushing behaviour into bfs_ctx_flush()Tavian Barnes2022-03-131-5/+16
|
* ctx: Don't include std{out,err} in the open file countTavian Barnes2022-03-091-1/+5
|
* ctx: Also check ferror(stdout)Tavian Barnes2022-02-111-15/+27
| | | | | | Previously this was checked for all other files, but for stdout we just checked the return value of fflush(). Checking ferror() makes sure we don't miss any errors that occurred on a previous flush.
* Don't truncate files until we know they're not duplicatesTavian Barnes2021-09-261-1/+1
|
* ctx: Also deduplicate the standard streamsTavian Barnes2021-09-211-29/+43
| | | | | | 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.
* Implement -files0-from FILETavian Barnes2021-09-151-0/+5
| | | | | See https://savannah.gnu.org/bugs/?60383 for the development of the corresponding GNU find feature.
* eval: Use 512-byte blocks for -ls when POSIXLY_CORRECT is setTavian Barnes2021-09-021-1/+2
| | | | | This matches the behaviour of GNU find, and allows bfs to match the output of BSD find as well. Fixes #77.
* eval: Raise RLIMIT_NOFILE if possibleTavian Barnes2021-05-201-0/+9
| | | | | | This lets us keep more open FDs cached in bftw(). The limit is lowered before running -exec commands, in case they're incompatible with a high limit (e.g. due to select()).
* Give messages to unconditional assertion failuresTavian Barnes2020-12-021-1/+1
|
* parse: Clean up debug flag parsing/printingTavian Barnes2020-12-021-0/+26
|
* Include what I useTavian Barnes2020-11-121-1/+3
| | | | Thanks to https://github.com/include-what-you-use/include-what-you-use
* ctx: Add missing #include <limits.h>Tavian Barnes2020-11-121-0/+1
| | | | Spotted at https://github.com/freebsd/freebsd-ports/commit/4d80040cb4c10271b375f3b5d70d2b29dae7fc6f
* New -status option to display a status barTavian Barnes2020-11-031-0/+1
|
* pwcache: Adjust some naming conventionsTavian Barnes2020-10-061-4/+4
|
* mtab: Adjust some naming conventionsTavian Barnes2020-10-061-2/+2
|
* parse: Fail if -color is passed and the colors couldn't be parsedTavian Barnes2020-10-041-0/+1
|
* ctx: Perserve errno better in bfs_ctx_open()Tavian Barnes2020-09-281-0/+7
|
* Rename struct cmdline to bfs_ctxTavian Barnes2020-09-271-0/+217
The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab.