summaryrefslogtreecommitdiffstats
path: root/src/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* eval: Tweak status bar punctuationTavian Barnes2024-03-061-1/+1
|
* eval: Add thousands separators to -statusTavian Barnes2024-02-121-2/+2
|
* sanity: Don't use self-init for uninit()Tavian Barnes2024-02-121-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 earlierTavian Barnes2024-02-061-19/+2
|
* bftw: stat() files asynchronouslyTavian Barnes2024-02-061-10/+10
|
* eval: Squelch an uninitialized variable warningTavian Barnes2024-01-221-1/+3
|
* bfstd: New {error,errno}_is_like() functionsTavian Barnes2024-01-131-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 failureTavian Barnes2024-01-071-1/+8
|
* expr: Make expressions variadicTavian Barnes2024-01-071-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 Barnes2023-12-181-1/+1
|
* config: New variadic attr(...) macroTavian Barnes2023-12-181-1/+1
|
* bfstd: New xwcwidth() wrapperTavian Barnes2023-12-161-1/+1
|
* ctx: Switch paths from darray to RESERVE()Tavian Barnes2023-11-231-2/+1
|
* eval: Remove Cosmopolitan-specific workaroundTavian Barnes2023-11-131-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 LibcTavian Barnes2023-11-101-1/+3
|
* config: s/BFS_FORMATTER/attr_format/Tavian Barnes2023-11-091-1/+1
|
* ctx: Store the original and current RLIMIT_NOFILETavian Barnes2023-11-061-14/+19
|
* bfstd: Expose rlim_cmp()Tavian Barnes2023-11-061-33/+0
|
* Use {0} to initialize mbstate_t rather than memset()Tavian Barnes2023-10-271-2/+1
|
* eval: TTY-escape paths in the status barTavian Barnes2023-10-271-4/+8
|
* bfstd: Expose xmbrtowc() and use it in eval_status()Tavian Barnes2023-10-271-24/+15
|
* bftw: New flag to control whiteout visibilityTavian Barnes2023-10-171-0/+1
|
* dir: Add a flags parameter to bfs_opendir()Tavian Barnes2023-10-171-3/+3
|
* bfstd: Add a thread-safe wrapper for strerror()Tavian Barnes2023-10-051-1/+1
|
* Formatting fixesTavian Barnes2023-09-271-8/+7
|
* dstring: New dchar typedef for dynamic stringsTavian Barnes2023-09-261-2/+2
|
* eval: Don't oversubscribe the CPU by defaultTavian Barnes2023-07-111-3/+3
|
* Use strcmp() instead of fnmatch() if possibleTavian Barnes2023-07-061-4/+17
|
* dir: Arena-allocate directoriesTavian Barnes2023-06-201-12/+22
|
* eval: Pre-allocate the highest fdTavian Barnes2023-06-131-0/+18
| | | | | | This avoids the need to grow the fd table during the search, significantly reducing kernel contention when opening directories in parallel.
* bftw: Use an I/O queue to open directoriesTavian Barnes2023-06-131-0/+22
| | | | Parallelism is controlled by the new -j flag.
* eval: For -ls, track the longest user/group names to keep alignmentTavian Barnes2023-06-081-20/+26
|
* eval: Print non-path -ls text in the "normal" color, like ls -lTavian Barnes2023-06-081-1/+6
|
* Switch from assert() to bfs_assert()/bfs_verify()Tavian Barnes2023-05-181-6/+5
|
* Use bfs_bug("...") over assert(!"...")Tavian Barnes2023-05-181-3/+3
|
* config: s/BFS_FALLTHROUGH/fallthru/Tavian Barnes2023-05-101-2/+2
|
* style: Don't use tabs to indent preprocessor directivesTavian Barnes2023-05-031-11/+11
|
* Replace license boilerplate with SPDX tagsTavian Barnes2023-01-251-15/+2
| | | | | | | And while I'm at it, remove years from copyright declarations. Link: https://spdx.dev/about/ Link: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/
* mtab: Keep parent dirs open during fill_types()Tavian Barnes2023-01-251-0/+5
|
* bfstd: New wrappers for dirname()/basename()Tavian Barnes2023-01-191-9/+1
|
* Turn on more aggressive format string warningsTavian Barnes2022-12-091-3/+5
|
* expr: Rename bfs_expr_has_children() to _is_parent()Tavian Barnes2022-12-051-2/+2
|
* expr: Don't use reftime for -lsTavian Barnes2022-11-171-1/+1
| | | | | reftime is part of a different union than the print actions are supposed to use.
* Try to report I/O errors earlier and only onceTavian Barnes2022-11-101-5/+19
|
* pwcache: Fill the user/group caches lazilyTavian Barnes2022-11-091-15/+10
| | | | | | | Iterating all the users/groups can be expensive, especially with NSS. Android has so many that it doesn't even return them all from get{pw,gr}ent() for performance reasons, leading to incorrect behaviour of -user/-group/etc.
* eval: Add missing flag to -D statTavian Barnes2022-11-081-0/+1
|
* bfstd: Rename from util and reorganize itTavian Barnes2022-11-061-3/+3
|
* config: Split out some of util.h into a new headerTavian Barnes2022-11-061-0/+1
|
* parse: They're called "primary expressions," not "literals"Tavian Barnes2022-07-051-1/+1
|
* Source / Include Folder (#88)トトも2022-04-161-0/+1644
Moved Source Files Into `src` Folder