~kris/9p

9hist

a9d668a5569fcb108301160ad836d26bc1327898 — David du Colombier 32 years ago 1b3952e
Plan 9 from Bell Labs 1994-07-30
3 files changed, 14 insertions(+), 6 deletions(-)

M pc/kbd.c
M port/devmouse.c
M port/portfns.h
M pc/kbd.c => pc/kbd.c +2 -2
@@ 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;
}


M port/devmouse.c => port/devmouse.c +5 -2
@@ 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;

M port/portfns.h => port/portfns.h +7 -2
@@ 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);