- current POTFILES.in file detection can output wrong filename
xgettext output
#: src/background.c:221 src/filemanager/file.c:858 src/filemanager/file.c:952
result in
src/background.csrc/filemanager/file.csrc/filemanager/file.c
- simplify POTFILES.in file detection by using grep only
- find command search files only
- find/grep option should be Solaris OS friendly
- move POTFILES.in creating to configure.ac (more BUILD friendly and future autogen.sh get rid possibility)
- autoconf AC_CONFIG_COMMANDS_POST support since <2.64
- comparing current vs simplify grep file detection result in additional files:
lib/search/regex.c
lib/widget/history.c
lib/widget/quick.h
src/diffviewer/internal.h
src/diffviewer/search.c
src/editor/editdraw.c
src/editor/etags.c
src/filemanager/command.c
src/vfs/tar/tar.c
src/viewer/lib.c
tests/src/execute__common.c
tests/src/execute__execute_with_vfs_arg.c
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
src/filemanager/hotlist.c:1046:26: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
1046 | if (title == NULL || *title == '\0' || url == NULL || *url == '\0')
| ^~~~~~
- distinct def_text and title/url
- simplify and move quick_dialog return evaluation in same function add_new_entry_cmd()
Found by Clang-19 Static Analyzer.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fix Use-after-free in sftpfs_fill_connection_data_from_config()
Found by Clang-19 Static Analyzer
The bug was introduced in 4c998ac636.
Reported-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
When tar data block unexpected end then header_copy get freed but
"goto ret:" freed header_copy again.
Do not free header_copy at exit from the loop of reading tar blocks.
Found by Clang-19 Static Analyzer.
The bug was introduced in 8223f82857.
Reported-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Current browser selection happen on compile time and should change to runtime selection.
- add chromium browser to list
- bonus: remove shellcheck warning
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
After move to the end of file, set the start positions to EOL
to make backward search starting directly from EOL.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Sync regex search way with mcedit: handle BOL (^) metacharacter.
* (WView::search_line_type): new member.
* (mcview_search_init): init WView::search_line_type.
* (mcview_find): sync with edit_find().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
* (mcview_search): move to search.c.
* (mcview_do_search): make static.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Refactoring.
* (mc_search_line_t): rename from edit_search_line_t and move to
lib/search.h.
* (mc_search_get_line_type): rename from edit_get_search_line_type()
and move to lib/search/regex.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
(file_eta_prepare_for_show): check if 'eta_secs' is too large to display
as integer. If yes, display "--".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 3205_eta: (29 commits)
Update po/*.po files.
doc: update EN and RU man pages.
Calculate pauses in file operations.
File copy/move: make ETA accurate.
(calc_copy_file_progress): clarify calculation of BPSes and ETAs.
(panel_operate): use intermediate variable for better indentation.
(copy_file_file): clarify handling of mc_open() errors.
(copy_file_file): fix handling of mc_open() error.
(calc_copy_file_progress): rename from copy_file_file_display_progress().
(file_progress_show_total): add 'tv_current' argument.
(file_progress_show_total): use 'copied_bytes' to show numeric value.
(file_progress_show_count): remove 'done' and 'total' arguments.
(erase_dir_iff_empty): remove 'count' argument.
(file_op_context_t): rename members.
(copy_file_file): reduce variable scope, change order of progress update.
(file_op_context_t): reorder members.
Move content of src/filemanager/fileopctx.[ch] to src/filemanager/filegui.[ch].
(file_op_total_context_t): remove. All members were moved to file_op_context_t.
(file_op_total_context_t): rename members.
(copy_file_file_display_progress): remove dead code.
...