mirror of
https://github.com/jarun/nnn.git
synced 2024-11-20 09:59:14 +00:00
3b09fd1c75
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.
6 lines
56 B
Plaintext
6 lines
56 B
Plaintext
*.o
|
|
*.dSYM
|
|
nnn
|
|
src/icons-generated.h
|
|
src/icons-hash-gen
|