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.
* 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
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. */
#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)
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);
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);
}
#ifndef DISABLE_COLOR
- if (opensyntax && endcolor == NULL)
+ if (opensyntax && lastcolor == NULL)
rcfile_error(N_("Syntax \"%s\" has no color commands"),
live_syntax->name);