Commit Graph

14265 Commits

Author SHA1 Message Date
Andrew Borodin
8bf8079139 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:22:27 +03:00
Boruch Baum
98f0c3faba src/filemanager/mountlist.c: clarify comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Mooffie
7f81194304 (mc_search_run): document the return value.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
2356acc26d NULL-ize some variables to make unit tests happy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
9a39e35dc3 Use g_assert() instead of assert(3).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
f64e8b99d4 doc/NEWS: cosmetics.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
eec71bccff Ticket #3703: fix potential NULL dereference.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
1aefd27a2a Sync with gnulib 5159ac54e0c73df4432a681e2e267df4ffcc04e4.
Simplify "configure: checking ..." messages.

  * m4.include/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update copyright
years. Use AC_MSG_CHECKING instead of AC_MSG_NOTICE.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
0e2833e398 MSG_INIT is handled by default.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
9e226f130f Clarify startup.
If mc isn't run as file manager, don't resolve the "other_dir" panel
option.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
bea83a1189 (panel_callback) [MSG_FOCUS]: don't redraw panel here.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
c1cf7e81b9 (setup_panels): fix location of right panel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
40b00b5800 Add -Wformat-signedness option.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andreas Mohr
9c43890f0d (my_systemv): cleanup unreachable-code warning.
Compiler with my_exit() 'noreturn' knowledge will complain about
never reachable break statement.

Reported by clang compiler.

(Maybe there is a better code sequence)

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andreas Mohr
7e689e8e43 (vfs_die): cleanup no attribute noreturn warning.
utilvfs.c: In function 'vfs_die':
utilvfs.c:354:1: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
 vfs_die (const char *m)
 ^~~~~~~

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andreas Mohr
b91ab44b43 (my_exit): cleanup no attribute noreturn warning.
utilunix.c:360:1: error: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
c0cc0546d1 (edit_move_block_to_left): reduce variable scope.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andreas Mohr
c5efd8a1e1 (edit_move_block_to_left): cleanup -Wunsafe-loop-optimizations.
edit.c: In function 'edit_move_block_to_left':
edit.c:1652:13: warning: cannot optimize possibly infinite loops [-Wunsafe-loop-optimizations]
             for (i = 1; i <= del_tab_width; i++)
             ^~~

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andreas Mohr
38fc00669d lib/serialize.c: cleanup -Wformat-signedness warning.
serialize.c: In function 'mc_serialize_str':
serialize.c:116:34: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
     return g_strdup_printf ("%c%zd" SRLZ_DELIM_S "%s", prefix, strlen (data), data);
                                  ^
serialize.c:130:19: error: format '%zd' expects argument of type 'signed size_t', but argument 5 has type 'size_t {aka long unsigned int}' [-Werror=format=]
 #define FUNC_NAME "mc_serialize_str()"
                   ^
serialize.c:175:22: note: in expansion of macro 'FUNC_NAME'
                      FUNC_NAME
                      ^~~~~~~~~
serialize.c:130:19: error: format '%zd' expects argument of type 'signed size_t', but argument 6 has type 'size_t {aka long unsigned int}' [-Werror=format=]
 #define FUNC_NAME "mc_serialize_str()"
                   ^
serialize.c:175:22: note: in expansion of macro 'FUNC_NAME'
                      FUNC_NAME
                      ^~~~~~~~~
serialize.c: In function 'mc_deserialize_config':
serialize.c:267:19: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
 #define FUNC_NAME "mc_deserialize_config()"
                   ^
serialize.c:269:35: note: in expansion of macro 'FUNC_NAME'
     prepend_error_message (error, FUNC_NAME " at %zd", current_position + 1); \
                                   ^~~~~~~~~
serialize.c:301:17: note: in expansion of macro 'prepend_error_and_exit'
                 prepend_error_and_exit ();
                 ^~~~~~~~~~~~~~~~~~~~~~
serialize.c:267:19: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
 #define FUNC_NAME "mc_deserialize_config()"
                   ^
serialize.c:269:35: note: in expansion of macro 'FUNC_NAME'
     prepend_error_message (error, FUNC_NAME " at %zd", current_position + 1); \
                                   ^~~~~~~~~
serialize.c:313:17: note: in expansion of macro 'prepend_error_and_exit'
                 prepend_error_and_exit ();
                 ^~~~~~~~~~~~~~~~~~~~~~
serialize.c:267:19: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
 #define FUNC_NAME "mc_deserialize_config()"
                   ^
serialize.c:269:35: note: in expansion of macro 'FUNC_NAME'
     prepend_error_message (error, FUNC_NAME " at %zd", current_position + 1); \
                                   ^~~~~~~~~
serialize.c:325:17: note: in expansion of macro 'prepend_error_and_exit'
                 prepend_error_and_exit ();
                 ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andrew Borodin
9df8bc2d12 (vfs_path_deserialize): refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andrew Borodin
de0e960de5 (vfs_path_serialize): get rid of dynamic string allocation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andreas Mohr
3b1183571a (quit_cmd_internal): cleanup -Wformat-signedness warning.
midnight.c: In function 'quit_cmd_internal':
midnight.c:1027:31: error: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=]
                               "You have %zd opened screens. Quit anyway?", n), n);
                               ^
midnight.c:1026:31: error: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=]
                     ngettext ("You have %zd opened screen. Quit anyway?",
                               ^

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andreas Mohr
2b265834ab (info_show_info): cleanup -Wformat-signedness warning.
info.c: In function 'info_show_info':
info.c:193:29: error: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'int' [-Werror=format=]
             tty_printf (" (%Xh)", myfs_stats.type);
                             ^

info.c:239:51: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'long unsigned int' [-Werror=format=]
             tty_printf (ngettext (" (%ld block)", " (%ld blocks)",
                                                   ^
info.c:239:35: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'long unsigned int' [-Werror=format=]
             tty_printf (ngettext (" (%ld block)", " (%ld blocks)",
                                   ^

info.c:259:23: error: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'int' [-Werror=format=]
         tty_printf (_("Location:   %Xh:%Xh"), (int) st.st_dev, (int) st.st_ino);
                       ^
info.c:259:21: note: in expansion of macro '_'
         tty_printf (_("Location:   %Xh:%Xh"), (int) st.st_dev, (int) st.st_ino);
                     ^
info.c:259:23: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'int' [-Werror=format=]
         tty_printf (_("Location:   %Xh:%Xh"), (int) st.st_dev, (int) st.st_ino);
                       ^
info.c:259:21: note: in expansion of macro '_'
         tty_printf (_("Location:   %Xh:%Xh"), (int) st.st_dev, (int) st.st_ino);
                     ^

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andrew Borodin
82497824f4 Hex patterns: fix Russian manual page.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Mooffie
f9385f5a43 Hex patterns: fix manual page.
* Decimal and octal numerals aren't supported(!).
* Negative numbers are no longer supported.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andreas Mohr
31b0bcd584 (mc_search__hex_translate_to_regex): cleanup -Wformat-signedness warning.
hex.c: In function 'mc_search__hex_translate_to_regex':
hex.c:79:39: error: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'int *' [-Wformat=]
         if (sscanf (tmp_str + loop, "%x%n", &val, &ptr))
                                                ^

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andreas Mohr
0bac703a59 (ftpfs_chmod): cleanup -Wformat-signedness warning.
ftpfs.c: In function 'ftpfs_chmod':
ftpfs.c:2029:52: error: format '%o' expects argument of type 'unsigned int', but argument 4 has type 'int' [-Werror=format=]
     g_snprintf (buf, sizeof (buf), "SITE CHMOD %4.4o /%%s", (int) (mode & 07777));
                                                    ^

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:54 +03:00
Andreas Mohr
f3bcc33f91 src/filemanager/find.c: cleanup -Wformat-signedness warning.
find.c: In function 'found_num_update':
find.c:373:44: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'long unsigned int' [-Werror=format=]
     g_snprintf (buffer, sizeof (buffer), _("Found: %ld"), matches);
                                            ^

find.c: In function 'do_search':
find.c:1306:51: error: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=]
                                                   "Finished (ignored %zd directories)",
                                                   ^
find.c:1305:51: error: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=]
                                         ngettext ("Finished (ignored %zd directory)",
                                                   ^

file.c:2526:41: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
     label_set_textv (dsm->count_size, _("Directories: %zd, total size: %s"),
                                         ^

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:48 +03:00
Andreas Mohr
feb2581991 (dirsize_status_update_cb): cleanup -Wformat-signedness warning.
file.c:2526:41: error: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t {aka long unsigned int}' [-Werror=format=]
     label_set_textv (dsm->count_size, _("Directories: %zd, total size: %s"),
                                         ^

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:08:32 +03:00
Andreas Mohr
9ee93df098 src/editor/editdraw.c: cleanup -Wformat-signedness warning.
editdraw.c:127:62: error: format '%d' expects argument of type 'int', but argument 4 has type 'unsigned int' [-Werror=format=]
                 g_snprintf (byte_str, sizeof (byte_str), "%04d 0x%03X",
                                                              ^

editdraw.c:326:30: error: format '%d' expects argument of type 'int', but argument 2 has type 'unsigned int' [-Werror=format=]
             tty_printf ("[%05d 0x%04X]", cur_utf, cur_utf);
                              ^

editdraw.c:334:30: error: format '%d' expects argument of type 'int', but argument 2 has type 'unsigned int' [-Werror=format=]
             tty_printf ("[%05d 0x%04X]", (unsigned int) cur_byte, (unsigned int) cur_byte);
                              ^

editdraw.c:554:20: warning: conversion to 'unsigned int' from 'long int' may alter its value [-Wconversion]
         cur_line = edit->start_line + row;
                    ^~~~

editdraw.c:557:59: error: format '%i' expects argument of type 'int', but argument 4 has type 'unsigned int' [-Werror=format=]
             g_snprintf (line_stat, sizeof (line_stat), "%7i ", cur_line + 1);
                                                           ^

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:08:32 +03:00
Andreas Mohr
a76afeec89 Ticket #3693: code cleanup before 4.8.19 release.
(init_subshell_child): cleanup -Wformat-signedness warning.

common.c:330:26: error: format '%d' expects argument of type 'int', but argument 3 has type 'unsigned int' [-Werror=format=]
         fprintf (stderr, __FILE__ ": unimplemented subshell type %d\r\n", mc_global.shell->type);
                          ^~~~~~~~

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:08:32 +03:00
Andrew Borodin
da538f0b99 Merge branch '3720_mcview_search_error_messages'
* 3720_mcview_search_error_messages:
  Ticket #3720: make viewer show search error messages.
2016-11-21 11:01:46 +03:00
Mooffie
38b96be737 Ticket #3720: make viewer show search error messages.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 11:01:19 +03:00
Andrew Borodin
5662ad6d74 Merge branch '3711_skin_color_aliases'
* 3711_skin_color_aliases:
  Add alias description to RU manual page.
  Ticket #3711: support color aliases in skin files.
2016-11-21 10:53:04 +03:00
Andrew Borodin
b9e3417cfb Add alias description to RU manual page.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 10:52:37 +03:00
Egmont Koblinger
0cceb99c2e Ticket #3711: support color aliases in skin files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 10:52:37 +03:00
Andrew Borodin
fc3d153b67 Merge branch '3697_ncurses_bsdcurses'
* 3697_ncurses_bsdcurses:
  (tty_init): support curses other than ncurses.
  Ticket #3697: fix broken compatibility with ncurses.
2016-11-21 10:46:52 +03:00
Andrew Borodin
4247120b4a (tty_init): support curses other than ncurses.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 10:46:18 +03:00
Andrew Borodin
787e24966d Ticket #3697: fix broken compatibility with ncurses.
Revert "Ticket #3665: fix compatibility with netbsd curses."

This reverts commit 38d4c655d3.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 10:46:18 +03:00
Yury V. Zaytsev
f3509db2bc syntax: highlight *.t (Perl test) files as Perl scripts
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-11-13 16:22:02 +01:00
Andrew Borodin
59bfd83744 (skin_dlg_callback): add forgotten return.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-13 17:28:54 +03:00
Andrew Borodin
682a5116ed Merge branch '3145_true_color'
* 3145_true_color:
  Update po/*.po files.
  (parse_256_or_true_color_name): minor optimization.
  Ticket #3145: support for True Color (16 millions colors).
2016-11-13 16:06:06 +03:00
Andrew Borodin
0e25aae952 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-13 16:05:25 +03:00
Andrew Borodin
b19c336951 (parse_256_or_true_color_name): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-13 15:56:59 +03:00
Egmont Koblinger
31320b597c Ticket #3145: support for True Color (16 millions colors).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-13 15:56:59 +03:00
Andrew Borodin
3cf0d55abb Merge branch '3723_skin_selector_location'
* 3723_skin_selector_location:
  Ticket #3723: fix positioning of skin selector dialog.
2016-11-13 15:28:55 +03:00
Andrew Borodin
d314609bb8 Ticket #3723: fix positioning of skin selector dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-13 15:28:45 +03:00
Yury V. Zaytsev
d1766655d3 maint: try to build & run as much tests as possible with -k make option
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-11-13 11:47:23 +01:00
Andrew Borodin
6f6ddefeb0 Merge branch '3714_dialog_resize_location'
* 3714_dialog_resize_location:
  Ticket #3714: (dialog_change_screen_size): fix dialog resizing order.
2016-11-13 12:37:33 +03:00
Andrew Borodin
5169a9dd95 Ticket #3714: (dialog_change_screen_size): fix dialog resizing order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-13 12:36:57 +03:00