Sync with gnulib 64ddc975e72cb55d2b2d755c25603bd70312aa5e:
This patch alters xstrtoumax behavior slightly, in areas are not
likely to affect any real callers, by making xstrtoumax behave more
like the system strtol. In particular, it lets xstrtoumax support
bases other than those required by POSIX, if the underlying
implementation does; this removes the need for an g_assert().
* lib/strutil/strtol.c: Do not include stdio.h.
(xstrtoumax): Use same parameter names as POSIX, to make it
easier for outsiders to follow. Do not require the base to be 0-36,
as the underlying implementation is allowed to support other bases.
Sync with gnulib 16b33e6649425fcdce095f262da98b539d2f7448.
* (xstrtoumax): Don't update *endptr if strtol doesn't.
Also, if the underlying strtol gives an unusual error number and
sets *endpnr = nptr, assume that's an error not a missing number.
Sync with gnulib bd1e981434c98751b1106a1744e77a27317b52b3
* (xstrtoumax): Stop worrying about hypothetical implementations that
are causing more confusion than the code is worth. Instead, go back
more to old way of doing things. None of this matters for practical
applications.
Add commemt.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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>