Bodies of mc_search__tolower_case_str() and mc_search__toupper_case_str()
are almost same excluding the case conversion function call:
mc_search__tolower_case_str() calls str_tolower() and
mc_search__toupper_case_str() calls str_toupper.
Move this common body to separate function and call case conversion
function via pointer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(mc_search_t): use GString to keep original search string. Join search string
and charset to structure.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Before the change the description said:
Handle all compiler warnings as errors
Looks like a leftover from --enable-werror copy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
If file name is too long, message window is wider than screen.
Truncate file name to fit it in the screen.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
../../../lib/widget/input.c:573:8: error: 'event_data.ret' may be used uninitialized [-Werror=maybe-uninitialized]
573 | if (event_data.ret)
| ^
../../../lib/widget/input.c:566:35: note: 'event_data.ret' was declared here
566 | ev_clipboard_text_from_file_t event_data;
Found by gcc-11.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
In quick view panel mode, gzip is used for view zip-files.
Initial commit:
(get_compression_type): use hex values instead of octal ones.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4141_mc.ext.ini:
Update po/*.po files.
Port mc.ext to INI format.
(regex_command_for): move load of extension file to separate function.
(mc_config_has_param): use g_key_file_get_value()...
Ticket #4141: allow compound (AND) conditions in mc.ext
Ticket #2773: 'include' keyword (for command class def) have no effect
if it was defined before 'Include' keyword (for command def).
Ticket #3742: update comment in mc.ext.ini.
doc: remove mc.ext.ini format description from manual page.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (mcview_growbuf_read_until): the previous call to mcview_show_error()
invalidates sp by freeing view->ds_stdio_pipe. Reintroduce the check
that was removed in a68f2d1202 but take
sp's invalidity into account.
* (mc_pclose): add a NULL pointer check to play safe.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Most of mc uses of PERL is to embed path to the interpreter in VFS
helpers. There we can use path to perl for --host. But
`date-of-man-include.am` is the place where perl is used for --build.
On most systems both paths are expected to be /usr/bin/perl.
But on some systems paths might differ a bit. Most prominent
example is NixOS, where packages get installed into unique prefixes:
$ file /nix/store/...-perl-5.36.0/bin/perl \
/nix/store/...-perl-powerpc64-unknown-linux-gnu-5.36.0/bin/perl
/nix/store/...-perl-5.36.0/bin/perl:
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), ...
/nix/store/...-perl-powerpc64-unknown-linux-gnu-5.36.0/bin/perl:
ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, ...
This allows running both binaries via qemu-user if needed for tests.
The change introduces PERL_FOR_BUILD (similar to autoconf's CC_FOR_BUILD
and friends) to allow passing both PERLs when needed.
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>