Commit Graph

1545 Commits

Author SHA1 Message Date
Andrew Borodin
76a5f70f5b Ticket #3992: improve support of Windows 1251 encoding on Solaris.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-07-13 08:58:27 +03:00
Andrew Borodin
7eaa51c79b Fix broken hotkeys in menu.
Regression was introduced in f5f78ea658.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-18 09:34:00 +03:00
Andrew Borodin
651c3539b6 VFS: trivial optimization
* (vfs_s_opendir): test if path is invalid or not ASAP.
  * (vfs_s_readlink): likewise.
  * (vfs_s_open): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
9df841478b VFS: move flush member from vfs_s_subclass to vfs_class.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
45bd20ab0b VFS: move logfile member from vfs_s_subclass to vfs_class.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
94c0b79f37 VFS: change vfs_class::nothingisopen members
Do not free VFS before nested one.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
5b0f177e62 vfs_class::nothingisopen: return gboolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
3d6d6bd9a6 lib/vfs/gc.c: yet another fixups
* (vfs_expire): refactor.
  * Fix typos.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
7548679271 VFS: invalidate file descriptors after close.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
210ccc2f65 (vfs_path_from_str_uri_parser): get rid of extra type cast.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
ff7d1728e2 Menubar: support Home and End actions for Menubar.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-09 12:06:10 +03:00
Ilia Maslakov
4e5488d5b2 Menu: implement drop/execute menu by hotkey.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-09 12:06:10 +03:00
Ilia Maslakov
f5f78ea658 Ticket #212: implement keybinding for menu.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-09 12:06:10 +03:00
Andrew Borodin
7ddd4e9bb4 Ticket #3452: mcviewer: implement temporary change of search direction.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 20:47:51 +03:00
Andrew Borodin
8724c80b7a lib/tty/key.c: fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:31:20 +03:00
Andrew Borodin
c6f269a2c3 lib/tty/key.c: (SelectList): rename to select_t and refactor using GSList.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
0c66d9cef6 extfs: refactoring: use standard VFS structures.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
533cbbd971 VFS: make vfs_file_handler related macros more readable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:24 +03:00
Andrew Borodin
6d21416672 VFS: derive VFS-specific file handler class from vfs_file_handler_t.
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
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
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
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
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
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
7fb06b3105 Use g_queue_clear_full().
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
1dd8a47987 Ticket #3955: code cleanup before 4.8.23 release.
Update copyright years.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:44:40 +03:00
Andrew Borodin
ba6845f2d6 (vfs_stamp_path): get rid of path conversion.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-01-13 12:33:06 +03:00
Andrew Borodin
93f790dc7c Sync with gnulib e96dcbcbc5142bd04c6c2e9e4595d9bea910fb3b.
* m4.include/gnulib/fsusage.m4: (gl_FILE_SYSTEM_USAGE): Don't define
  STAT_STATFS2_FS_DATA.
* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't
  define MOUNTED_GETMNT.
* src/filemanager/filegui.c: remove Ultrix related includes.
* src/filemanager/mountlist.c: Remove STAT_STATFS2_FS_DATA case.
  Remove MOUNTED_GETMNT case.
* lib/tty/tty-internal.h: remove Ultrix-related define.
* src/vfs/smbfs/helpers/include/includes.h: Likewize
* doc/FAQ: Update OS list.
* doc/INSTALL: Likewize.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
654b58d2b5 Sync with gnulib 23671eec22f5221a2dff50942f24c41bcf9caeaf.
fsusage, mountlist: Remove support for Dynix/ptx.

* m4.include/gnulib/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
* m4.include/gnulib/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Don't test for
  libseq.
  (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't test for MNTTABNAME.
* lib/stat-size.h: Don't mention the Sequent bug.
* src/filemanager/mountlist.c: Don't test for MNTTABNAME. Remove
  _SEQUENT_ case

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
792d25a48b Sync with gnulib 4d4877e6c2123c4862c321f3eab28a55bf886216.
Remove support for AIX PS/2.

* m4.include/gnulib/fsusage.m4: (gl_PREREQ_FSUSAGE_EXTRA): Don't check
  for dustat.h.
* lib/unixcompat.h: Remove code for AIX PS/2.
* lib/stat-size.h (ST_NBLOCKSIZE): Likewise.
* lib/vfs/vfs.c: Likewise.
* src/filemanager/mountlist.c: Likewise.
* src/vfs/smbfs/helpers/include/includes.h: Likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
1fec6e9854 Partially revert "VFS: (vfs_s_subclass): make the derived class from vfs_class."
This reverts commit 5d1284c4a6.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-10 12:47:12 +03:00
Andrew Borodin
c7206191bc Revert "VFS: make VFS-specific super class as derived one from vfs_s_super."
This reverts commit ab033ad318.
2018-09-10 12:47:12 +03:00
Andrew Borodin
c91e3d5edb Revert "VFS: make VFS-specific file handler class the derived one from vfs_file_handler_t."
This reverts commit 2d58e4d624.
2018-09-10 12:47:12 +03:00
Andrew Borodin
88d6157323 (vfs_preallocate): check mc_global.vfs.preallocate_space before call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
669a8e3e17 (dlg_run_done): fix possible NULL dereference.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
b9194d8c8a (dlg_init): fix possible NULL dereference.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00