mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* syntax.c (this_try_alloc_color_pair): Added const qualifiers.
* editcmd.c (snprintf_p): Likewise. (edit_replace_prompt): Simplified the code.
This commit is contained in:
parent
dc259a038c
commit
2a2b478f67
@ -1,6 +1,8 @@
|
||||
2004-09-25 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* syntax.c (this_try_alloc_color_pair): Added const qualifiers.
|
||||
* editcmd.c (snprintf_p): Likewise. (edit_replace_prompt):
|
||||
Simplified the code.
|
||||
|
||||
2004-09-25 Pavel S. Shirshov <pavelsh@mail.ru>
|
||||
|
||||
|
@ -1183,9 +1183,8 @@ edit_replace_prompt (WEdit * edit, char *replace_text, int xpos, int ypos)
|
||||
|
||||
GString *label_text = g_string_new (_(" Replace with: "));
|
||||
if (*replace_text) {
|
||||
size_t label_text_len = label_text->len;
|
||||
g_string_append (label_text, replace_text);
|
||||
convert_to_display (label_text->str + label_text_len);
|
||||
convert_to_display (label_text->str + label_text->len);
|
||||
}
|
||||
quick_widgets[5].text = label_text->str;
|
||||
|
||||
@ -1633,13 +1632,14 @@ static int snprintf_p (char *str, size_t size, const char *fmt,...)
|
||||
{
|
||||
va_list ap;
|
||||
size_t n;
|
||||
char *q, *p, *s = str, *e = str + size;
|
||||
const char *q, *p;
|
||||
char *s = str, *e = str + size;
|
||||
char q1[40];
|
||||
char *p1;
|
||||
int nargs = 0;
|
||||
|
||||
va_start (ap, fmt);
|
||||
p = q = (char *) fmt;
|
||||
p = q = fmt;
|
||||
|
||||
while ((p = strchr (p, '%'))) {
|
||||
n = p - q;
|
||||
|
Loading…
Reference in New Issue
Block a user