| plan 9 kernel history: overview | file list | diff list |
1992/0627/port/devbit.c (diff list | history)
| 1992/0622/sys/src/9/port/devbit.c:352,358 – 1992/0627/sys/src/9/port/devbit.c:352,358 (short | long | prev | next) | ||
| 1990/0613 | uchar *p, *q; long miny, maxy, t, x, y; | |
| 1991/0706 | ulong l, nw, ws, rv, gv, bv; | |
| 1992/0605 |
| |
| 1992/0627 | int off, j; | |
| 1990/06231 | Fontchar *i; | |
| 1990/0902 | GBitmap *src; | |
| 1990/0327 | ||
| 1992/0622/sys/src/9/port/devbit.c:436,446 – 1992/0627/sys/src/9/port/devbit.c:436,446 | ||
| 1992/0622 | * 'I' 1 * ldepth 1 * rectangle 16 | |
| 1992/0627 | * clip rectangle 16 | |
| 1992/0622 | * font info 3*12 * fontchars 6*(defont->n+1) */ | |
| 1992/0627 | if(n < 34) | |
| 1992/0622 | error(Ebadblt); p[0] = 'I'; p[1] = gscreen.ldepth; | |
| 1992/0622/sys/src/9/port/devbit.c:448,463 – 1992/0627/sys/src/9/port/devbit.c:448,459 | ||
| 1992/0622 | PLONG(p+6, gscreen.r.min.y); PLONG(p+10, gscreen.r.max.x); PLONG(p+14, gscreen.r.max.y); | |
| 1992/0627 | PLONG(p+18, gscreen.clipr.min.x); PLONG(p+22, gscreen.clipr.min.y); PLONG(p+26, gscreen.clipr.max.x); PLONG(p+30, gscreen.clipr.max.y); if(n >= 34+3*12+6*(defont->n+1)){ p += 34; | |
| 1992/0622 | sprint((char*)p, "%11d %11d %11d ", defont->n, defont->height, defont->ascent); p += 3*12; | |
| 1992/0622/sys/src/9/port/devbit.c:468,476 – 1992/0627/sys/src/9/port/devbit.c:464,472 | ||
| 1992/0622 | p[4] = i->left; p[5] = i->width; } | |
| 1992/0627 | n = 34+3*12+6*(defont->n+1); | |
| 1992/0622 | }else | |
| 1992/0627 | n = 34; | |
| 1992/0622 | bit.init = 0; }else if(bit.lastid > 0){ /* | |
| 1992/0622/sys/src/9/port/devbit.c:782,794 – 1992/0627/sys/src/9/port/devbit.c:778,789 | ||
| 1992/0209 | break; | |
| 1990/0604 | case 'i': | |
| 1992/0605 |
| |
| 1990/0604 | /* * init * | |
| 1992/0605 |
| |
| 1992/0627 | * 'i' 1 | |
| 1990/0604 | */ | |
| 1992/0605 |
| |
| 1992/0627 | bit.init = 1; | |
| 1990/0604 | m -= 1; p += 1; | |
| 1990/0327 | break; | |
| 1992/0622/sys/src/9/port/devbit.c:905,916 – 1992/0627/sys/src/9/port/devbit.c:900,913 | ||
| 1992/0209 | * height 1 * ascent 1 * ldepth 2 | |
| 1992/0627 | * ncache 2 | |
| 1992/0209 | * next read returns allocated font id */ | |
| 1992/0627 | if(m < 7) | |
| 1992/0209 | error(Ebadblt); v = GSHORT(p+3); | |
| 1992/0627 | t = GSHORT(p+5); if(v<0 || t<0) | |
| 1992/0209 | error(Ebadblt); | |
| 1992/0621 | for(i=0; i<bit.nfont; i++) if(bit.font[i] == 0) | |
| 1992/0622/sys/src/9/port/devbit.c:922,927 – 1992/0627/sys/src/9/port/devbit.c:919,926 | ||
| 1992/0621 | bit.nfont += DMAP; | |
| 1992/0209 | fontfound: | |
| 1992/0621 | ff = smalloc(sizeof(GFont)); | |
| 1992/0627 | ff->ncache = t; ff->cache = smalloc(t*sizeof(GCacheinfo)); | |
| 1992/0621 | bit.font[i] = ff; ff = bit.font[i]; | |
| 1992/0209 | ff->height = p[1]; | |
| 1992/0622/sys/src/9/port/devbit.c:929,936 – 1992/0627/sys/src/9/port/devbit.c:928,935 | ||
| 1992/0209 | ff->ldepth = v; ff->width = 0; ff->b = 0; | |
| 1992/0627 | m -= 7; p += 7; | |
| 1992/0621 | bit.lastfid = i; | |
| 1992/0209 | break; | |
| 1992/0622/sys/src/9/port/devbit.c:1016,1068 – 1992/0627/sys/src/9/port/devbit.c:1015,1030 | ||
| 1990/0613 | m -= 11; | |
| 1990/06111 | break; | |
| 1990/0329 |
| |
| 1992/0627 | case 's': | |
| 1990/0329 | /* | |
| 1992/0604 |
| |
| 1990/0329 |
| |
| 1990/11211 |
| |
| 1990/0329 |
| |
| 1992/0621 |
| |
| 1990/11211 |
| |
| 1990/0504 |
| |
| 1991/0706 |
| |
| 1990/0504 |
| |
| 1991/0706 |
| |
| 1990/0329 |
| |
| 1992/0621 |
| |
| 1990/11211 |
| |
| 1991/0701 |
| |
| 1990/0329 |
| |
| 1991/0706 |
| |
| 1990/0329 |
| |
| 1992/0209 |
| |
| 1992/0627 | * 's' 1 | |
| 1992/0209 | * id 2 * pt 8 * font id 2 * code 2 * n 2 | |
| 1992/0627 | * cache indices 2*n (not null terminated) | |
| 1992/0209 | */ if(m < 17) error(Ebadblt); | |
| 1992/0622/sys/src/9/port/devbit.c:1095,1100 – 1992/0627/sys/src/9/port/devbit.c:1057,1099 | ||
| 1992/0209 | p += l; break; | |
| 1992/0627 | case 't': /* * texture * 't' 1 * dst id 2 * rect 16 * src id 2 * fcode 2 */ if(m < 23) error(Ebadblt); v = GSHORT(p+1); if(v<0 || v>=bit.nmap || (dst=bit.map[v])==0) error(Ebadbitmap); off = 0; fc = GSHORT(p+21) & 0xF; if(v == 0){ if(flipping) fc = flipD[fc]; off = 1; } rect.min.x = GLONG(p+3); rect.min.y = GLONG(p+7); rect.max.x = GLONG(p+11); rect.max.y = GLONG(p+15); v = GSHORT(p+19); if(v<0 || v>=bit.nmap || (src=bit.map[v])==0) error(Ebadbitmap); if(off && !isoff){ cursoroff(1); isoff = 1; } gtexture(dst, rect, src, fc); m -= 23; p += 23; break; | |
| 1992/0209 | case 'v': /* * clear font cache and bitmap | |
| 1992/0622/sys/src/9/port/devbit.c:1380,1385 – 1992/0627/sys/src/9/port/devbit.c:1379,1385 | ||
| 1992/0621 | { if(f->b) bitfree(f->b); | |
| 1992/0627 | free(f->cache); | |
| 1992/0621 | free(f); } | |