+2016-02-28 Benno Schulenberg <bensberg@justemail.net>
+ * src/nano.h, src/rcfile.c, src/color.c: Rename a struct member.
+
2016-02-28 Benno Schulenberg <bensberg@justemail.net>
* src/rcfile.c (parse_header_exp): Don't continue when something is
wrong -- skip the rest of the line. This fixes Savannah bug #47289.
return;
for (sint = syntaxes; sint != NULL; sint = sint->next) {
- if (strcmp(sint->desc, syntaxstr) == 0) {
+ if (strcmp(sint->name, syntaxstr) == 0) {
openfile->syntax = sint;
openfile->colorstrings = sint->color;
}
/* If we didn't find any syntax yet, see if there is a default one. */
if (openfile->colorstrings == NULL) {
for (sint = syntaxes; sint != NULL; sint = sint->next) {
- if (strcmp(sint->desc, "default") == 0) {
+ if (strcmp(sint->name, "default") == 0) {
openfile->syntax = sint;
openfile->colorstrings = sint->color;
break;
prev_syntax = NULL;
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
tmpsyntax = tmpsyntax->next) {
- if (strcmp(nameptr, tmpsyntax->desc) == 0) {
+ if (strcmp(nameptr, tmpsyntax->name) == 0) {
syntaxtype *old_syntax = tmpsyntax;
if (endsyntax == tmpsyntax)
else
syntaxes = tmpsyntax;
- free(old_syntax->desc);
+ free(old_syntax->name);
free(old_syntax);
break;
}
#endif
}
- endsyntax->desc = mallocstrcpy(NULL, nameptr);
+ endsyntax->name = mallocstrcpy(NULL, nameptr);
endsyntax->color = NULL;
endcolor = NULL;
endsyntax->extensions = NULL;
/* The "none" syntax is the same as not having a syntax at all, so
* we can't assign any extensions or colors to it. */
- if (strcmp(endsyntax->desc, "none") == 0) {
+ if (strcmp(endsyntax->name, "none") == 0) {
rcfile_error(N_("The \"none\" syntax is reserved"));
return;
}
/* The default syntax should have no associated extensions. */
- if (strcmp(endsyntax->desc, "default") == 0 && *ptr != '\0') {
+ if (strcmp(endsyntax->name, "default") == 0 && *ptr != '\0') {
rcfile_error(
N_("The \"default\" syntax must take no extensions"));
return;
ptr = parse_next_word(ptr);
for (ts = syntaxes; ts != NULL; ts = ts->next)
- if (!strcmp(ts->desc, syntaxname))
+ if (!strcmp(ts->name, syntaxname))
break;
if (ts == NULL) {
} else if (strcasecmp(keyword, "syntax") == 0) {
if (endsyntax != NULL && endcolor == NULL)
rcfile_error(N_("Syntax \"%s\" has no color commands"),
- endsyntax->desc);
+ endsyntax->name);
parse_syntax(ptr);
}
else if (strcasecmp(keyword, "magic") == 0)
#ifndef DISABLE_COLOR
if (endsyntax != NULL && endcolor == NULL)
rcfile_error(N_("Syntax \"%s\" has no color commands"),
- endsyntax->desc);
+ endsyntax->name);
#endif
opensyntax = FALSE;