Commit Graph

14940 Commits

Author SHA1 Message Date
Andreas Mohr
631cf4f3bf Ticket #3986: tests: do not write parallel to logfile.
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>
2021-02-07 20:58:45 +03:00
Andrew Borodin
79628270a7 Merge branch '4160_complete_all_files'
* 4160_complete_all_files:
  editor: completing from all open files.
  editor: word completion: refactoring.
  editor: word completion: refactoring.
  Ticket #4160: mceditor: complete words from all open files.
2021-02-07 20:40:16 +03:00
Andrew Borodin
2420b7180b editor: completing from all open files.
Thanks Sebastian Gniazdowski <sgniazdowski@gmail.com> for the original
patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-07 20:37:36 +03:00
Andrew Borodin
3b476adcae editor: word completion: refactoring.
(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>
2021-02-07 20:37:36 +03:00
Andrew Borodin
29720d04ab editor: word completion: refactoring.
(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>
2021-02-07 20:37:13 +03:00
Andrew Borodin
feca634073 Ticket #4160: mceditor: complete words from all open files.
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>
2021-02-07 20:33:20 +03:00
Andrew Borodin
a34525c5fa Merge branch '4192_shadows_out_of_screen'
* 4192_shadows_out_of_screen:
  Ticket #4192: fix crash if shadow is out of screen.
2021-02-03 09:51:45 +03:00
Sergei Trofimovich
6394547dbf Ticket #4192: fix crash if shadow is out of screen.
(tty_clip): add extra tests for area boundaries.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-03 09:47:13 +03:00
Andrew Borodin
c7306aae18 Merge branch '4171_silent_macro'
* 4171_silent_macro:
  Ticket #4171: fix usermenu and macro system() calls disrupting terminal.
2021-01-31 19:28:41 +03:00
Sebastian Gniazdowski
8177cdd0f1 Ticket #4171: fix usermenu and macro system() calls disrupting terminal.
(execute_menu_command): prepare terminal to run system() and restore
after.

(user_menu_cmd): fix comment.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-26 13:52:13 +03:00
Andrew Borodin
09e904bf3d Merge branch '4182_cmdline_update'
* 4182_cmdline_update:
  Ticket #4182: fix command line update.
2021-01-24 14:27:15 +03:00
Andrew Borodin
653961523c Ticket #4182: fix command line update.
(setup_cmdline): don't update command line if it's invisible.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-24 14:26:31 +03:00
Andrew Borodin
25bc8a64d9 Merge branch '4182_osx_ncurses_ftbfs'
* 4182_osx_ncurses_ftbfs:
  Ticket #4181: FTBFS against NCurses on OS X 10.9.5.
2021-01-24 14:23:40 +03:00
Andrew Borodin
ba62dd32ad Ticket #4181: FTBFS against NCurses on OS X 10.9.5.
lib/tty/tty-ncurses.h: define _XOPEN_SOURCE_EXTENDED to use cchar_t,
getcchar(), setcchar().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-24 14:19:22 +03:00
Andrew Borodin
a75071b3c0 Merge branch '4180_mc.ext_zip_regex'
* 4180_mc.ext_zip_regex:
  Ticket #4180: fix handling of zip archives.
2021-01-24 14:11:02 +03:00
Andrew Borodin
7881ed2fda Ticket #4180: fix handling of zip archives.
After 8857423e4e due to
using "file -z", zip archves w/o ".zip" file name extension
(i.e. "ff_ext.xpi", a Firefox extension) aren't handled
as zip archives.

misc/mc.ext.in: fix regular expression for zip format.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-23 21:10:04 +03:00
Andrew Borodin
a88a626e76 Fix segfault on switch to subshell in mcedit/mcview/mcdiffview.
(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>
2021-01-18 21:27:26 +03:00
Yury V. Zaytsev
33c84e75e6 Update doc/NEWS file
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2021-01-10 15:17:18 +01:00
Yury V. Zaytsev
eaee877af6 Update hints translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2021-01-10 15:10:32 +01:00
Yury V. Zaytsev
eafffd8459 Update translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2021-01-10 13:40:54 +01:00
Andrew Borodin
fd65a1654d (edit_store_macro_cmd): restore lost 'else'.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-05 08:27:42 +03:00
Andrew Borodin
5a45ed1583 Fix segfault on adding current path to hotlist.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-01-03 08:15:56 +03:00
Andrew Borodin
485ea75cbe Merge branch '4103_cleanup'
* 4103_cleanup: (56 commits)
  Update po/*.po files.
  (tree_store_load_from): remove extra parenthesis.
  (tree_store_load_from): fix copy-into-fixed-size-buffer warning.
  (create_panel): remove extra test of midnight_dlg.
  (edit_scroll_screen_over_cursor): fix copy-paste error.
  (pipe_mail): fix unchecked return value warning.
  tests/lib/strutil/Makefile.am: remove unsed include path.
  (edit_read_syntax_file): fix logically dead code.
  (edit_suggest_current_word): the NULL check is unnecessary...
  (edit_get_match_keyword_cmd): fix possible NULL dereference.
  (x_basename): the NULL check is unnecessary...
  (mcview_growbuf_read_until): the NULL check is unnecessary...
  (cpio_read_bin_head): fix unintended sign extension.
  Move cd_to() to separate file.
  Refactoring: rename functions
  (do_cd_command): refactoring: get path only
  (examine_cd): return GString.
  (copy_file_file): minor refactoring.
  (handle_console_linux): fix resource leak.
  (open_error_pipe): fix resource leak.
  ...
2020-12-31 16:35:22 +03:00
Andrew Borodin
f8a88007f4 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:34:55 +03:00
Andrew Borodin
01ca2756e1 (tree_store_load_from): remove extra parenthesis.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
1c8400d6ef (tree_store_load_from): fix copy-into-fixed-size-buffer warning.
Found by Coverity.
Coverity id #32616.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
a17dd53c29 (create_panel): remove extra test of midnight_dlg.
midnight_dlg is never NULL in create_panel().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
3cd408407d (edit_scroll_screen_over_cursor): fix copy-paste error.
Found by Coverity.
Coverity id #32566.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
3114240921 (pipe_mail): fix unchecked return value warning.
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>
2020-12-31 16:26:47 +03:00
Andrew Borodin
c1ed403c02 tests/lib/strutil/Makefile.am: remove unsed include path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
dfb81a3dae (edit_read_syntax_file): fix logically dead code.
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>
2020-12-31 16:26:47 +03:00
Andreas Mohr
68b803e5c4 (edit_suggest_current_word): the NULL check is unnecessary...
...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>
2020-12-31 16:26:47 +03:00
Andreas Mohr
ae244077af (edit_get_match_keyword_cmd): fix possible NULL dereference.
Found by Coverity.
Coverity id #32609.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
40b96b67dd (x_basename): the NULL check is unnecessary...
...because the pointer can't be NULL.

Found by Coverity.
Coverity id #110817.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
a68f2d1202 (mcview_growbuf_read_until): the NULL check is unnecessary...
...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>
2020-12-31 16:26:47 +03:00
Andreas Mohr
f57e69ad29 (cpio_read_bin_head): fix unintended sign extension.
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>
2020-12-31 16:26:47 +03:00
Andrew Borodin
d37dbcca4c Move cd_to() to separate file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
344af14029 Refactoring: rename functions
_do_panel_cd -> panel_do_cd_int
do_panel_cd -> panel_do_cd
do_cd -> panel_cd
do_cd_command -> cd_to

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
e3519f8966 (do_cd_command): refactoring: get path only
...instead of command "cd path".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
6f96cad1ca (examine_cd): return GString.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
38fee964bc (copy_file_file): minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
5f482396f6 (handle_console_linux): fix resource leak.
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>
2020-12-31 16:26:47 +03:00
Andreas Mohr
61f997de26 (open_error_pipe): fix resource leak.
Save file handle for later close, if valid.

Found by Coverity.

Coverity id #32607.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
35911c08e1 (do_background): fix yet another resource leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
88b6c3e930 (do_background): fix resource leak.
Found by Coverity.

Coverity id #32606.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
9d8cd79dde (mouse_get_local): fix uninitialized scalar variable.
Found by Coverity.

Coverity id #32631.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
e7a4f0932d (search_content): fix uninitialized scalar variable.
Found by Coverity.

Coverity id #32628.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
0281ba51b7 (tar_read_header): fix uninitialized scalar variable.
Found by Coverity.

Coverity id #32634.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
7916e8e097 src/vfs/fish/fish.c: fix uninitialized scalar variable.
Found by Coverity.

Coverity id #32630.
Coverity id #164548.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
a37a4eba73 src/vfs/extfs/extfs.c: fix uninitialized scalar variable.
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>
2020-12-31 16:26:47 +03:00