From bb4c06b6ba69b769798f1e72307d54b6d2e8d7e8 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 14 Dec 2000 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2000-12-14 --- bitsy/devpenmouse.c | 11 ++++++++++- bitsy/screen.c | 1 - port/devcons.c | 1 - 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bitsy/devpenmouse.c b/bitsy/devpenmouse.c index 6bcfd33ffa61dec6f5e75221f28f5c9cf497630e..b145f8a47ee073fbc0337e58faa06e911bacdd33 100644 --- a/bitsy/devpenmouse.c +++ b/bitsy/devpenmouse.c @@ -78,7 +78,7 @@ enum{ static Dirtab mousedir[]={ "mouse", {Qmouse}, 0, 0666, "mousein", {Qmousein}, 0, 0220, - "mousectl", {Qmousectl}, 0, 0220, + "mousectl", {Qmousectl}, 0, 0660, }; static uchar buttonmap[8] = { @@ -238,6 +238,15 @@ penmouseread(Chan *c, void *va, long n, vlong) case CHDIR: return devdirread(c, va, n, mousedir, nelem(mousedir), devgen); + 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; + case Qmouse: while(penmousechanged(0) == 0) sleep(&mouse.r, penmousechanged, 0); diff --git a/bitsy/screen.c b/bitsy/screen.c index 7caf75e8626f85b7cf0a1c24d6893586a2b6d29d..9ef4d47c1603461cca5f6a9ea3b31d834342b4b9 100644 --- a/bitsy/screen.c +++ b/bitsy/screen.c @@ -366,7 +366,6 @@ screenwin(void) h = memdefont->height; r = insetrect(gscreen->r, 4); - r.max.y -= 56; memimagedraw(gscreen, r, memblack, ZP, memopaque, ZP); window = insetrect(r, 4); diff --git a/port/devcons.c b/port/devcons.c index 3db039269a55b13d55402c865fddddd34e5d701c..3c617d26d30c8f792bc173fc505a517eb8f3c563 100644 --- a/port/devcons.c +++ b/port/devcons.c @@ -1097,7 +1097,6 @@ readtime(ulong off, char *buf, int n) vlong nsec, ticks; long sec; char str[7*NUMSIZE]; - // char nsec = todget(&ticks); if(fasthz == 0LL)