summaryrefslogtreecommitdiffstats
path: root/util.h
Commit message (Collapse)AuthorAgeFilesLines
* regex: Wrap the POSIX API in a facadeTavian Barnes2022-02-211-1/+0
|
* regex: Add support for emacs and grep typesTavian Barnes2022-02-041-11/+0
|
* Standardize WITH_* make variables for configuring dependenciesTavian Barnes2022-01-291-1/+2
|
* Simplifyingdata-man2022-01-241-7/+1
|
* Using Oniguruma library (optionally)data-man2022-01-241-1/+6
|
* util: New close() wrappers to check for EBADF and preserve errnoTavian Barnes2022-01-181-1/+19
|
* util: New xfopen() utilityTavian Barnes2021-09-211-0/+10
| | | | | 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.
* util: Wrap getdelim() instead of open coding itTavian Barnes2021-09-151-0/+14
|
* util: New xconfstr() wrapperTavian Barnes2021-06-131-0/+10
|
* util: Rename fallthrough to BFS_FALLTHROUGHTavian Barnes2021-06-091-3/+3
| | | | This avoids shadowing the actually standard name fallthrough.
* util: Avoid warnings on older compilers with fallthroughTavian Barnes2021-06-091-3/+9
|
* Enable -Wimplicit-fallthroughTavian Barnes2021-06-021-0/+14
|
* util: Tweak the safe read/write functionsTavian Barnes2021-04-151-14/+13
|
* util: add safe_read_all() and safe_write_all() functions.Markus F.X.J. Oberhumer2021-04-151-0/+10
|
* util: introduce safe versions of read & write that handle interruptedMarkus F.X.J. Oberhumer2021-04-151-0/+10
| | | | systems calls.
* Support -flags on all the BSDsTavian Barnes2021-03-061-0/+19
|
* Update copyright datesTavian Barnes2021-02-051-1/+1
|
* dir: New DIR* facadeTavian Barnes2021-01-281-6/+0
|
* 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
|