Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | dstring: Add an infallible dstrshrink() function | Tavian Barnes | 2024-10-17 | 1 | -2/+2 |
| | | | | And mark the fallible ones with _nodiscard. | ||||
* | eval: Use xtimer_start() for status bar updates | Tavian Barnes | 2024-10-10 | 1 | -36/+76 |
| | |||||
* | Fix includes | Tavian Barnes | 2024-08-29 | 1 | -0/+1 |
| | |||||
* | build: Move feature test macros to prelude.h | Tavian Barnes | 2024-08-28 | 1 | -1/+0 |
| | | | | | | This replaces the explicit CPPFLAGS list in flags.mk with just `-include src/prelude.h`, shortening our compiler command lines and allowing them to be easily documented. | ||||
* | prelude: Split bfs-specific utilities into new bfs.h header | Tavian Barnes | 2024-08-28 | 1 | -0/+3 |
| | |||||
* | eval: Don't warn about suppressed errors without -noerror | Tavian Barnes | 2024-08-19 | 1 | -1/+1 |
| | |||||
* | eval: Capitalize -noerror warning message | Tavian Barnes | 2024-08-17 | 1 | -1/+1 |
| | |||||
* | New -noerror option to suppress error messages | Tavian Barnes | 2024-08-16 | 1 | -1/+16 |
| | | | | Closes: https://github.com/tavianator/bfs/issues/142 | ||||
* | eval: Remove info_hook from callback_args | Tavian Barnes | 2024-08-16 | 1 | -4/+2 |
| | |||||
* | bfstd: New sysoption() macro to check for POSIX option runtime support | Tavian Barnes | 2024-08-09 | 1 | -4/+7 |
| | | | | | | | | | | POSIX allows optional features to be supported at compile time but not necessarily at run time by defining _POSIX_OPTION to 0 and requiring users to check sysconf(_SC_OPTION) > 0. The new sysoption() macro simplifies the check. sighook() and bfs_spawn() now check for conditional runtime support for the relevant POSIX options. | ||||
* | xtime: Remove xgettime() | Tavian Barnes | 2024-08-09 | 1 | -12/+7 |
| | | | | clock_gettime() is available everywhere by now. | ||||
* | prelude: s/fallthru/_fallthrough/ for consistency with other attributes | Tavian Barnes | 2024-08-09 | 1 | -2/+2 |
| | |||||
* | prelude: Simplify attributes | Tavian Barnes | 2024-07-28 | 1 | -1/+1 |
| | |||||
* | Merge branch 'revert-eloop' | Tavian Barnes | 2024-06-03 | 1 | -0/+7 |
|\ | |||||
| * | Make ELOOP an error again, except for -xtype.3.3.1 | Tavian Barnes | 2024-06-03 | 1 | -0/+7 |
| | | | | | | | | | | | | | | | | | | | | POSIX requires an error if (for example) -L encounters a symlink loop. The GNU find change was restricted to -xtype, so add a manual ELOOP test to eval_xtype() for compatibility. This reverts commit 470589cbd9ca3e73d8c01ac3a96cbc065179dcc5. Link: https://savannah.gnu.org/bugs/?19605 | ||||
* | | eval: Fix -D stat printed return value | Tavian Barnes | 2024-06-03 | 1 | -1/+1 |
|/ | |||||
* | eval: Don't turn on NOKERNINFO | Tavian Barnes | 2024-05-27 | 1 | -95/+8 |
| | | | | | Other utilities on FreeBSD like dd, sleep, etc. that respond to SIGINFO still print the kernel info line too. | ||||
* | eval: Use a flag instead of a counter for SIGINFO | Tavian Barnes | 2024-05-27 | 1 | -16/+13 |
| | |||||
* | eval: Print more information on filesystem loops | Tavian Barnes | 2024-05-27 | 1 | -3/+13 |
| | |||||
* | eval: Show/hide the bar on SIGINFO/SIGUSR1 | Tavian Barnes | 2024-05-25 | 1 | -1/+125 |
| | |||||
* | opt: Don't raise RLIMIT_NOFILE if it would prevent using posix_spawn() | Tavian Barnes | 2024-05-23 | 1 | -0/+3 |
| | | | | | | | | | | If we raise RLIMIT_NOFILE, we have to lower it before calling exec() for compatibility with select(). If posix_spawn() doesn't support that, we fall back to fork(), which is quite a bit slower. Therefore, if we're going to exec() on most files, it's better to keep RLIMIT_NOFILE the same to avoid the fork() cost, even though it makes bftw() somewhat slower. | ||||
* | expr: New for_expr macro | Tavian Barnes | 2024-05-23 | 1 | -5/+5 |
| | |||||
* | Stop using %m | Tavian Barnes | 2024-05-20 | 1 | -11/+9 |
| | |||||
* | Cast AT_FDCWD to int for comparisons | Tavian Barnes | 2024-05-17 | 1 | -1/+1 |
| | | | | | Some platforms define AT_FDCWD to a constant like 0xFFFAFDCD that gets typed as an unsigned int. | ||||
* | eval: Plug memory leak if bfs_opendir() fails | Tavian Barnes | 2024-04-24 | 1 | -18/+22 |
| | |||||
* | Rename config.h to prelude.h | Tavian Barnes | 2024-04-19 | 1 | -1/+1 |
| | |||||
* | Implement -context | Tavian Barnes | 2024-04-10 | 1 | -14/+29 |
| | | | | Closes: https://github.com/tavianator/bfs/issues/27 | ||||
* | Implement -limit N | Tavian Barnes | 2024-03-20 | 1 | -0/+13 |
| | | | | Closes: https://github.com/tavianator/bfs/issues/133 | ||||
* | Re-run include-what-you-use | Tavian Barnes | 2024-03-11 | 1 | -2/+2 |
| | |||||
* | xtime: Call tzset() from main() instead of lazily | Tavian Barnes | 2024-03-07 | 1 | -1/+1 |
| | | | | | | | | | | | | | POSIX specifies[1] that If a thread accesses tzname, daylight, or timezone directly while another thread is in a call to tzset(), or to any function that is required or allowed to set timezone information as if by calling tzset(), the behavior is undefined. So calling it lazily from arbitrary threads is risky. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/tzset.html | ||||
* | eval: Tweak status bar punctuation | Tavian Barnes | 2024-03-06 | 1 | -1/+1 |
| | |||||
* | eval: Add thousands separators to -status | Tavian Barnes | 2024-02-12 | 1 | -2/+2 |
| | |||||
* | sanity: Don't use self-init for uninit() | Tavian Barnes | 2024-02-12 | 1 | -1/+1 |
| | | | | | | | | | | | Self-initialization like bool ret = ret; is a GCC trick to suppress uninitialized variable warnings, but it's not actually well-defined, and will trip a recent enough MemorySanitizer: src/eval.c:1088:13: runtime error: load of value 128, which is not a valid value for type 'bool' | ||||
* | ctx: Fill in ctx->threads earlier | Tavian Barnes | 2024-02-06 | 1 | -19/+2 |
| | |||||
* | bftw: stat() files asynchronously | Tavian Barnes | 2024-02-06 | 1 | -10/+10 |
| | |||||
* | eval: Squelch an uninitialized variable warning | Tavian Barnes | 2024-01-22 | 1 | -1/+3 |
| | |||||
* | bfstd: New {error,errno}_is_like() functions | Tavian Barnes | 2024-01-13 | 1 | -1/+1 |
| | | | | | | | We used to have is_nonexistence_error() to consistently treat ENOENT and ENOTDIR the same. Recently, we started considering EFAULT the same as ENAMETOOLONG on DragonFly BSD to work around a kernel bug. Unify both of these behind a more generic interface. | ||||
* | eval: Check for xbasename() allocation failure | Tavian Barnes | 2024-01-07 | 1 | -1/+8 |
| | |||||
* | expr: Make expressions variadic | Tavian Barnes | 2024-01-07 | 1 | -31/+24 |
| | | | | | | | | | Rather than only unary/binary expressions, we now support an arbitrary number of children. The optimizer has been re-written almost completely and now supports optimal reordering of longer expression chains, rather than just arm-swapping. Fixes #85. | ||||
* | config: s/attr_format/attr_printf/ | Tavian Barnes | 2023-12-18 | 1 | -1/+1 |
| | |||||
* | config: New variadic attr(...) macro | Tavian Barnes | 2023-12-18 | 1 | -1/+1 |
| | |||||
* | bfstd: New xwcwidth() wrapper | Tavian Barnes | 2023-12-16 | 1 | -1/+1 |
| | |||||
* | ctx: Switch paths from darray to RESERVE() | Tavian Barnes | 2023-11-23 | 1 | -2/+1 |
| | |||||
* | eval: Remove Cosmopolitan-specific workaround | Tavian Barnes | 2023-11-13 | 1 | -3/+1 |
| | | | | | | | Turns out this is not specific to Cosmopolitan, it's a recent Linux behaviour change. Link: https://lore.kernel.org/linux-fsdevel/20231113180616.2831430-1-tavianator@tavianator.com/ | ||||
* | Initial support for Cosmopolitan Libc | Tavian Barnes | 2023-11-10 | 1 | -1/+3 |
| | |||||
* | config: s/BFS_FORMATTER/attr_format/ | Tavian Barnes | 2023-11-09 | 1 | -1/+1 |
| | |||||
* | ctx: Store the original and current RLIMIT_NOFILE | Tavian Barnes | 2023-11-06 | 1 | -14/+19 |
| | |||||
* | bfstd: Expose rlim_cmp() | Tavian Barnes | 2023-11-06 | 1 | -33/+0 |
| | |||||
* | Use {0} to initialize mbstate_t rather than memset() | Tavian Barnes | 2023-10-27 | 1 | -2/+1 |
| | |||||
* | eval: TTY-escape paths in the status bar | Tavian Barnes | 2023-10-27 | 1 | -4/+8 |
| |