Commit Graph

14021 Commits

Author SHA1 Message Date
Andrew Borodin
d5f4e631c3 Sync with gnulib 3b1faeb2e29b62588709208f97d34c1787777dcb.
* m4.include/ls-mntd-fs.m4: make sure $host and $host_os are defined
when used.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew Borodin
3a3a6479d3 (do_link): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew Borodin
55bafd40e5 (do_link): fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew Borodin
e1ee3a2465 Syntax.in: simplify pattern for HiveQL.
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
1b47c88ff1 (message): Use "%s" to fix incorrect translation with printf pattern(s)
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2017-11-17 16:01:29 +03:00
Andrew V. Samoilov
23dec99195 (parm_table[]): Make const to relocate 13624 bytes from .data to .text.
(init_globals): fstring is enough for "%d.%d".
(*): Remove nmbd code.

Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2017-11-17 16:01:29 +03:00
Andrew V. Samoilov
62eca8ebde (_interpret_node_status): Remove dead code.
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
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
Andreas Mohr
d2cfb712b0 (mcview_mouse_callback): fix typo.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andreas Mohr
20398ece6e (jobs_fill_listbox): cleanup pointer-compare warning.
Found by GCC 7.1.0.

boxes.c:431:22: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (state_str[0] == '\0')
                      ^~
boxes.c:431:9: note: did you mean to dereference the pointer?
     if (state_str[0] == '\0')
         ^

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
a4518eed9e (set_panel_filter_to): rename variable and use MC_PTR_FREE macro.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:23 +03:00
Andrew Borodin
8bf7e69134 (set_panel_filter): fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 15:59:44 +03:00
Andrew Borodin
e185cb1e8c (tar_open_archive): initialize variable.
../../../../src/vfs/tar/tar.c: In function 'tar_open_archive':
../../../../src/vfs/tar/tar.c:805:69: error: 'h_size' may be used uninitialized in this function [-Werror=uninitialized]

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 15:59:44 +03:00
Andrew Borodin
b5012c8e9d (tar_read_header): move checksum to separate function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 15:59:44 +03:00
Andrew Borodin
09ba994aa1 doc/TODO: clean up the already implemented stuff.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 15:59:44 +03:00
Andrew Borodin
42b3af0132 doc: move news of 4.7 series to separate file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 15:59:44 +03:00
Andrew Borodin
49dc23e0f2 doc/keybind-migration.txt: remove.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 15:59:44 +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
Sergey Naumov
aff3834dc3 Ticket #3868: syntax: add Protocol Buffers and gRPC support.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-10-29 20:35:32 +03:00
Grzegorz Szymaszek
26ecb44e1d Ticket #3864: initial support of Markdown syntax highlighting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-10-29 20:32:46 +03:00
Andrew Borodin
cde8e194aa Merge branch '3869_netrc_password'
* 3869_netrc_password:
  (ftpfs_correct_url_parameters): clean up always true condition.
  Ticket #3869: fix of retrieve password from .netrc.
2017-10-29 20:23:40 +03:00
Andrew Borodin
eb9b1407c8 (ftpfs_correct_url_parameters): clean up always true condition.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-10-29 20:23:04 +03:00
Cristian Rigamonti
3ab6ef7aa7 Ticket #3869: fix of retrieve password from .netrc.
(ftpfs_correct_url_parameters): fix condition.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-10-29 20:23:04 +03:00
Andrew Borodin
0d17cf7914 Merge branch '3870_quick_complete_cd'
* 3870_quick_complete_cd:
  Ticket #3870: fix INPUT_COMPLETE_CD in quick widget.
2017-10-28 19:21:26 +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
Andrew Borodin
98294fc1e6 Merge branch '3867_mcedit_c_macro'
* 3867_mcedit_c_macro:
  Ticket #3867: mceditor: add %c (cursor offset from BOF) support for macros.
2017-10-28 19:01:09 +03:00
Sergey Naumov
fc68bd7aa3 Ticket #3867: mceditor: add %c (cursor offset from BOF) support for macros.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-10-28 18:56:32 +03:00
Andrew Borodin
2a6b8a9ec1 Merge branch '3861_mcedit_f_macro'
* 3861_mcedit_f_macro:
  Document the %f macro related to mcedit.
  Fix %f macto in mcedit user menu.
  Ticket #3861: fix %f macro in mcedit user menu.
2017-10-28 18:46:45 +03:00
Andrew Borodin
b11c84dbb7 Document the %f macro related to mcedit. 2017-10-28 18:46:14 +03:00
Andrew Borodin
f89fff139c Fix %f macto in mcedit user menu.
In mcedit user menu the %f macro should match the file name opened in
mcedit not the file name is selected in the panel.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-10-28 18:46:14 +03:00
Andrew Borodin
680678ef72 Ticket #3861: fix %f macro in mcedit user menu.
Initial step: move usermenu.[ch] files from src/filemanager/ directory
to src/ one.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-10-28 18:46:08 +03:00
Andrew Borodin
b47f233a80 Merge branch '3855_mcview_seach_ask_continue_from_begin'
* 3855_mcview_seach_ask_continue_from_begin:
  Ticket #3855: mcview: search doesn't ask about starting over
2017-10-08 10:10:42 +03:00
Andrew Borodin
1221900262 Ticket #3855: mcview: search doesn't ask about starting over
Broken in 178628e67f.

(mcview_do_search): do search in last chunk if data source is the
growing buffer only.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-09-26 12:56:05 +03:00
Yury V. Zaytsev
cb1be748d8 Merge branch '3852_broken_tcsh_escaping' 2017-09-09 17:30:43 +02:00
Yury V. Zaytsev
0fec3ef449 Ticket #3852: subshell - fix broken tcsh 6.20+ cd escaping
Reported-by: Anatoly Borodin <anatoly.borodin@gmail.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-09-09 11:16:46 +02:00
Yury V. Zaytsev
1a6f9e0239 Merge branch '3843_8bit_to_utf8_broken' 2017-09-09 11:01:39 +02:00
Yury V. Zaytsev
5ee452eba9 Ticket #3843: mcedit - fix broken encoding into UTF-8 for 8-bit displays
Reported-by: Lőrinczy Zsigmond <lzsiga@freemail.c3.hu>
Reviewed-by: Egmont Koblinger <egmont@gmail.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-09-09 08:48:21 +02:00
Andrew Borodin
5d142251e0 Merge branch '3846_mcview_hook'
* 3846_mcview_hook:
  Ticket #3846: fix crash on slow startup...
2017-08-07 13:44:41 +03:00
Andrew Borodin
443b92e16a Ticket #3846: fix crash on slow startup...
...because of access to free'd viewer in the idle hooks execution.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-08-07 13:44:22 +03:00
Izzy
1046f489f1 syntax: add missing SQL keywords (closes MidnightCommander/mc#129)
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
2017-07-30 21:20:00 +02:00
Izzy
f397f9b0de syntax: add missing PHP keywords (closes MidnightCommander/mc#129)
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
2017-07-30 21:18:17 +02:00
Andrew Borodin
37013e7db3 Merge branch '3616_utf8_normalize_speedup'
* 3616_utf8_normalize_speedup:
  Ticket #3616: speed up of utf-8 normalization.
2017-07-29 10:23:40 +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
Yury V. Zaytsev
eab2556ed8 Merge branch '3836_with_homedir_yes' 2017-07-15 22:53:28 +02:00
Yury V. Zaytsev
9932087cec Ticket #3836: maint - set default --with-homedir value to .mc instead of yes
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Reviewed-by: Andrew Borodin <aborodin@vmail.ru>
2017-07-15 22:52:47 +02:00