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
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
eb507862ff
(str_ptr_array_join): constify argument.
...
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
a38c7f19e9
Ticket #3453 : Find file: show pattern and content in the results dialog title.
...
Initial step:
* (dlg_set_title): new API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-04 10:26:35 +03:00
Andrew Borodin
2e5cd866f9
Check linux/fs.h file.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-03 09:44:42 +03:00
Andrew Borodin
23a2056a18
(vfs_clone_file): clarify errno in case of bad file descriptors.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-03 09:33:32 +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
Samuel Bingner
d352220604
Ticket #3930 : clarify name of struct stat members for Apple compilation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-08-19 11:37:20 +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
566992da32
Ticket #1620 : change file highlighting defaults.
...
Now file highlighting by extension is case insensitive by
default.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-18 12:05:05 +03:00
Andrew V. Samoilov
af8b0ce339
(mc_deserialize_str): trivial optimization.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew V. Samoilov
dfd6d99e1c
(str_8bit_encodings[], str_utf8_encodings[]): make const.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew Borodin
d70a899c16
(convert_from_8bit_to_utf_c2): use convert_from_8bit_to_utf_c().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
c2e2a33358
lib/charsets.c: fix coding style, trivial optimizations.
2018-02-04 11:30:23 +03:00
Andrew Borodin
c04f8776de
(mc_search__recode_str): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
c511968cd4
(mc_search__get_one_symbol): cosmetics.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
52d1980c46
strutil: character test functions return gboolean instead of int.
...
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 V. Samoilov
d78fc418ec
(get_codepage_index): minor optimizations.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew V. Samoilov
35376105d4
(vfs_url_split): Fix 2 memory leaks found by valgrind.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew V. Samoilov
6f6c676776
(mc_event_mass_add): make events const.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2018-02-04 11:30:23 +03:00
Andrew Borodin
af466458b7
vfs: create enum vfs_linear_state_t instead of defines.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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
cb354e5490
(vfs_file_handler_t::changed): change type from int to gboolean.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
a514ce6d13
(vfs_s_super::want_stale): change type from int to gboolean.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
f1d9b67bb5
lib/vfs/direntry.c: apply cpding style; cosmetics.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andreas Mohr
6aa2cb1cad
(my_systemv): cleanup implicit-fallthrough warning.
...
Found by GCC 7.2.0
utilunix.c: In function 'my_systemv':
utilunix.c:455:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
my_exit (127); /* Exec error */
^~~~~~~~~~~~~
utilunix.c:458:5: note: here
default:
^~~~~~~
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin
ddd645526a
Update copyright years.
2018-02-04 11:30:22 +03:00
Andrew Borodin
a38accd389
(mc_realpath): ignore path encoding.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:22 +03:00
Andrew Borodin
6e994011f5
(vfs_path_url_split): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:22 +03:00
Andrew Borodin
73979369d1
Support __attribute__((fallthrough)) if possible.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:22 +03:00
Andrew Borodin
b7c54f64bb
(vfs_mkstemps): don't allocate a large memory chunk.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:22 +03:00
Andrew Borodin
48d85a42b4
achown: add callback for permission buttons
...
...to change behaviour of WButton objects.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:19:15 +03:00
Andrew Borodin
069306eb2e
Ticket #3883 : size_trunc_sep() breaks on multibyte locales.
...
The bug was introduced in b3867a6e15
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-02 14:41:35 +03:00
Andrew Borodin
6310e07745
(button_callback): clean up unneeded type casting.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew Borodin
3424622d5a
(vfs_path_from_str_deprecated_parser, vfs_path_from_str_uri_parser): remove unused flags argument.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
8715c41a47
(vfs_path_from_str_uri_parser): fix detection of relative path.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
cebede5e84
(diff_two_paths): optimizate path comparision.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
72056890a7
(diff_two_paths): minor optimization: exit loop ASAP.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
02effb2499
(diff_two_paths): reduce variable scopes.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew V. Samoilov
bf5abff937
(buttonbar_call): fix possible NULL dereference.
...
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2017-11-17 16:01:29 +03:00
Andrew Borodin
7772f00aab
Ticket #3780 : code clean up before 4.8.20 release.
...
Direct include <limits.h> for MB_LEN_MAX.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 15:59:44 +03:00
Maksim Dzabraev
16b569986e
Ticket #3870 : fix INPUT_COMPLETE_CD in quick widget.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-10-28 19:18:23 +03:00
devzero
7f9b333861
Ticket #3616 : speed up of utf-8 normalization.
...
When content of a large directory is being sorted by file names, a
significant amount of CPU time is spent in str_utf8_normalize() that is
called from str_utf8_create_key_gen().
For example, /usr/bin/ contains 5437 files on my Archlinux box. Running
mc /usr/bin/ /usr/bin/ takes approx. 75 000 000 CPU instructions to sort
file names, or 25% of total program run time. From these 75 000 000
instructions, 42 500 000 instruction are spent in str_utf8_normalize().
str_utf8_normalize() uses g_utf8_normalize() to do the work.
g_utf8_normalize() is a heavyweight function, that converts UTF-8 into
UCS-4, does the normalization and then converts UCS-4 back into UTF-8.
Since file names are composed of ASCII characters in most cases, we can
speed up str_utf8_normalize() by checking if the heavyweight Unicode
normalization is actually needed. Normalization of ASCII string is
no-op, so it is effectively "normalized" by just strdup().
With this patch, running mc /usr/bin/ /usr/bin/ requires just 37 000 000
instructions to sort the file names (down from 75 000 000) and 4 500 000
instuctions to do str_utf8_normalize() (down from 42 500 000).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-07-29 10:23:09 +03:00