tweaks: adjust the indentation after the previous change
And reshuffle two declarations.master
parent
a1669e1bfd
commit
9b30bb15cc
32
src/rcfile.c
32
src/rcfile.c
|
@ -1022,8 +1022,9 @@ void parse_rcfile(FILE *rcstream, bool syntax_only, bool headers_only)
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
/* Handle extending first... */
|
/* Handle extending first... */
|
||||||
if (strcasecmp(keyword, "extendsyntax") == 0 && !syntax_only) {
|
if (strcasecmp(keyword, "extendsyntax") == 0 && !syntax_only) {
|
||||||
syntaxtype *sint;
|
augmentstruct *newitem, *extra;
|
||||||
char *syntaxname = ptr;
|
char *syntaxname = ptr;
|
||||||
|
syntaxtype *sint;
|
||||||
|
|
||||||
ptr = parse_next_word(ptr);
|
ptr = parse_next_word(ptr);
|
||||||
|
|
||||||
|
@ -1045,24 +1046,23 @@ void parse_rcfile(FILE *rcstream, bool syntax_only, bool headers_only)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When the syntax isn't loaded yet, store extendsyntax commands. */
|
newitem = nmalloc(sizeof(augmentstruct));;
|
||||||
augmentstruct *newitem = nmalloc(sizeof(augmentstruct));;
|
|
||||||
|
|
||||||
newitem->filename = strdup(nanorc);
|
/* Store the content of an 'extendsyntax', for later parsing. */
|
||||||
newitem->lineno = lineno;
|
newitem->filename = strdup(nanorc);
|
||||||
newitem->data = strdup(ptr);
|
newitem->lineno = lineno;
|
||||||
newitem->next = NULL;
|
newitem->data = strdup(ptr);
|
||||||
|
newitem->next = NULL;
|
||||||
|
|
||||||
if (sint->augmentations != NULL) {
|
if (sint->augmentations != NULL) {
|
||||||
augmentstruct *extra = sint->augmentations;
|
extra = sint->augmentations;
|
||||||
|
while (extra->next != NULL)
|
||||||
|
extra = extra->next;
|
||||||
|
extra->next = newitem;
|
||||||
|
} else
|
||||||
|
sint->augmentations = newitem;
|
||||||
|
|
||||||
while (extra->next != NULL)
|
continue;
|
||||||
extra = extra->next;
|
|
||||||
extra->next = newitem;
|
|
||||||
} else
|
|
||||||
sint->augmentations = newitem;
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to parse the keyword. */
|
/* Try to parse the keyword. */
|
||||||
|
|
Loading…
Reference in New Issue