summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--handle.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/handle.c b/handle.c
index 422cd76..4383cb0 100644
--- a/handle.c
+++ b/handle.c
@@ -1228,17 +1228,17 @@ static int compar(const void *cmd, const void *_handler) {
 	return strcmp(cmd, handler->cmd);
 }
 
-void handle(struct Message msg) {
-	if (!msg.cmd) return;
-	if (msg.tags[TagPos]) {
-		self.pos = strtoull(msg.tags[TagPos], NULL, 10);
+void handle(struct Message *msg) {
+	if (!msg->cmd) return;
+	if (msg->tags[TagPos]) {
+		self.pos = strtoull(msg->tags[TagPos], NULL, 10);
 	}
 	const struct Handler *handler = bsearch(
-		msg.cmd, Handlers, ARRAY_LEN(Handlers), sizeof(*handler), compar
+		msg->cmd, Handlers, ARRAY_LEN(Handlers), sizeof(*handler), compar
 	);
 	if (handler) {
-		handler->fn(&msg);
-	} else if (strcmp(msg.cmd, "400") >= 0 && strcmp(msg.cmd, "599") <= 0) {
-		handleErrorGeneric(&msg);
+		handler->fn(msg);
+	} else if (strcmp(msg->cmd, "400") >= 0 && strcmp(msg->cmd, "599") <= 0) {
+		handleErrorGeneric(msg);
 	}
 }
f3a888b5a7046aafa87969a77d5a455750a81&follow=1'>Use $() in install.shJune McEnroe 2017-08-02Create Code Tarmak 3 layoutJune McEnroe 2017-07-31Add tupJune McEnroe 2017-07-31Use designated initializer for hnel tableJune McEnroe 2017-07-30Add juneJune McEnroe 2017-07-30Play nethack as ValkyrieJune McEnroe 2017-07-28Add toggle to hnelJune McEnroe 2017-07-28Install slJune McEnroe 2017-07-25Add up, supJune McEnroe 2017-07-24Autopickup ringsJune McEnroe 2017-07-24Name dogJune McEnroe 2017-07-23Add nethackrcJune McEnroe 2017-07-23Remove useless setuid in briJune McEnroe 2017-07-23Clean up hnel a tiny bitJune McEnroe 2017-07-21Set window size in hnelJune McEnroe 2017-07-21Add hnelJune McEnroe 2017-07-19chmod 600 in dtchJune McEnroe