]>
Sergey Matveev's repositories - nnn.git/log
Arun Prakash Jana [Thu, 21 Dec 2017 13:42:12 +0000 (19:12 +0530)]
No need to test end of numeric
Arun Prakash Jana [Thu, 21 Dec 2017 12:19:31 +0000 (17:49 +0530)]
Ignore punctuation marks in file name compare. Fix xstrcmp().
1. File name comparison method:
- initially ignore white space and punctuation characters
- run test for numeric values
- if the remaining substrings match in case-insensitive compare, compare case
- if they still match, see which one has more prefix symbols
- if they still match, run a case-sensitive compare on complete strings
2. Fixed xstrcmp() to return diff instead of 0 and -1.
Arun Prakash Jana [Wed, 20 Dec 2017 22:31:21 +0000 (04:01 +0530)]
Update README, performance numbers
Arun Prakash Jana [Wed, 20 Dec 2017 16:50:28 +0000 (22:20 +0530)]
Add file name len to entry structure
Arun Prakash Jana [Wed, 20 Dec 2017 02:48:37 +0000 (08:18 +0530)]
Offset can be derived
Arun Prakash Jana [Tue, 19 Dec 2017 19:12:11 +0000 (00:42 +0530)]
Retire redundant variable
Arun Prakash Jana [Tue, 19 Dec 2017 18:31:32 +0000 (00:01 +0530)]
A fancier func to get order of 2
Arun Prakash Jana [Tue, 19 Dec 2017 18:03:27 +0000 (23:33 +0530)]
Replace a large buf with global g_buf
Arun Prakash Jana [Tue, 19 Dec 2017 17:13:49 +0000 (22:43 +0530)]
Fix #50: use -O3, disable -ftree-loop-vectorize
Arun Prakash Jana [Tue, 19 Dec 2017 15:19:54 +0000 (20:49 +0530)]
Link to performance factors
Arun Prakash Jana [Mon, 18 Dec 2017 19:46:03 +0000 (01:16 +0530)]
Use exact number of bytes for each filename.
Results in even less memory usage. The names are appended one after another.
The offsets are reset when the location of the memory changes die to realloc().
Other changes:
1. Use a debug mode print to measure time.
2. Remove redundant prefix when printing pointers in debug mode.
Arun Prakash Jana [Sun, 17 Dec 2017 19:00:48 +0000 (00:30 +0530)]
Fix #64: change printf() to printw()
Arun Prakash Jana [Sun, 17 Dec 2017 18:30:08 +0000 (00:00 +0530)]
NAME_MAX does not include NULL char
Arun Prakash Jana [Sun, 17 Dec 2017 18:06:26 +0000 (23:36 +0530)]
Remove -O2 from debug build
Arun Prakash Jana [Sun, 17 Dec 2017 17:38:55 +0000 (23:08 +0530)]
An even faster nnn - no more copying file names!
nnn has been using `struct entry` to hold both file name as well as file info.
The design forces file names to be copied in the following cases:
- swaps during file sort (nnn uses quicksort) applied after all the matching
files are read (in no particular order; good old readdir()) into memory.
- swaps during manual filtering. nnn moves non-matching entries below so they
are not encountered twice resulting in fast filtering.
There were scopes for _massive_ improvements in this area. So I did what had to
be done - decouple the file names from `struct entry` and use a separate struct
to hold the names with the indices set when the files are added by opendir().
There was a hidden problem to this approach - nnn uses realloc() to allocate
memory for file information and realloc() may move the original pointer in mem
when it can't fit the new memory to the earlier pointer. To handle that the new
algorithm tracks the change in memory location and re-adjusts the existing dir
entry names when that happens; this too, without any copying!
Though the results seem pretty clean from a theoretical point of view and early
tests, we may uncover some bugs. However, the speed is just mind-blowing!
And the binary size remains the same too!!!
Arun Prakash Jana [Sat, 16 Dec 2017 17:30:23 +0000 (23:00 +0530)]
Add Slackware as packager
Arun Prakash Jana [Thu, 14 Dec 2017 13:42:14 +0000 (19:12 +0530)]
Fix indentation
Arun Prakash Jana [Tue, 12 Dec 2017 21:11:30 +0000 (02:41 +0530)]
Use static vars in frequently used APIs
Arun Prakash Jana [Tue, 12 Dec 2017 21:02:45 +0000 (02:32 +0530)]
Retire redundant tmp vars
Arun Prakash Jana [Tue, 12 Dec 2017 20:16:50 +0000 (01:46 +0530)]
Process keypress by probable frequency
Arun Prakash Jana [Sat, 9 Dec 2017 06:34:32 +0000 (12:04 +0530)]
Update README
Arun Prakash Jana [Mon, 4 Dec 2017 14:22:35 +0000 (19:52 +0530)]
Minor optimization, refactor
Arun Prakash Jana [Sun, 3 Dec 2017 12:06:00 +0000 (17:36 +0530)]
Fix -Os compilation warnings
Arun Prakash Jana [Sat, 2 Dec 2017 16:59:43 +0000 (22:29 +0530)]
switch to formulae.brew.sh for Homebrew link
Arun Prakash Jana [Thu, 30 Nov 2017 16:12:17 +0000 (21:42 +0530)]
Use the same o/p filename in debug mode
Arun Prakash Jana [Thu, 30 Nov 2017 16:10:52 +0000 (21:40 +0530)]
Fix #50: revert to -O2 optimization
The while loop in xstrlcpy() breaks when -O3 is used.
Arun Prakash Jana [Thu, 30 Nov 2017 12:54:06 +0000 (18:24 +0530)]
Minor changes
Vlad Glagolev [Sat, 25 Nov 2017 13:03:04 +0000 (08:03 -0500)]
Add Source Mage package
Arun Prakash Jana [Fri, 24 Nov 2017 23:18:32 +0000 (04:48 +0530)]
Update package maintainers
Arun Prakash Jana [Fri, 17 Nov 2017 15:43:40 +0000 (21:13 +0530)]
Change button color
Arun Prakash Jana [Mon, 6 Nov 2017 04:50:23 +0000 (10:20 +0530)]
Add Void Linux as a package source
Arun Prakash Jana [Sat, 4 Nov 2017 04:50:39 +0000 (10:20 +0530)]
Update readme
Arun Prakash Jana [Wed, 18 Oct 2017 01:04:32 +0000 (06:34 +0530)]
Add how-to on hot plugged devices
Arun Prakash Jana [Sun, 15 Oct 2017 23:54:56 +0000 (05:24 +0530)]
Minor maintenance
Arun Prakash Jana [Tue, 10 Oct 2017 14:59:48 +0000 (20:29 +0530)]
Add copier script
Arun Prakash Jana [Mon, 9 Oct 2017 17:25:44 +0000 (22:55 +0530)]
Ignore TAB in input prompt
Vlad Glagolev [Mon, 9 Oct 2017 02:17:02 +0000 (22:17 -0400)]
Fix a couple of warnings on BSDs (#54)
Arun Prakash Jana [Sun, 8 Oct 2017 21:26:25 +0000 (02:56 +0530)]
archive listing is done using atool
Vlad Glagolev [Sun, 8 Oct 2017 04:02:29 +0000 (00:02 -0400)]
Fix segfault when SHLVL env var is not available (#52)
Vlad Glagolev [Sun, 8 Oct 2017 03:47:32 +0000 (23:47 -0400)]
Correct name checking for NEW and RENAME (#53)
Vlad Glagolev [Sun, 8 Oct 2017 01:43:18 +0000 (21:43 -0400)]
Add ExifTool URL (#51)
Vlad Glagolev [Sun, 8 Oct 2017 01:42:12 +0000 (21:42 -0400)]
OpenBSD compatibility support (#48)
* Improve compatibility with OpenBSD
* Fix indefinite blocking
maxice8 [Thu, 5 Oct 2017 07:34:18 +0000 (04:34 -0300)]
include sys/types.h for non-glibc linux builds (#46)
Arun Prakash Jana [Thu, 5 Oct 2017 01:51:12 +0000 (07:21 +0530)]
Use sudo to install packagecore
Arun Prakash Jana [Wed, 4 Oct 2017 18:26:59 +0000 (23:56 +0530)]
Prepare for release v1.5
Arun Prakash Jana [Mon, 2 Oct 2017 17:33:45 +0000 (23:03 +0530)]
Update help
Arun Prakash Jana [Mon, 2 Oct 2017 02:43:36 +0000 (08:13 +0530)]
Fix alignment in examples
Arun Prakash Jana [Sun, 1 Oct 2017 13:29:43 +0000 (18:59 +0530)]
Remove redundant conversion
Arun Prakash Jana [Sun, 1 Oct 2017 10:43:35 +0000 (16:13 +0530)]
Disable noti subscription for the same dir
Arun Prakash Jana [Sat, 30 Sep 2017 22:58:48 +0000 (04:28 +0530)]
Change archive list shortcut to 'F'
Arun Prakash Jana [Sat, 30 Sep 2017 00:17:38 +0000 (05:47 +0530)]
Fix #44: document PAGER usage in certain screens
Arun Prakash Jana [Wed, 27 Sep 2017 17:18:46 +0000 (22:48 +0530)]
Enable O3 optimization
Arun Prakash Jana [Wed, 27 Sep 2017 16:37:04 +0000 (22:07 +0530)]
Revert "Archive handling on OS X using unar+lsar"
This reverts commit
1e859eb1370bd67cecd06b7bc8c6f885b80554bd .
We will use atool on OS X as well, it can be brewed easily.
Arun Prakash Jana [Wed, 27 Sep 2017 16:26:02 +0000 (21:56 +0530)]
Archive handling on OS X using unar+lsar
Arun Prakash Jana [Wed, 27 Sep 2017 14:49:42 +0000 (20:19 +0530)]
Support archive listing and extraction
Arun Prakash Jana [Wed, 27 Sep 2017 12:07:36 +0000 (17:37 +0530)]
Show current entry number in du mode
Arun Prakash Jana [Tue, 26 Sep 2017 20:38:58 +0000 (02:08 +0530)]
Show current entry number.
...because you need to know where you are.
Arun Prakash Jana [Sun, 24 Sep 2017 17:58:27 +0000 (23:28 +0530)]
Fix #42
Arun Prakash Jana [Sat, 23 Sep 2017 17:32:35 +0000 (23:02 +0530)]
Add badge to PPA for Ubuntu variants
Arun Prakash Jana [Sat, 23 Sep 2017 14:08:56 +0000 (19:38 +0530)]
nnn is on Ubuntu 17.10
Arun Prakash Jana [Wed, 20 Sep 2017 03:08:55 +0000 (08:38 +0530)]
Add step to set NNN_NOWAIT in Quickstart
Arun Prakash Jana [Tue, 19 Sep 2017 14:25:02 +0000 (19:55 +0530)]
Update NNN_NOWAIT changes
Paul [Tue, 19 Sep 2017 06:30:54 +0000 (02:30 -0400)]
Prevent nnn from waiting on open file process (#40)
* Prevent nnn from waiting on open file process
* Add env var flag to not wait for child process when opening file
* Set nowait flag once to skip bit-or every time we open a file
* Add documentation for NNN_NOWAIT
Arun Prakash Jana [Wed, 13 Sep 2017 13:14:27 +0000 (18:44 +0530)]
Skip entries in case fstatat() fails, do not exit
Arun Prakash Jana [Sun, 10 Sep 2017 20:50:35 +0000 (02:20 +0530)]
New video
Arun Prakash Jana [Sun, 10 Sep 2017 07:35:25 +0000 (13:05 +0530)]
Support file and dir create
Arun Prakash Jana [Fri, 8 Sep 2017 20:46:10 +0000 (02:16 +0530)]
Convert metaviewer and color to bitfields
Arun Prakash Jana [Fri, 8 Sep 2017 19:40:21 +0000 (01:10 +0530)]
Add general info in help
Arun Prakash Jana [Tue, 5 Sep 2017 12:37:45 +0000 (18:07 +0530)]
Add package information
Arun Prakash Jana [Mon, 4 Sep 2017 20:50:08 +0000 (02:20 +0530)]
Change donation button
Arun Prakash Jana [Mon, 4 Sep 2017 05:05:43 +0000 (10:35 +0530)]
Add gcc, pkg-config as build deps
Arun Prakash Jana [Mon, 4 Sep 2017 04:57:23 +0000 (10:27 +0530)]
Update README
Arun Prakash Jana [Mon, 4 Sep 2017 04:53:02 +0000 (10:23 +0530)]
Prepare for v1.4 release
Arun Prakash Jana [Sun, 3 Sep 2017 03:36:05 +0000 (09:06 +0530)]
Clean up after compilation
Arun Prakash Jana [Sat, 2 Sep 2017 14:04:02 +0000 (19:34 +0530)]
Add pin directory in cool list
Arun Prakash Jana [Sat, 2 Sep 2017 12:39:47 +0000 (18:09 +0530)]
Make test script more aggressive
Arun Prakash Jana [Sat, 2 Sep 2017 08:39:34 +0000 (14:09 +0530)]
Reorder APIs
Arun Prakash Jana [Sat, 2 Sep 2017 08:32:29 +0000 (14:02 +0530)]
Disable dircolor if no sub-directories
Fix regression from
1e5a0b8c5bc78462956d01c647293a7da594c36f .
Arun Prakash Jana [Sat, 2 Sep 2017 07:58:58 +0000 (13:28 +0530)]
Add tests for Unicode and astral codepoints
Arun Prakash Jana [Sat, 2 Sep 2017 07:17:02 +0000 (12:47 +0530)]
Note Makefile.native differences
Arun Prakash Jana [Sat, 2 Sep 2017 07:04:29 +0000 (12:34 +0530)]
Re-arrange artifacts
Arun Prakash Jana [Sat, 2 Sep 2017 06:54:40 +0000 (12:24 +0530)]
Make mktest.sh an executable
Arun Prakash Jana [Sat, 2 Sep 2017 06:53:19 +0000 (12:23 +0530)]
Add auto-completion scripts
Arun Prakash Jana [Sat, 2 Sep 2017 06:09:44 +0000 (11:39 +0530)]
Move config.h to nnn.h
Arun Prakash Jana [Sat, 2 Sep 2017 05:45:10 +0000 (11:15 +0530)]
Change name to scripts directory
Arun Prakash Jana [Fri, 1 Sep 2017 16:46:14 +0000 (22:16 +0530)]
Integrate PackageCore to generate packages
Arun Prakash Jana [Fri, 1 Sep 2017 14:27:36 +0000 (19:57 +0530)]
Use 'pin' dir instead of 'mark' dir
Arun Prakash Jana [Fri, 1 Sep 2017 14:00:25 +0000 (19:30 +0530)]
Calculate number of cols for name only once
Arun Prakash Jana [Fri, 1 Sep 2017 13:28:32 +0000 (18:58 +0530)]
Change to light mode if < 35 columns are available
Arun Prakash Jana [Fri, 1 Sep 2017 12:20:14 +0000 (17:50 +0530)]
Remove redundant variable
Arun Prakash Jana [Fri, 1 Sep 2017 05:05:04 +0000 (10:35 +0530)]
Adjusting number of cols is redundant with shortening.
Arun Prakash Jana [Fri, 1 Sep 2017 04:52:44 +0000 (10:22 +0530)]
Fix #36: uneven splitting of codepoints
Check if the number of columns needed to print name exceeds the number of cols.
If it does, split the name str at the max number of columns available for name.
Conversion to wide char ensures the split is done at a valid codepoint.
The current patch adds some optimization as well:
- No more copying to an intermediate (global) string.
- If the name is shortened, escape chars are replaced only till the terminator.
Arun Prakash Jana [Sun, 27 Aug 2017 18:10:43 +0000 (23:40 +0530)]
Undocumented keys: F2, F5
Arun Prakash Jana [Sat, 26 Aug 2017 08:04:43 +0000 (13:34 +0530)]
Fix cursor position issue with astral symbols
In case of astral symbols like Devanagari matras multiple wide-char codepoints
occupy a single position/column. Positioning the cursor wrt. the actual number
of wide-characters in a wide-char string gets "visually incorrect". The trick
is to calculate the correct number of columns needed to represent a fixed-size
wide-character string.
Relevant man pages:
1. wcswidth(3)
2. wctomb(3)
3. mblen(3)
Interesting links:
1. https://www.gnu.org/software/libc/manual/html_node/Non_002dreentrant-Character-Conversion.html
2. https://www.gnu.org/software/libc/manual/html_node/Shift-State.html
3. https://10hash.com/c-programming/uchar/
4. https://mathiasbynens.be/notes/javascript-unicode#accounting-for-astral-symbols
Example file names for test:
1. Malgudi Days - मालगुडी डेज - E05. Swami and Friends - स्वामी और उसके दोस्त (Part 5)
2. Eso eso aamar ghare eso ♫ এসো এসো আমার ঘরে এসো ♫ Swagatalakshmi Dasgupta
3. Führer
Arun Prakash Jana [Sat, 26 Aug 2017 04:07:04 +0000 (09:37 +0530)]
A shorter overwrite message (key is not echoed)
Arun Prakash Jana [Fri, 25 Aug 2017 21:12:33 +0000 (02:42 +0530)]
Revert "Handle multi-byte: 2 codepoints single column"
This reverts commit
e8cf0dc663436e2ac30f737a17d8cc91efbdd364 .
Arun Prakash Jana [Fri, 25 Aug 2017 21:05:01 +0000 (02:35 +0530)]
Handle multi-byte: 2 codepoints single column
Very frequent with Devanagari scripts ('matra's)
Arun Prakash Jana [Fri, 25 Aug 2017 16:39:03 +0000 (22:09 +0530)]
More concise help
Arun Prakash Jana [Fri, 25 Aug 2017 16:19:55 +0000 (21:49 +0530)]
Clear rename prompt with Ctrl-L
Arun Prakash Jana [Fri, 25 Aug 2017 13:52:30 +0000 (19:22 +0530)]
The '> ' as rename prompt is distracting