From 277186329921ba34630b7a2492e1792133a02c67 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 11 Feb 2020 17:43:36 -0500 Subject: Define ColorCap instead of hardcoding 100 --- chat.h | 1 + ui.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/chat.h b/chat.h index 1e28bad..bd1ff4e 100644 --- a/chat.h +++ b/chat.h @@ -34,6 +34,7 @@ enum Color { White, Black, Blue, Green, Red, Brown, Magenta, Orange, Yellow, LightGreen, Cyan, LightCyan, LightBlue, Pink, Gray, LightGray, Default = 99, + ColorCap, }; enum { None, Debug, Network, IDCap = 256 }; diff --git a/ui.c b/ui.c index 34b6f7d..83373d9 100644 --- a/ui.c +++ b/ui.c @@ -314,7 +314,7 @@ struct Style { }; static const struct Style Reset = { A_NORMAL, Default, Default }; -static const short Colors[100] = { +static const short Colors[ColorCap] = { [Default] = -1, [White] = 8 + COLOR_WHITE, [Black] = 0 + COLOR_BLACK, -- cgit 1.4.1