Since Ctrl-C is used as common shortcut, don't use it
to generate the SIGINN signal in S-Lang library.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 1845_code_cleanup: (30 commits)
editcmd.c 'eval_marks': removed unused variable 'diff'
The check result of g_new(), g_new0(), g_malloc(), g_malloc0() and g_realloc() is useless.
Remove declaration of unused function.
Added glib library for mcserv
rearranging some lines in src_skin_colors.c mc_skin_color_parse_ini_file()
missing check in src_mcconfig_get.c-mc_config_get_groups()_-2
Unifying of g_strconcat() calls
Types accuracy, minor optimization, removed unneeded goto and return.
Fixed i18n of file operation dialog titles.
added NULL check before call g_utf8_find_prev_char, g_utf8_get_char_validated for more safety.
More usage of GLib functions.
No need to call done_menu() at MC exit.
Optimization of DLG_RESIZE message handling.
doxygen: various warning fixes
Fixed forgotten call of va_end() in mc_log().
src/boxes.c (configure_vfs): fixed #ifdef directive.
m4.include/mc-cflags.m4: added -fdiagnostics-show-option (exact warning option)
configure.ac: guard $CFLAGS with "" in tests
m4.include/mc-cflags.m4: sorted CFLAGS (no flags were added or removed)
cflags: enable -Wformat in maintainer mode
...
g_new(), g_new0(), g_malloc(), g_malloc0() and g_realloc() functions
never return NULL and call abort() on fail. So check result of these
functions is useless. g_try_new(), g_try_new0(), g_try_malloc(),
g_try_malloc0() and g_try_realloc() functions are used instead.
Some minor optimization and code formatting are also performed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fixes such warnings:
mc/src/viewer/mcviewer.h:1: Warning: the name `view.h' supplied as the second argument
in the \file statement is not an input file
mc/vfs/vfs.c:267: Warning: explicit link request to 'op' could not be resolved
mc/src/strescape.c:219: Warning: Found unknown command `\params'
mc/src/strescape.c:153: Warning: Found unknown command `\params'
mc/src/strescape.c:187: Warning: Found unknown command `\params'
mc/src/strescape.c:219: Warning: Found unknown command `\params'
mc/src/strescape.c:153: Warning: Found unknown command `\params'
mc/src/strescape.c:187: Warning: Found unknown command `\params'
mc/vfs/fish.c:33: Warning: explicit link request to 'sh' could not be resolved
mc/vfs/fish.c:33: Warning: Found unknown command `\host'
mc/vfs/ftpfs.c:43: Warning: Found unknown command `\hobit'
mc/vfs/sfs.c:26: Warning: explicit link request to 'ugz' could not be resolved
mc/vfs/vfs.c:267: Warning: explicit link request to 'op' could not be resolved
mc/vfs/vfs.c:267: Warning: explicit link request to 'op' could not be resolved
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
../../mc/edit/editcmd.c:2519:50: error: field precision should have type 'int', but argument has type 'gsize' (aka 'unsigned long') [-Wformat]
match_expr = g_strdup_printf ("(^|\\s+|\\b)%.*s[^\\s\\.=\\+\\[\\]\\(\\)\\,\\;\\:\\\"\\'\\-\\?\\/\\|\\\\\\{\\}\\*\\&\\^\\%%\\$#@\\!]+", word_len, bufpos);
^ ~~~~~~~~
../../mc/edit/editcmd.c:2700:38: error: field precision should have type 'int', but argument has type 'gsize' (aka 'unsigned long') [-Wformat]
match_expr = g_strdup_printf ("%.*s", word_len, bufpos);
^ ~~~~~~~~
2 diagnostics generated.
make[2]: *** [editcmd.o] Error 1
make[2]: Target `all' not remade because of errors.
../../../mc/src/mcconfig/common.c:71:74: error: format string is not a string literal (potentially insecure) [-Wformat-security]
g_propagate_error (error, g_error_new (mc_main_error_quark() ,0, strerror(errno)));
^~~~~~~~~~~~~~~
../../../mc/src/mcconfig/common.c:83:74: error: format string is not a string literal (potentially insecure) [-Wformat-security]
g_propagate_error (error, g_error_new (mc_main_error_quark() ,0, strerror(errno)));
^~~~~~~~~~~~~~~
2 diagnostics generated.
make[3]: *** [libmcconfig_la-common.lo] Error 1
make[3]: Target `all' not remade because of errors.
../../mc/src/main.c:2165:41: error: format string is not a string literal (potentially insecure) [-Wformat-security]
message (D_ERROR, _("Warning"), error->message);
^~~~~~~~~~~~~~
1 diagnostic generated.
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
Removed unneeded goto, return, #ifdef.
Type accuracy.
Indentation.
Minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
Since button bar is a part of editor dialog, its initialization
was moved from WIDGET_INIT stage to DLG_INIT one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Now these functions will return newly allocated string in any case.
As third-side effect, fixed memory leak with '--disable-charset' configure option.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Now user-defined CFLAG (from envirovement) have higest priority before
internal definitions.
Also, patch have change for respect code optimization options from user.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>