When using an external editor (i.e. "Use internal edit" in the Configure
Options is unchecked) the environment variable EDITOR is used. However,
if $EDITOR contains a command line argument after the executable name,
these arguments are not processed properly, and the editor might not be
started at all.
How to reproduce: (Precondition: vi is available on the system)
1) On the command line, execute: export EDITOR="vi +" && mc
(the + argument should let vi start at the document's end instead of the
beginning).
2) Go to the Options menu -> Configuration -> uncheck "Use internal
edit".
3) Move the cursor to a file that is larger than a single screen (e.g.
ABOUT-NLS in mc's source directory).
4) Press F4 to start the external editor.
Result: Nothing visible happens
Expected result: vi is opened showing the end of the file ABOUT-NLS
The bug: my_system_make_arg_array() doesn't perform full-feature
parsing of the comman line.
* (str_tokenize): mew function based on history_tokenize_internal()
from GNU readline-8.2.
* (str_tokenize_word): mew function based on history_tokenize_word()
from GNU readline-8.2.
* (my_system_make_arg_array): reimplement using str_tokenize().
* (my_systemv_flags): use modified my_system_make_arg_array().
* (fork_child_tokens): new test for string tokenization.
* (fork_child_tokens2): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Found via `codespell -S
po,doc,./misc/syntax,./src/vfs/extfs/helpers/README.it -L
parm,rouge,sav,ect,vie,te,dum,clen,wee,dynamc,childs,ths,fo,nin,unx,nd,iif,iterm,ser,makrs,wil`
Co-authored-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Kian-Meng Ang <kianmeng@cpan.org>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
filevercmp: don't treat entire filename as suffix.
Sync with gnulib 1ba2b66ea45f9bc43cdc0f6f93efa59157d2b2ba.
(file_prefixlen): When stripping (\.[A-Za-z~][A-Za-z0-9~]*)*$ suffixes,
do not strip the entire file name.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Sync with gnulib 9f48fb992a3d7e96610c4ce8be969cff2d61a01b.
Problems reported by Michael Debertol in <https://bugs.gnu.org/49239>.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...to avoid conflict with global names.
On HP-UX, inttypes.h includes ctype.h through other dependencies, ctype.h
defines macros for various functions and these macros clash with entries
of "struct str_class".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Use single function to calculate of text lines and columns
because algorithm is the same for all encodings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Suppose we have 3 files with version in their names:
* file-2.1.tgz
* file-2.2.tgz
* file-2.10.tgz
It is impossible to see them in natural order using standard facilities,
they will be sorted in alphabet order:
* file-2.1.tgz
* file-2.10.tgz
* file-2.2.tgz
There was some attempts to fix this. I've picked up the patch by Roland Illig <roland illig gmx de>
(http://mail.gnome.org/archives/mc-devel/2004-July/msg00016.html) and adopted it for today's git snapshot.
It adds "version" option to the sort menu, which uses copy of strverscmp function from glibc.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>