about summary refs log tree commit diff homepage
path: root/torus.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-04-09 01:25:43 -0400
committerJune McEnroe <june@causal.agency>2018-04-09 01:25:43 -0400
commit6dadef0381d8b7a63f40b185b3592f27b55453cd (patch)
treeca6784a44b5154af2f707b5a213b0b5b796cd29d /torus.h
parentReplace #define with enum or const where possible (diff)
downloadtorus-6dadef0381d8b7a63f40b185b3592f27b55453cd.tar.gz
torus-6dadef0381d8b7a63f40b185b3592f27b55453cd.zip
Use anonymous union
Diffstat (limited to 'torus.h')
-rw-r--r--torus.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/torus.h b/torus.h
index 72895f2..5e01aaa 100644
--- a/torus.h
+++ b/torus.h
@@ -99,20 +99,20 @@ struct ServerMessage {
         struct {
             uint8_t cellX;
             uint8_t cellY;
-        } m;
+        } move;
         struct {
             uint8_t cellX;
             uint8_t cellY;
             uint8_t color;
             char cell;
-        } p;
+        } put;
         struct {
             uint8_t oldCellX;
             uint8_t oldCellY;
             uint8_t newCellX;
             uint8_t newCellY;
-        } c;
-    } data;
+        } cursor;
+    };
 };
 
 static const uint8_t CURSOR_NONE = UINT8_MAX;
@@ -127,13 +127,11 @@ struct ClientMessage {
         struct {
             int8_t dx;
             int8_t dy;
-        } m;
+        } move;
         struct {
             uint8_t color;
             char cell;
-        } p;
-        struct {
-            uint8_t spawn;
-        } s;
-    } data;
+        } put;
+        uint8_t spawn;
+    };
 };
class='logsubject'>Fix tests for diff spansJune McEnroe 2021-01-20Avoid matching ':' in make tagsJune McEnroe Otherwise a :: rule includes one of the ':'s in the tag name. 2021-01-19Prefer tag matches not preceded by [[:alnum:]]June McEnroe Otherwise the "id" in "void" matches for "void id". 2021-01-19Escape \ and / in mtags search patternsJune McEnroe 2021-01-20Use mtags in source-filterJune McEnroe 2021-01-19Add mtags to generate tags for make and mdocJune McEnroe 2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe 2021-01-19Don't use a pager if reading standard inputJune McEnroe 2021-01-19Support BSD make syntax and match *.amJune McEnroe These don't really go together, but... 2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe Otherwise it ends up going into Shell state. 2021-01-18Allow matching lexers using first input lineJune McEnroe