diff --git a/src/color.c b/src/color.c index 0b411393..701dab04 100644 --- a/src/color.c +++ b/src/color.c @@ -266,7 +266,7 @@ void set_up_multicache(linestruct *line) { line->multidata = (short *)nmalloc(openfile->syntax->nmultis * sizeof(short)); - for (int index = 0; index < openfile->syntax->nmultis; index++) + for (short index = 0; index < openfile->syntax->nmultis; index++) line->multidata[index] = -1; } diff --git a/src/nano.h b/src/nano.h index 953a2626..71112fac 100644 --- a/src/nano.h +++ b/src/nano.h @@ -178,10 +178,12 @@ typedef enum { /* Structure types. */ #ifdef ENABLE_COLOR typedef struct colortype { + short id; + /* An ordinal number (if this color combo is for a multiline regex). */ short fg; - /* This syntax's foreground color. */ + /* This combo's foreground color. */ short bg; - /* This syntax's background color. */ + /* This combo's background color. */ short pairnum; /* The pair number for this foreground/background color combination. */ int attributes; @@ -191,9 +193,7 @@ typedef struct colortype { regex_t *end; /* The compiled regular expression for 'end=', if any. */ struct colortype *next; - /* Next set of colors. */ - int id; - /* Basic id for assigning to lines later. */ + /* Next color combination. */ } colortype; typedef struct regexlisttype { @@ -241,7 +241,7 @@ typedef struct syntaxtype { #endif colortype *color; /* The colors and their regexes used in this syntax. */ - int nmultis; + short nmultis; /* How many multiline regex strings this syntax has. */ struct syntaxtype *next; /* Next syntax. */