From a9d668a5569fcb108301160ad836d26bc1327898 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sat, 30 Jul 1994 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1994-07-30 --- pc/kbd.c | 4 ++-- port/devmouse.c | 7 +++++-- port/portfns.h | 9 +++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pc/kbd.c b/pc/kbd.c index 8f3e1820207fe009cace0b841f140c531359a528..53266ce6c55f8927ad6ebd71752a4f64de74d3ae 100644 --- a/pc/kbd.c +++ b/pc/kbd.c @@ -250,9 +250,9 @@ serialmouse(int port, char *type, int setspeed) if(setspeed) setspeed = 1200; if(type && *type == 'M') - NS16552special(port, setspeed, &mouseq, 0, NS16552m3mouse); + NS16552special(port, setspeed, &mouseq, 0, m3mouseputc); else - NS16552special(port, setspeed, &mouseq, 0, NS16552mouse); + NS16552special(port, setspeed, &mouseq, 0, mouseputc); mousetype = Mouseserial; } diff --git a/port/devmouse.c b/port/devmouse.c index 300601a96f613e82a725c929d963c16cc7391160..65341528ab21ffcd6a815552b9ede875feafe9a4 100644 --- a/port/devmouse.c +++ b/port/devmouse.c @@ -363,7 +363,7 @@ mousetrack(int b, int dx, int dy) * shift & right button is the same as middle button (for 2 button mice) */ int -m3mouseputc(int c) +m3mouseputc(void *q, int c) { static uchar msg[3]; static int nb; @@ -372,6 +372,8 @@ m3mouseputc(int c) short x; int dx, dy, newbuttons; + USED(q); + /* * check bit 6 for consistency */ @@ -403,13 +405,14 @@ m3mouseputc(int c) * shift & right button is the same as middle button (for 2 button mice) */ int -mouseputc(int c) +mouseputc(void *q, int c) { static short msg[5]; static int nb; static uchar b[] = {0, 4, 2, 6, 1, 5, 3, 7, 0, 2, 2, 6, 1, 5, 3, 7}; int dx, dy, newbuttons; + USED(q); if((c&0xF0) == 0x80) nb=0; msg[nb] = c; diff --git a/port/portfns.h b/port/portfns.h index 770e595dd1dbd242f5e7361c20ac0644399f65d0..7560a5bf9e3a68dd3773641285db9e3aa8cd7c00 100644 --- a/port/portfns.h +++ b/port/portfns.h @@ -119,7 +119,7 @@ void links(void); void lock(Lock*); void lockinit(void); Page* lookpage(Image*, ulong); -int m3mouseputc(int); +int m3mouseputc(void*, int); void machinit(void); #define malloc(s) mallocz(s, 1) void* mallocz(ulong, int); @@ -135,7 +135,7 @@ void mountfree(Mount*); void mousebuttons(int); void mouseclock(void); void mousectl(char*); -int mouseputc(int); +int mouseputc(void*, int); void mousetrack(int, int, int); int msize(void*); Chan* namec(char*, int, int, ulong); @@ -262,6 +262,11 @@ void xhole(ulong, ulong); void xinit(void); void* xspanalloc(ulong, int, ulong); void xsummary(void); +int z8530m3mouse(Queue*, int); +int z8530mouse(Queue*, int); +void z8530setup(uchar*, uchar*, uchar*, uchar*, ulong, int, int); +void z8530special(int, int, Queue**, Queue**, int (*)(Queue*, int)); +void z8530intr(int); Segment* data2txt(Segment*); Segment* dupseg(Segment**, int, int); Segment* newseg(int, ulong, ulong);