Andrew Borodin
04b37639a9
Merge branch '4426_cleanup'
...
* 4426_cleanup: (61 commits)
Update po/*.po files.
(parse_integer): fix comment.
(str_replace_all): refactoring.
tests/lib/strutil/str_replace_all.c: rename file.
Indentation.
Use vfs_path_get_last_path_vfs() where it is resonable.
Use vfs_path_get_last_path_str() where it is resonable.
(mc_fstat): define via MC_HANDLEOP macro.
(mc_stat, mc_lstat): define via macro.
sftpfs: refactoring: get rid of code duplication.
(tree_move): get rid of gotos.
(tar_skip_member): fix NULL dereference.
(unlock_file): eliminate goto, reduce variable scopes.
(lock_extract_info): refactor loops.
lib/lock.c: use sizeof() for buffer size.
(lock_build_name): fix coding style.
(hotkey_draw): constify argument.
(widget_selectcolor): constify argument.
Remove unused macro ALLOC_COLOR_PAIR_INDEX.
lib/tty/color.c: fix coding style.
...
2023-08-04 21:40:45 +03:00
Andrew Borodin
3f3a4fbf12
Update po/*.po files.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:20:52 +03:00
Andrew Borodin
623fcd1316
(parse_integer): fix comment.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:05:52 +03:00
Andrew Borodin
8ce06c4868
(str_replace_all): refactoring.
...
Get rig of intermediate storage of string patrs. Create result string directly.
Update comments. Update test.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:05:44 +03:00
Andrew Borodin
634219ccad
tests/lib/strutil/str_replace_all.c: rename file.
2023-08-04 21:04:55 +03:00
Andrew Borodin
f1cf92f435
Indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
978ce6d0dd
Use vfs_path_get_last_path_vfs() where it is resonable.
2023-08-04 21:04:55 +03:00
Andrew Borodin
e20d9acecb
Use vfs_path_get_last_path_str() where it is resonable.
2023-08-04 21:04:55 +03:00
Andrew Borodin
883f7af560
(mc_fstat): define via MC_HANDLEOP macro.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
2124ffa498
(mc_stat, mc_lstat): define via macro.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
b926c08ec9
sftpfs: refactoring: get rid of code duplication.
...
* (sftpfs_op_init): make public and use it...
* (sftpfs_opendir): here,
* (sftpfs_mkdir): here,
* (sftpfs_rmdir): and here.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
ec98810986
(tree_move): get rid of gotos.
2023-08-04 21:04:55 +03:00
Andrew Borodin
e8e9d222a9
(tar_skip_member): fix NULL dereference.
...
Found by Coverity.
Coverity id #462418 .
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
54ec89d950
(unlock_file): eliminate goto, reduce variable scopes.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
fded68057e
(lock_extract_info): refactor loops.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
66e79e97dd
lib/lock.c: use sizeof() for buffer size.
2023-08-04 21:04:55 +03:00
Andrew Borodin
1e4d27e437
(lock_build_name): fix coding style.
2023-08-04 21:04:55 +03:00
Andrew Borodin
ee5bf223fb
(hotkey_draw): constify argument.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
d243d467a8
(widget_selectcolor): constify argument.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
28dd27875e
Remove unused macro ALLOC_COLOR_PAIR_INDEX.
2023-08-04 21:04:55 +03:00
Andrew Borodin
626bd819b6
lib/tty/color.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Bogdan107
626d02998a
mcedit: fix colorize *.zsh files.
...
I need colorizing content of the "*.zsh" files in mcedit.
With "zsh(env|rc)" regexp rule, only "*.zshenv" and "*.zshrc" files are will be colorized.
With "zsh(env|rc)?" regexp rule, "*.zsh" files will be colorized too.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
37e7ee5a47
(edit_push_redo_action): reduce variable scope.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
a9f4626138
(edit_push_undo_action): reduce variable scope.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
8a0f00ae6f
(edit_load_macro_cmd): reduce variable scope.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
bill auger
ef2172ee5a
PKGBUILD.syntax: recognize 'b2sums'.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
srem1
5a10a33c9e
ruby.syntax: add puts
...
puts == print + "\n" very often use
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
e1c4e7f3cb
(info_show_info): fix unused variable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Oleg Kharitonov
6a9ad25e44
Add support for MacOS Mach-O and .dylib files
...
Closes MidnightCommander/mc#164 .
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
482e183190
(spell_dialog_lang_list_show): ret rid of string duplication.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
2e78166c23
src/editor/spell.c: refactoring: use GPtrArray instead of GArray for string arrays.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
583adea34e
(edit_suggest_current_word): minor refactoring.
...
Do not duplcate an empty string.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
0869946de5
(str_nconvert_to_input): return NULL if input is NULL.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
464a2eeefc
(str_nconvert_to_display): return NULL if input is NULL.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
afaa3f075a
lib/widget/quick.h: remove unneeded #include.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
6fecb7a9e8
(mc_args__convert_help_to_syscharset): return GString.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
0a9ecdeb98
Remove #include <errno.h> from files where errno is unused.
2023-08-04 21:04:54 +03:00
Andrew Borodin
f4ac2bb01f
(cd_error_msg): new function to show the change directory error message.
...
Use it where needed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
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