../../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>
fixed: drawing CJK character as '...'.
Sometimes the CJK character gets replaced by three inverse dots.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
In UTF-8 locales, with case sensitive sort files are sorted properly:
00050.jpg
001-gepard.jpg
0175ep.jpg
027.jpg
060912.jpg
win.jpg
z1.jpg
but if in case insensitive sort, they get mixed up
and files with number in their name are sorted badly:
001-gepard.jpg
027.jpg
00050.jpg
0175ep.jpg
060912.jpg
win.jpg
z1.jpg
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
fixed: 'eval_marks' for correct vertical block delete.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
fixed edit_block_delete, edit_delete_column_of_text for correct delete vertical block
fixed cursor position after delete block
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
fixed: cursor placement and movements in non-ascii (cyrillic) UTF-8 files
in 8-bit (KOI8-R) locales
fixed incorrect width calculation in 7-bit codeset
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Minor optimization of edit_move_forward3() function.
Also fixed build with --disable-charset option.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Test case:
1. Make two files with same content but with different encodings (for example, in UTF-8 and KOI8-R);
2. Open UTF-8 file for editing. Press Alt+e and set 'UTF-8' encoding;
3. Search someting
4. exit from editor and open file with 'KOI8-R' encoding;
5. You must see a dots. Now press shift+F7 (continue search);
6. Segfault here
Fix issue:
Now function mc_search__recode_str() returns newly allocated string in any case
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Refactoring of uneeded goto in user_menu() function in editor.
Thanks to Vit Rosin for originl patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>