diff --git a/include/color.h b/include/color.h index 1cd6f7d2..c183ef79 100644 --- a/include/color.h +++ b/include/color.h @@ -2,7 +2,6 @@ #define __COLOR_H__ 1 enum color_attr { - COLOR_NONE, COLOR_IFNAME, COLOR_MAC, COLOR_INET, diff --git a/lib/color.c b/lib/color.c index 79d5e289..05afcb21 100644 --- a/lib/color.c +++ b/lib/color.c @@ -104,13 +104,13 @@ int color_fprintf(FILE *fp, enum color_attr attr, const char *fmt, ...) va_start(args, fmt); - if (!color_is_enabled || attr == COLOR_NONE) { + if (!color_is_enabled || attr == COLOR_CLEAR) { ret = vfprintf(fp, fmt, args); goto end; } ret += fprintf(fp, "%s", - color_codes[attr_colors[is_dark_bg ? attr + 8 : attr]]); + color_codes[attr_colors[is_dark_bg ? attr + 7 : attr]]); ret += vfprintf(fp, fmt, args); ret += fprintf(fp, "%s", color_codes[C_CLEAR]);