diff --git a/src/ChangeLog b/src/ChangeLog index 510fe0004..3d9d53185 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,20 @@ +2000-05-14 Andrew V. Samoilov + + * background.c (real_message_1s, message_1s): third parameter is + used by message () as printf pattern, so "%s" has to be added + if plain string must be shown but printf conversion + specification(s) may be there. + * view.c (do_view_init): ditto + * user.c (debug_out): ditto + * utilunux.c (close_error_pipe, check_error_pipe): ditto + + * background.[ch], vfs/util-alone.c (message_1s): third parameter + constified + 2001-04-27 Andrew V. Samoilov * find.c (search_content): Redo recent change without infinite loop ;-), - egrep_path hardcoded to "egrep" as it is done in locate_egrep () + egrep_path hardcoded to "egrep" as it is done in locate_egrep () (locate_egrep): commented out diff --git a/src/background.c b/src/background.c index 47e97fa69..809a03e11 100644 --- a/src/background.c +++ b/src/background.c @@ -183,12 +183,12 @@ background_title (char *str) /* {{{ Routines that do the real job */ static void -real_message_1s (enum OperationMode mode, int *flags, char *title, char *str1) +real_message_1s (enum OperationMode mode, int *flags, char *title, const char *str1) { if (mode == Background) title = background_title (title); - - message (*flags, title, str1); + + message (*flags, title, "%s", str1); if (mode == Background) g_free (title); @@ -488,7 +488,7 @@ tell_parent (int msg) } void -message_1s (int flags, char *title, char *str1) +message_1s (int flags, char *title, const char *str1) { if (we_are_background) parent_call ((void *)real_message_1s, NULL, 3, sizeof (flags), &flags, @@ -536,9 +536,9 @@ input_dialog_help (char *header, char *text, char *help, char *def_text) /* {{{ Stubs if background code is not supported */ void -message_1s (int flags, char *title, char *str1) +message_1s (int flags, char *title, const char *str1) { - message (flags, title, str1); + message (flags, title, "%s", str1); } void diff --git a/src/background.h b/src/background.h index 27954b9dd..76696479d 100644 --- a/src/background.h +++ b/src/background.h @@ -43,7 +43,7 @@ int parent_call (void *routine, FileOpContext *ctx, int argc, ...); void unregister_task_running (pid_t, int fd); /* stubs */ -void message_1s (int flags, char *title, char *str1); +void message_1s (int flags, char *title, const char *str1); void message_2s (int flags, char *title, char *str1, char *str2); void message_3s (int flags, char *title, char *str1, char *str2, const char *str3); void message_1s1d (int flags, char *title, char *str, int d); diff --git a/src/user.c b/src/user.c index 1e4623732..7f18adc8d 100644 --- a/src/user.c +++ b/src/user.c @@ -240,7 +240,7 @@ char *expand_format (char c, int quote) for (i = 0; i < panel->count; i++) if (panel->dir.list [i].f.marked) - length += strlen (panel->dir.list [i].fname) + 1; + length += strlen (panel->dir.list [i].fname) + 1; /* for space */ block = g_malloc (length*2+1); *block = 0; diff --git a/src/view.c b/src/view.c index 1f186bd97..da3c76987 100644 --- a/src/view.c +++ b/src/view.c @@ -593,7 +593,7 @@ do_view_init (WView *view, char *_command, const char *_file, int start_line) finish: if (error){ if (!view->have_frame){ - message (1, MSG_ERROR, error); + message (1, MSG_ERROR, "%s", error); g_free (error); return -1; } diff --git a/vfs/util-alone.c b/vfs/util-alone.c index 4a63b5ec2..3c9e38832 100644 --- a/vfs/util-alone.c +++ b/vfs/util-alone.c @@ -155,7 +155,7 @@ exist_file (char *name) } void -message_1s (int i, char *c1, char *c2) +message_1s (int i, char *c1, const char *c2) { char buf [4096];