mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
(edit_read_syntax_rules): fix pointer tests.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
4dd577fbe0
commit
172196d16a
@ -8,7 +8,7 @@
|
|||||||
Paul Sheer, 1998
|
Paul Sheer, 1998
|
||||||
Egmont Koblinger <egmont@gmail.com>, 2010
|
Egmont Koblinger <egmont@gmail.com>, 2010
|
||||||
Slava Zanko <slavazanko@gmail.com>, 2013
|
Slava Zanko <slavazanko@gmail.com>, 2013
|
||||||
Andrew Borodin <aborodin@vmail.ru>, 2013
|
Andrew Borodin <aborodin@vmail.ru>, 2013, 2014
|
||||||
|
|
||||||
This file is part of the Midnight Commander.
|
This file is part of the Midnight Commander.
|
||||||
|
|
||||||
@ -1046,13 +1046,13 @@ edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size)
|
|||||||
c->keyword[0] = g_malloc0 (sizeof (struct key_word));
|
c->keyword[0] = g_malloc0 (sizeof (struct key_word));
|
||||||
subst_defines (edit->defines, a, &args[1024]);
|
subst_defines (edit->defines, a, &args[1024]);
|
||||||
fg = *a;
|
fg = *a;
|
||||||
if (*a != '\0')
|
if (*a != NULL)
|
||||||
a++;
|
a++;
|
||||||
bg = *a;
|
bg = *a;
|
||||||
if (*a != '\0')
|
if (*a != NULL)
|
||||||
a++;
|
a++;
|
||||||
attrs = *a;
|
attrs = *a;
|
||||||
if (*a != '\0')
|
if (*a != NULL)
|
||||||
a++;
|
a++;
|
||||||
g_strlcpy (last_fg, fg != NULL ? fg : "", sizeof (last_fg));
|
g_strlcpy (last_fg, fg != NULL ? fg : "", sizeof (last_fg));
|
||||||
g_strlcpy (last_bg, bg != NULL ? bg : "", sizeof (last_bg));
|
g_strlcpy (last_bg, bg != NULL ? bg : "", sizeof (last_bg));
|
||||||
@ -1119,13 +1119,13 @@ edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size)
|
|||||||
k->first = *k->keyword;
|
k->first = *k->keyword;
|
||||||
subst_defines (edit->defines, a, &args[1024]);
|
subst_defines (edit->defines, a, &args[1024]);
|
||||||
fg = *a;
|
fg = *a;
|
||||||
if (*a != '\0')
|
if (*a != NULL)
|
||||||
a++;
|
a++;
|
||||||
bg = *a;
|
bg = *a;
|
||||||
if (*a != '\0')
|
if (*a != NULL)
|
||||||
a++;
|
a++;
|
||||||
attrs = *a;
|
attrs = *a;
|
||||||
if (*a != '\0')
|
if (*a != NULL)
|
||||||
a++;
|
a++;
|
||||||
if (fg == NULL)
|
if (fg == NULL)
|
||||||
fg = last_fg;
|
fg = last_fg;
|
||||||
|
Loading…
Reference in New Issue
Block a user