mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 06:09:38 +03:00
Renaming a variable, from 'endcolor' to 'lastcolor', to fully avoid
the idea that it might have something to do with 'end_regex'. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5733 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
6ed6462154
commit
8fbb922868
@ -4,6 +4,7 @@
|
||||
fix for Savannah bug #47325 reported by Thomas Rosenau.
|
||||
* src/rcfile.c (parse_rcfile, parse_colors, nregcomp): Combine the
|
||||
regular-expression flags at compile time instead of at run time.
|
||||
* src/rcfile.c (parse_syntax, parse_colors): Rename a variable.
|
||||
|
||||
2016-03-13 Thomas Rosenau <thomasr@fantasymail.de> (tiny change)
|
||||
* autogen.sh, README.SVN: Mention SVN instead of CVS.
|
||||
|
22
src/rcfile.c
22
src/rcfile.c
@ -125,7 +125,7 @@ static bool opensyntax = FALSE;
|
||||
* or when a new syntax command is seen, this bool becomes FALSE. */
|
||||
static syntaxtype *live_syntax;
|
||||
/* The syntax that is currently being parsed. */
|
||||
static colortype *endcolor = NULL;
|
||||
static colortype *lastcolor = NULL;
|
||||
/* The end of the color list for the current syntax. */
|
||||
#endif
|
||||
|
||||
@ -308,7 +308,7 @@ void parse_syntax(char *ptr)
|
||||
live_syntax->linter = NULL;
|
||||
live_syntax->formatter = NULL;
|
||||
live_syntax->color = NULL;
|
||||
endcolor = NULL;
|
||||
lastcolor = NULL;
|
||||
live_syntax->nmultis = 0;
|
||||
|
||||
/* Hook the new syntax in at the top of the list. */
|
||||
@ -703,12 +703,12 @@ void parse_colors(char *ptr, int rex_flags)
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Adding an entry for fg %hd, bg %hd\n", fg, bg);
|
||||
#endif
|
||||
if (endcolor == NULL)
|
||||
if (lastcolor == NULL)
|
||||
live_syntax->color = newcolor;
|
||||
else
|
||||
endcolor->next = newcolor;
|
||||
lastcolor->next = newcolor;
|
||||
|
||||
endcolor = newcolor;
|
||||
lastcolor = newcolor;
|
||||
}
|
||||
|
||||
if (!expectend)
|
||||
@ -959,10 +959,10 @@ void parse_rcfile(FILE *rcstream
|
||||
opensyntax = TRUE;
|
||||
|
||||
/* Refind the tail of the color list for this syntax. */
|
||||
endcolor = sint->color;
|
||||
if (endcolor != NULL)
|
||||
while (endcolor->next != NULL)
|
||||
endcolor = endcolor->next;
|
||||
lastcolor = sint->color;
|
||||
if (lastcolor != NULL)
|
||||
while (lastcolor->next != NULL)
|
||||
lastcolor = lastcolor->next;
|
||||
|
||||
keyword = ptr;
|
||||
ptr = parse_next_word(ptr);
|
||||
@ -995,7 +995,7 @@ void parse_rcfile(FILE *rcstream
|
||||
else
|
||||
parse_includes(ptr);
|
||||
} else if (strcasecmp(keyword, "syntax") == 0) {
|
||||
if (opensyntax && endcolor == NULL)
|
||||
if (opensyntax && lastcolor == NULL)
|
||||
rcfile_error(N_("Syntax \"%s\" has no color commands"),
|
||||
live_syntax->name);
|
||||
parse_syntax(ptr);
|
||||
@ -1201,7 +1201,7 @@ void parse_rcfile(FILE *rcstream
|
||||
}
|
||||
|
||||
#ifndef DISABLE_COLOR
|
||||
if (opensyntax && endcolor == NULL)
|
||||
if (opensyntax && lastcolor == NULL)
|
||||
rcfile_error(N_("Syntax \"%s\" has no color commands"),
|
||||
live_syntax->name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user