From fbb416f2bdd9dedcbc7b4471af335e2b65331953 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Fri, 1 Sep 2017 13:55:48 -0400 Subject: Revert "Add client readOnly mode" This reverts commit 34f25ae40a3db9369e9d98b3814f2b93bbc21451. --- client.c | 7 +------ torus.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/client.c b/client.c index db03db3..e674ba2 100644 --- a/client.c +++ b/client.c @@ -44,8 +44,6 @@ static int client; -static bool readOnly = false; - static void clientMessage(const struct ClientMessage *msg) { ssize_t len = send(client, msg, sizeof(*msg), 0); if (len < 0) err(EX_IOERR, "send"); @@ -60,7 +58,6 @@ static void clientMove(int8_t dx, int8_t dy) { } static void clientPut(uint8_t color, char cell) { - if (readOnly) return; struct ClientMessage msg = { .type = CLIENT_PUT, .data.p = { .color = color, .cell = cell }, @@ -384,9 +381,7 @@ static void initColors(void) { } } -int main(int argc, char *argv[] UNUSED) { - if (argc > 1) readOnly = true; - +int main() { client = socket(PF_LOCAL, SOCK_STREAM, 0); if (client < 0) err(EX_OSERR, "socket"); diff --git a/torus.h b/torus.h index f2fb6ee..e337557 100644 --- a/torus.h +++ b/torus.h @@ -20,7 +20,6 @@ #include #include -#define UNUSED __attribute__((unused)) #define ALIGNED(x) __attribute__((aligned(x))) enum { -- cgit 1.4.1 =1'>diff
Commit message (Collapse)Author
2019-02-08Use [] to quote special characters in regexJune McEnroe
This looks much cleaner than having to double-escape backslash.
2019-02-08Improve ANSI output and base IRC on itJune McEnroe
2019-02-08Add hi -nJune McEnroe
2019-02-08Elaborate hi man pageJune McEnroe
2019-02-08Use set for parent in hiJune McEnroe
2019-02-08Switch back to semantic keyword grouping in hiJune McEnroe
2019-02-08Match only the basename in hiJune McEnroe
2019-02-07Add mdoc syntax to hiJune McEnroe
2019-02-07Support multi-line C macros in hiJune McEnroe
2019-02-07Detect .mk files as makeJune McEnroe
2019-02-07Add make syntax to hiJune McEnroe
2019-02-07Add IRC output to hiJune McEnroe
2019-02-07Improve C syntax accuracy and add Format classJune McEnroe
2019-02-07Factor out hi checkJune McEnroe
Fix subexpression bounds check and compile pattends.
2019-02-07Add Escape class to hiJune McEnroe
2019-02-07Add Todo class and parent syntax constraintJune McEnroe