From e0a7598d1362df2a1ccef46f8b448e91ad3e3e4c Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sun, 16 Aug 1992 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1992-08-16 --- port/devbit.c | 49 +++++++++++++++++++++++++++---------------------- power/clock.c | 2 +- ss/screen.c | 2 +- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/port/devbit.c b/port/devbit.c index 29c49ac9a983f453d53fd2d39f10ea1aaa3f5410..3a4df96c8527d82060c43fbcdb71be77405ad853 100644 --- a/port/devbit.c +++ b/port/devbit.c @@ -463,7 +463,7 @@ bitread(Chan *c, void *va, long n, ulong offset) { uchar *p, *q; long miny, maxy, t, x, y; - ulong l, v, nw, ws, rv, gv, bv; + ulong l, nw, ws, rv, gv, bv; int off, j; Fontchar *i; GBitmap *src; @@ -525,12 +525,13 @@ bitread(Chan *c, void *va, long n, ulong offset) p = va; for(y=miny; yr.min.x, y)); q += (src->r.min.x&((sizeof(ulong))*ws-1))/ws; - if(bit.rid == 0) - for(x=0; xr.min.x, y)); - q += (dst->r.min.x&((sizeof(ulong))*ws-1))/ws; - if(v == 0 && flipping) /* flip bits */ - for(x=0; xr.min.x, y)); + q = oq + (dst->r.min.x&((sizeof(ulong))*ws-1))/ws; + memmove(q, p, l); + if(v==0 && flipping){ /* flip bits */ + /* we know it's all word aligned */ + lp = (ulong*)oq; + for(x=0; xpc); - if(u && (ur->status&IEP) && u->p && u->p->state==Running){ + if(u && (ur->status&IEP) && u->p->state==Running){ if(anyready()){ if(u->p->hasspin) u->p->hasspin = 0; /* just in case */ diff --git a/ss/screen.c b/ss/screen.c index ba626fcaa73ffb984b847d0d10cc9f9631388c09..8171ad867d6f3fd33a93af5a1ba2613f5c30bf23 100644 --- a/ss/screen.c +++ b/ss/screen.c @@ -49,7 +49,7 @@ struct screens }screens[] = { { "bwtwo", 1152, 900, 0, 0x400000 }, { "cgsix", 1152, 900, 3, 0x200000 }, - { "cgthree", 1152, 900, 3, 0x200000 }, + { "cgthree", 1152, 900, 3, 0x200000 }, /* PURE GUESS! */ 0 };