From 9a69869d392ca9ac9e2d845dec5f4dfecdbf3456 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 13 Sep 2018 15:17:41 -0400 Subject: Add IRCDefault to colors enum --- format.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'format.c') diff --git a/format.c b/format.c index b9cd8b1..cb9cb15 100644 --- a/format.c +++ b/format.c @@ -25,15 +25,15 @@ void formatReset(struct Format *format) { format->italic = false; format->underline = false; format->reverse = false; - format->fg = -1; - format->bg = -1; + format->fg = IRCDefault; + format->bg = IRCDefault; } static void parseColor(struct Format *format) { size_t len = MIN(wcsspn(format->str, L"0123456789"), 2); if (!len) { - format->fg = -1; - format->bg = -1; + format->fg = IRCDefault; + format->bg = IRCDefault; return; } format->fg = 0; @@ -41,7 +41,7 @@ static void parseColor(struct Format *format) { format->fg *= 10; format->fg += format->str[i] - L'0'; } - if (format->fg > IRCLightGray) format->fg = -1; + if (format->fg > IRCLightGray) format->fg = IRCDefault; format->str = &format->str[len]; len = 0; @@ -54,7 +54,7 @@ static void parseColor(struct Format *format) { format->bg *= 10; format->bg += format->str[1 + i] - L'0'; } - if (format->bg > IRCLightGray) format->bg = -1; + if (format->bg > IRCLightGray) format->bg = IRCDefault; format->str = &format->str[1 + len]; } -- cgit 1.4.1