Commit Graph

15003 Commits

Author SHA1 Message Date
Andrew Borodin
faa195ae59 (mc_tmpdir): use $MC_TMPDIR if set. 2021-03-14 19:48:59 +03:00
Andrew Borodin
7b5b56104b (show_file_history): keep order of modified history items.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:48:59 +03:00
Andrew Borodin
48dea680e6 filemanager/chattr.c: remove TODO.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:48:59 +03:00
Andrew Borodin
4cbc61a775 Clarify check of 256 colors support.
(tty_use_truecolors): don't check 256 colors here.
(tty_use_256colors): generate error message if 256 colors aren't
supported.
(tty_init): sync with modified tty_use_256colors().
(tty_color_try_alloc_pair_lib): likewise.
(mc_skin_init): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:48:59 +03:00
Andrew Borodin
f29533f00f Ticket #4173: fix linking of libmc.la.
Thanks Sebastian Gniazdowski <sgniazdowski@gmail.com> for the issue.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:48:59 +03:00
Andrew Borodin
32cc3532a9 doc: fix autotools and gettext versions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:48:59 +03:00
Andrew Borodin
7acf07ee6e (str_convert_to_input): make inline.
(str_convert_to_display): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
f5b813a0ab undelfs simplifications.
m4.include/vfs/mc-vfs-undelfs.m4: simplify test of required libraries.
Don't test Linux kernel specific header.

src/vfs/undelfs/undelfs.c: don't include Linux kernel specific header.
Use headers from ext2fs library only.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
5a4d1dd122 src/args.c: fix formatting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
f4b1c0a4d0 (parse_256_or_true_color_name): pacify gcc-10.2.
Fix warnings:

lib/tty/color-internal.c: In function 'tty_color_get_index_by_name':
lib/tty/color-internal.c:156:19: warning: '[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
  156 |             i = (h[0] << 20) | (h[1] << 16) | (h[2] << 12) | (h[3] << 8) | (h[4] << 4) | h[5];
      |                  ~^~~
lib/tty/color-internal.c:156:34: warning: 'h[1]' may be used uninitialized in this function [-Wmaybe-uninitialized]
  156 |             i = (h[0] << 20) | (h[1] << 16) | (h[2] << 12) | (h[3] << 8) | (h[4] << 4) | h[5];
      |                                 ~^~~
lib/tty/color-internal.c:156:49: warning: 'h[2]' may be used uninitialized in this function [-Wmaybe-uninitialized]
  156 |             i = (h[0] << 20) | (h[1] << 16) | (h[2] << 12) | (h[3] << 8) | (h[4] << 4) | h[5];
      |                                                ~^~~

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
452074906a (str_replace_all): use g_ptr_array_new_with_free_func().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
a309e1e133 (str_ptr_array_join): return GString.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
6af68462dd Sync with gnulib 1b357ec51ac32ebc6262373a354ffd33e5bba8c0.
Remove some of the support for obsolete IRIX 4 and 5.

* m4.include/gnulib/mountlist.m4 (AC_FUNC_GETMNTENT): Don't test for
getmntent in libsun.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
f469197c79 (edit_get_macro): refactoring.
Return position of found macro in global variable macro_list or -1 if
nothing found.

(edit_delete_macro): related changes.
(edit_execute_macro): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
fdd3a0013f (edit_repeat_macro_cmd): refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
d650faf774 (edit_load_macro_cmd): refactoring.
Get rid of create and free of an empty array. Create macros array if
needed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
3e8ca53fa2 (edit_load_macro_cmd): fix memory leaks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
ef45037919 (edit_store_macro_cmd): refactoring.
Get rid of create and free of an empty array and string. Create macros
array and string if needed.

Fix typo.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
985bef8c6d (edit_store_macro_cmd): fix memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
daf21d8315 Clarify init and destroy of dialog.
(group_default_callback): NULLify list of widgets after destroy.

(dlg_default_callback): do nothing in MSG_INIT and MSG_DESTROY handlers.

(dlg_destroy): send MSG_DESTORY to dialog to allow it destroy it's
private data. MSG_DESTROY is a last message sent to dialog before
desctuction.

(edit_dialog_callback): use MSG_DESTROY instead of MSG_END to deinit
editor.

(midnight_callback): use MSG_DESTROY instead of MSG_DESTORY to deinit
file manager.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
c96875fa9f Fix typo.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
cf54c9457a doc/NEWS: cosmetics. 2021-03-14 19:30:42 +03:00
Andrew Borodin
9ee52e77c3 Ticket #4179: code clean up before 4.8.27 release.
Update copyright years.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
318981535f Merge branch '4191_tar.xz'
* 4191_tar.xz:
  (open_error_pipe, close_error_pipe): remove.
  (extfs_read_archive): move file adding to separate function.
  extfs: reimplement using mc_pipe.
  (sfs_vfmake): reimplement using mc_pipe.
  (do_external_panelize): reimplement using mc_pipe.
  (mc_pstream_get_string): new API.
  (mc_popen): add two parameters:
  Ticket #4191: unable to browse tar.xz archives.
2021-03-14 19:17:27 +03:00
Andrew Borodin
03029ff6da (open_error_pipe, close_error_pipe): remove.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:17:08 +03:00
Andrew Borodin
68fe37d339 (extfs_read_archive): move file adding to separate function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:17:08 +03:00
Andrew Borodin
0781c4fb6d extfs: reimplement using mc_pipe.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:17:08 +03:00
Andrew Borodin
e36158b02b (sfs_vfmake): reimplement using mc_pipe.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:17:08 +03:00
Andrew Borodin
c8f4a80ac8 (do_external_panelize): reimplement using mc_pipe.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:17:08 +03:00
Andrew Borodin
a10bf6a244 (mc_pstream_get_string): new API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:17:08 +03:00
Andrew Borodin
1e45efecb2 (mc_popen): add two parameters:
do or don't read stdout of child process;
do or don't read stderr of child process.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:17:07 +03:00
Andrew Borodin
68556db80d Ticket #4191: unable to browse tar.xz archives.
Initial commit: revert "(open_error_pipe): fix resource leak."

This reverts commit 61f997de26.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:17:07 +03:00
Andrew Borodin
ff0949ece8 Merge branch '2841_ftp_ls_parser'
* 2841_ftp_ls_parser:
  ftpfs: use new parser.
  Add test for new ftp parser.
  (parse_ls_line): get rid of extra string duplication.
  Add ftp long file list parser from lftp and modify it for MC VFS.
  Ticket #2841: ftpfs: new filelist parser.
2021-03-14 19:04:51 +03:00
Andrew Borodin
dc8db0089f ftpfs: use new parser.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:02:12 +03:00
Andrew Borodin
6cc697beff Add test for new ftp parser.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:02:12 +03:00
Andrew Borodin
d4cbed25cc (parse_ls_line): get rid of extra string duplication.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:02:12 +03:00
Andrew Borodin
804186bbd8 Add ftp long file list parser from lftp and modify it for MC VFS.
Based on lftp 62093f21348be405fdefbd10d4655a224f326153.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:02:12 +03:00
Andrew Borodin
02989d4d84 Ticket #2841: ftpfs: new filelist parser.
Initial step: minor refactoring:
  * (vfs_parse_month): rename from is_month() and make global.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:02:12 +03:00
Andrew Borodin
32c28026f8 Merge branch '4132_tags_dialog_width'
* 4132_tags_dialog_width:
  etags: get rid of limitation of window width.
  etags: get rid of limitation of definition length.
  etags: get rid of limitation of list length.
  etags: fix memory leaks.
  (etags_hash_t): remove unused filename_len member.
  Ticket #4132: clarify width of 'Find declaration' dialog.
2021-03-13 20:36:19 +03:00
Andrew Borodin
9c7437bf48 etags: get rid of limitation of window width.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 20:35:56 +03:00
Andrew Borodin
451e1585a7 etags: get rid of limitation of definition length.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 20:35:56 +03:00
Andrew Borodin
ce05476057 etags: get rid of limitation of list length.
(etags_set_definition_hash): return GPtraArray.
(editcmd_dialog_select_definition_show): take GPtraArray.
(edit_get_match_keyword_cmd): sync with modified functions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 20:35:56 +03:00
Andrew Borodin
f82d30e3e0 etags: fix memory leaks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 20:35:56 +03:00
Andrew Borodin
68c9db0c17 (etags_hash_t): remove unused filename_len member.
Cleanup unused includes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 20:35:56 +03:00
Andrew Borodin
4a3cf4c6af Ticket #4132: clarify width of 'Find declaration' dialog.
Initial changeset:
src/editor/etags.[ch]: fix coding style.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 20:35:56 +03:00
Andrew Borodin
26e568cd7e Merge branch '4203_custom_zshrc'
* 4203_custom_zshrc:
  Ticket #4203: support custom .zshrc.
2021-03-13 20:19:48 +03:00
Andrew Borodin
76847e08fd Ticket #4203: support custom .zshrc.
Custom .zshrc file is  ~/.local/share/mc/.zshrc.

If ZDOTDIR environment variable is not set, set it to ~/.local/share/mc
if a .zshrc is found there. It is the only way to point zsh to an other
rc file than the default.

Thanks Sebastian Gniazdowski <sgniazdowski@gmail.com> for the original
patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 20:17:31 +03:00
Purdea Andrei
e50a4d0e25 Ticket# 4215: support syntax highlighting for Verilog/SystemVerilog header files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 08:12:43 +03:00
Andrew Borodin
94588d2da6 Merge branch '4207_tag_declaration'
* 4207_tag_declaration:
  Ticket # 4207: (editcmd_dialog_select_definition_show): fix "Find declaration" disrupting file's path.
2021-02-28 16:51:54 +03:00
Sebastian Gniazdowski
360e9bec33 Ticket # 4207: (editcmd_dialog_select_definition_show): fix "Find declaration" disrupting file's path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-28 16:50:39 +03:00