diff --git a/src/rcfile.c b/src/rcfile.c index 3c515717..003e070b 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -991,9 +991,10 @@ void parse_includes(char *ptr) free(expanded); } -const char hues[9][7] = { "pink", "purple", "mauve", "lagoon", "mint", +#define COLORCOUNT 9 +const char hues[COLORCOUNT][7] = { "pink", "purple", "mauve", "lagoon", "mint", "lime", "peach", "orange", "latte" }; -short indices[9] = { 204, 163, 134, 38, 48, 148, 215, 208, 137 }; +short indices[COLORCOUNT] = { 204, 163, 134, 38, 48, 148, 215, 208, 137 }; /* Return the short value corresponding to the given color name, and set * vivid to TRUE for a lighter color, and thick for a heavier typeface. */ @@ -1032,7 +1033,7 @@ short color_to_short(const char *colorname, bool *vivid, bool *thick) else if (strcmp(colorname, "normal") == 0) return THE_DEFAULT; else - for (int index = 0; index < 9; index++) + for (int index = 0; index < COLORCOUNT; index++) if (strcmp(colorname, hues[index]) == 0) { if (*vivid) { jot_error(N_("Color '%s' takes no prefix"), colorname);