commit fe40e8867da8445e378d44b71ff35d53248bfc55
parent 923a90cba057e840768a00324843578065e883db
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 31 May 2019 12:23:47 +0200
tweaks: rename a struct element, to be distinct
And to match the style of its sisters.
Diffstat:
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/nano.h b/src/nano.h
@@ -233,7 +233,7 @@ typedef struct syntaxtype {
/* The name of this syntax. */
char *filename;
/* File where the syntax is defined, or NULL if not an included file. */
- struct augmentstruct *extendsyntax;
+ struct augmentstruct *augmentations;
/* List of extendsyntax commands to apply when loaded. */
regexlisttype *extensions;
/* The list of extensions that this syntax applies to. */
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -326,7 +326,7 @@ void parse_syntax(char *ptr, bool headers_only)
live_syntax = (syntaxtype *)nmalloc(sizeof(syntaxtype));
live_syntax->name = mallocstrcpy(NULL, nameptr);
live_syntax->filename = (headers_only ? strdup(nanorc) : NULL);
- live_syntax->extendsyntax = NULL;
+ live_syntax->augmentations = NULL;
live_syntax->extensions = NULL;
live_syntax->headers = NULL;
live_syntax->magics = NULL;
@@ -582,7 +582,7 @@ void parse_one_include(char *file, syntaxtype *syntax)
while (lastcolor->next != NULL)
lastcolor = lastcolor->next;
- augmentstruct *es = syntax->extendsyntax;
+ augmentstruct *es = syntax->augmentations;
/* Apply any stored extendsyntax commands. */
while (es != NULL) {
@@ -604,7 +604,7 @@ void parse_one_include(char *file, syntaxtype *syntax)
free(syntax->filename);
syntax->filename = NULL;
- syntax->extendsyntax = NULL;
+ syntax->augmentations = NULL;
opensyntax = FALSE;
}
@@ -1056,14 +1056,14 @@ void parse_rcfile(FILE *rcstream, bool syntax_only, bool headers_only)
newextendsyntax->data = strdup(ptr);
newextendsyntax->next = NULL;
- if (sint->extendsyntax != NULL) {
- augmentstruct *es = sint->extendsyntax;
+ if (sint->augmentations != NULL) {
+ augmentstruct *es = sint->augmentations;
while (es->next != NULL)
es = es->next;
es->next = newextendsyntax;
} else
- sint->extendsyntax = newextendsyntax;
+ sint->augmentations = newextendsyntax;
continue;
}