about summary refs log tree commit diff
path: root/format.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--format.c12
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];
 }
 
heme.c?id=8650242e5449c907dc053281304c760c7eb33cc5&follow=1'>Add scheme -i to swap white and blackJune McEnroe 2018-09-21Map caps lock to escape on Linux consoleJune McEnroe 2018-09-19Fix README mandoc lintsJune McEnroe 2018-09-19Un-NOT trans.alpha values in pngoJune McEnroe 2018-09-18Refactor reads in pngo and clear palette between filesJune McEnroe 2018-09-17Add tRNS support to pngoJune McEnroe 2018-09-11Move gfx man pages to gfx/manJune McEnroe 2018-09-11Move bin man pages to bin/manJune McEnroe 2018-09-11Rewrite gfx.7 and render plaintext READMEJune McEnroe 2018-09-11Remove GAMES from BINSJune McEnroe 2018-09-11Rewrite bin.7 and render to plaintext READMEJune McEnroe 2018-09-11Add "blank" lines to man pagesJune McEnroe 2018-09-10Add mdoc syntax fileJune McEnroe 2018-09-08Fix Nm usage in multi-name man pagesJune McEnroe 2018-09-08Put real dates on man pagesJune McEnroe 2018-09-08Replace gfx README with REAMDE.7June McEnroe 2018-09-08Link gfx man pages in ~/.localJune McEnroe