| plan 9 kernel history: overview | file list | diff list |
1990/0912/gnot/screen.c (diff list | history)
| 1990/0902/sys/src/9/gnot/screen.c:7,12 – 1990/0912/sys/src/9/gnot/screen.c:7,13 (short | long | prev | next) | ||
| 1990/0330 | #include "ureg.h" | |
| 1990/0808 | #include "errno.h" | |
| 1990/03091 | ||
| 1990/0912 | #include <libg.h> | |
| 1990/0902 | #include <gnot.h> | |
| 1990/03091 | #define MINX 8 | |
| 1990/0902/sys/src/9/gnot/screen.c:24,30 – 1990/0912/sys/src/9/gnot/screen.c:25,31 | ||
| 1990/0808 | int duartacr; | |
| 1990/0830 | int duartimr; | |
| 1990/0329 | ||
| 1990/0902 |
| |
| 1990/0912 | GBitmap gscreen = | |
| 1990/03091 | { | |
| 1990/0320 | (ulong*)((4*1024*1024-256*1024)|KZERO), /* BUG */ | |
| 1990/03091 | 0, | |
| 1990/0902/sys/src/9/gnot/screen.c:42,52 – 1990/0912/sys/src/9/gnot/screen.c:43,53 | ||
| 1990/05313 | * Read HEX switch to set ldepth */ if(*(uchar*)MOUSE & (1<<4)){ | |
| 1990/0912 | gscreen.ldepth = 1; | |
| 1990/05313 | defont = &defont1; }else defont = &defont0; | |
| 1990/0902 |
| |
| 1990/0912 | gbitblt(&gscreen, Pt(0, 0), &gscreen, gscreen.r, 0); | |
| 1990/03091 | out.pos.x = MINX; out.pos.y = 0; out.bwid = defont0.info[' '].width; | |
| 1990/0902/sys/src/9/gnot/screen.c:61,73 – 1990/0912/sys/src/9/gnot/screen.c:62,74 | ||
| 1990/03091 | if(c == '\n'){ out.pos.x = MINX; out.pos.y += defont0.height; | |
| 1990/0329 |
| |
| 1990/0902 |
| |
| 1990/0329 |
| |
| 1990/0912 | 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); | |
| 1990/03091 | }else if(c == '\t'){ | |
| 1990/08101 | out.pos.x += (8-((out.pos.x-MINX)/out.bwid&7))*out.bwid; | |
| 1990/0329 |
| |
| 1990/0912 | if(out.pos.x >= gscreen.r.max.x) | |
| 1990/03091 | screenputc('\n'); }else if(c == '\b'){ if(out.pos.x >= out.bwid+MINX){ | |
| 1990/0902/sys/src/9/gnot/screen.c:76,86 – 1990/0912/sys/src/9/gnot/screen.c:77,87 | ||
| 1990/03091 | out.pos.x -= out.bwid; } }else{ | |
| 1990/0329 |
| |
| 1990/0912 | if(out.pos.x >= gscreen.r.max.x-out.bwid) | |
| 1990/03091 | screenputc('\n'); buf[0] = c&0x7F; buf[1] = 0; | |
| 1990/0902 |
| |
| 1990/0912 | out.pos = gstring(&gscreen, out.pos, defont, buf, S); | |
| 1990/03091 | } } | |