Commit Graph

13852 Commits

Author SHA1 Message Date
Andrew Borodin
2151edaff2 Get rid of global variables mc_main_config and mc_panels_config.
Use mc_global.main_config and mc_global.panels_congig instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
1c2060c28f (mc_realpath): cleanup cppcheck warning.
Cleanup following cppcheck warnings:

[lib/utilunix.c:1109]: (style) Unused variable: link_path.
[lib/utilunix.c:1113]: (style) Variable 'readlinks' is assigned a value that is never used.
[lib/utilunix.c:1114]: (style) Unused variable: n.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
f03bb30a5a (update_split): cleanup cppcheck warning.
Cleanup following cppcheck warnings:

[src/filemanager/layout.c:231]: (style) Clarify calculation precedence for '&' and '?'.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
67035605b9 lib/vfs/direntry.c: cleanup cppcheck warnings.
Cleanup following cppcheck warnings:

[lib/vfs/direntry.c:121]: (style) Clarify calculation precedence for '&' and '?'.
[lib/vfs/direntry.c:386]: (style) Clarify calculation precedence for '&' and '?'.
[lib/vfs/direntry.c:391]: (style) Clarify calculation precedence for '&' and '?'.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
80f138c1ba (mc_shell_get_installed_in_system): fix description.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
eecf1fc946 Fix typo.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
cae521c61d Clarify type cast in tgetsrt() calls.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
ccad69bccf Clarify type cast in SLtt_tgetsrt() calls.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Konrad Twardowski
4aea217d68 MidnightCommander/mc#95: update Java syntax: add missing keywords: _ assert strictfp.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Pavol Rusnak
7c7673d8f0 MidnightCommander/mc#89: add webp extension to file highlight and extension files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Sergei Trofimovich
5b594fffeb MidnightCommander/mc#97: src/filemanager/mountlist.c: add makedev() declaration.
On glibc-2.23 link fails as

    $ mc-9999/src/filemanager/mountlist.c:750: undefined reference to `makedev'

Reported-by: Thomas D.
Bug: https://bugs.gentoo.org/579858
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
dcf2ac11c1 (dlg_set_top_or_bottom_widget): move to proper file section.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
972aefda69 Add Mooffie as author of new high-level mouse API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
fa4895c1a3 Remove orphaned be@tarask.po_ file.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
bc14ff44c8 Remove min() and max() macros. Use MIN() and MAX() macros from GLib.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
3bea889648 (edit_replace_cmd): change type of 2nd argument from int to gboolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
288c4490bf mcedit: fix type of function arguments:
(edit_move_{up,down}): fix 3rd argument: gboolean instead of int.
(edit_move_{up,down}_paragraph]): fix 2nd argument: gboolean instead of int.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
0641e942e5 (input_is_empty): new WInput API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
4d65a731c2 mcview: refactoring of mcview_get_utf().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
8cd8dbeb58 diffview: refactoring of dview_get_byte() and dview_get_utf().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
2d77cb32f9 lib/strutil/strutilutf8.c: grammar.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
eef076cef6 cppcheck: Cleanup Passing NULL after the last typed argument warning
Cleanup Passing NULL after the last typed argument warning.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
5a7d7d0087 (mouse_get_local): cleanup uninitialized warning.
Cleanup uninitialized warning with gcc compiler (gcc-4.4.7-4.el6).

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
8bb9605bfd VFS optimization: ret rid of double call of vfs_get_openfile() in file operations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
623015eb0d (mc_closedir): fix NULL dereference.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
a9e5957196 (mc_fstat): fix function used to set up of errno value.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
ec296b2c9f Clarify text of screen_msg message.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Mooffie
17706ad9f3 Configure summary omits "S-Lang" when used as screen library.
When using slang, 'configure' prints blank in the "Screen library" name:

    ...
    File system:                Midnight Commander Virtual Filesystem
                                cpio, extfs, fish, ftp, sfs, sftp, smb, tar
    Screen library:
    Mouse support:              gpm and xterm
    X11 events support:         yes
    ...

This occurs when slang is found using pkg-config (as opposed to explicit path
search). The patch fixes this by moving the 'screen_msg' assignment one level
up, to the controlling function (mc_WITH_SLANG) so that it's effective for
however method the library was found.

The problem was mentioned on our mailing list:

    https://mail.gnome.org/archives/mc-devel/2016-March/msg00021.html

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
284a19aff1 (find_widget_type): Make Solaris Studio happy
Make Solaris Studio 12.4 happy.

"dialog.c", line 1029: warning: argument #2 is incompatible with prototype:
        prototype: pointer to const void
        argument : pointer to function (...) returning enum (...)

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
72258dcca6 args.c: Make Solaris Studio happy
Make Solaris Studio 12.4 & 12.5 happy.

"args.c", line 180: warning: initialization type mismatch
"args.c", line 188: warning: initialization type mismatch

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
9f97274120 doc/README: use https.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
042ece84cb Ticket #3615: doc/README: fix URL.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
874be2de1e mcedit: rename functions:
edit_buffer_move_forward -> edit_buffer_get_forward_offset
edit_buffer_move_backward -> edit_buffer_get_backward_offset

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
2b8b1c56ea edit_buffer: clarify of buffer size update.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
954af9fec9 Ticket #3607: code cleanup bebore 4.8.17 release.
Clarify include of fileloc.h.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
7fd0f172ef Merge branch '3640_subshell_cursor_position'
* 3640_subshell_cursor_position:
  Do not duplicate alternate screen switching.
  Ticket #3640: Subshell cursor position lost after window resizing.
2016-05-05 10:01:47 +03:00
Yuri Khan
c1975a3a35 Do not duplicate alternate screen switching.
S-Lang already handles that in SLsmg_init_smg() and SLsmg_reset_smg().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-05 10:01:13 +03:00
Yuri Khan
abb4996589 Ticket #3640: Subshell cursor position lost after window resizing.
Refactoring: rename functions:

do_enter_ca_mode -> tty_enter_ca_mode
do_exit_ca_mode -> tty_exit_ca_mode

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-05 10:01:13 +03:00
Andrew Borodin
c4a8882b13 Merge branch '3639_subshell_output_lost'
* 3639_subshell_output_lost:
  Ticket #3639: fix window resizing when panels are hidden.
2016-05-05 09:56:56 +03:00
Yuri Khan
f278eaec99 Ticket #3639: fix window resizing when panels are hidden.
Calling tty_change_screen_size() causes a switch to the alternate screen:

   * Resizing the window causes a SIGWINCH sent to the mc process.
   * sigwinch_handler() sets the flag mc_global.tty.winch_flag to 1.
   * The select() call in feed_subshell() is interrupted.
   * feed_subshell() notices the winch_flag and calls tty_change_screen_size().
   * tty_change_screen_size() calls SLsmg_reinit_smg().
   * SLsmg_reinit_smg() sees that Smg_Mode is currently SMG_MODE_NONE
     (because it was set that way back in reset_smg() that was called
     when panels were hidden).
   * SLsmg_reinit_smg() calls SLsmg_init_smg().
   * SLsmg_init_smg() calls init_smg_for_mode(SMG_MODE_FULLSCREEN).
   * init_smg_for_mode() calls SLtt_init_video().
   * SLtt_init_video() sends the smcup terminfo sequence to the terminal.
   * SLtt_init_video() calls SLtt_init_keypad().
   * SLtt_init_keypad() sends the smkx terminfo sequence to the terminal
     and flushes the output buffer. (If $TERM starts with xterm or exactly
     matches screen, this function returns immediately without flushing the
     buffer, so the issue will not be visible.) The terminal switches to
     alternate screen and clears it.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-05 09:56:21 +03:00
Yury V. Zaytsev
30cf792a49 Merge branch '3622_fix_unzip_extfs' 2016-05-01 16:30:21 +02:00
Mooffie
a1d2c81d15 Ticket #3622: extfs/uzip: fix date parsing
By default, on Unix systems, unzip gets compiled with MDY date order. Debian
based distros compile it with YMD order, for which this patch adds support.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-05-01 14:23:35 +02:00
Yury V. Zaytsev
db074dd954 Merge branch '3609_keymap_symlink' 2016-05-01 11:20:17 +02:00
Andreas Mohr
284003e838 Ticket #3609: install mc.keymap as a symlink to mc.default.keymap
Save space and fix rpmlint warning found by OBS Framework
(build.opensuse.org).

mc.x86_64: W: files-duplicate /etc/mc/mc.keymap /etc/mc/mc.default.keymap

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-05-01 11:20:07 +02:00
Yury V. Zaytsev
a56511ce1a Merge branch '3610_fish_noexec' 2016-05-01 09:28:32 +02:00
Andreas Mohr
903773ceed Ticket #3610: remove executable bit from FISH helper scripts
Prevent them from getting accidentally run by users and fix rpmlint
warning found by OBS Framework (build.opensuse.org)

mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/append
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/chmod
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/chown
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/fexists
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/get
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/hardlink
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/info
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/ln
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/ls
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/mkdir
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/mv
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/rmdir
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/send
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/unlink
mc.x86_64: W: script-without-shebang /usr/lib/mc/fish/utime

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-04-30 18:02:25 +02:00
Andrew Borodin
61bc352b62 Merge branch '1885_autopoint_without_cvs'
* 1885_autopoint_without_cvs:
  Simplify `autogen.sh` by switching to `autoreconf`
  Ticket #1885: minimal gettext version is 0.18.1.
2016-04-28 09:25:58 +03:00
Andreas Mohr
b6cbac1017 Simplify autogen.sh by switching to autoreconf
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-04-28 09:25:18 +03:00
Andrew Borodin
406765f044 Ticket #1885: minimal gettext version is 0.18.1.
Since 0.18.1, the 'autopoint' program uses the 'git' program instead of
'cvs' one by default.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-28 09:25:18 +03:00
Yury V. Zaytsev
23c00cf33f Merge branch '2742_csh_as_tcsh_fix' 2016-04-25 21:44:15 +02:00