diff --git a/src/color.c b/src/color.c index bcf2f2cf..88254b01 100644 --- a/src/color.c +++ b/src/color.c @@ -240,7 +240,7 @@ void check_the_multis(linestruct *line) char *afterstart; /* If there is no syntax or no multiline regex, there is nothing to do. */ - if (openfile->syntax == NULL || openfile->syntax->nmultis == 0) + if (!openfile->syntax || openfile->syntax->multiscore == 0) return; if (line->multidata == NULL) { @@ -293,7 +293,7 @@ void precalc_multicolorinfo(void) regmatch_t startmatch, endmatch; linestruct *line, *tailline; - if (!openfile->syntax || openfile->syntax->nmultis == 0 || ISSET(NO_SYNTAX)) + if (!openfile->syntax || openfile->syntax->multiscore == 0 || ISSET(NO_SYNTAX)) return; //#define TIMEPRECALC 123 @@ -305,7 +305,7 @@ void precalc_multicolorinfo(void) /* For each line, allocate cache space for the multiline-regex info. */ for (line = openfile->filetop; line != NULL; line = line->next) if (!line->multidata) - line->multidata = nmalloc(openfile->syntax->nmultis * sizeof(short)); + line->multidata = nmalloc(openfile->syntax->multiscore * sizeof(short)); for (ink = openfile->syntax->color; ink != NULL; ink = ink->next) { /* If this is not a multi-line regex, skip it. */ diff --git a/src/definitions.h b/src/definitions.h index 86eeae35..5d6cb47b 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -444,7 +444,7 @@ typedef struct syntaxtype { #endif colortype *color; /* The colors and their regexes used in this syntax. */ - short nmultis; + short multiscore; /* How many multiline regex strings this syntax has. */ struct syntaxtype *next; /* Next syntax. */ diff --git a/src/nano.c b/src/nano.c index bca18f3e..4c0c19be 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1518,7 +1518,7 @@ void inject(char *burst, size_t count) if (thisline == openfile->filebot && !ISSET(NO_NEWLINES)) { new_magicline(); #ifdef ENABLE_COLOR - if (margin || (openfile->syntax && openfile->syntax->nmultis)) + if (margin || (openfile->syntax && openfile->syntax->multiscore)) #else if (margin) #endif diff --git a/src/rcfile.c b/src/rcfile.c index 75edb290..3f94e155 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -679,7 +679,7 @@ void begin_new_syntax(char *ptr) live_syntax->comment = copy_of(GENERAL_COMMENT_CHARACTER); #endif live_syntax->color = NULL; - live_syntax->nmultis = 0; + live_syntax->multiscore = 0; /* Hook the new syntax in at the top of the list. */ live_syntax->next = syntaxes; @@ -1223,8 +1223,8 @@ void parse_rule(char *ptr, int rex_flags) /* For a multiline rule, give it a number and increase the count. */ if (expectend) { - newcolor->id = live_syntax->nmultis; - live_syntax->nmultis++; + newcolor->id = live_syntax->multiscore; + live_syntax->multiscore++; } } } diff --git a/src/winio.c b/src/winio.c index d67e9959..5f013bf9 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2595,8 +2595,8 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col) const colortype *varnish = openfile->syntax->color; /* If there are multiline regexes, make sure this line has a cache. */ - if (openfile->syntax->nmultis > 0 && line->multidata == NULL) - line->multidata = nmalloc(openfile->syntax->nmultis * sizeof(short)); + if (openfile->syntax->multiscore > 0 && line->multidata == NULL) + line->multidata = nmalloc(openfile->syntax->multiscore * sizeof(short)); /* Iterate through all the coloring regexes. */ for (; varnish != NULL; varnish = varnish->next) {