plan 9 kernel history: overview | file list | diff list

2000/1120/bitsy/devpenmouse.c (diff list | history)

2000/1021/sys/src/9/bitsy/devpenmouse.c:90,1002000/1024/sys/src/9/bitsy/devpenmouse.c:90,101 (short | long)
2000/1021    
pentrackxy(int x, int y) { 
	if (x == -1) { 
		/* pen up. associate with button 1, 2, 3 up */ 
		if (mouse.buttons & 0x7) 
			mouse.buttons &= ~0x7; 
2000/1024    
		mouse.buttons &= ~0x7; 
2000/1021    
	} else { 
		x = (x<<16)/calibration.scalex + calibration.transx; 
		y = (y<<16)/calibration.scaley + calibration.transy; 
2000/1024    
		if ((mouse.buttons & 0x7) == 0) 
			mouse.buttons |= 0x1; 
2000/1021    
	} 
	penmousetrack(mouse.buttons, x, y); 
} 
2000/1021/sys/src/9/bitsy/devpenmouse.c:204,2102000/1024/sys/src/9/bitsy/devpenmouse.c:205,210
2000/1021    
	} 
} 
 
                 
static long 
penmouseread(Chan *c, void *va, long n, vlong) 
{ 
2000/1021/sys/src/9/bitsy/devpenmouse.c:211,2172000/1024/sys/src/9/bitsy/devpenmouse.c:211,216
2000/1021    
	char buf[4*12+1]; 
	static int map[8] = {0, 4, 2, 6, 1, 5, 3, 7 }; 
	Mousestate m; 
	int b; 
 
	switch(c->qid.path){ 
	case CHDIR: 
2000/1021/sys/src/9/bitsy/devpenmouse.c:239,2502000/1024/sys/src/9/bitsy/devpenmouse.c:238,246
2000/1021    
			m = mouse.Mousestate; 
		} 
 
		b = buttonmap[m.buttons&7]; 
		/* put buttons 4 and 5 back in */ 
		b |= m.buttons & (3<<3); 
		sprint(buf, "m%11d %11d %11d %11lud", 
			m.xy.x, m.xy.y, 
			b, 
2000/1024    
			m.buttons, 
2000/1021    
			m.msec); 
		mouse.lastcounter = m.counter; 
		if(n > 1+4*12) 
2000/1021/sys/src/9/bitsy/devpenmouse.c:303,3092000/1024/sys/src/9/bitsy/devpenmouse.c:299,305
2000/1021    
{ 
	char *p; 
	Point pt; 
	char buf[64], *field[3]; 
2000/1024    
	char buf[64], *field[5]; 
2000/1021    
	int nf, b; 
 
	p = va; 
2000/1021/sys/src/9/bitsy/devpenmouse.c:319,3252000/1024/sys/src/9/bitsy/devpenmouse.c:315,321
2000/1021    
			buf[n-1] = 0; 
		else 
			buf[n] = 0; 
		nf = getfields(buf, field, 3, 1, " "); 
2000/1024    
		nf = getfields(buf, field, 5, 1, " "); 
2000/1021    
		if(strcmp(field[0], "swap") == 0){ 
			if(mouseswap) 
				setbuttonmap("123"); 
2000/1021/sys/src/9/bitsy/devpenmouse.c:338,3442000/1024/sys/src/9/bitsy/devpenmouse.c:334,341
2000/1021    
				calibration.scaley = strtol(field[2], nil, 0); 
				calibration.transx = strtol(field[3], nil, 0); 
				calibration.transy = strtol(field[4], nil, 0); 
			} 
2000/1024    
			} else 
				print("calibrate %d fields\n", nf); 
2000/1021    
		} 
		return n; 
 
2000/1024/sys/src/9/bitsy/devpenmouse.c:80,882000/1025/sys/src/9/bitsy/devpenmouse.c:80,88 (short | long)
2000/1021    
void 
penbutton(int up, int b) { 
	if (up) 
		mouse.buttons &= ~ (1 << b); 
2000/1025    
		mouse.buttons &= ~b; 
2000/1021    
	else 
		mouse.buttons |= 1 << b; 
2000/1025    
		mouse.buttons |= b; 
2000/1021    
	penmousetrack(mouse.buttons, -1, -1); 
} 
 
2000/1024/sys/src/9/bitsy/devpenmouse.c:406,4172000/1025/sys/src/9/bitsy/devpenmouse.c:406,413
2000/1021    
{ 
	int lastb; 
 
	if(gscreen==nil) 
		return; 
                 
	if (x >= 0) { 
2000/1025    
	if (x >= 0) 
2000/1021    
		mouse.xy = Pt(x, y); 
	} 
	lastb = mouse.buttons; 
	mouse.buttons = b; 
	mouse.counter++; 
2000/1025/sys/src/9/bitsy/devpenmouse.c:92,992000/1101/sys/src/9/bitsy/devpenmouse.c:92,99 (short | long)
2000/1021    
		/* pen up. associate with button 1, 2, 3 up */ 
2000/1024    
		mouse.buttons &= ~0x7; 
2000/1021    
	} else { 
		x = (x<<16)/calibration.scalex + calibration.transx; 
		y = (y<<16)/calibration.scaley + calibration.transy; 
2000/1101    
		x = ((x*calibration.scalex)>>16) + calibration.transx; 
		y = ((y*calibration.scaley)>>16) + calibration.transy; 
2000/1024    
		if ((mouse.buttons & 0x7) == 0) 
			mouse.buttons |= 0x1; 
2000/1021    
	} 
2000/1025/sys/src/9/bitsy/devpenmouse.c:325,3322000/1101/sys/src/9/bitsy/devpenmouse.c:325,332
2000/1021    
		} 
		else if(strcmp(field[0], "calibrate") == 0){ 
			if (nf == 1) { 
				calibration.scalex = 1; 
				calibration.scaley = 1; 
2000/1101    
				calibration.scalex = 1<<16; 
				calibration.scaley = 1<<16; 
2000/1021    
				calibration.transx = 0; 
				calibration.transy = 0; 
			} else if (nf == 5) { 
2000/1101/sys/src/9/bitsy/devpenmouse.c:22,312000/1102/sys/src/9/bitsy/devpenmouse.c:22,31 (short | long)
2000/1021    
	long	transx; 
	long	transy; 
} calibration = { 
	-0x10000*0x400/320, 
	-0x10000*0x400/240, 
	320, 
	240 
2000/1102    
	-23540, 
	-16858, 
	342, 
	252 
2000/1021    
}; 
 
struct Mousestate 
2000/1102/sys/src/9/bitsy/devpenmouse.c:22,312000/1104/sys/src/9/bitsy/devpenmouse.c:22,31 (short | long)
2000/1021    
	long	transx; 
	long	transy; 
} calibration = { 
2000/1102    
	-23540, 
	-16858, 
	342, 
	252 
2000/1104    
	23540, 
	252, 
	342 
2000/1021    
}; 
 
struct Mousestate 
2000/1104/sys/src/9/bitsy/devpenmouse.c:22,312000/1120/sys/src/9/bitsy/devpenmouse.c:22,31 (short | long)
2000/1021    
	long	transx; 
	long	transy; 
} calibration = { 
2000/1102    
	-16858, 
2000/1104    
	23540, 
	252, 
	342 
2000/1120    
	-16435, 
	23275, 
	253, 
	-23 
2000/1021    
}; 
 
struct Mousestate 
2000/1120/sys/src/9/bitsy/devpenmouse.c:425,4302000/1130/sys/src/9/bitsy/devpenmouse.c:425,431 (short | long)
2000/1021    
			mouse.qfull = 1; 
	} 
	wakeup(&mouse.r); 
2000/1130    
	drawactive(1); 
2000/1021    
} 
 
int 
2000/1130/sys/src/9/bitsy/devpenmouse.c:223,2292000/1206/sys/src/9/bitsy/devpenmouse.c:223,229 (short | long)
2000/1021    
		mouse.qfull = 0; 
 
		/* 
		 * No lock of the indicies is necessary here, because ri is only 
2000/1206    
		 * No lock of the indices is necessary here, because ri is only 
2000/1021    
		 * updated by us, and there is only one mouse reader 
		 * at a time.  I suppose that more than one process 
		 * could try to read the fd at one time, but such behavior 
2000/1206/sys/src/9/bitsy/devpenmouse.c:28,372000/1207/sys/src/9/bitsy/devpenmouse.c:28,48 (short | long)
2000/1120    
	-23 
2000/1021    
}; 
 
2000/1207    
/* The pen goes down, tracks some and goes up again.  The pen alone can 
 * only simulate a one-button mouse. 
 * To simulate a more-button (five, in this case) mouse, we use the four 
 * keys along the the bottom of the iPaq as modifiers. 
 * When one (or more) of the modifier keys is (are) down, a pen-down event 
 * causes the corresponding bottons to go down.  If no modifier key is 
 * depressed, a pen-down event is translated into a button-one down event. 
 * Releasing the modifier keys has no direct effect.  The pen-up event is 
 * the one that triggers mouse-up events. 
 */ 
2000/1021    
struct Mousestate 
{ 
	Point	xy;			/* mouse.xy */ 
	int		buttons;	/* mouse.buttons */ 
2000/1207    
	int		modifiers;	/* state of physical buttons 2, 3, 4, 5 */ 
2000/1021    
	ulong	counter;	/* increments every update */ 
	ulong	msec;		/* time of last event */ 
}; 
2000/1206/sys/src/9/bitsy/devpenmouse.c:79,1012000/1207/sys/src/9/bitsy/devpenmouse.c:90,123
2000/1021    
 
void 
penbutton(int up, int b) { 
	if (up) 
2000/1025    
		mouse.buttons &= ~b; 
2000/1021    
	else 
2000/1025    
		mouse.buttons |= b; 
2000/1021    
	penmousetrack(mouse.buttons, -1, -1); 
2000/1207    
	if (b & 0x20) { 
		if (up) 
			mouse.buttons &= ~b; 
		else 
			mouse.buttons |= b; 
		penmousetrack(mouse.buttons, -1, -1); 
	} else { 
		if (up) 
			mouse.modifiers &= ~b; 
		else 
			mouse.modifiers |= b; 
	} 
2000/1021    
} 
 
void 
pentrackxy(int x, int y) { 
	if (x == -1) { 
		/* pen up. associate with button 1, 2, 3 up */ 
2000/1024    
		mouse.buttons &= ~0x7; 
2000/1207    
		/* pen up. associate with button 1 through 5 up */ 
		mouse.buttons &= ~0x1f; 
2000/1021    
	} else { 
2000/1101    
		x = ((x*calibration.scalex)>>16) + calibration.transx; 
		y = ((y*calibration.scaley)>>16) + calibration.transy; 
2000/1024    
		if ((mouse.buttons & 0x7) == 0) 
			mouse.buttons |= 0x1; 
2000/1207    
		if ((mouse.buttons & 0x1f) == 0) { 
			if (mouse.modifiers) 
				mouse.buttons |= mouse.modifiers; 
			else 
				mouse.buttons |= 0x1; 
		} 
2000/1021    
	} 
	penmousetrack(mouse.buttons, x, y); 
} 
2000/1207/sys/src/9/bitsy/devpenmouse.c:78,842000/1214/sys/src/9/bitsy/devpenmouse.c:78,84 (short | long)
2000/1021    
static Dirtab mousedir[]={ 
	"mouse",	{Qmouse},		0,			0666, 
	"mousein",	{Qmousein},		0,			0220, 
	"mousectl",	{Qmousectl},	0,			0220, 
2000/1214    
	"mousectl",	{Qmousectl},	0,			0660, 
2000/1021    
}; 
 
static uchar buttonmap[8] = { 
2000/1207/sys/src/9/bitsy/devpenmouse.c:237,2422000/1214/sys/src/9/bitsy/devpenmouse.c:237,251
2000/1021    
	switch(c->qid.path){ 
	case CHDIR: 
		return devdirread(c, va, n, mousedir, nelem(mousedir), devgen); 
2000/1214    
 
	case Qmousectl: 
		sprint(buf, "c%11ld %11ld %11ld %11ld", 
				calibration.scalex, calibration.scaley, 
				calibration.transx, calibration.transy); 
		if(n > 1+4*12) 
			n = 1+4*12; 
		memmove(va, buf, n); 
		return n; 
2000/1021    
 
	case Qmouse: 
		while(penmousechanged(0) == 0) 
2000/1214/sys/src/9/bitsy/devpenmouse.c:10,152000/1215/sys/src/9/bitsy/devpenmouse.c:10,16 (short | long)
2000/1021    
#include	<memdraw.h> 
#include	<cursor.h> 
#include	"screen.h" 
2000/1215    
#include	<ctype.h> 
2000/1021    
 
typedef struct Mouseinfo	Mouseinfo; 
typedef struct Mousestate	Mousestate; 
2000/1214/sys/src/9/bitsy/devpenmouse.c:361,3662000/1215/sys/src/9/bitsy/devpenmouse.c:362,372
2000/1021    
				calibration.transx = 0; 
				calibration.transy = 0; 
			} else if (nf == 5) { 
2000/1215    
				if ((!isdigit(*field[1]) && *field[1] != '-') 
				 || (!isdigit(*field[2]) && *field[2] != '-') 
				 || (!isdigit(*field[3]) && *field[3] != '-') 
				 || (!isdigit(*field[4]) && *field[4] != '-')) 
					error(Ectlsyntax); 
2000/1021    
				calibration.scalex = strtol(field[1], nil, 0); 
				calibration.scaley = strtol(field[2], nil, 0); 
				calibration.transx = strtol(field[3], nil, 0); 
2000/1215/sys/src/9/bitsy/devpenmouse.c:269,2752000/1216/sys/src/9/bitsy/devpenmouse.c:269,274 (short | long)
2000/1021    
		} else { 
			m = mouse.Mousestate; 
		} 
                 
		sprint(buf, "m%11d %11d %11d %11lud", 
			m.xy.x, m.xy.y, 
2000/1024    
			m.buttons, 
2000/1216/sys/src/9/bitsy/devpenmouse.c:365,3712001/0115/sys/src/9/bitsy/devpenmouse.c:365,371 (short | long)
2000/1215    
				 || (!isdigit(*field[2]) && *field[2] != '-') 
				 || (!isdigit(*field[3]) && *field[3] != '-') 
				 || (!isdigit(*field[4]) && *field[4] != '-')) 
					error(Ectlsyntax); 
2001/0115    
					error("bad syntax in control file message"); 
2000/1021    
				calibration.scalex = strtol(field[1], nil, 0); 
				calibration.scaley = strtol(field[2], nil, 0); 
				calibration.transx = strtol(field[3], nil, 0); 
2001/0115/sys/src/9/bitsy/devpenmouse.c:77,852001/0529/sys/src/9/bitsy/devpenmouse.c:77,86 (short | long)
2000/1021    
}; 
 
static Dirtab mousedir[]={ 
	"mouse",	{Qmouse},		0,			0666, 
	"mousein",	{Qmousein},		0,			0220, 
2000/1214    
	"mousectl",	{Qmousectl},	0,			0660, 
2001/0529    
	".",			{Qdir, 0, QTDIR},	0,	DMDIR|0555, 
	"mouse",		{Qmouse},		0,	0666, 
	"mousein",	{Qmousein},		0,	0220, 
	"mousectl",	{Qmousectl},		0,	0660, 
2000/1021    
}; 
 
static uchar buttonmap[8] = { 
2001/0115/sys/src/9/bitsy/devpenmouse.c:145,1762001/0529/sys/src/9/bitsy/devpenmouse.c:146,168
2000/1021    
	return devattach('m', spec); 
} 
 
static Chan* 
penmouseclone(Chan *c, Chan *nc) 
2001/0529    
static Walkqid* 
penmousewalk(Chan *c, Chan *nc, char **name, int nname) 
2000/1021    
{ 
	nc = devclone(c, nc); 
	if(c->qid.path != CHDIR) 
		incref(&mouse); 
	return nc; 
2001/0529    
	return devwalk(c, nc, name, nname, mousedir, nelem(mousedir), devgen); 
2000/1021    
} 
 
static int 
penmousewalk(Chan *c, char *name) 
2001/0529    
penmousestat(Chan *c, uchar *db, int n) 
2000/1021    
{ 
	return devwalk(c, name, mousedir, nelem(mousedir), devgen); 
2001/0529    
	return devstat(c, db, n, mousedir, nelem(mousedir), devgen); 
2000/1021    
} 
 
static void 
penmousestat(Chan *c, char *db) 
{ 
	devstat(c, db, mousedir, nelem(mousedir), devgen); 
} 
                 
static Chan* 
penmouseopen(Chan *c, int omode) 
{ 
	switch(c->qid.path){ 
	case CHDIR: 
2001/0529    
	switch((ulong)c->qid.path){ 
	case Qdir: 
2000/1021    
		if(omode != OREAD) 
			error(Eperm); 
		break; 
2001/0115/sys/src/9/bitsy/devpenmouse.c:214,2202001/0529/sys/src/9/bitsy/devpenmouse.c:206,212
2000/1021    
static void 
penmouseclose(Chan *c) 
{ 
	if(c->qid.path!=CHDIR && (c->flag&COPEN)){ 
2001/0529    
	if(c->qid.path != Qdir && (c->flag&COPEN)){ 
2000/1021    
		lock(&mouse); 
		if(c->qid.path == Qmouse) 
			mouse.open = 0; 
2001/0115/sys/src/9/bitsy/devpenmouse.c:235,2422001/0529/sys/src/9/bitsy/devpenmouse.c:227,234
2000/1021    
	static int map[8] = {0, 4, 2, 6, 1, 5, 3, 7 }; 
	Mousestate m; 
 
	switch(c->qid.path){ 
	case CHDIR: 
2001/0529    
	switch((ulong)c->qid.path){ 
	case Qdir: 
2000/1021    
		return devdirread(c, va, n, mousedir, nelem(mousedir), devgen); 
2000/1214    
 
	case Qmousectl: 
2001/0115/sys/src/9/bitsy/devpenmouse.c:334,3412001/0529/sys/src/9/bitsy/devpenmouse.c:326,333
2000/1021    
	int nf, b; 
 
	p = va; 
	switch(c->qid.path){ 
	case CHDIR: 
2001/0529    
	switch((ulong)c->qid.path){ 
	case Qdir: 
2000/1021    
		error(Eisdir); 
 
	case Qmousectl: 
2001/0115/sys/src/9/bitsy/devpenmouse.c:419,4252001/0529/sys/src/9/bitsy/devpenmouse.c:411,416
2000/1021    
	penmousereset, 
	penmouseinit, 
	penmouseattach, 
	penmouseclone, 
	penmousewalk, 
	penmousestat, 
	penmouseopen, 
2001/0529/sys/src/9/bitsy/devpenmouse.c:92,982001/0822/sys/src/9/bitsy/devpenmouse.c:92,101 (short | long)
2000/1021    
 
void 
penbutton(int up, int b) { 
2000/1207    
	if (b & 0x20) { 
2001/0822    
	// button 5 (side button) immediately causes an event 
	// when the pen is down (button 1), other buttons also 
	// cause events, allowing chording with button 1 
	if ((b & 0x20) || (mouse.buttons & 0x1)) { 
2000/1207    
		if (up) 
			mouse.buttons &= ~b; 
		else 
2001/0822/sys/src/9/bitsy/devpenmouse.c:341,3472001/1117/sys/src/9/bitsy/devpenmouse.c:341,347 (short | long)
2000/1021    
			buf[n-1] = 0; 
		else 
			buf[n] = 0; 
2000/1024    
		nf = getfields(buf, field, 5, 1, " "); 
2001/1117    
		nf = tokenize(buf, field, 5); 
2000/1021    
		if(strcmp(field[0], "swap") == 0){ 
			if(mouseswap) 
				setbuttonmap("123"); 
2001/1117/sys/src/9/bitsy/devpenmouse.c:83,882001/1121/sys/src/9/bitsy/devpenmouse.c:83,100 (short | long)
2001/0529    
	"mousectl",	{Qmousectl},		0,	0660, 
2000/1021    
}; 
 
2001/1121    
enum 
{ 
	CMcalibrate, 
	CMswap, 
}; 
 
static Cmdtab penmousecmd[] = 
{ 
	CMcalibrate,	"calibrate",	0, 
	CMswap,		"swap",		1, 
}; 
 
2000/1021    
static uchar buttonmap[8] = { 
	0, 1, 2, 3, 4, 5, 6, 7, 
}; 
2001/1117/sys/src/9/bitsy/devpenmouse.c:325,3302001/1121/sys/src/9/bitsy/devpenmouse.c:337,344
2000/1021    
{ 
	char *p; 
	Point pt; 
2001/1121    
	Cmdbuf *cb; 
	Cmdtab *ct; 
2000/1024    
	char buf[64], *field[5]; 
2000/1021    
	int nf, b; 
 
2001/1117/sys/src/9/bitsy/devpenmouse.c:334,3612001/1121/sys/src/9/bitsy/devpenmouse.c:348,374
2000/1021    
		error(Eisdir); 
 
	case Qmousectl: 
		if(n >= sizeof(buf)) 
			n = sizeof(buf)-1; 
		strncpy(buf, va, n); 
		if(buf[n - 1] == '\n') 
			buf[n-1] = 0; 
		else 
			buf[n] = 0; 
2001/1117    
		nf = tokenize(buf, field, 5); 
2000/1021    
		if(strcmp(field[0], "swap") == 0){ 
2001/1121    
		cb = parsecmd(va, n); 
		if(waserror()){ 
			free(cb); 
			nexterror(); 
		} 
		ct = lookupcmd(cb, penmousecmd, nelem(penmousecmd)); 
		switch(ct->index){ 
		case CMswap: 
2000/1021    
			if(mouseswap) 
				setbuttonmap("123"); 
			else 
				setbuttonmap("321"); 
			mouseswap ^= 1; 
		} 
		else if(strcmp(field[0], "calibrate") == 0){ 
			if (nf == 1) { 
2001/1121    
			break; 
		case CMcalibrate: 
			if (cb->nf == 1) { 
2000/1101    
				calibration.scalex = 1<<16; 
				calibration.scaley = 1<<16; 
2000/1021    
				calibration.transx = 0; 
				calibration.transy = 0; 
			} else if (nf == 5) { 
2001/1121    
			} else if (cb->nf == 5) { 
2000/1215    
				if ((!isdigit(*field[1]) && *field[1] != '-') 
				 || (!isdigit(*field[2]) && *field[2] != '-') 
				 || (!isdigit(*field[3]) && *field[3] != '-') 
2001/1117/sys/src/9/bitsy/devpenmouse.c:366,3732001/1121/sys/src/9/bitsy/devpenmouse.c:379,389
2000/1021    
				calibration.transx = strtol(field[3], nil, 0); 
				calibration.transy = strtol(field[4], nil, 0); 
2000/1024    
			} else 
				print("calibrate %d fields\n", nf); 
2001/1121    
				cmderror(cb, Ecmdargs); 
			break; 
2000/1021    
		} 
2001/1121    
		free(cb); 
		poperror(); 
2000/1021    
		return n; 
 
	case Qmousein: 
2001/1121/sys/src/9/bitsy/devpenmouse.c:123,1282001/1130/sys/src/9/bitsy/devpenmouse.c:123,129 (short | long)
2000/1021    
 
void 
pentrackxy(int x, int y) { 
2001/1130    
 
2000/1021    
	if (x == -1) { 
2000/1207    
		/* pen up. associate with button 1 through 5 up */ 
		mouse.buttons &= ~0x1f; 
2001/1121/sys/src/9/bitsy/devpenmouse.c:339,3462001/1130/sys/src/9/bitsy/devpenmouse.c:340,347
2000/1021    
	Point pt; 
2001/1121    
	Cmdbuf *cb; 
	Cmdtab *ct; 
2000/1024    
	char buf[64], *field[5]; 
2000/1021    
	int nf, b; 
2001/1130    
	char buf[64]; 
	int b; 
2000/1021    
 
	p = va; 
2001/0529    
	switch((ulong)c->qid.path){ 
2001/1121/sys/src/9/bitsy/devpenmouse.c:369,3832001/1130/sys/src/9/bitsy/devpenmouse.c:370,384
2000/1021    
				calibration.transx = 0; 
				calibration.transy = 0; 
2001/1121    
			} else if (cb->nf == 5) { 
2000/1215    
				if ((!isdigit(*field[1]) && *field[1] != '-') 
				 || (!isdigit(*field[2]) && *field[2] != '-') 
				 || (!isdigit(*field[3]) && *field[3] != '-') 
				 || (!isdigit(*field[4]) && *field[4] != '-')) 
2001/1130    
				if ((!isdigit(*cb->f[1]) && *cb->f[1] != '-') 
				 || (!isdigit(*cb->f[2]) && *cb->f[2] != '-') 
				 || (!isdigit(*cb->f[3]) && *cb->f[3] != '-') 
				 || (!isdigit(*cb->f[4]) && *cb->f[4] != '-')) 
2001/0115    
					error("bad syntax in control file message"); 
2000/1021    
				calibration.scalex = strtol(field[1], nil, 0); 
				calibration.scaley = strtol(field[2], nil, 0); 
				calibration.transx = strtol(field[3], nil, 0); 
				calibration.transy = strtol(field[4], nil, 0); 
2001/1130    
				calibration.scalex = strtol(cb->f[1], nil, 0); 
				calibration.scaley = strtol(cb->f[2], nil, 0); 
				calibration.transx = strtol(cb->f[3], nil, 0); 
				calibration.transy = strtol(cb->f[4], nil, 0); 
2000/1024    
			} else 
2001/1121    
				cmderror(cb, Ecmdargs); 
			break; 
2001/1130/sys/src/9/bitsy/devpenmouse.c:430,4352002/0109/sys/src/9/bitsy/devpenmouse.c:430,436 (short | long)
2000/1021    
 
	penmousereset, 
	penmouseinit, 
2002/0109    
	devshutdown, 
2000/1021    
	penmouseattach, 
	penmousewalk, 
	penmousestat, 
2002/0109/sys/src/9/bitsy/devpenmouse.c:474,4792002/1112/sys/src/9/bitsy/devpenmouse.c:474,480 (short | long)
2000/1021    
	} 
	wakeup(&mouse.r); 
2000/1130    
	drawactive(1); 
2002/1112    
	resetsuspendtimer(); 
2000/1021    
} 
 
int 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)