This pretty much reworks the entire icon system. Some notable changes:
* The extensions are put into a statically generated hash-table instead
of a sorted array. We use Robin-Hood insertion to reduce the max probe
length. Currently we need to probe only 2 slots for `O_EMOJI` and only
3 for `O_NERD`/`O_ICONS`.
* I've opted not to use a perfect-hash since the perfect hashes
generated by [`gperf`](https://www.gnu.org/software/gperf) used some
huge lookup table. The hash function also wasn't as minimal as I'd
like.
* Colors are now using X-Macros. This should speed up startup since we
don't have to search `icons_ext` linearly to find unique colors.
* The hash-table generator outputs a more space optimized `struct
icon_pair` using a char array instead of char pointer. This brings
down the binary size from `145KiB` when using `O_NERD` down to
`137KiB`.
* Some unnecessary duplication and indirection has been reduced by using
the `ICON_STR()` macro.
* Branched v4.2
Added workaround for Mac OS X < 10.12.0
(Only tested on 10.11.6, lower versions may need more workaround)
* Added *.dSYM to .gitignore
* Added comments for the macosx detection in Makefile
* Fixed indentation, formatting and missing newline at eof
* Moved includes inside include guard
Co-authored-by: elder-n00b <elder-n00b@yandex.com>
* Add persistsel
* Fix Makefile spacing
* Update Haiku Makefile
* Do a double pass on inversion
* Split single and double pass for easier testing
Removed lastappendpos
Eliminate suffix matches
* Check if dir is in selection before searching for files
Fix double pass
* Switch to mainline
Optimize memory moving
Handle large selection in invertsel()
Going forward with 2pass
* Update Makefiles
* Fix style
* Move forward declarations
* Remove edit selection in inversion
Replace buf with g_buf to fix CI
Fix CI
* Style changes
* Comment the code
* Style fixes
* Fix infinite loop
* Fix crash on empty invert
* Fix off-by-one-in-two-places
Off-by-twice?
* Adopt changes from master
* Only check directory if entry in it is selected
* Better organization
* Wrong variable
* Tiny optimizations
* Style fixes and updated man page
* Update man page
* Remember where we found directory path in selection
Add in progress message on invert
Implements pthreads based du using FTS. Currently 4 threads are used.
NFTW is dropped as there is no way to pass any custom values to fn().
FTS does not require any per entry function callback.
The performance numbers are best with FTS:
./nnn-fts -T d / 5.29s user 0.94s system 116% cpu 5.335 total
1/21 du:102.402G free:8.476G files:397644 101132550144B
./nnn-ftw -T d / 5.52s user 0.94s system 116% cpu 5.534 total
1/21 du:102.400G free:8.474G files:397653 101133148160B
./nnn-4.0 -T d / 0.20s user 2.27s system 24% cpu 10.241 total
1/21 du:102.400G free:8.475G files:397654 101133299712B
* Add support for Alexey Tourbin's QSORT code
See https://github.com/svpv/qsort
* Add benchmark scripts and compilation mode
Compile with `make O_BENCHMARK=1`, and run benchmarks with e.g.:
./misc/test/benchmark.sh ./nnn '/' '/usr/bin' '/usr/lib' > benchdata
You can then plot basic violin graphs with:
./misc/test/plot-bench.py benchdata
* Update style, doc, haiku support, fix lint
* Add icons
* Fix build break
* Fix icon position in detailed mode
* Various fixes
* Provision for icon specific colors
No icons with oldcolor. Small optimizatons
* Update Makefiles
Small refinement for other matching