Commit Graph

14494 Commits

Author SHA1 Message Date
Andrew Borodin
86401f30dc VFS: make vfs_super related macros more readable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
3e08cc7226 VFS: derive VFS-specific super class from vfs_s_super.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
d51f1f4963 VFS: refactor VFS unit initialization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
672ba46c8b VFS: make vfs_class and vfs_s_subclass related macros more readable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
0fbd98fece Join vfs_class_flags_t and vfs_subclass_flags_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
c764d60238 VFS: (vfs_s_subclass): derive from vfs_class.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
f11c78f9d0 (vfs_unregister_class): new API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
45b10aed6b VFS GC: fixups of reimplement using GSList.
Fixups for commit f45ea691db.
Don't use g_list_foreach() for list that is being modified.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
28cdea55cd Revert "VFS GC: use mc_timer."
This reverts commit f21f27c5ae
to fix an unexpected segfaults.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
3b997974ec Refactor dialog command execution. 2019-04-27 19:29:24 +03:00
Andrew Borodin
c97893279c tests: fix comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
acc0bbdfbf tests/lib/strutil/parse_integer.c: use macros, fix comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
e1461bcfd3 tests: fix memory leaks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
d6ed25d143 tests: set up writable directory to allow create temporary files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
8388de9b50 m4.include/mc-tests.m4: fix bash-isms.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
1db894f63c (mc_skin_init): don't check TTY color supports if not required.
Don't check TTY color support if skon doesn't require 256 colors or
true colors.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
28926c5760 (find_parm_callback): get rid of extra type casting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
8235df18af (stop_dialogs): remove extra check.
Continue 433ae45bdd.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
4d219ec5c1 (subst_defines): refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
6b67d123d9 (apply_rules_going_right): minor optimization.
Make easy tests first, call strlen() at the end of test sequence.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:23 +03:00
Andrew Borodin
fd3df33310 src/edit/syntax.c: define size for syntax rules array.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:23 +03:00
Andrew Borodin
3bb602d86f src/edit/syntax.c: cleanup empty macro.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:23 +03:00
Andrew Borodin
516eca2658 src/edit/syntax.c (syntax_keyword_t, context_rule_t): use gboolean for boolean fields.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:23 +03:00
Andrew Borodin
000235c7ee Ticket #3955: code cleanup before 4.8.23 release.
src/editor/syntax.c: fix coding style.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:23 +03:00
TerraTech
91d6d55baf Ticket #3981: sh.syntax: allow for indented 'function' highlighting.
This will allow for the following:

  if want_foo; then
      function foobar() {
          echo "foo"
      }
  else
      function foobar() {
          echo "bar"
      }
  fi
  foobar

Signed-off-by: TerraTech <1118433+TerraTech@users.noreply.github.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:17:54 +03:00
Andrew Borodin
8196833781 Merge branch '3958_slow_dir_delete'
* 3958_slow_dir_delete:
  Ticket #3958: speed up of large directory structures delete.
2019-03-24 15:00:19 +03:00
Andrew Borodin
19fa75f7a2 Ticket #3958: speed up of large directory structures delete.
(file_progress_show_deleting): reduce update rate of delete status
window. Use the way as in c31e413b2a.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-24 14:59:03 +03:00
Andrew Borodin
5389e3fc8e Merge branch '3208_gpm_connect_attempt'
* 3208_gpm_connect_attempt:
  Ticket #3208: fix failed gpm connect for vc /dev/tty0.
2019-03-24 14:48:23 +03:00
Mikulas Patocka
d1fd9f2303 Ticket #3208: fix failed gpm connect for vc /dev/tty0.
How to reproduce the bug:

* compile mc with gpm support
* run the gpm daemon on the console
* login to the machine with ssh from console on another machine
* run mc

At this situation, keyboard response will be sluggish and mc will consume
CPU time when idle. The reason is that mc is trying to reopen the Gpm
connection over and over again and gpm will try to close the connection
over and over again (because the user is not on the local console).

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-24 13:37:26 +03:00
Andrew Borodin
673dd73ac0 Merge branch '3975_syntax'
* 3975_syntax:
  Use ini.syntax for systemd cofiguration files.
  Ticket #3975: expand syntax highlighting rules.
2019-03-11 11:42:45 +03:00
Vadim Illarionov
61e390dfc7 Use ini.syntax for systemd cofiguration files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-11 11:40:53 +03:00
Vadim Illarionov
359129b524 Ticket #3975: expand syntax highlighting rules.
Expand file name regexp for sh.syntax.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-11 11:37:41 +03:00
Andrew Borodin
5454a1c740 Fix indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-10 11:55:45 +03:00
simwin
7c5d4d337f Ticket #3973: add featured-plus skin.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-08 17:05:20 +03:00
Andrew Borodin
657d8e8822 Merge branch '3935_file_exists_extra_options'
* 3935_file_exists_extra_options:
  Update po/*.po files.
  (overwrite_query_dialog): add "Don't overwrite with zero length file" option.
  (overwrite_query_dialog): redesign the overwrite query dialog.
  (overwrite_query_dialog): add "If smaller" option.
  Ticket #3935: extra optopns in n "File exists" query dialog.
2019-03-02 12:43:41 +03:00
Andrew Borodin
a7a9d11bbb Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-02 12:29:23 +03:00
Andrew Borodin
ac689ea726 (overwrite_query_dialog): add "Don't overwrite with zero length file" option.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-02 12:26:18 +03:00
Andrew Borodin
a07cb50069 (overwrite_query_dialog): redesign the overwrite query dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-02 12:25:29 +03:00
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