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>
The mc's built-in samba library which is used to access data across
smb links is taken from an old samba version.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Add two widget callbacks:
* (make_global): convert widget coordinates from local (relative to
owner) to global (screen).
* (make_local): convert widget coordinates from global (screen) to
local (relative to owner).
Such conversions are required when nested widgets and groups are added to
or removed from another groups.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
libcheck fail_unless() is deprecated since 0.10.0.
Also fix -Wformat-extra-args warnings.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
libcheck fail() is deprecated since 0.10.0.
Also fix -Wformat-extra-args warnings.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
hex_translate_to_regex.c: In function 'test_hex_translate_to_regex_fn':
hex_translate_to_regex.c:172:9: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
172 | mctest_assert_int_eq (error, data->expected_error);
| ^
hex_translate_to_regex.c:154:33: note: 'error' was declared here
154 | mc_search_hex_parse_error_t error;
| ^
Found by gcc-9.3.0
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...to free or not to free the string representation
of vfs_path_t object.
It allows to get rid of string duplication in following cases:
vfs_path_t *vpath;
char *path;
...
vpath = vfs_path_from_str (...);
path = g_strdup (vfs_path_as_str (vpath));
vfs_path_free (vpath);
Now we can write:
vfs_path_t *vpath;
char *path;
...
vpath = vfs_path_from_str (...);
path = vfs_path_free (vpath, FALSE);
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Custom .zshrc file is ~/.local/share/mc/.zshrc.
If ZDOTDIR environment variable is not set, set it to ~/.local/share/mc
if a .zshrc is found there. It is the only way to point zsh to an other
rc file than the default.
Thanks Sebastian Gniazdowski <sgniazdowski@gmail.com> for the original
patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Since automake-1.12 (test-driver script) libcheck logfile is written
parallel by automake.
Print test logging to stdout and let write to logfile by automake only.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(edit_collect_completions): return GQueue. Use GQueue inside.
Do not return an empty queue, create it if needed only.
(edit_complete_word_cmd): Use GQueue inside. Ged rid of limitation
of completions count. Rename variable.
(editcmd_dialog_completion_show): take GQueue. Rename and reorder
arguments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>