Andrew Borodin
2edbf44dc0
(tty_color_get_name_by_index): fix format overflow.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:14 +03:00
Andrew Borodin
1c81987cf6
(load_codepages_list_from_file): fix memory leak in free_codepages_list().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:14 +03:00
Andrew Borodin
56f31e03ff
Bump minimum GLib requirenment to 2.32.0.
...
This is required for g_array_set_clear_func().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:14 +03:00
Andrew Borodin
1821e0e2f8
(vfs_path_build_url_params_str): return NULL instead of an empty string.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:13 +03:00
Andrew Borodin
5d8399befb
tty: refactoring of color pairs deallocation.
...
* (tty_color_free_all_tmp): rename to tty_color_free_temp and call
g_hash_table_foreach_remove().
* (tty_color_free_all_non_tmp): rename to tty_color_free_all and call
g_hash_table_remove_all().
* (tty_color_free_all): remove.
* (tty_color_free_condition_cb): rename to tty_color_free_temp_cb and
simplify.
* (mc_skin_deinit): use changed API.
* (edit_free_syntax_rules): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:13 +03:00
Andrew Borodin
2d6d8a477e
tty: color-related API changes
...
* (tty_try_alloc_color_pair): remove.
* (tty_try_alloc_color_pair2): rename to tty_try_alloc_color_pair,
change arguments.
* (tty_color_set_defaults): changes arguments.
* (this_try_alloc_color_pair): likewise.
* lib/skin/color.c: related changes.
* src/editor/syntax.c: likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:13 +03:00
Andrew Borodin
c76c6820e6
lib/tty/color.c: use variable of tty_color_pair_t type for default color pair.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:13 +03:00
Andrew Borodin
4a116608d4
tty: refactoring of color pairs definition.
...
Rename structure mc_skin_color_t -> tty_color_pair_t and move to lib/tty/color.h.
Rename members.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:13 +03:00
Andrew Borodin
2c01bd53cb
Ticket #4490 : code cleanup before 4.8.31 release.
...
tty: refactoring of color pairs definition.
Rename structure tty_color_pair_t -> tty_color_lib_pair_t. Rename members.
Rename tty_color_try_alloc_pair_lib() -> tty_color_try_alloc_lib_pair().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:13 +03:00
Andrew Borodin
6ca4ab4b4e
Rename FISH VFS to SHELL one.
2023-10-15 16:04:39 +03:00
Chris Severance
dba05b78ea
Ticket #4498 : broken stickchars (-a ) mode.
...
'mc -a' shows ^@ for most box drawing elements. Some drawing elements
only show as ^ as the @ is overwritten by other characters.
Revert "(mc_skin_lines_parse_ini_file): do not overwrite mc_tty_frm array in case of slow and ugly terminal."
This reverts commit 6d639ce942
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-22 22:03:49 +03:00
Andrew Borodin
bdc5665531
lib/strutil/strutil.c: remove trailing space.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-12 20:48:18 +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
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
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
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
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
0a9ecdeb98
Remove #include <errno.h> from files where errno is unused.
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
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
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
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
290a57b474
struct vfs_s_inode: add the 'user_data' member.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-01 13:04:41 +03:00
Andrew Borodin
49624e473b
Ticket #4450 : support PCRE2 in the search engine.
...
* m4.include/ax_path_lib_pcre.m4: replace by recent version from GNU
Autoconf Archive.
* m4.include/ax_check_pcre2.m4: get grom GNU Autoconf Archive.
* m4.include/mc-check-search-type.m4: support both PCRE versions.
* */*/Makefile.am: remove @CHECK_CFLAGS@ and @PCRE_LIBS@ ads they are
added via AX_PATH_LIB_PCRE and AX_CHECK_PCRE2.
* lib/search.h, lib/search/: add support of PCRE2. Thanks broly <gagan@hotmail.com>
for the initial patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-25 10:07:41 +03:00
Andrew Borodin
c157b048e5
Listbox window: rename functions.
...
create_listbox_window -> listbox_window_new
create_listbox_window_centered -> listbox_window_new_centered
run_listbox -> listbox_run
run_listbox_with_data -> listbox_run_with_data
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:24 +03:00
Andrew Borodin
d9383ba8b3
(buttonbar_find): rename from find_buttonbar.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:24 +03:00
Andrew Borodin
fd2d5b49ac
Menu: rename functions.
...
menu_entry_create -> menu_entry_new
menu_separator_create -> menu_separator_new
create_menu -> menu_new
destroy_menu -> menu_free
find_menubar -> menubar_find
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:24 +03:00
Andrew Borodin
2a6580127a
VFS: mc_fgetflags, mc_fsetflags: new APIs.
...
(mc_fgetflags): fgetflags(3) VFS wrapper.
(mc_fsetflags): fsetflags(3) VFS wrapper.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:24 +03:00
Andrew Borodin
47da3a764a
(dlg_default_destroy): send MSG_DESTROY to the dialog itself
...
...to avoid various memory leaks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:24 +03:00