aboutsummaryrefslogtreecommitdiffstats
path: root/autoreload.c
AgeCommit message (Collapse)Author
2023-01-28update copyright yearNRK
2022-07-30autoreload: simplify and cleanup (#342)NRK
the current code is quite hacky and complex as it mixes multiple pointers. all of this complexity is unnecessary. drop it by introducing an explicit scratch buffer instead of implicitly abusing `arl->filename` as one. this also reduces some unnecessary allocation overhead. additionally, the argument to arl_setup must be the result of `realpath(3)` (as commented in `nsxiv.h`). instead of commenting it, assert it. and lastly, rename `arl_setup` to `arl_add` since it's not doing any "setup" but rather *adding* a file to watch. Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/342 Reviewed-by: explosion-mental <explosion-mental@noreply.codeberg.org>
2022-06-28sort and group includesNRK
* includes are sorted alphabetically * their grouping and layout is the following: - nsxiv.h will be the first include - followed by any internal headers (e.g "commands.h" "config.h") - followed by system headers (<stdlib.h> etc) - followed by third party headers (X.h libwebp etc) * also add `llvm-include-order` check to clang-tidy so that it can catch unsorted includes during CI.
2022-06-25[ci]: slience some clang-tidy warningsNRK
the warnings on r_readdir(), img_load_gif() and strcpy seems to be false positives. the warning about fmt being unused is valid, but not worth fixing with additional #ifdef guards. use `assert` to silence the false positive cases when possible, otherwise use a NOLINT comment with an explanation.
2022-04-27merge autoreload_{inotify,nop}.c into autoreload.c (#263)explosion-mental