If char is unsigned (as on ARM) subtracting a larger number would
result in a wrap around, not a negative value.
src/nnn.c: In function 'readpipe':
src/nnn.c:4325:11: warning: comparison is always false due to limited
range of data type [-Wtype-limits]
if (ctx < 0 || ctx > CTX_MAX)
^
Fixes the build on NetBSD 9 on arm64.
GCC expands alloca() to __builtin_alloca() but only in nonstandard mode,
e.g. when -std=... is not supplied. In standards mode (with -std=...)
alloca() is left undefined by GCC. The C library may define it but it
also may not, as on NetBSD on arm64:
$ uname -srp
NetBSD 9.0 aarch64
$ cat alloca.c
#include <stdlib.h>
int main() { char *p = alloca(10); }
$ gcc alloca.c
$ gcc -std=c99 alloca.c
alloca.c:(.text+0xc): warning: Warning: reference to the libc
supplied alloca(3); this most likely will not work. Please use the
compiler provided version of alloca(3), by supplying the
appropriate compiler flags (e.g. not -std=c89).
ld: alloca.c:(.text+0xc): undefined reference to `alloca'
The fix is to either not use standards mode (undesirable) or to
explicitly use the builtin, which is what this patch does.
This is also sufficient for Solarius/Illumos so that check and include
are removed.
Selection is cleared after successful:
- file removal
- batch rename
- link creation
However, selection is not cleared after:
- archive creation: user may want to delete the files after archiving
Both Pistol and `scope.sh` are run `file --mimetype` or an equivalent, internally.
Thus, for speed, it's better to run them before almost anything else.