tweaks: set a modifier in a single place, for conciseness
parent
2ff398c685
commit
bd97ae7255
|
@ -591,7 +591,8 @@ short color_to_short(const char *colorname, bool *bright)
|
||||||
if (strncasecmp(colorname, "bright", 6) == 0) {
|
if (strncasecmp(colorname, "bright", 6) == 0) {
|
||||||
*bright = TRUE;
|
*bright = TRUE;
|
||||||
colorname += 6;
|
colorname += 6;
|
||||||
}
|
} else
|
||||||
|
*bright = FALSE;
|
||||||
|
|
||||||
if (strcasecmp(colorname, "green") == 0)
|
if (strcasecmp(colorname, "green") == 0)
|
||||||
return COLOR_GREEN;
|
return COLOR_GREEN;
|
||||||
|
@ -624,7 +625,7 @@ short color_to_short(const char *colorname, bool *bright)
|
||||||
void parse_colors(char *ptr, int rex_flags)
|
void parse_colors(char *ptr, int rex_flags)
|
||||||
{
|
{
|
||||||
short fg, bg;
|
short fg, bg;
|
||||||
bool bright = FALSE;
|
bool bright;
|
||||||
char *item;
|
char *item;
|
||||||
|
|
||||||
if (!opensyntax) {
|
if (!opensyntax) {
|
||||||
|
@ -779,8 +780,6 @@ colortype *parse_interface_color(char *combostr)
|
||||||
{
|
{
|
||||||
colortype *trio = nmalloc(sizeof(colortype));
|
colortype *trio = nmalloc(sizeof(colortype));
|
||||||
|
|
||||||
trio->bright = FALSE;
|
|
||||||
|
|
||||||
if (parse_color_names(combostr, &trio->fg, &trio->bg, &trio->bright)) {
|
if (parse_color_names(combostr, &trio->fg, &trio->bg, &trio->bright)) {
|
||||||
free(combostr);
|
free(combostr);
|
||||||
return trio;
|
return trio;
|
||||||
|
|
Loading…
Reference in New Issue