Commit Graph

14356 Commits

Author SHA1 Message Date
Andrew Borodin
67653322a3 (overwrite_query_dialog): add "If smaller" option.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-02 12:25:03 +03:00
Andrew Borodin
e6397c0561 Ticket #3935: extra optopns in n "File exists" query dialog.
(overwrite_query_dialog): rename "Update" button to "If older".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-02 12:25:03 +03:00
Andrew Borodin
e7249a88de Merge branch '3956_file_version_sort_fixes'
* 3956_file_version_sort_fixes:
  Fix file version sort.
  Ticket #3905, 3956: fix file version sort.
2019-03-02 12:18:14 +03:00
Andrew Borodin
a2a5fa017e Fix file version sort.
Use filevercmp() instead of str_verscmp().
Source code of filevercmp() is taken from Gnulib.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-02 11:24:07 +03:00
Andrew Borodin
2163009270 Ticket #3905, 3956: fix file version sort.
* Update str_verscmp implementation: sync with Gnulib.
  * Add tests. Testcases are taken from Gnulib.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-20 15:42:53 +03:00
Andrew Borodin
e2b8a50cea Merge branch '3487_syntax_highlighting_fixes'
* 3487_syntax_highlighting_fixes:
  mcedit: fixed syntax highlighting bug in .c and .cxx syntax scripts
  Ticket #3487: mcedit: fixed invalid syntax highlighting
2019-02-09 10:42:58 +03:00
Sergii Pylypenko
deceefab74 mcedit: fixed syntax highlighting bug in .c and .cxx syntax scripts
To reproduce, open this .c file in mcedit (remove backslashes):

/* this preprocessor macro is not colorized,
   when there is whitespace before '#' and the next line is not empty */
\  #if not_colorized
int code;

/* this preprocessor macro is colorized properly, the next line is empty */
\  #if colorized

int code2;

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-09 10:40:43 +03:00
Sergii Pylypenko
49493dc8e0 Ticket #3487: mcedit: fixed invalid syntax highlighting
...when both context and keyword end with a newline.

To reproduce, create .c or .cxx file and open it in mcedit:

\#endif // preprocessor macro with one-line comment
int code; /* <-- this line is colorized incorrectly */
int code2; /* <-- next line is colorized properly */

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-09 10:40:43 +03:00
Andrew Borodin
e806c2bac6 Merge branch '3955_cleanup'
* 3955_cleanup: (50 commits)
  (mc_AC_GET_FS_INFO): rename to mc_GET_FS_INFO...
  Sync with gnulib 5d6ca1aeeb04b9b0cd760529d548ac26675ef9b9.
  configure.c: fix AX_GCC_FUNC_ATTRIBUTE detection on custom CFLAGS
  (panel_new_with_dir): variable 'err' is assigned a value that is never used.
  (load_setup): reduce variable scope.
  (mcview_display_hex): reduce variable scope.
  (check_hardlinks): suspicious condition (assignment + comparison).
  src/filemanager/filegui.c: fix coding style.
  File operations: rename variables.
  Clarify checks of dialog and widget existence.
  Sync with gnulib a3d1c7849936e481ae10dea5312a36a448a5d5bf.
  Sync with gnulib 248cb6a2499ffa5a9e652d05e61c4a959fbae605.
  VFS GC: use mc_timer.
  VFS GC: reimplement using GSList.
  vfs_stamping: make opaque.
  src/filemanager/treestore.c: fix coding style, minor refactoring.
  src/filemanager/tree.c: fix coding style, minor refactoring.
  WTree: use gboolean type for boolean members.
  (find_do_view_edit): Remove unused variable. Found by PVS-Studio:V575
  (smbfs_fake_share_stat): Remove unneeded g_free(NULL) (PVS-Studio:V575)
  ...
2019-02-09 10:35:47 +03:00
Andrew Borodin
dc999a23eb (mc_AC_GET_FS_INFO): rename to mc_GET_FS_INFO...
since it is not from Autoconf.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:01 +03:00
Andrew Borodin
392a9b6f92 Sync with gnulib 5d6ca1aeeb04b9b0cd760529d548ac26675ef9b9.
Merge m4.include/gnuluib/{mountlist,ls-mntd-fs}.m4 files.
Remove m4.include/gnuluib/ls-mntd-fs.m4.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:01 +03:00
Andreas Mohr
ee013b383f configure.c: fix AX_GCC_FUNC_ATTRIBUTE detection on custom CFLAGS
AX_GCC_FUNC_ATTRIBUTE detect attribute feature by compiler warnings.
Custom or unrecognized CFLAGS can causes extra warnings so attribute
check failed.

Reset CFLAGS and restore after AX_GCC_FUNC_ATTRIBUTE call.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:01 +03:00
Andreas Mohr
9f4e2b945f (panel_new_with_dir): variable 'err' is assigned a value that is never used.
Found by cppcheck 1.81

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:01 +03:00
Andreas Mohr
2153fa8b61 (load_setup): reduce variable scope.
Found by cppcheck 1.81.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:01 +03:00
Andreas Mohr
cedf33301a (mcview_display_hex): reduce variable scope.
Found by cppcheck 1.81.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:01 +03:00
Andreas Mohr
371d69e8ba (check_hardlinks): suspicious condition (assignment + comparison).
Clarify expression with parentheses.

Found by cppcheck 1.81.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
04e26ca78b src/filemanager/filegui.c: fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
6fb25ed8ce File operations: rename variables.
(move_file_file): rename variables.
(query_replace): likewise.
(file_progress_real_query_replace): likewise.
file_op_context_ui_t): rename members.
(erase_dir): rename argument.
(file_progress_show_source): likewise.
(file_progress_show_target): likewise.
(my_mkdir_rec): likewise.
(my_mkdir): likewise.
(my_rmdir): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
433ae45bdd Clarify checks of dialog and widget existence.
Widget list in the dialog cannot contain empty elements.
Dialog list cannot contain empty elements too.
Therefore simplify some checks.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
1c621d1a86 Sync with gnulib a3d1c7849936e481ae10dea5312a36a448a5d5bf.
src/filemanager/mountlist.c: use Linux code on Android.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
5505ed054d Sync with gnulib 248cb6a2499ffa5a9e652d05e61c4a959fbae605.
src/filemanager/mountlist.c: port better to Android.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
f21f27c5ae VFS GC: use mc_timer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
f45ea691db VFS GC: reimplement using GSList.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
d451d5978f vfs_stamping: make opaque.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
66cf2a5a75 src/filemanager/treestore.c: fix coding style, minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
f28a5ed9e4 src/filemanager/tree.c: fix coding style, minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew Borodin
9bc3f5db29 WTree: use gboolean type for boolean members.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +03:00
Andrew V. Samoilov
326ecb9207 (find_do_view_edit): Remove unused variable. Found by PVS-Studio:V575
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2019-02-03 13:10:00 +03:00
Andrew V. Samoilov
1fd726e70c (smbfs_fake_share_stat): Remove unneeded g_free(NULL) (PVS-Studio:V575)
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2019-02-03 13:09:59 +03:00
Andrew V. Samoilov
ceefccbd5a (tree_do_search): fix possible off-by-one (PVS-Studio:V557)
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2019-02-03 13:09:59 +03:00
Andrew V. Samoilov
05ea41cdb5 (load_setup_get_keymap_profile_config): fix possible use-after-free [PVS-Studio]
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2019-02-03 13:09:59 +03:00
Andrew Borodin
912a182aad (init_layout): rename to layout_dlg_create.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:09:59 +03:00
Andrew Borodin
846e2b9888 (get_display_type): rename to get_panel_type.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:09:59 +03:00
Andrew Borodin
615f29d7d5 (set_display_type): rename to create_panel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:09:59 +03:00
Andreas Mohr
40b2681294 src/man2hlp.in: support partly .RE macro.
To get rid of following warning

    man2hlp: Warning: unsupported command .RE in file "../../doc/man/mc.1" on line 4317

support at least 'break' feature for .RE macro

See https://www.gnu.org/software/groff/manual/html_node/Man-usage.html
    The macros RS and RE also cause a break but do not insert vertical space.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
54215184f5 (editcmd_dialog_select_definition_show): minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andreas Mohr
0327191c24 editcmd_dialogs.c: Cleanup -Wcast-align warning
Found by Clang 6.0.1

editcmd_dialogs.c:474:20: warning: cast from 'char *' to 'etags_hash_t *' (aka 'struct etags_hash_struct *') increases required alignment from 1 to 8 [-Wcast-align]
        curr_def = (etags_hash_t *) tmp_curr_def;
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
8dcc5d42b0 doc/NEWS: indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andreas Mohr
a4e9e6191a autoconf: remove obsolete ac_onceonly.m4 file
Mininum requirement is autoconf 2.60
This file is only needed for autoconf <= 2.59

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andreas Mohr
217fd64afd autoconf: AC_TRY_LINK is obsolete, use AC_LINK_IFELSE instead.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andreas Mohr
8788ff7010 autoconf: AC_PROG_LIBTOOL is obsolete, use LT_INIT instead.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andreas Mohr
8e12753bfc autoconf: AC_ERROR is obsolete, use AC_MSG_ERROR instead.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
7fb06b3105 Use g_queue_clear_full().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
aa9d18e3ed (examine_cd): refactoring: use GString.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
f4d448629f lib/util.c: fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
1876ef7b84 lib/utilunix.c: fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
c652ab9ccc mcviewer: remove useless assertions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
e13ac553d3 (edit_clean): no need in NULLization before purge.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andreas Mohr
5b858d8e6e Fix implicit fallthrough.
Signed-off-by: Andreas Mohr <and@gmx.li>
2019-02-03 12:47:59 +03:00
Andrew Borodin
ae6f15f29e tar.c: cleanup: remove unused defines, replace tabs with spaces.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00