midnight-commander.git
11 days agoMerge branch '4524_cleanup'master
Andrew Borodin [Sun, 7 Apr 2024 13:47:06 +0000 (7 16:47 +0300)]
Merge branch '4524_cleanup'

* 4524_cleanup: (40 commits)
  Update po/*.po files.
  (link_t): remove unused member linkcount.
  src/filemanager/file.c: fix comment.
  src/filemanager/file.c: rename structure: link -> link_t.
  (fetch_hosts): refactoring.
  hostname complition: refactoring: use GPtrArray.
  (load_codepages_list_from_file): use g_ptr_array_new_full().
  src/selcodepage.c: fix coding style.
  (tree_move): fix coding style.
  (info_show_info): don't create VFS path if EXT2 attributes aren't supported.
  file_op_context_t: remove op_preserve member.
  (shell_execute): fix coding style.
  (tar_seek_archive): improve diagnostic for truncated archive.
  Move OS-specific stuff from lib/global.h to lib/unixcompat.h.
  Merge lib/utilunix.h into lib/util.h.
  Merge lib/strescape.h into lib/strutil.h. Rename functions.
  Set the default IO size to 256KiB.
  (find_cmd): add intermediate variable to simplify formatting.
  mceditor: massive use of edit_arg_t as function argument.
  mceditor: new APIs.
  ...

11 days agoUpdate po/*.po files.
Andrew Borodin [Sun, 7 Apr 2024 13:44:43 +0000 (7 16:44 +0300)]
Update po/*.po files.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(link_t): remove unused member linkcount.
Andrew Borodin [Sat, 6 Apr 2024 06:27:33 +0000 (6 09:27 +0300)]
(link_t): remove unused member linkcount.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agosrc/filemanager/file.c: fix comment.
Andrew Borodin [Sat, 6 Apr 2024 06:25:00 +0000 (6 09:25 +0300)]
src/filemanager/file.c: fix comment.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agosrc/filemanager/file.c: rename structure: link -> link_t.
Andrew Borodin [Sat, 6 Apr 2024 06:21:03 +0000 (6 09:21 +0300)]
src/filemanager/file.c: rename structure: link -> link_t.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(fetch_hosts): refactoring.
Andrew Borodin [Sat, 6 Apr 2024 06:02:42 +0000 (6 09:02 +0300)]
(fetch_hosts): refactoring.

Reduce variablle scope.
Refactor loops.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agohostname complition: refactoring: use GPtrArray.
Andrew Borodin [Sun, 31 Mar 2024 16:40:09 +0000 (31 19:40 +0300)]
hostname complition: refactoring: use GPtrArray.

11 days ago(load_codepages_list_from_file): use g_ptr_array_new_full().
Andrew Borodin [Sun, 31 Mar 2024 16:14:07 +0000 (31 19:14 +0300)]
(load_codepages_list_from_file): use g_ptr_array_new_full().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agosrc/selcodepage.c: fix coding style.
Andrew Borodin [Sun, 31 Mar 2024 16:12:40 +0000 (31 19:12 +0300)]
src/selcodepage.c: fix coding style.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(tree_move): fix coding style.
Andrew Borodin [Sun, 24 Mar 2024 16:44:23 +0000 (24 19:44 +0300)]
(tree_move): fix coding style.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(info_show_info): don't create VFS path if EXT2 attributes aren't supported.
Andrew Borodin [Sun, 24 Mar 2024 14:00:25 +0000 (24 17:00 +0300)]
(info_show_info): don't create VFS path if EXT2 attributes aren't supported.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agofile_op_context_t: remove op_preserve member.
Andrew Borodin [Sun, 17 Mar 2024 10:22:29 +0000 (17 13:22 +0300)]
file_op_context_t: remove op_preserve member.

(file_mask_dialog): use local variable instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(shell_execute): fix coding style.
Andrew Borodin [Sun, 10 Mar 2024 09:01:43 +0000 (10 12:01 +0300)]
(shell_execute): fix coding style.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(tar_seek_archive): improve diagnostic for truncated archive.
Andrew Borodin [Sun, 10 Mar 2024 07:58:42 +0000 (10 10:58 +0300)]
(tar_seek_archive): improve diagnostic for truncated archive.

If EOF has been read, don't attempt to seek past it.

Sync with GNU tar 21318f385627a30da5d92811dd80f70abbe80ee7.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoMove OS-specific stuff from lib/global.h to lib/unixcompat.h.
Andrew Borodin [Sun, 10 Mar 2024 17:40:27 +0000 (10 20:40 +0300)]
Move OS-specific stuff from lib/global.h to lib/unixcompat.h.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoMerge lib/utilunix.h into lib/util.h.
Andrew Borodin [Sun, 10 Mar 2024 08:11:18 +0000 (10 11:11 +0300)]
Merge lib/utilunix.h into lib/util.h.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoMerge lib/strescape.h into lib/strutil.h. Rename functions.
Andrew Borodin [Sat, 9 Mar 2024 11:41:08 +0000 (9 14:41 +0300)]
Merge lib/strescape.h into lib/strutil.h. Rename functions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoSet the default IO size to 256KiB.
Andrew Borodin [Sun, 3 Mar 2024 15:12:10 +0000 (3 18:12 +0300)]
Set the default IO size to 256KiB.

src/filemanager/ioblksize.h: Add updated test results and increase value
from 128KiB to 256KiB.

This was previously 128KiB and increasing to 256KiB was seen to increase
throughput by 10-20% when reading cached files on modern systems.

Sync with GNU coreutils fcfba90d0d27a1bacf2020bac4dbec74ed181028.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(find_cmd): add intermediate variable to simplify formatting.
Andrew Borodin [Sat, 24 Feb 2024 17:13:10 +0000 (24 20:13 +0300)]
(find_cmd): add intermediate variable to simplify formatting.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agomceditor: massive use of edit_arg_t as function argument.
Andrew Borodin [Fri, 23 Feb 2024 10:07:34 +0000 (23 13:07 +0300)]
mceditor: massive use of edit_arg_t as function argument.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agomceditor: new APIs.
Andrew Borodin [Fri, 23 Feb 2024 11:59:26 +0000 (23 14:59 +0300)]
mceditor: new APIs.

  * (edit_arg_init): initialize edit_arg_t object.
  * (edit_arg_assign): Apply new values to edit_arg_t object members.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agomceditor: drop edit_stack_type. Use edit_arg_t instead.
Andrew Borodin [Fri, 23 Feb 2024 10:39:01 +0000 (23 13:39 +0300)]
mceditor: drop edit_stack_type. Use edit_arg_t instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(edit_get_file_name): move from editwidget.c to edit.c.
Andrew Borodin [Fri, 23 Feb 2024 09:56:48 +0000 (23 12:56 +0300)]
(edit_get_file_name): move from editwidget.c to edit.c.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agomceditor: refactoring.
Andrew Borodin [Fri, 23 Feb 2024 09:36:18 +0000 (23 12:36 +0300)]
mceditor: refactoring.

  * (mcedit_arg_t): rename to edit_arg_t and move to src/editor/edit.h.
  * (mcedit_arg_free): rename to edit_arg_free() and move to src/editor/edit.c.
  * (mcedit_arg_vpath_new): rename to edit_arg_vpath_new(), move to src/editor/edit.c
  and make public.
  * (mcedit_arg_new): rename to edit_arg_new(), move to src/editor/edit.c
  and make public.
  * src/editor/editwidget.c: sync with new editor APIs.
  * src/main.c: likewise.
  * src/args.c: likewise.
  * (mc_args_parse): show error in case of run MC as "mc -e" if MC is built
    without builtin editor.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agotextconf.c: features: fix capital letters.
Andrew Borodin [Fri, 23 Feb 2024 09:46:11 +0000 (23 12:46 +0300)]
textconf.c: features: fix capital letters.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(dview_init): move first run of redo_diff() to diff_view().
Andrew Borodin [Fri, 23 Feb 2024 08:22:13 +0000 (23 11:22 +0300)]
(dview_init): move first run of redo_diff() to diff_view().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(create_panel): reduce variable scope.
Andrew Borodin [Sun, 18 Feb 2024 12:10:18 +0000 (18 15:10 +0300)]
(create_panel): reduce variable scope.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(mcview_new): use WRect to define a panel area.
Andrew Borodin [Sun, 18 Feb 2024 12:04:00 +0000 (18 15:04 +0300)]
(mcview_new): use WRect to define a panel area.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoModify WTree creation API.
Andrew Borodin [Sun, 18 Feb 2024 10:28:45 +0000 (18 13:28 +0300)]
Modify WTree creation API.

 * (tree_init): use WRect to define widget area.
 * (create_panel): sync with modified API.
 * (tree_box): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(info_new): use WRect to define a panel area.
Andrew Borodin [Sun, 18 Feb 2024 10:23:17 +0000 (18 13:23 +0300)]
(info_new): use WRect to define a panel area.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoChange the file list panel creation APIs.
Andrew Borodin [Sun, 18 Feb 2024 10:13:47 +0000 (18 13:13 +0300)]
Change the file list panel creation APIs.

  * (panel_sized_empty_new): use WRect to define a panel area.
  * (panel_sized_with_dir_new): likewise.
  * (panel_sized_new): likewise.
  * (panel_empty_new): sync with modified API.
  * (panel_with_dir_new): likewise.
  * (panel_sized_with_dir_new): likewise.
  * (create_panel): likewise.
  * (restore_into_right_dir_panel): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(put_tagged): trivial refactoring.
Andrew Borodin [Sun, 18 Feb 2024 09:51:19 +0000 (18 12:51 +0300)]
(put_tagged): trivial refactoring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(check_panel_timestamp): constify arguments, simplify checks.
Andrew Borodin [Sun, 18 Feb 2024 09:39:50 +0000 (18 12:39 +0300)]
(check_panel_timestamp): constify arguments, simplify checks.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(mc_build_filenamev): refactoring.
Andrew Borodin [Sun, 11 Feb 2024 16:56:08 +0000 (11 19:56 +0300)]
(mc_build_filenamev): refactoring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoDon't create and install diff viewer man page if mc is built --without-diff-viewer.
Andrew Borodin [Sun, 7 Apr 2024 13:05:48 +0000 (7 16:05 +0300)]
Don't create and install diff viewer man page if mc is built --without-diff-viewer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoDon't create and install mcedit man page if mc is built --without-internal-edit.
Andrew Borodin [Sun, 11 Feb 2024 16:34:34 +0000 (11 19:34 +0300)]
Don't create and install mcedit man page if mc is built --without-internal-edit.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoClean up irrelevant comments.
Andrew Borodin [Sun, 11 Feb 2024 08:50:05 +0000 (11 11:50 +0300)]
Clean up irrelevant comments.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agosrc/editor/editmenu.c: includes cleanup.
Andrew Borodin [Sun, 11 Feb 2024 08:48:22 +0000 (11 11:48 +0300)]
src/editor/editmenu.c: includes cleanup.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agomcedit: update C and C++ syntax highlightings.
Dmitry Atamanov [Wed, 31 Jan 2024 20:45:54 +0000 (1 01:45 +0500)]
mcedit: update C and C++ syntax highlightings.

Closes MidnightCommander/mc#195.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days ago(edit_get_search_line_type): refactoring.
Andrew Borodin [Fri, 2 Feb 2024 17:34:46 +0000 (2 20:34 +0300)]
(edit_get_search_line_type): refactoring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoTicket #4524: code cleanup before 4.8.32 release.
Viktor Szakats [Mon, 29 Jan 2024 09:59:03 +0000 (29 09:59 +0000)]
Ticket #4524: code cleanup before 4.8.32 release.

mcedit: fix losing column position when navigating up/down.
Regression from 49bc0ddebfda91ea90d19b286ca1c2198387cf77.

Closes MidnightCommander/mc#194.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
11 days agoMerge branch '4533_external_editor_tokens'
Andrew Borodin [Sun, 7 Apr 2024 12:52:04 +0000 (7 15:52 +0300)]
Merge branch '4533_external_editor_tokens'

* 4533_external_editor_tokens:
  Ticket #4533: External editor does not work with arguments in $EDITOR

2 weeks agoTicket #4533: External editor does not work with arguments in $EDITOR
Andrew Borodin [Sun, 31 Mar 2024 15:53:59 +0000 (31 18:53 +0300)]
Ticket #4533: External editor does not work with arguments in $EDITOR

When using an external editor (i.e. "Use internal edit" in the Configure
Options is unchecked) the environment variable EDITOR is used. However,
if $EDITOR contains a command line argument after the executable name,
these arguments are not processed properly, and the editor might not be
started at all.

How to reproduce: (Precondition: vi is available on the system)
  1) On the command line, execute: export EDITOR="vi +" && mc
(the + argument should let vi start at the document's end instead of the
beginning).
  2) Go to the Options menu -> Configuration -> uncheck "Use internal
edit".
  3) Move the cursor to a file that is larger than a single screen (e.g.
ABOUT-NLS in mc's source directory).
  4) Press F4 to start the external editor.

Result: Nothing visible happens

Expected result: vi is opened showing the end of the file ABOUT-NLS

The bug: my_system_make_arg_array() doesn't perform full-feature
parsing of the comman line.

  * (str_tokenize): mew function based on history_tokenize_internal()
from GNU readline-8.2.
  * (str_tokenize_word): mew function based on history_tokenize_word()
from GNU readline-8.2.
  * (my_system_make_arg_array): reimplement using str_tokenize().
  * (my_systemv_flags): use modified my_system_make_arg_array().
  * (fork_child_tokens): new test for string tokenization.
  * (fork_child_tokens2): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 weeks agoMerge branch '4532_copy_move_attrs'
Andrew Borodin [Sun, 31 Mar 2024 15:48:21 +0000 (31 18:48 +0300)]
Merge branch '4532_copy_move_attrs'

* 4532_copy_move_attrs:
  mceditor: support ext2fs attributes.
  Ticket #4451: preserve ext2fs attributes on copy/move operations.

2 weeks agomceditor: support ext2fs attributes.
Andrew Borodin [Sat, 16 Mar 2024 18:01:50 +0000 (16 21:01 +0300)]
mceditor: support ext2fs attributes.

Get attributes on file open and set ones on file save.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 weeks agoTicket #4451: preserve ext2fs attributes on copy/move operations.
Andrew Borodin [Sun, 17 Mar 2024 10:25:37 +0000 (17 13:25 +0300)]
Ticket #4451: preserve ext2fs attributes on copy/move operations.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 weeks agoMerge branch '4530_skins'
Andrew Borodin [Sat, 23 Mar 2024 07:14:50 +0000 (23 10:14 +0300)]
Merge branch '4530_skins'

* 4530_skins:
  skins: add modarin256 thin and root variant.
  skins: add modarcon16 thin and root variant.
  skins: add xoria thin and root variant.
  Ticket #4530: new skins.

3 weeks agoskins: add modarin256 thin and root variant.
Eugene San (eugenesan) [Mon, 18 Mar 2024 02:24:52 +0000 (17 19:24 -0700)]
skins: add modarin256 thin and root variant.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 weeks agoskins: add modarcon16 thin and root variant.
Eugene San (eugenesan) [Mon, 18 Mar 2024 02:24:15 +0000 (17 19:24 -0700)]
skins: add modarcon16 thin and root variant.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 weeks agoskins: add xoria thin and root variant.
Eugene San (eugenesan) [Mon, 18 Mar 2024 02:23:22 +0000 (17 19:23 -0700)]
skins: add xoria thin and root variant.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 weeks agoTicket #4530: new skins.
Eugene San (eugenesan) [Sat, 23 Mar 2024 06:23:43 +0000 (23 09:23 +0300)]
Ticket #4530: new skins.

Initial commit: xoria256.ini: clean up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
7 weeks agoMerge branch '4224_mcdiff_man'
Andrew Borodin [Sat, 24 Feb 2024 07:14:02 +0000 (24 10:14 +0300)]
Merge branch '4224_mcdiff_man'

* 4224_mcdiff_man:
  Ticket #4224: add mcdiff manual page.

7 weeks agoTicket #4224: add mcdiff manual page.
Denys Vlasenko [Mon, 29 Mar 2021 01:41:03 +0000 (29 03:41 +0200)]
Ticket #4224: add mcdiff manual page.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 months agoMerge branch '3088_terminal_cwd'
Andrew Borodin [Sun, 11 Feb 2024 16:28:07 +0000 (11 19:28 +0300)]
Merge branch '3088_terminal_cwd'

* 3088_terminal_cwd:
  Use ESC_STR macro in escape sequences.
  (update_xterm_title_path): change the escape sequence's terminator
  Ticket #3088: tell the current directory to the terminal

2 months agoUse ESC_STR macro in escape sequences.
Andrew Borodin [Sun, 4 Feb 2024 17:05:49 +0000 (4 20:05 +0300)]
Use ESC_STR macro in escape sequences.

  * (update_xterm_title_path): use ESC_STR macro.
  * (update_terminal_cwd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 months ago(update_xterm_title_path): change the escape sequence's terminator
Egmont Koblinger [Sun, 4 Feb 2024 16:59:18 +0000 (4 19:59 +0300)]
(update_xterm_title_path): change the escape sequence's terminator

...from \a to \e\\. Various standards (at least ECMA-48 and DEC STD 070)
agree that an OSC is to be terminated by an ST, i.e. \e\\. Using BEL \a
is a nonstandard solution introduced and popularized by xterm.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 months agoTicket #3088: tell the current directory to the terminal
Egmont Koblinger [Sun, 4 Feb 2024 16:40:38 +0000 (4 19:40 +0300)]
Ticket #3088: tell the current directory to the terminal

...using OSC 7 sequence, so it can open new tabs there.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 months agoMerge branch '4521_fish_history'
Andrew Borodin [Sun, 11 Feb 2024 16:20:55 +0000 (11 19:20 +0300)]
Merge branch '4521_fish_history'

* 4521_fish_history:
  Ticket #4521: really escape fish shell history.

2 months agoTicket #4521: really escape fish shell history.
Anton Anikin [Sun, 4 Feb 2024 15:36:45 +0000 (4 18:36 +0300)]
Ticket #4521: really escape fish shell history.

Some of the "service" commands generated by the mc "leak" into the fish
subshell history available to the user. An example to reproduce:

  *  set user shell to fish and start mc (SHELL=/usr/bin/fish mc)
  *  navigate to any directory
  *  press Ctrl+o
  *  press \u2191 button (UP, go back in history)
  *  observe " cd (printf '%b' ... " command

This commit avoids the " cd (printf '%b' ... " commands in the fish
history.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 months agoMerge branch '4525_mcedit_replace_regex'
Andrew Borodin [Sun, 11 Feb 2024 16:10:32 +0000 (11 19:10 +0300)]
Merge branch '4525_mcedit_replace_regex'

* 4525_mcedit_replace_regex:
  (edit_search_init): call edit_search_fix_search_start_if_selection().
  Tickets #4525, #4526: mcedit: fix replacement using regular expressions.

2 months ago(edit_search_init): call edit_search_fix_search_start_if_selection().
Andrew Borodin [Wed, 31 Jan 2024 18:35:32 +0000 (31 21:35 +0300)]
(edit_search_init): call edit_search_fix_search_start_if_selection().

  * (edit_search): do not call edit_search_fix_search_start_if_selection()
  since it called in edit_search_init().
  * (edit_replace_cmd): likewise; join two ifs.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 months agoTickets #4525, #4526: mcedit: fix replacement using regular expressions.
Andrew Borodin [Wed, 31 Jan 2024 18:32:22 +0000 (31 21:32 +0300)]
Tickets #4525, #4526: mcedit: fix replacement using regular expressions.

The bug was introduced in 21feb38a8d9161c4004ff4d9d11eb6c010b200e1.

  * (edit_search_init): call edit_get_search_line_type().
  * (edit_search): do mot call edit_get_search_line_type() since it is
  called in edit_search_init().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 months agoMerge branch '4518_unrar7'
Andrew Borodin [Tue, 30 Jan 2024 18:55:03 +0000 (30 21:55 +0300)]
Merge branch '4518_unrar7'

* 4518_unrar7:
  Ticket #4518: extfs: support unrar-7.

2 months agoTicket #4518: extfs: support unrar-7.
Andrew Borodin [Sun, 28 Jan 2024 08:13:41 +0000 (28 11:13 +0300)]
Ticket #4518: extfs: support unrar-7.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 months agoTicket #4519: mcedit: fix php.syntax.
purdeaandrei [Sun, 28 Jan 2024 08:24:48 +0000 (28 11:24 +0300)]
Ticket #4519: mcedit: fix php.syntax.

Highlight comment located in any place of line, not from start only.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2 months agoUpdate doc/NEWS file4.8.314.8.31-pre1
Yury V. Zaytsev [Sat, 20 Jan 2024 20:09:00 +0000 (20 21:09 +0100)]
Update doc/NEWS file

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2 months agoUpdate hints translations from Transifex
Yury V. Zaytsev [Sat, 20 Jan 2024 20:04:28 +0000 (20 21:04 +0100)]
Update hints translations from Transifex

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2 months agoUpdate translations from Transifex
Yury V. Zaytsev [Sat, 20 Jan 2024 20:02:14 +0000 (20 21:02 +0100)]
Update translations from Transifex

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
3 months agoMerge branch '4490_cleanup'
Andrew Borodin [Sun, 14 Jan 2024 15:30:28 +0000 (14 18:30 +0300)]
Merge branch '4490_cleanup'

* 4490_cleanup: (31 commits)
  Update po/*.po files.
  ext.d/image.sh: use exiftool in addition to exif to view image metadata.
  ext.d/image.sh: check $DISPLAY in the xpm View action.
  mc.ext.ini: support avif images.
  mc.ext.ini: add View action for webp images.
  Update copyright years.
  (main): call tty_check_term() right after mc_args_parse().
  Refactor learn keys.
  Use g_string_new_take().
  (test_glob_prepare_replace_str): remove unneeded type cast.
  maint/utils/update-years.sh: replaced unportable 'sed -i' command.
  maint/utils/update-years.sh: add src/man2hlp/man2hlp.in.
  src/man2hlp/man2hlp.in: collapse copyright years.
  (str_utf8_offset_to_pos): change type of variable.
  (mc_search_regex__get_max_num_of_replace_tokens): refactor loop.
  lib/widget/input_complete.c: remove intermediate variables.
  mcedit: add intermediate variables to make code more readable and debuggable.
  (is_blank): refactor loop.
  (edit_help): use help node of editor dialog.
  (tree_execute_cmd): move CK_Help handler to separate function tree_help()
  ...

3 months agoUpdate po/*.po files.
Andrew Borodin [Sun, 14 Jan 2024 15:29:41 +0000 (14 18:29 +0300)]
Update po/*.po files.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agoext.d/image.sh: use exiftool in addition to exif to view image metadata.
Andrew Borodin [Sat, 13 Jan 2024 13:17:35 +0000 (13 16:17 +0300)]
ext.d/image.sh: use exiftool in addition to exif to view image metadata.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agoext.d/image.sh: check $DISPLAY in the xpm View action.
Andrew Borodin [Sat, 13 Jan 2024 13:13:38 +0000 (13 16:13 +0300)]
ext.d/image.sh: check $DISPLAY in the xpm View action.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agomc.ext.ini: support avif images.
Eugene San [Sat, 13 Jan 2024 12:38:40 +0000 (13 15:38 +0300)]
mc.ext.ini: support avif images.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agomc.ext.ini: add View action for webp images.
Eugene San [Sat, 13 Jan 2024 12:17:37 +0000 (13 15:17 +0300)]
mc.ext.ini: add View action for webp images.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agoUpdate copyright years.
Andrew Borodin [Mon, 1 Jan 2024 06:46:17 +0000 (1 09:46 +0300)]
Update copyright years.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(main): call tty_check_term() right after mc_args_parse().
Andrew Borodin [Wed, 27 Dec 2023 07:22:24 +0000 (27 10:22 +0300)]
(main): call tty_check_term() right after mc_args_parse().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agoRefactor learn keys.
Andrew Borodin [Wed, 27 Dec 2023 06:41:02 +0000 (27 09:41 +0300)]
Refactor learn keys.

  * (learn_store_key):
  * (learn_key): use GString for key buffer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agoUse g_string_new_take().
Andrew Borodin [Sat, 23 Dec 2023 13:54:53 +0000 (23 16:54 +0300)]
Use g_string_new_take().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(test_glob_prepare_replace_str): remove unneeded type cast.
Andrew Borodin [Sat, 23 Dec 2023 13:50:16 +0000 (23 16:50 +0300)]
(test_glob_prepare_replace_str): remove unneeded type cast.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agomaint/utils/update-years.sh: replaced unportable 'sed -i' command.
Andrew Borodin [Sat, 23 Dec 2023 08:36:41 +0000 (23 11:36 +0300)]
maint/utils/update-years.sh: replaced unportable 'sed -i' command.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agomaint/utils/update-years.sh: add src/man2hlp/man2hlp.in.
Andrew Borodin [Sat, 23 Dec 2023 08:38:09 +0000 (23 11:38 +0300)]
maint/utils/update-years.sh: add src/man2hlp/man2hlp.in.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agosrc/man2hlp/man2hlp.in: collapse copyright years.
Andrew Borodin [Sat, 23 Dec 2023 08:34:29 +0000 (23 11:34 +0300)]
src/man2hlp/man2hlp.in: collapse copyright years.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(str_utf8_offset_to_pos): change type of variable.
Andrew Borodin [Tue, 19 Dec 2023 18:41:53 +0000 (19 21:41 +0300)]
(str_utf8_offset_to_pos): change type of variable.

GString is pointless here.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(mc_search_regex__get_max_num_of_replace_tokens): refactor loop.
Andrew Borodin [Tue, 19 Dec 2023 18:38:24 +0000 (19 21:38 +0300)]
(mc_search_regex__get_max_num_of_replace_tokens): refactor loop.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agolib/widget/input_complete.c: remove intermediate variables.
Andrew Borodin [Sun, 17 Dec 2023 14:45:10 +0000 (17 17:45 +0300)]
lib/widget/input_complete.c: remove intermediate variables.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agomcedit: add intermediate variables to make code more readable and debuggable.
Andrew Borodin [Sun, 17 Dec 2023 14:32:15 +0000 (17 17:32 +0300)]
mcedit: add intermediate variables to make code more readable and debuggable.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(is_blank): refactor loop.
Andrew Borodin [Sun, 17 Dec 2023 14:18:03 +0000 (17 17:18 +0300)]
(is_blank): refactor loop.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(edit_help): use help node of editor dialog.
Andrew Borodin [Sat, 9 Dec 2023 17:15:02 +0000 (9 20:15 +0300)]
(edit_help): use help node of editor dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(tree_execute_cmd): move CK_Help handler to separate function tree_help()
Andrew Borodin [Sat, 9 Dec 2023 14:30:27 +0000 (9 17:30 +0300)]
(tree_execute_cmd): move CK_Help handler to separate function tree_help()

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(menubar_execute_cmd): move CK_Help handler to separate function menubar_help().
Andrew Borodin [Sat, 9 Dec 2023 14:29:12 +0000 (9 17:29 +0300)]
(menubar_execute_cmd): move CK_Help handler to separate function menubar_help().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(dlg_execute_cmd): move CK_Help handler to separate function dlg_help().
Andrew Borodin [Sat, 9 Dec 2023 14:25:48 +0000 (9 17:25 +0300)]
(dlg_execute_cmd): move CK_Help handler to separate function dlg_help().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(mcview_execute_cmd): don't handle CK_Help here.
Andrew Borodin [Sat, 9 Dec 2023 14:24:15 +0000 (9 17:24 +0300)]
(mcview_execute_cmd): don't handle CK_Help here.

Use default handler via dlg_execute_cmd().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(move_to_top): fix a 14-years error in condition.
Andrew Borodin [Fri, 8 Dec 2023 17:27:55 +0000 (8 20:27 +0300)]
(move_to_top): fix a 14-years error in condition.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agosrc/help.c: reduce variable scopes.
Andrew Borodin [Fri, 8 Dec 2023 17:26:10 +0000 (8 20:26 +0300)]
src/help.c: reduce variable scopes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agosrc/help.c: refactor loops.
Andrew Borodin [Fri, 8 Dec 2023 17:25:38 +0000 (8 20:25 +0300)]
src/help.c: refactor loops.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agosrc/help.c: fix coding style.
Andrew Borodin [Fri, 8 Dec 2023 17:08:52 +0000 (8 20:08 +0300)]
src/help.c: fix coding style.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agodoc/ru/mc.1: various fixups.
Andrew Borodin [Thu, 7 Dec 2023 17:47:19 +0000 (7 20:47 +0300)]
doc/ru/mc.1: various fixups.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(eval_marks): move from editcmd.c to edit.c.
Andrew Borodin [Wed, 29 Nov 2023 18:48:24 +0000 (29 21:48 +0300)]
(eval_marks): move from editcmd.c to edit.c.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months ago(edit_block_delete_cmd): return boolean.
Andrew Borodin [Wed, 29 Nov 2023 18:42:46 +0000 (29 21:42 +0300)]
(edit_block_delete_cmd): return boolean.

(edit_block_delete): likewize.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
3 months agoTicket #4490: code cleanup before 4.8.31 release.
Andrew Borodin [Sun, 26 Nov 2023 14:24:07 +0000 (26 17:24 +0300)]
Ticket #4490: code cleanup before 4.8.31 release.

(mcdiffview_dialog_search): indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>