Andrew Borodin
65e12d1a9f
(dlg_redraw): rename to dlg_draw.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin
60fe701b76
(widget_redraw): rename to widget_draw.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin
35f14be028
(widget_move): rename to widget_gotoyx.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin
baca4ba045
Widget and WDialog API changes:
...
* (widget_destroy): new API to destroy widget.
* (del_widget): don't destroy widget after remove it from dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin
093571938a
Ticket #4035 : fix compile failure on OS X 10.9.
...
Fix duplication of menu_map definition.
Move menu_map definition to lib/widget/menu.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-11-23 17:41:58 +03:00
Andrew Borodin
92eaf22ed7
Ticket #4027 : (do_move_dir_dir): totals aren't computed before move of a single directory.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-11-19 21:09:18 +03:00
Andrew Borodin
68d9961977
Ticket #4022 : fix compile failure on AIX 7.2.
...
Rename MC VFS flags to avoid name conflicts with system-wide VFS flags
on some OSes (such as AIX).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-11-18 21:27:56 +03:00
Joshua Watt
d009ea7b8b
Ticket #4031 : add option to control configure args.
...
Embedding the configure time options into the executable can lead to
non-reproducible builds, since configure options often have embedded
paths. Add a configure time option to control if the configure args are
embedded so this can be disabled.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-11-10 16:24:22 +03:00
Andrew Borodin
41abcbf706
Ticket #3380 : enable subshell in standalone mceditor, mcviewer, and mcdiffviewer.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-10-02 17:14:42 +03:00
Andrew Borodin
0dacce4228
Do not include <sys/select> globally via "lib/global.h".
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
a2d32c22bb
(display_bits_box): use tty_display_8bit().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
3daff7838f
(panel_options_box): don't apply integer value to boolean variable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
a0c77a5ccf
(edit_files): fix shadow of variable declaration.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
6190f37f53
mcviewer: clarify of HAVE_CHARSET usage.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
7baaca3fe1
(setup_panels): fix origin and size of panels.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
12a6af8f29
(ftpfs_dir_load): minor refactoring.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
7ce3ca0991
Make VFS faster a bit.
...
Each VSF entry is added to VFS using vfs_s_insert_entry() via
g_list_append(). For long lists, a lot of walking through entire list
is performed. To get rid that, change type of vfs_s_inode::subdir from
GList to GQueue.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
6dc337ff90
urar extfs: don't start path with ./ in file list.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
48ec7c3d8a
Ticket #3997 : code clean up before 4.8.24 release.
...
(subshell_handle_cons_saver): don't call waitpid() twice.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin
3c4fe21108
Ticket #4019 : fix SIGWINCH handling,
...
Fix regression introduced in 37ffc02422
.
(tty_got_winch): don't read FIFO, just check whether it os empty or not.
It can be called many times without lost of info about SIGWINCH raises.
(tty_flush_winch): read from FIFO to make it empty.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 11:21:14 +03:00
Andrew Borodin
95432ec457
Ticket #3859 : rotating dash generates way too much output.
...
(rotate_dash): draw rotating dash with maximum rate of 10 FPS.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-22 13:04:53 +03:00
Andrew Borodin
dc46dc0009
Ticket #3936 : update uc1541 extfs
...
...from https://github.com/gryf/uc1541 .
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-21 19:54:54 +03:00
blubbkm
7b187676c4
Ticket #4016 : (panel_mouse_callback): prevent run/open files with double right click.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-15 11:04:07 +03:00
Enrico Weigelt, metux IT consult
d2f86e698e
Fix .gitignore
...
autogen.sh generates a bunch of files aren't .gitignore'd yet.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 20:13:27 +03:00
Andrew Borodin
ef085af3ac
(dir_list_reload): refactoring.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
ef2931272b
(dir_list_load): get rid of goto.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
564351e1e5
Refactoring of directory read visualization.
...
Use dir_list callback to show rotaing dash.
Now src/filenamager/dir.c does not depend on the Widget subsystem.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
284c3de727
Add dir_list callback to visualize of directory reading.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
8c5737f558
(dir_list_load): show error message outside of this function.
...
(dir_list_reload): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
fcc8639169
(handle_path): change parameters type from int* to gboolean*.
...
(do_find): change variable type and reduce scope.
(do_external_panelize): change variable type.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
ea0fcc0fb8
(handle_dirent): change parameters type from int* to gboolean*.
...
(dir_list_load): change variable type and reduce scope.
(dir_list_reload): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
3b39cee81f
src/filemanager/layout.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
07d2f11712
(save_panel_dir): minor refactoring.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
97bc63d7ac
File manager: refactoring of MSG_RESIZE handling.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
6e4ea30fc3
diffviewer: refactoring of MSG_RESIZE handling.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
2ddd6b41a0
mcviewer: refactoring of MSG_RESIZE handling.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
5ca0dbab01
mcedit: refactoring of MSG_RESIZE handling.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
f6c4ae2f31
(setup_panels): refactoring: optimization
...
..,and change order of widget origin/size calculation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
2b55c54efc
Menubar is always on top line of screen.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
35d2590893
(create_file_manager): clarufy value of hint transparency.
2019-09-01 19:41:12 +03:00
Andrew Borodin
247af01a8e
(toggle_panels): join with view_other_cmd and rename to toggle_subshell.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
02f49a8f6d
src/subshell/proxyfunc.c: fix up includes.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
29110e5681
Move history operation routines from lib/widget/history.c to lib/mcconfig/history.c.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
500e49b50a
(fish_set_env): remove uneeded function call.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
596a6edc56
src/filemanager/cmd.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:06 +03:00
Andrew Borodin
d76cf51d54
src/filemanager/boxes.[ch]: unify some function names.
2019-09-01 19:34:45 +03:00
Andrew Borodin
d615e4b9b7
src/filemanager/find.c: test verbose flag before call of find_rotate_dash().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:34:45 +03:00
Andrew Borodin
40f82f2732
src/filemanager/find.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:34:45 +03:00
Andrew Borodin
37ffc02422
Ticket #117 : refactoring of SIGWINCH hangling.
...
Use pipe to collect consecutive raised SIGWINCH events.
Then handle multiple events at a time treating them
as a single one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:22:21 +03:00
Andrew Borodin
f52a6549d4
Ticket #4006 : remove Enter from Down menu key binding.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-23 12:44:06 +03:00
Andrew Borodin
ade0e70eb4
Remove archives from temporary directory after VFS timeout or at mc exit.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 10:04:04 +03:00
Andrew Borodin
e1a1990055
Remove check of "." and ".." directories.
...
Output of "list" command must not contain them.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 10:02:08 +03:00
Andrew Borodin
85bf9bec23
Ticket #4000 : extfs: nested archives are not removed...
...
...from temporary directory.
Initial step: don't insert "." and ".." to file/directory tree while
reading archive.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 10:02:08 +03:00
Andrew Borodin
fede9fb4f9
Editor and viewer history: support CK_Delete,
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:45:27 +03:00
Andrew Borodin
c4668b56f7
history: refactoring.
...
Prepare to support CK_Delete in editor and viewer history.
The filepos file contains file positions and bookmarks. We must keep
them.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:45:27 +03:00
Andrew Borodin
2ed7abc3fe
mceditor: support file history.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:45:27 +03:00
Andrew Borodin
f0c9e50f80
mcviewer: support file history.
2019-08-10 09:45:27 +03:00
Andrew Borodin
a4e36d079d
WListbox: add Edit, View and Enter keynindings.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:45:27 +03:00
Andrew Borodin
00f1229af3
Refactoring of show file history in the file manager.
2019-08-10 09:45:27 +03:00
Ilia Maslakov
87428aa8ea
added new keybindings (F3, F4) in history list.
...
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2019-08-10 09:45:27 +03:00
Ilia Maslakov
3e7b2c49dc
Ticket #2733 (a simple list of recently edited files)
...
Based on patch by Filip Sefrna <fsefrna@gmail.com>
added action 'EditorHistory' for call history dialog.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2019-08-10 09:45:27 +03:00
Adam Majer
dc830db839
Ticket #3921 : enable keyboard interactive authentication.
...
If SSH server does not support cleartext tunneled password
authentication and only 'keyboard interactive' authentication
instead, then we need to use different authentication
function along with a interactive callback.
Signed-off-by: Adam Majer <amajer@suse.de>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:35:45 +03:00
Andrew Borodin
c1b6d29b95
iso9660: report errors in copyout in case of isoinfo usage.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-07-20 19:09:38 +03:00
Andrew Borodin
afdc9719f3
Ticket #3933 : report iso9660 listing errors.
...
Variation 1:
Steps to reproduce:
* create empty .iso file (touch foo.iso)
* run 'mc' and press enter on empty .iso
Expected result: some error about invalid file format (sililar to what
F3 view would yield).
Actual result: mc elters a file as if it would be empty valid file.
Variation 2:
Steps to reproduce:
* pick valid .iso file
* deinstall all helper tools that handle .sio (isoinfo, xorriso, etc.)
* run 'mc' and press enter on empty .iso
Expected result: some error about invalid file format (sililar to what
F3 view would yield)
Actual result: mc enters a file as if it would be empty valid file
Variation 2 is especially confusing for users as it does not hint them
that they should install a tool to get it working. They just observe
silently broken behaviour.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-07-20 19:09:38 +03:00
Andrew Borodin
2120010cf9
Ticket #3996 : fix of broken dynamic paragraph formatting.
...
Revert "Ticket #1666 : fix paragraph formatting."
This reverts commit ccb7ab341e
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-07-20 19:02:45 +03:00
Andrew Borodin
92146f1033
smbfs: fix type of DEBUG macro arguments.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-17 10:39:53 +03:00
Andrew Borodin
c47f0c4bba
smbfs: fix pointer comparision.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-17 10:39:49 +03:00
Andrew Borodin
58d601c54b
(sfs_open): rename variable
...
...to fix the warning:
sfs.c:281:10: warning: declaration of 'sfs_info' shadows a global declaration [-Wshadow]
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-17 08:17:17 +03:00
Andrew Borodin
cc9b87e9cd
src/vfs/extfs/helpers/Makefile.am: clarify condition.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
7cf275db73
VFS: move src/vfs/extfs/helpers/sfs.ini to src/vfs/sfs.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
d4819e1fb6
src/vfs/sfs/sfs.c: refactor flags and options.
...
Use enum for SFS flags. Use array of structures for SFS info.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
f2203868c1
(sfs_init): refactor loop.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
db342d69ac
(sfs_vfmake): use gboolean instead of int for boolean variable was_percent.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
286e10679e
src/vfs/sfs/sfs.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
c1b604fa16
src/vfs/local/local.c: fix coding style.
...
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
01a1a01d4e
Rename VFS module initialization functions.
...
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
7d80e8a175
Always use vfs_s_subclass as base class for VFS modules.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +03:00
Andrew Borodin
70eba8c2d9
Ticket #3955 : code cleanup before 4.8.23 release.
...
(update_one_panel_widget): clarify call of mc_setctl().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-15 17:43:00 +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
936ba9618d
Ticket #3990 : (real_do_file_error): fix number of buttons in the dialog window.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-05-29 09:28:42 +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
2c44ec24c9
(mcview_execute_cmd): regroup actions.
2019-04-27 19:31:20 +03:00
Andrew Borodin
94eff3e2fd
(setup_mc): clarify call of add_select_channel().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
870c1db722
src/editor/edit.c: cleanup unused include.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
987b4e3234
(ftpfs_get_proxy_host_and_port): ret rid of host name duplcation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
a16db591e3
(ftpfs_open_socket): fix memory leak in case of proxy usage
...
...and remove pointless check.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
f19a10c657
src/vfs/ftpfs/ftpfs.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
6bbb2d9ded
src/vfs/ftpfs/ftpfs.c: use gboolean instead of int where reasonable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
e6fc6c81fa
(tar_read_header): refactor loop. Get rid of goto.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
745c3536fe
tar.c: move header decoding to separate function.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
075ad1e047
tar.c: lots of renaming to be close with the GNU tar source code.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
8e6bd77b6e
extfs: change some function arguments.
...
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
58d2f1be35
extfs: refactoring of open and read archive.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:29:25 +03:00
Andrew Borodin
445b427d37
(extfs_find_entry_int): minor optimization.
...
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
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
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
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
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
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
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
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
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
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
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
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
Andrew Borodin
4a25dc2e94
Report Aspell support (if enabled) in the output of mc -V.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
762c8ed2d1
src/filemanager/panel.c: (cd_up_dir): new function.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
8299455519
(parse_display_format): refactoring.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
3e92c40a38
Reafctor panel format storage: use GSList.
...
Rename structure.
Constify some function arguments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
27470f3989
Use input_is_empty() to check the state of WInput widgets.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Teresa e Junior
2a24ba2016
(init_subshell_precmd): remove irrelevant comments about fish."
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:58 +03:00
Andrew Borodin
5839db4fc9
src/filemanager/panel.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:58 +03:00
Andrew Borodin
798f3bb74e
Remove unised WPanel::format_modified.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:58 +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
f920c6cd37
Stamp path at panel destroy.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-01-13 12:33:07 +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
b4e0bf13c8
(nice_cd): allow create network connection from any panel type.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-01-13 12:33:06 +03:00
Andrew Borodin
96520f48c3
Ticket 3948: can't create network link from panel...
...
other than file list (tree, quick view, info).
Initial step: extend file panel creation API:
* create an empty panel;
* create panel with specified size.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-01-13 12:32:51 +03:00
Andrew Borodin
177c64cd2f
src/filemanager/panelize.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
03e69e1f36
Sync with gnulib 1ff0e9684bb83a8277ffe22ac125ce7e90f6702b.
...
mountlist: Remove support for Cray with UNICOS 9.
* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't
define MOUNTED_LISTMNTENT.
* src/filemanager/mountlist.c: Remove MOUNTED_LISTMNTENT case.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +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
0f3d0ea511
Sync with gnulib 8ae091f7c8cd35cc7dff82c544d04da6fd095e11.
...
Remove support for AIX 3.
* m4.include/gnulib/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Update comments.
* src/filemanager/mountlist.c: Likewise.
* doc/FAQ: Update OS list.
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
610bf3a9d9
Sync with gnulib cbc85bb67fc628349e0351b835efc9e91cd0482f.
...
fsusage, mountlist: Remove support for DolphinOS (an SVR3 variant).
* m4.include/gnulib/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
* src/filemanager/mountlist.c: Remove MOUNTED_GETMNTTBL case.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
00d3b8a468
Sync with gnulib be9e66b37c948df517ee905b4a9689a50946409c.
...
mountlist: Remove support for SVR2.
* src/filemanager/mountlist.c: Remove MOUNTED_FREAD case.
* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't
define MOUNTED_FREAD.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
f992628ae5
(make_symlink): rename variable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
392df60bc1
(do_move_dir_dir): rename variables.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
2fdc186123
(copy_dir_dir): rename variables.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
db716c3c7a
dir_list: fix memory leak when list is free'd.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
25a9aa1d45
Sync with gnulib f7a6286e04209da1bc7b1820002b6a5c32638369.
...
mountlist: Improve support for Solaris in 64-bit mode.
* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): On
Solaris 8 or newer, define MOUNTED_GETEXTMNTENT instead of
MOUNTED_GETMNTENT2.
* src/filemanager/mountlist.c: Add code for MOUNTED_GETEXTMNTENT case.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
6d593567d1
Sync with gnulib d1327df1f1c9bae26571e6699800c8d1c4712afb.
...
mountlist: Add support for Minix.
* m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't
use AC_CHECK_FUNCS to check for 'getmntinfo'.
* src/filemanager/mountlist.c: Update comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
849bfb26f8
Sync with gnulib 74c29c68bba3fe7c2f02eb3fc9f7ef196cec1bc6.
...
mountlist: Modernize platform lists.
* m4.include/gnulib/ls-mntd-fs.m4: Clarify which MOUNTED_* symbol
applies to which platforms, deemphasizing the obsolete ones.
* src/filemanager/filegui.c: Likewise.
* src/filemanager/mountlist.c: Likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
3b8ee664f2
src/background.c: clean up and fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
6d79aa7d5d
(destroy_task_and_return_fd): rename to destroy_task.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
08136039b6
Ticket #3915 : code clean up before 4.8.22 release.
...
(destroy_task_and_return_fd): fix access after free.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Andrew Borodin
071dbd9076
Ticket #3943 : fix crash when switching from subshell.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-03 20:49:48 +03:00
Andrzej Pronobis
c5aaeda39c
Ticket 3944: support user-defined prompt in the fish subshell.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-10-21 19:53:21 +03:00
Andrew Borodin
5dacf75cef
Ticket #3937 : fix crash when trying some sftp connections.
...
(sftpfs_recognize_auth_types): fix dereference of NULL returned by
libssh2_userauth_list().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-10-20 18:51:40 +03:00
Andrew Borodin
2c2e41c167
Handle hard link creation error.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-10-20 18:33:06 +03:00
Andrew Borodin
0f0dbc2b2e
(file_error): allow show query dialog w/o Rerty action.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-10-20 18:33:06 +03:00
Andrew Borodin
022f15d9f0
(check_hardlinks): refactoring:
...
* use is_in_linklist() to search the hard link in cache;
* reduce variable scopes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-10-20 18:33:06 +03:00
Andrew Borodin
c94cd7620d
(is_in_linklist): refactoring: return pointer to found link.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-10-20 18:33:06 +03:00
Andrew Borodin
7c9e3817ce
(check_hardlinks): make error message more verbose.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-10-20 18:33:06 +03:00
Andrew Borodin
7e5ee0e512
Ticket #3678 : handle hardlink creation errors.
...
Initial step: (check_hardlinks): refactopring:
* reorder and rename parameters;
* check number of hard links here;
* Do not fill struct with zero. Set up members explicitly instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-10-20 18:33:06 +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
b5a768200e
src/subshell/common.c: fix #ifdef.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 20:39:12 +03:00
Andrew Borodin
a7ff88d24c
(init_subshell): use openpty() to open master/slave devices for subshell.
...
Thanks Jesse R. Gorzinski <jgorzins@us.ibm.com> for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +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
357711da33
(filegui__check_attrs_on_fs): check copymove_persistent_attr before call.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
b684ce2565
Clarify usage of FL_NONE value.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
8cbb9cd1ac
extfs: optimization: get rid of extra memory duplication.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
32687c9c4e
(file_mask_dialog): don't return an empty string.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
0af1c270e2
(file_mask_dialog): grammar.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
42469e2016
(extfs_get_path): use standard VFS flags.
2018-09-09 19:10:43 +03:00
Andrew Borodin
a91323f7ac
(extfs_find_entry): use standard VFS flags.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
01a00e7ce6
extfs: constify some function arguments.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
c29f068457
extfs: refactoring: rename structures...
...
to unify it with standard VFS ones.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
81945d32ce
extfs: refactoring: rename some structure members...
...
to unify it with standard VFS structures.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
e86ba483c6
extfs: refactoring: struct inode: use struct stat instead of separate members.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
7f9fb38176
extfs: refactoring: use GSList to store archive list.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
2d58e4d624
VFS: make VFS-specific file handler class the derived one from vfs_file_handler_t.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
ab033ad318
VFS: make VFS-specific super class as derived one from vfs_s_super.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
5d1284c4a6
VFS: (vfs_s_subclass): make the derived class from vfs_class.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
86e9d85f21
(extfs_done): fix possible NULL dereference.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin
b9ea1b2a21
Ticket #3915 : code clean up before 4.8.22 release.
...
(fish_chmod): fix argument type of "%o" format.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:42 +03:00
Jesse R. Gorzinski
4da6ea8db3
(feed_subshell): on IBM i, read(1) can return 0 for a non-closed fd.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 18:57:56 +03:00
Andrew Borodin
877b5a6add
Find file: show pattern and content in the results window title.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 18:45:03 +03:00
Andrew Borodin
22e83bad08
src/filemanager/find.c: refactoring: optimize variable usages.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-04 10:36:13 +03:00
Andrew Borodin
953b7e9f23
Ticket #3924 : Find file: remember state (empty or not) of Content field.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-04 10:20:44 +03:00
gray_-_wolf
0493a5e90e
Ticket #1983 : support BTRFS's file clone operation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-03 09:33:32 +03:00
Andrew Borodin
7ac669c654
Ticket: 3908: quiet single file overwrite.
...
If target file exists, MC overwrites that file without confirmation.
The bug has not been fixed comletely in
7d73ce1cbe
.
Yet another test case:
1. Create files:
mkdir -p test1/1 test2/1
echo "1" > test1/1/file
echo "2" > test2/1/file
2. Run `mc test1 test2`.
3. Select directory "1" and press F6.
Result: "file" file is overwritten w/o confirmation.
Expected result: since the "file" file exists the confirmation dialog
must be shown.
The problem is: confirmation dialog requires context UI which was not
created in case of single directory move/rename operation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-07-28 17:21:24 +03:00
Andrew Borodin
f75430d68c
(operate_one_file): remove unescape of source and destination filenames.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-07-01 20:00:36 +03:00
Andrew Borodin
aea06fbc7a
Ticket #3923 : fix of file name escaping in file operations.
...
Revert "(operate_single_file): make src and dest file name unescaping"
This reverts commit ef5d346dd9
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-06-30 11:33:49 +03:00
moko
5f603638de
Ticket #3917 : preserve atime/mtime over sftpfs.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-06-03 14:54:01 +03:00
Yury V. Zaytsev
b44bfee6bf
Ticket #3789 : remove faulty test in rpm helper to detect CONFLICTS tag
...
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2018-05-27 15:17:31 +02:00
Andrew Borodin
8f7d44ef7f
Ticket #3914 : %view not piping command output to internal viewer in user menu.
...
Revert "(execute_menu_command): fix mcview_viewer() call."
This reverts commit 2043ef74a9
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-05-07 09:07:37 +03:00
Andrew Borodin
34712ec05b
Ticket #3913 : implement safe file overwrite.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-04-25 11:36:10 +03:00
Andrew Borodin
7d73ce1cbe
Ticket: 3908: quiet single file overwrite.
...
If target file exists, MC overwrites that file without confirmation.
The bug was introduced in #3149 .
How to reproduce:
1. Create two files: `touch a aa`.
2. Stay on "aa".
3. Make sure that Options/Confirmation.../Overwrite option is checked on.
4. Press Shift-F6
5. Edit the "to:" value to "a" ("a" file exists) and press Enter.
Actual result:
The "a" file is overwritten w/o confirmation.
Expected result:
Since the "a" file exists the confirmation dialog must be shown.
The problem is: confirmation dialog requires context UI which was not
created in case of single file rename operation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-04-07 13:13:53 +03:00
Adam Borowski
5eb9bd605e
Ticket #3906 : ZSTD support.
...
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-03-19 15:00:23 +03:00
Andrew Borodin
a2a63aa8c1
Ticket #3898 : mcedit doesn't save all opened files.
...
(edit_quit): do not call widget_select() while direct iterating editor
windows because it changes the window position in Z order. Collect
modified files in separate list.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-12 21:11:56 +03:00
Andrew Borodin
c139ba72ae
Ticket #3897 : mcedit: broken extended key mode.
...
(edit_dialog_callback): do not reset the extended mode if command
was not handled.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-12 21:10:43 +03:00
Andrew V. Samoilov
de242255dc
(edit_do_search): use gboolean. Remove unused computations.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew V. Samoilov
06eac9f17d
(etags_set_definition_hash): make buf stack variable.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew Borodin
9b74ff8653
str_convert_to_input() never returns NULL.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
454e23d48f
(edit_collect_completions): str_convert_to_display() never returns NULL.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
2a973f7a46
Use str_move() where possible.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
8b6f4ef2c2
Use gboolean instead of int in file/dir sort related functions.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
56081caaae
(ftpfs_command): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
6d3d6c9b45
FTP: fix some calls of ftpfs_command().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
ec80df187c
FISH: optimize creation of FISH commands.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
aafc77c8f9
src/vfs/fish/fish.c: allocate buffer for command dynamically.
...
Continue 53a1d52ed9
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew V. Samoilov
63d9fc6b0a
smbfs: code cleanup
...
* (sys_select): fix }
* (sys_open): commented out
* (sys_random, sys_srandom): remove unused functions
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew V. Samoilov
f963a74a8e
smbfs/helpers: comment out unused code.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew V. Samoilov
a02c353ab9
smbfs/helpers: Comment/remove unused code. Reduce .data
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew V. Samoilov
6a47e7bce9
(sesssetup_user): make static const char[] instead of pstring.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew V. Samoilov
b207798426
(events_init): make standard_events const.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew Borodin
95e1ab3064
vfs: use LS_NOT_LINEAR constant.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
c524d6d49c
src/cons.handler.c: fix include.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
e151b0756f
src/usermenu.c: cosmetics.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
80a4982d95
Refactor file manager creation.
...
* (create_panels_and_run_mc): rename to create_file_manager.
Move call of dlg_run() to do_nc().
* (create_panels): create file panels only. Move creation of
other widgets to create_file_manager().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andreas Mohr
00416d5cf3
(my_type_of): remove unreachable code.
...
Found by Clang 4.0.1.
edit.c:896:16: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
return 0x80000000UL;
^~~~~~~~~~~~
(whole my_type_of() is suspect)
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andreas Mohr
ac9e4c321a
(panel_recursive_cd_to_parent): fix potential null pointer dereference.
...
Found by GCC 6.4.0.
panel.c: In function 'panel_reload':
panel.c:4188:40: warning: potential null pointer dereference [-Wnull-dereference]
if (IS_PATH_SEP (panel_cwd_path[0]) && panel_cwd_path[1] == '\0')
../../lib/global.h:132:26: note: in definition of macro 'IS_PATH_SEP'
#define IS_PATH_SEP(c) ((c) == PATH_SEP)
^
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andreas Mohr
ae3cf817f4
Cleanup implicit-fallthrough warnings.
...
Found by GCC 7.2.0
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00