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 (!defaults_allowed) {
if (combo->fg == USE_THE_DEFAULT)
if (combo->fg == THE_DEFAULT)
combo->fg = COLOR_WHITE;
if (combo->bg == USE_THE_DEFAULT)
if (combo->bg == THE_DEFAULT)
combo->bg = COLOR_BLACK;
}
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) {
if (!defaults_allowed) {
if (ink->fg == USE_THE_DEFAULT)
if (ink->fg == THE_DEFAULT)
ink->fg = COLOR_WHITE;
if (ink->bg == USE_THE_DEFAULT)
if (ink->bg == THE_DEFAULT)
ink->bg = COLOR_BLACK;
}

View File

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

View File

@ -1020,7 +1020,7 @@ short color_to_short(const char *colorname, bool *vivid, bool *thick)
else if (strcmp(colorname, "black") == 0)
return COLOR_BLACK;
else if (strcmp(colorname, "normal") == 0)
return USE_THE_DEFAULT;
return THE_DEFAULT;
else
for (int index = 0; index < 9; index++)
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);
return BAD_COLOR;
} else if (COLORS < 255)
return USE_THE_DEFAULT;
return THE_DEFAULT;
else
return indices[index];
}
@ -1078,7 +1078,7 @@ bool parse_combination(char *combostr, short *fg, short *bg, int *attributes)
else if (vivid)
*attributes |= A_BOLD;
} else
*fg = USE_THE_DEFAULT;
*fg = THE_DEFAULT;
if (comma) {
*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)
*bg += 8;
} else
*bg = USE_THE_DEFAULT;
*bg = THE_DEFAULT;
return TRUE;
}