| plan 9 kernel history: overview | file list | diff list |
1991/1228/ss/screen.c (diff list | history)
| 1991/1225/sys/src/9/ss/screen.c:33,38 – 1991/1228/sys/src/9/ss/screen.c:33,40 (short | long | prev | next) | ||
| 1990/1223 | 0 }; | |
| 1991/1228 | Lock screenlock; | |
| 1990/1223 | void screeninit(void) { | |
| 1991/1225/sys/src/9/ss/screen.c:44,49 – 1991/1228/sys/src/9/ss/screen.c:46,62 | ||
| 1990/1223 | } void | |
| 1991/1228 | screenputnl(void) { out.pos.x = MINX; out.pos.y += defont0.height; if(out.pos.y > gscreen.r.max.y-defont0.height) out.pos.y = gscreen.r.min.y; gbitblt(&gscreen, Pt(0, out.pos.y), &gscreen, Rect(0, out.pos.y, gscreen.r.max.x, out.pos.y+2*defont0.height), 0); } void | |
| 1991/0604 | screenputs(char *s, int n) | |
| 1990/1223 | { | |
| 1991/1223 | Rune r; | |
| 1991/1225/sys/src/9/ss/screen.c:50,55 – 1991/1228/sys/src/9/ss/screen.c:63,69 | ||
| 1991/1223 | int i; char buf[4]; | |
| 1991/1228 | lock(&screenlock); | |
| 1991/1223 | while(n > 0){ i = chartorune(&r, s); if(i == 0){ | |
| 1991/1225/sys/src/9/ss/screen.c:61,89 – 1991/1228/sys/src/9/ss/screen.c:75,98 | ||
| 1991/1223 | buf[i] = 0; n -= i; s += i; | |
| 1991/1228 | if(r == '\n') screenputnl(); else if(r == '\t'){ | |
| 1991/1223 | out.pos.x += (8-((out.pos.x-MINX)/out.bwid&7))*out.bwid; if(out.pos.x >= gscreen.r.max.x) | |
| 1991/1228 | screenputnl(); | |
| 1991/1223 | }else if(r == '\b'){ if(out.pos.x >= out.bwid+MINX){ out.pos.x -= out.bwid; | |
| 1991/1228 | gstring(&gscreen, out.pos, defont, " ", S); | |
| 1991/1223 | } }else{ if(out.pos.x >= gscreen.r.max.x-out.bwid) | |
| 1991/1228 | screenputnl(); | |
| 1991/1223 | out.pos = gstring(&gscreen, out.pos, defont, buf, S); } } | |
| 1991/1228 | unlock(&screenlock); | |
| 1990/1223 | } | |
| 1990/1231 | /* | |