summary refs log tree commit diff homepage
path: root/help.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-04-09 01:00:54 -0400
committerJune McEnroe <june@causal.agency>2018-04-09 01:00:54 -0400
commit99e3c574a02fdb779e97186119891fbe46390d72 (patch)
tree639e659dd91b6e9259f55f59ca91d6bf9ae46e12 /help.c
parentLink against ncurses (diff)
downloadtorus-99e3c574a02fdb779e97186119891fbe46390d72.tar.gz
torus-99e3c574a02fdb779e97186119891fbe46390d72.zip
Replace #define with enum or const where possible
Diffstat (limited to '')
-rw-r--r--help.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/help.c b/help.c
index 4415065..d997bde 100644
--- a/help.c
+++ b/help.c
@@ -46,16 +46,18 @@ static void clientPut(uint8_t color, char cell) {
     clientMessage(msg);
 }
 
-#define DELAY (50000)
-
-#define R (COLOR_RED)
-#define G (COLOR_GREEN)
-#define Y (COLOR_YELLOW)
-#define B (COLOR_BLUE)
-#define M (COLOR_MAGENTA)
-#define C (COLOR_CYAN)
-#define W (COLOR_WHITE)
-#define I (COLOR_BRIGHT | COLOR_WHITE)
+static const useconds_t DELAY = 50000;
+
+enum {
+    R = COLOR_RED,
+    G = COLOR_GREEN,
+    Y = COLOR_YELLOW,
+    B = COLOR_BLUE,
+    M = COLOR_MAGENTA,
+    C = COLOR_CYAN,
+    W = COLOR_WHITE,
+    I = COLOR_BRIGHT | COLOR_WHITE,
+};
 
 static void h(void) { clientMove(-1,  0); usleep(DELAY); }
 static void j(void) { clientMove( 0,  1); usleep(DELAY); }