tweaks: rename a symbol, from a phrase to a noun

master
Benno Schulenberg 2020-06-17 16:54:48 +02:00
parent 61c94c2f81
commit bafcc19b7a
3 changed files with 9 additions and 9 deletions

View File

@ -55,9 +55,9 @@ void set_interface_colorpairs(void)
if (combo != NULL) { if (combo != NULL) {
if (!defaults_allowed) { if (!defaults_allowed) {
if (combo->fg == USE_THE_DEFAULT) if (combo->fg == THE_DEFAULT)
combo->fg = COLOR_WHITE; combo->fg = COLOR_WHITE;
if (combo->bg == USE_THE_DEFAULT) if (combo->bg == THE_DEFAULT)
combo->bg = COLOR_BLACK; combo->bg = COLOR_BLACK;
} }
init_pair(index + 1, combo->fg, combo->bg); init_pair(index + 1, combo->fg, combo->bg);
@ -89,9 +89,9 @@ void set_syntax_colorpairs(syntaxtype *sntx)
for (colortype *ink = sntx->color; ink != NULL; ink = ink->next) { for (colortype *ink = sntx->color; ink != NULL; ink = ink->next) {
if (!defaults_allowed) { if (!defaults_allowed) {
if (ink->fg == USE_THE_DEFAULT) if (ink->fg == THE_DEFAULT)
ink->fg = COLOR_WHITE; ink->fg = COLOR_WHITE;
if (ink->bg == USE_THE_DEFAULT) if (ink->bg == THE_DEFAULT)
ink->bg = COLOR_BLACK; ink->bg = COLOR_BLACK;
} }

View File

@ -135,7 +135,7 @@
#define INREGION 2 #define INREGION 2
#ifdef ENABLE_COLOR #ifdef ENABLE_COLOR
#define USE_THE_DEFAULT -1 #define THE_DEFAULT -1
#define BAD_COLOR -2 #define BAD_COLOR -2
#endif #endif

View File

@ -1020,7 +1020,7 @@ short color_to_short(const char *colorname, bool *vivid, bool *thick)
else if (strcmp(colorname, "black") == 0) else if (strcmp(colorname, "black") == 0)
return COLOR_BLACK; return COLOR_BLACK;
else if (strcmp(colorname, "normal") == 0) else if (strcmp(colorname, "normal") == 0)
return USE_THE_DEFAULT; return THE_DEFAULT;
else else
for (int index = 0; index < 9; index++) for (int index = 0; index < 9; index++)
if (strcmp(colorname, hues[index]) == 0) { if (strcmp(colorname, hues[index]) == 0) {
@ -1028,7 +1028,7 @@ short color_to_short(const char *colorname, bool *vivid, bool *thick)
jot_error(N_("Color '%s' takes no prefix"), colorname); jot_error(N_("Color '%s' takes no prefix"), colorname);
return BAD_COLOR; return BAD_COLOR;
} else if (COLORS < 255) } else if (COLORS < 255)
return USE_THE_DEFAULT; return THE_DEFAULT;
else else
return indices[index]; return indices[index];
} }
@ -1078,7 +1078,7 @@ bool parse_combination(char *combostr, short *fg, short *bg, int *attributes)
else if (vivid) else if (vivid)
*attributes |= A_BOLD; *attributes |= A_BOLD;
} else } else
*fg = USE_THE_DEFAULT; *fg = THE_DEFAULT;
if (comma) { if (comma) {
*bg = color_to_short(comma + 1, &vivid, &thick); *bg = color_to_short(comma + 1, &vivid, &thick);
@ -1087,7 +1087,7 @@ bool parse_combination(char *combostr, short *fg, short *bg, int *attributes)
if (vivid && COLORS > 8) if (vivid && COLORS > 8)
*bg += 8; *bg += 8;
} else } else
*bg = USE_THE_DEFAULT; *bg = THE_DEFAULT;
return TRUE; return TRUE;
} }