Commit Graph

15811 Commits

Author SHA1 Message Date
Andrew Borodin
8cc71a7f65 src/viewer/nroff.c: remove unneeded include.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
702c3634e5 Move the some stuff from dialog.[ch] to dialog-switch.[ch]:
* variables: top_dlg, fast_refresh;
  * function: do_refresh().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
fc6cc7bfc3 lib/widget/widget-common.h: rename include guard.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
30e64b5f4c lib/vfs/utilvfs.c: clean up, fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
b4cf765748 (vfs_url_split): replace the 'while' loop with strchr().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
044c035900 Use bit-field members of file_entry_t as integers explicitly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
7f30f8c692 file_entry_t: rename members:
sort_key -> name_sort_key
  second_sort_key -> extension_sort_key

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
51400f132e (repaint_file): decomposition.
(repain_status): new function. Move draw of mini-status here from
repaint_file().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
94df2c8c8d src/filemanager/panel.c: refactor file color attributes.
* attributes: enum instead of defines.
 * (paint_dir): set attributes explicitly.
 * (unselect_item): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
fe121396ca WPanel: rename 'top_file' to 'top'.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
f29118dcec WPanel: rename 'selected' to 'current' and related changes.
Renames:
  WPanel::selected -> WPanel::current
  selection (macro) -> panel_current_entry()
  panel_selected_at_half() -> panel_current_at_half()
  move_selection() -> panel_move_current()
  do_select() -> panel_set_current()
  try_to_select() -> panel_set_current_by_name()
  mark_if_marking(): argument and intermal variables
  file attributes:
    SELECTED -> CURRENT
    MARKED_SELECTED -> MARKED_CURRENT

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
fac7922cd0 (do_try_to_select): move into try_to_select().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
6fb8b13207 Rename key-related APIs:
lookup_key() -> tty_keyname_to_keycode()
  lookup_key_by_code() -> tty_keycode_to_keyname()

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
ea40129743 Menu: renames:
WMenuBar::selected -> WMenuBar::current
  menu_t::selected -> menu_t::current

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
35b5d8e2f2 WListbox: renames:
WListbox::pos -> WListbox::current
  listbox_select_entry() -> listbox_set_current()
  listbox_get_nth_item() -> listbox_get_nth_entry()

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
e6cb6591b3 (dlg_close): rename from dlg_stop().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:11 +03:00
Andrew Borodin
8455ff8dfd (vfs_path_to_str_flags): create recode_buffer only when required.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:11 +03:00
Andrew Borodin
97e8cbc8d6 (test_vfs_setup_cwd_symlink): simplify.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:11 +03:00
Andrew Borodin
3616877462 (vfs_get_cwd): rename from _vfs_get_cwd(), simplify.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:11 +03:00
Andrew Borodin
9d28def848 (make_symlink): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:11 +03:00
Andrew Borodin
52572d5b80 (vfs_path_new): add argument to create relative path object.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:11 +03:00
Andrew Borodin
43fc63be8e src/filemanager/panel.c: fix indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:11 +03:00
Andrew Borodin
d82bfd8902 (do_external_panelize): constify argument.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:11 +03:00
Andrew Borodin
8b30eaee1c Ticket #4426: code clean up before 4.8.30 release.
(erase_dir_after_copy): don't call g_queue_is_empty() if erase_list is NULL.
erase_list is NULL in case of move an empty directory across filesystems.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:11 +03:00
Andrew Borodin
7111f8aa30 Merge branch '4486_diffviewer_options'
* 4486_diffviewer_options:
  Ticket 3386: diffviewer: options are not applied on second run.
2023-07-29 19:47:05 +03:00
Andrew Borodin
00f84fbf24 Ticket 3386: diffviewer: options are not applied on second run.
Fix: make full initialization before diff execution.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-07-29 19:43:32 +03:00
Andrew Borodin
036976251e Merge branch '4485_patchfs'
* 4485_patchfs:
  Ticket #4485: patchfs: be more specific in error message.
2023-07-29 19:39:42 +03:00
Roland Illig
b8d6485467 Ticket #4485: patchfs: be more specific in error message.
Closes MidnightCommander/mc#192.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-07-23 14:06:51 +03:00
Andrew Borodin
299d9a2fb3 Merge branch '4472_ftp_listing'
* 4472_ftp_listing:
  Ticket #4472: (ftpfs_parse_long_list_UNIX): don't ignore special files.
2023-06-04 19:31:10 +03:00
Andrew Borodin
14bc2ac2f1 Ticket #4472: (ftpfs_parse_long_list_UNIX): don't ignore special files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-06-04 12:02:24 +03:00
Gyorgy Rotter
1536b5acf4 Ticket #4470: mcedit: add B language syntax highlight.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-31 20:29:45 +03:00
Andrew Borodin
5ac1e86e18 Merge branch '195_tar_timestamp'
* 195_tar_timestamp:
  Ticket 1952: fix wrong timestamps "Jan 1, 1970" int tar archives.
2023-05-28 19:23:58 +03:00
Andrew Borodin
25a445ed88 Ticket 1952: fix wrong timestamps "Jan 1, 1970" int tar archives.
(tar_insert_entry): assign timestamps after header decoding.
(tar_fill_stat): remove irrelevant #ifdef & #endif.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-28 19:23:44 +03:00
dsilakov
0d5a989e7e Ticket #4469: add syntax highlighting for Jenkinsfiles.
Jenkinsfiles follow Groovy syntax, treat them accordingly

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-26 20:19:15 +03:00
Andrew Borodin
cc283df6dc Merge branch '4464_FTBFS_without_ext2fs_attrs'
* 4464_FTBFS_without_ext2fs_attrs:
  Ticket #4464: FTBFS without ext2fs attributes support.
2023-05-21 20:36:08 +03:00
Evgeny Grin
cfe9ae814b Ticket #4464: FTBFS without ext2fs attributes support.
Closes MidnightCommander/mc#188.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-21 20:34:07 +03:00
Andrew Borodin
ec3f142b86 Merge branch '4466_sed'
* 4466_sed:
  Ticket #4466: fix sed usage in po/Makefile.
2023-05-21 20:26:19 +03:00
Evgeny Grin
1d7d9a832e Ticket #4466: fix sed usage in po/Makefile.
'po' directory does not use automake assignment.

This is a correction for f45d02ba2a.

Closes MidnightCommander/mc#191.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-21 20:24:38 +03:00
Andrew Borodin
b90177fa10 Merge branch '4465_ncurses_libs'
* 4465_ncurses_libs:
  Ticket #4465: remove duplicated libs from MCLIBS (again).
2023-05-21 20:17:18 +03:00
Evgeny Grin
8fba56d40f Ticket #4465: remove duplicated libs from MCLIBS (again).
Fixed copy-paste error.
This is a correction for 92ae4c6b20.

Closes MidnightCommander/mc#190.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-21 20:15:30 +03:00
Andrew Borodin
f17ebfd2a5 Merge branch '4463_ncurses_libs'
* 4463_ncurses_libs:
  Ticket #4463: ncurses library is duplicated in MCLIBS.
2023-05-20 20:59:44 +03:00
Evgeny Grin
92ae4c6b20 Ticket #4463: ncurses library is duplicated in MCLIBS.
AC_SEARCH_LIBS macro adds required library to 'LIBS' variable.
Currently 'LIBS' could be appended to 'MCLIBS' several times leading to
duplication of found values.
Also fixed duplication for 'stdscr' function detection.
Additionally fixed potential problematic situation when 'addwstr' or
'has_colors' detected in one ncurses library (for example 'ncurses'),
while 'stdscr' detected in other ncurses library (for example 'curses').
Such combination leads to problems.

Closes MidnightCommander/mc#187.

Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-20 20:54:50 +03:00
Andrew Borodin
5c9a145c3d Merge branch '4462_ncurses_includes'
* 4462_ncurses_includes:
  Ticket #4462: FTBFS if ncurses used without --with-ncurses-includes= configure parameter.
2023-05-20 20:47:47 +03:00
Evgeny Grin
1f732f0a14 Ticket #4462: FTBFS if ncurses used without --with-ncurses-includes= configure parameter.
If ncurses location is not specified by configure parameters like
'--with-ncurses-includes=/some/dir' then automatic detection at compiler
default location is used. With automatic detection the header
'ncurses/term.h' is not checked therefore macro HAVE_NCURSES_TERM_H is
not defined.

Closes MidnightCommander/mc#186.

Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-20 20:42:48 +03:00
Andrew Borodin
08be8094ca Merge branch '4460_makefile'
* 4460_makefile:
  Ticket #4460: fix unportable '$<' in Makefiles.
2023-05-20 20:23:41 +03:00
Evgeny Grin
8cd913a28a Ticket #4460: fix unportable '$<' in Makefiles.
POSIX specifis '$<' only for "inference" rules (i.e. general rule
like '.c.o:'), while for "target" is undefined.
It is supported as extension for targets by some "make" implementations,
but not all.
The workarounds could be easily used.

Closes MidnightCommander/mc#185.

Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-20 20:18:58 +03:00
Andrew Borodin
2e3e3a3775 Merge branch '4459_sed'
* 4459_sed:
  Replaced unportable 'inplace' sed command
  Use configure detected or user specified sed in build system
  Ticket #4459: usage of 'sed' in build system/makefiles is not portable.
2023-05-20 20:06:54 +03:00
Evgeny Grin
68e6d960f8 Replaced unportable 'inplace' sed command
'-i' sed option is not portable, not specified by POSIX and does not
work on same platforms.
Replaced with simple and obvious workarounds.

Closes MidnightCommander/mc#184.

Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-20 19:57:23 +03:00
Evgeny Grin
f45d02ba2a Use configure detected or user specified sed in build system
Sometimes system default sed is not the best option.
With this modification user may easily override sed used by build system
without editing any file.

Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-20 19:56:53 +03:00
Evgeny Grin
054a051b42 Ticket #4459: usage of 'sed' in build system/makefiles is not portable.
configure: add explicit sed detection

Actually SED variable is set automatically by LT_INIT currently.
Having explicit check should help avoiding problems if/when LT_INIT
changed.

Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-20 19:56:32 +03:00