shithub: libacme

Download patch

ref: b517e0beea8b1adc16160d99f4b5e5e9a4a5d3d6
parent: 34b70a9de77eb764e83ba184ce59071d53c333d5
author: james palmer <foura@biobuf.link>
date: Sun Jun 6 18:47:36 EDT 2021

git is harder. missed event.c

--- a/event.c
+++ b/event.c
@@ -5,7 +5,7 @@
 #include "acme.h"
 
 static int
-eventgetnum(Biobuf *bio)
+aeventgetnum(Biobuf *bio)
 {
 	int c, n;
 	
@@ -21,13 +21,13 @@
 }
 
 static int
-eventgetdata(Biobuf *bio, Event *ev)
+aeventgetdata(Biobuf *bio, AEvent *ev)
 {
 	int i, runes, len;
 	Rune r;
 	
 	len = 0;
-	runes = eventgetnum(bio);
+	runes = aeventgetnum(bio);
 	for(i = 0; i < runes; i++) {
 		if((r = Bgetrune(bio)) == -1)
 			break;
@@ -39,7 +39,7 @@
 }
 
 int
-eventnext(Win *w, Event *ev)
+aeventnext(AWin *w, AEvent *ev)
 {
 	int flags;
 	Biobuf bio;
@@ -50,10 +50,10 @@
 Again:
 	ev->origin = Bgetc(&bio);
 	ev->type = Bgetc(&bio);
-	ev->q0 = eventgetnum(&bio);
-	ev->q1 = eventgetnum(&bio);
-	ev->flags = eventgetnum(&bio);
-	ev->ntext = eventgetdata(&bio, ev);
+	ev->q0 = aeventgetnum(&bio);
+	ev->q1 = aeventgetnum(&bio);
+	ev->flags = aeventgetnum(&bio);
+	ev->ntext = aeventgetdata(&bio, ev);
 	if(Bgetc(&bio) != '\n') {
 		werrstr("unterminated mesage");
 		return -1;
@@ -70,7 +70,7 @@
 }
 
 void
-eventsend(Win *w, Event *ev)
+aeventsend(AWin *w, AEvent *ev)
 {
 	if(ev->flags & 0x2)
 		fprint(w->event, "%c%c%d %d\n", ev->origin, ev->type, ev->p, ev->p);