mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 06:09:38 +03:00
Renaming a struct member.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5697 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
275e9f0092
commit
a24aee417d
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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. */
|
||||
|
16
src/rcfile.c
16
src/rcfile.c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user