diff options
author | Curtis McEnroe | 2018-09-13 15:17:41 -0400 |
---|---|---|
committer | Curtis McEnroe | 2018-09-13 15:17:41 -0400 |
commit | 9a69869d392ca9ac9e2d845dec5f4dfecdbf3456 (patch) | |
tree | 7179e65680da647300158cf2eb0549f593e20030 /format.c | |
parent | 311795bf412012ae42c0a4e4ba0afc55517f2bc8 (diff) |
Add IRCDefault to colors enum
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 12 |
1 files changed, 6 insertions, 6 deletions
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]; } |