From fe40e8867da8445e378d44b71ff35d53248bfc55 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 31 May 2019 12:23:47 +0200 Subject: [PATCH] tweaks: rename a struct element, to be distinct And to match the style of its sisters. --- src/nano.h | 2 +- src/rcfile.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/nano.h b/src/nano.h index e35e76ed..c57d07f7 100644 --- 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 index 48c27779..a8013468 100644 --- 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; }