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>
* 4397_winput_api_fixes:
Clarify checks of input line content returned from quick dialog.
(input_get_ctext): mew API.
(input_destroy): remove check if WInput object is NULL. This object must exist.
WInput: make one-line APIs inline.
(input_is_empty): remove checks. WInput object must exist.
Ticket #4397: sort in editor without arguments stopped working.
Use it instead of direct access to WInput's buffer.
(handle_cmdline_enter): additional minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (input_get_text): never return NULL. If buffer is empty, return an
empty allocated string.
* (input_push_history): use new input_get_text.
* (find_parameters): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4391_edit_delete_macro:
(edit_delete_macro): do not resort macros after deleting one
Ticket #4391: fix infinite loop when deleting an mceditor macro.
When files are selected keeping the right mouse button pressed,
some files are not selected.
* Add new macros for mouse pointer location relative to file list.
* (mark_if_marking): select/unselect all files between previous
selected file and new one.
* (panel_mouse_is_on_item): return clarified value of mouse pointer location.
* (panel_mouse_callback): modify mouse drag event handling in accordance with
the mouse pointer location relatively to the file list.
Also fixes ticket #4119: "Cannot scroll panel listing upwards using mouse".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Menu according for "Sort order" item was changed in
d19b247c6d in order to fix shotrcut
conflict. Restore it back according to user requests.
óhange accelerator for "SFTP link" from S to N.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* configure.ac: test if "file" utility has -b option.
* (regex_check_type): don't compare file names if "file -b" is used.
Reduce variable scope. Rename variable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4357_cleanup: (39 commits)
Update po/*.po files.
src/filemanager/dir.c: minor sort optimization.
lib/util.h: fix typo.
(edit_sort_cmd): clarify hint for Sort command.
(query_default_callback): clarify widget position.
(mc_config_get_string): use mc_config_get_string_raw()
(ftpfs_setup_active): clarify handling of getnameinfo() errors.
(ftpfs_initconn): clarify errno setup.
ftpfs.c: variable ftpfs_errno is assigned but never used.
(ftpfs_dir_load): fix building of remote path.
(vfs_s_subclass::dir_load): constify argument.
Minor refactoring of path canonicalization.
(mc_chdir): clarufy setup of errno.
(vfs_path_get_by_index): set errno, update description.
Fix ENOTSUP usage.
mceditor: minor refactoring of file load.
(edit_init): change argument for coordinates.
(edit_add_window): change argument for coordinates.
(widget_adjust_position): change argument for coordinates.
(group_init): change argument for coordinates.
...
Get rid of sort condition double check.
Condition
ad == bd || panels_options.mix_all_files
was checked twice: first in sort_xxx(), then in sort_name() called in
sort_xxx().
Now this condition is checked in sort_xxx() only.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
If dialog should be placed too high (in the upper half of the screen
closer to the screen top), show it centered.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Handle errors of bind(), getsockname(), and listen() calls.
Return if one of these functions fails and setup errno to indicate the
cause of the error.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Call of mc_build_filename(remote_path, ".") is pointless
because the path canonicalization is performed and trailing
"/." is removed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Remove E_NOTSUPP define. Use ENOTSUP directly where required.
(vfs_clone_file): use ENOTSUP instead of EOPNOTSUPP.
(mc_open): likewize. Fix sign.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(edit_load_file_from_filename): make public, use it as main function to
load file and create editor window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>