summaryrefslogtreecommitdiffstats
path: root/util.h
Commit message (Collapse)AuthorAgeFilesLines
* util: New BFS_FLEX_SIZEOF() macro for more precise flexible array allocationsTavian Barnes2020-10-131-0/+23
| | | | | See http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_282.htm for all the fun behind this.
* util: Move redirect() and isopen() to main.cTavian Barnes2020-10-011-20/+0
|
* util: Don't rely on bftwTavian Barnes2020-09-301-1/+1
| | | | And rename format_mode() to xstrmode() while I'm at it.
* time: Split out time-related functions from utilTavian Barnes2020-02-131-47/+0
|
* parse: Handle 1969-12-31T23:59:59ZTavian Barnes2020-02-131-3/+17
| | | | | mktime() returns -1 on error, but also for one second before the epoch. Compare the input against localtime(-1) to distinguish those cases.
* Implement explicit reference times (-newerXt)Tavian Barnes2020-02-111-0/+21
|
* Release 1.5.21.5.2Tavian Barnes2020-01-091-1/+1
|
* fsade: Support checking for xattrs (extattrs) on FreeBSDTavian Barnes2020-01-081-0/+4
|
* Implement -xattr predicateTavian Barnes2019-05-241-0/+4
|
* Add some documentation commentsTavian Barnes2019-02-091-0/+4
|
* util: Remove some unused macrosTavian Barnes2019-02-011-12/+0
|
* util: Allow configuration macros to be specified with -DTavian Barnes2019-02-011-6/+23
| | | | In case we need to override them at build time.
* stat: Work around msan not knowing about statx()Tavian Barnes2019-01-311-1/+7
|
* posix1e: Don't #include <sys/capability.h> on FreeBSDTavian Barnes2019-01-031-7/+0
| | | | | | | | The file is there by default, but deprecated and not a POSIX.1E implementation. While I'm at it, move the logic to posix1e.h so other files aren't burdened with an extra include. Fixes the other half of #40.
* posix1e: Split out ACL and capability handling from utilTavian Barnes2019-01-021-12/+0
|
* color: Check format strings + args for cfprintf()Tavian Barnes2019-01-021-0/+9
| | | | | | %{cc} is now ${cc} to avoid warnings about an unrecognized format specifier, and %P and %L are now %pP and %pL to make them look more like standard format strings.
* Implement -acl testTavian Barnes2018-12-171-0/+6
|
* color: Support coloring files with capabilitiesTavian Barnes2018-12-171-4/+19
|
* bftw: Move bftw_typeflag conversion out of utilTavian Barnes2018-12-171-10/+0
| | | | Turns out incomplete enum types are a GNU C extension.
* Check for <sys/param.h> before including itTavian Barnes2018-11-081-3/+7
| | | | Fixes #38.
* util: Wrap __has_include()Tavian Barnes2018-11-011-0/+6
|
* Print device major/minor numbers for -lsTavian Barnes2018-11-011-0/+15
|
* Update copyright datesTavian Barnes2018-09-241-1/+1
|
* stat: New wrapper around the stat() familyTavian Barnes2018-01-081-28/+2
| | | | | This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times.
* exec: Recover from E2BIGTavian Barnes2017-11-121-0/+9
|
* Add support for file birth/creation times on platforms that have itTavian Barnes2017-11-051-0/+5
| | | | Fixes #19
* util: Wrap faccessat() to fix some portability issuesTavian Barnes2017-09-201-0/+5
|
* util: Factor out checks for nonexistent paths/broken linksTavian Barnes2017-09-061-0/+5
|
* Avoid multiple extra stat()s of broken symlinks for -xtypeTavian Barnes2017-08-221-2/+2
|
* Unify broken symlink handlingTavian Barnes2017-08-121-0/+15
| | | | | | | | | 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.
* util: Define O_DIRECTORY to 0 if it's not already definedTavian Barnes2017-07-291-0/+4
|
* Re-license under the BSD Zero Clause LicenseTavian Barnes2017-07-271-10/+15
|
* Handle yes/no prompts correctly according to the localeTavian Barnes2017-07-151-0/+7
|
* Release 1.01.0Tavian Barnes2017-04-241-1/+1
|
* util.h: Don't use a forward reference to enum bftw_typeflagTavian Barnes2017-04-131-0/+1
| | | | Apparently that's not allowed in standard C.
* Move bftw_typeflag converters to util.cTavian Barnes2017-04-081-0/+10
|
* Color link targets for -lsTavian Barnes2017-03-161-0/+9
| | | | Fixes #18.
* Implement -ls and -flsTavian Barnes2017-03-111-0/+22
|
* Don't trust st_size when reading symlinksTavian Barnes2017-01-311-0/+13
| | | | | Linux /proc, for example, reports a st_size of 0 for everything. It's nice to be able to use -lname on them anyway.
* Implement -regex, -iregex, and -regextype/-ETavian Barnes2016-12-181-4/+12
|
* Fix the build on OpenIndianaTavian Barnes2016-12-161-0/+10
|
* Move portability code into util.hTavian Barnes2016-12-041-0/+30
|
* Check for readdir() errors everywhere.Tavian Barnes2016-11-141-0/+6
|
* Redirect stdin from /dev/null for -ok and -okdir.Tavian Barnes2016-11-131-0/+37