(etags_set_definition_hash): return GPtraArray.
(editcmd_dialog_select_definition_show): take GPtraArray.
(edit_get_match_keyword_cmd): sync with modified functions.
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>
After 8857423e4e zip archives opened with
an error:
file -L -z archive.zip: Bad system call
This caused by using /usr/bin/file with -z option, because seccomp (a
security sandbox) doesn't allow it..
Solution: use -S option together with -z one.
The file command accepts the -S option since 5.33.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Add "Follow symlinks" checkbox. Default state is off (following
current hardcoded behavior).
Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(edit_collect_completion_from_one_buffer): new function. Main loop of
completion searching is here now.
(edit_collect_completions): use edit_collect_completion_from_one_buffer().
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>
Initial step: refactoring.
(edit_collect_completions_get_current_word): return GString. Get rid of
allocate and free an empty string, create string if needed instead.
Reduce variable scope.
(edit_collect_completions): related changes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(execute_menu_command): prepare terminal to run system() and restore
after.
(user_menu_cmd): fix comment.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(do_update_prompt): fix NULL dereference. In case of running mc
as standalone editor/viewer/diffviewer, the subshell_prompt variable
is NULL.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
If function failed, fail early.
Found by Coverity.
Coverity id #32538.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Statement cannot be true at this state.
Found by Coverity.
Coverity id #32572.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...because the pointer can't be NULL.
Found by Coverity.
Coverity id #313667.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...because the pointer can't be NULL.
Found by Coverity.
Coverity id #110819.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
If c_filesizes[0] is greater than 0x7fff implicit sign extension will happen on bit shift.
Found by Coverity.
Coverity id #32611.
Coverity id #32612.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Handle open failure properly.
Found by Coverity.
Coverity id #32608.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Found by Coverity.
Coverity id #32627.
Coverity id #313665.
Covertiy id #313669.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
fallthrough annotation does not directly precede switch label.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Sync with gnulib dd1fc46be12d671c1a9d9dc5a6fa8c766e99aa2f.
Sync "remote" file systems from stat.c in coreutils.
Note we only consider file systems that do not use host:resource
mount source. I.e. those that don't generally use a colon when
mounting, as that case is already considered. Searching for
"<fstype> /etc/fstab" was informative for identifying these.
The full list of "remote" file systems in coreutils is currently:
acfs afs ceph cifs coda fhgfs fuseblk fusectl
gfs gfs2 gpfs ibrix k-afs lustre novell nfs nfsd
ocfs2 panfs prl_fs smb smb2 snfs vboxsf vmhgfs vxfs
Note also we do not include virtual machine file systems,
as even though they're remote to the current kernel,
they are generally not distributed to separate hosts.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>