Renaming a struct member.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5697 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2016-02-29 09:17:03 +00:00
parent 275e9f0092
commit a24aee417d
5 changed files with 15 additions and 12 deletions

View File

@ -1,3 +1,6 @@
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.

View File

@ -190,7 +190,7 @@ void color_update(void)
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;
}
@ -295,7 +295,7 @@ void color_update(void)
/* 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;

View File

@ -1680,7 +1680,7 @@ void thanks_for_all_the_fish(void)
while (syntaxes != NULL) {
syntaxtype *bill = syntaxes;
free(syntaxes->desc);
free(syntaxes->name);
free(syntaxes->linter);
free(syntaxes->formatter);

View File

@ -238,7 +238,7 @@ typedef struct regexlisttype {
} regexlisttype;
typedef struct syntaxtype {
char *desc;
char *name;
/* The name of this syntax. */
regexlisttype *extensions;
/* The list of extensions that this syntax applies to. */

View File

@ -299,7 +299,7 @@ void parse_syntax(char *ptr)
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)
@ -311,7 +311,7 @@ void parse_syntax(char *ptr)
else
syntaxes = tmpsyntax;
free(old_syntax->desc);
free(old_syntax->name);
free(old_syntax);
break;
}
@ -329,7 +329,7 @@ void parse_syntax(char *ptr)
#endif
}
endsyntax->desc = mallocstrcpy(NULL, nameptr);
endsyntax->name = mallocstrcpy(NULL, nameptr);
endsyntax->color = NULL;
endcolor = NULL;
endsyntax->extensions = NULL;
@ -348,13 +348,13 @@ void parse_syntax(char *ptr)
/* 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;
@ -1062,7 +1062,7 @@ void parse_rcfile(FILE *rcstream
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) {
@ -1109,7 +1109,7 @@ void parse_rcfile(FILE *rcstream
} 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)
@ -1318,7 +1318,7 @@ void parse_rcfile(FILE *rcstream
#ifndef DISABLE_COLOR
if (endsyntax != NULL && endcolor == NULL)
rcfile_error(N_("Syntax \"%s\" has no color commands"),
endsyntax->desc);
endsyntax->name);
#endif
opensyntax = FALSE;