hlfw.ca

x9dev

Download patch

ref: 0b79285df1fb0edefd5585579c46d52715e33cfb
parent: 13cbf985bc6e76ebd525cadefb385b21b6674621
author: halfwit <michaelmisch1985@gmail.com>
date: Sat Oct 10 07:29:10 PDT 2020

Clean up code from c9 example for now

--- a/x9dev.c
+++ b/x9dev.c
@@ -25,6 +25,7 @@
 #include <dix-config.h>
 #endif
 
+#include <errno.h>
 #include "x9dev.h"
 
 extern x9devInfo x9di;
@@ -134,22 +135,11 @@
 	a = ctx->aux;
 	switch (r->type) {
 	case Rread:
-		if (chatoff >= skipuntil)
-			output(r->read.data, r->read.size);
-		chatoff += r->read.size;
-		/* fallthrough */
+		break;
 	case Ropen:
-		if ((a->flags & Joined) == 0 && printjoin) {
-			c9write(ctx, &tag, Chatfid, 0, buf, snprintf(buf, sizeof(buf), "JOIN %s to chat\n", nick));
-			a->flags |= Joined;
-		}
-		c9read(ctx, &tag, Chatfid, chatoff, chatoff < skipuntil ? skipuntil-chatoff : Msize);
 		break;
-
 	case Rerror:
-        /* Should return on this too */
 		break;
-
 	default:
 		break;
 	}