* (vfs_canon): treate "#enc:" as a regular part of path in case of
--disable-charset.
* (realpath_test): likewise.
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>
Get rig of intermediate storage of string patrs. Create result string directly.
Update comments. Update test.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
POSIX specifis '$<' only for "inference" rules (i.e. general rule
like '.c.o:'), while for "target" is undefined.
It is supported as extension for targets by some "make" implementations,
but not all.
The workarounds could be easily used.
ClosesMidnightCommander/mc#185.
Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* m4.include/ax_path_lib_pcre.m4: replace by recent version from GNU
Autoconf Archive.
* m4.include/ax_check_pcre2.m4: get grom GNU Autoconf Archive.
* m4.include/mc-check-search-type.m4: support both PCRE versions.
* */*/Makefile.am: remove @CHECK_CFLAGS@ and @PCRE_LIBS@ ads they are
added via AX_PATH_LIB_PCRE and AX_CHECK_PCRE2.
* lib/search.h, lib/search/: add support of PCRE2. Thanks broly <gagan@hotmail.com>
for the initial patch.
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>
Fix location of all user's syntax related stuff. Now it is the
~/.local/share/mc/syntax/ directory.
Don't use the system configuration directory (/etc/mc) as a storage
of syntax definitions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
In order to use multiline search, select "Regular expression" mode and
use "\n" in the input line:
For example, if file contains lines
aaa
bbb
search string should be "aaa\nbbb".
As a side effect, non-printable ASCII symbols (\r, \t, etc) in the
search string can be used too.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(filevercmp_test5): rename variables. START_TEST macro uses the variable
name _i, so GCC complains about redefining it with a different type
here.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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>
Use ck_assert_int_lt() and ck_assert_int_gt() to check integer values.
Increase minimal version of Check up to 0.9.10.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Remove mc-specific macros mctest_assert_int_eq and mctest_assert_int_ne.
Use ck_assert_int_eq() and ck_assert_int_ne() functions respectively.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>