mirror of
git://git.sv.gnu.org/nano.git
synced 2025-03-03 15:21:29 +03:00
tweaks: rename a type, for more contrast
This commit is contained in:
parent
5817e83e33
commit
923a90cba0
@ -217,23 +217,23 @@ typedef struct regexlisttype {
|
||||
/* The next regex. */
|
||||
} regexlisttype;
|
||||
|
||||
typedef struct extendsyntaxstruct {
|
||||
typedef struct augmentstruct {
|
||||
char *filename;
|
||||
/* The file where the syntax is extended. */
|
||||
ssize_t lineno;
|
||||
/* The number of the line of the extendsyntax command. */
|
||||
char *data;
|
||||
/* The text of the line. */
|
||||
struct extendsyntaxstruct *next;
|
||||
struct augmentstruct *next;
|
||||
/* Next node. */
|
||||
} extendsyntaxstruct;
|
||||
} augmentstruct;
|
||||
|
||||
typedef struct syntaxtype {
|
||||
char *name;
|
||||
/* The name of this syntax. */
|
||||
char *filename;
|
||||
/* File where the syntax is defined, or NULL if not an included file. */
|
||||
struct extendsyntaxstruct *extendsyntax;
|
||||
struct augmentstruct *extendsyntax;
|
||||
/* List of extendsyntax commands to apply when loaded. */
|
||||
regexlisttype *extensions;
|
||||
/* The list of extensions that this syntax applies to. */
|
||||
|
@ -582,11 +582,11 @@ void parse_one_include(char *file, syntaxtype *syntax)
|
||||
while (lastcolor->next != NULL)
|
||||
lastcolor = lastcolor->next;
|
||||
|
||||
extendsyntaxstruct *es = syntax->extendsyntax;
|
||||
augmentstruct *es = syntax->extendsyntax;
|
||||
|
||||
/* Apply any stored extendsyntax commands. */
|
||||
while (es != NULL) {
|
||||
extendsyntaxstruct *next = es->next;
|
||||
augmentstruct *next = es->next;
|
||||
char *keyword = es->data, *ptr = parse_next_word(es->data);
|
||||
|
||||
nanorc = es->filename;
|
||||
@ -1049,7 +1049,7 @@ void parse_rcfile(FILE *rcstream, bool syntax_only, bool headers_only)
|
||||
|
||||
/* When the syntax isn't loaded yet, store extendsyntax commands. */
|
||||
if (sint->filename != NULL) {
|
||||
extendsyntaxstruct *newextendsyntax = nmalloc(sizeof(extendsyntaxstruct));;
|
||||
augmentstruct *newextendsyntax = nmalloc(sizeof(augmentstruct));;
|
||||
|
||||
newextendsyntax->filename = strdup(nanorc);
|
||||
newextendsyntax->lineno = lineno;
|
||||
@ -1057,7 +1057,8 @@ void parse_rcfile(FILE *rcstream, bool syntax_only, bool headers_only)
|
||||
newextendsyntax->next = NULL;
|
||||
|
||||
if (sint->extendsyntax != NULL) {
|
||||
extendsyntaxstruct *es = sint->extendsyntax;
|
||||
augmentstruct *es = sint->extendsyntax;
|
||||
|
||||
while (es->next != NULL)
|
||||
es = es->next;
|
||||
es->next = newextendsyntax;
|
||||
|
Loading…
x
Reference in New Issue
Block a user