| plan 9 kernel history: overview | file list | diff list |
1990/0321/gnot/screen.c (diff list | history)
| 1990/03091/sys/src/9/gnot/screen.c:18,24 – 1990/0320/sys/src/9/gnot/screen.c:18,24 (short | long) | ||
| 1990/03091 | Bitmap screen = { | |
| 1990/0320 | (ulong*)((4*1024*1024-256*1024)|KZERO), /* BUG */ | |
| 1990/03091 | 0, 64, 0, | |
| 1990/0320/sys/src/9/gnot/screen.c:161,171 – 1990/0321/sys/src/9/gnot/screen.c:161,175 (short | long) | ||
| 1990/03091 | c = duart->data; if(status & (FRM_ERR|OVR_ERR|PAR_ERR)) duart->cmnd = RESET_ERR; | |
| 1990/0321 | if(status & PAR_ERR) /* control word: caps lock (0x4) or repeat (0x10) */ kbdrepeat((c&0x10) == 0); else{ if(c == 0x7F) c = 0xFF; /* VIEW key (bizarre) */ if(c & 0x80) c = keymap[c&0x7F]; kbdchar(c); } | |
| 1990/03091 | } /* * Is it 2? | |
| 1990/0321/sys/src/9/gnot/screen.c:16,21 – 1990/0329/sys/src/9/gnot/screen.c:16,23 (short | long) | ||
| 1990/03091 | int bwid; }out; | |
| 1990/0329 | void duartinit(void); | |
| 1990/03091 | Bitmap screen = { | |
| 1990/0320 | (ulong*)((4*1024*1024-256*1024)|KZERO), /* BUG */ | |
| 1990/0321/sys/src/9/gnot/screen.c:29,35 – 1990/0329/sys/src/9/gnot/screen.c:31,38 | ||
| 1990/03091 | void screeninit(void) { | |
| 1990/0329 | duartinit(); bitblt(&screen, Pt(0, 0), &screen, screen.r, 0); | |
| 1990/03091 | out.pos.x = MINX; out.pos.y = 0; out.bwid = defont0.info[' '].width; | |
| 1990/0321/sys/src/9/gnot/screen.c:44,57 – 1990/0329/sys/src/9/gnot/screen.c:47,60 | ||
| 1990/03091 | if(c == '\n'){ out.pos.x = MINX; out.pos.y += defont0.height; | |
| 1990/0329 | if(out.pos.y > screen.r.max.y-defont0.height) out.pos.y = screen.r.min.y; | |
| 1990/03091 | bitblt(&screen, Pt(0, out.pos.y), &screen, | |
| 1990/0329 | Rect(0, out.pos.y, screen.r.max.x, out.pos.y+2*defont0.height), 0); | |
| 1990/03091 | }else if(c == '\t'){ nx = out.pos.x + (8-(out.pos.x/out.bwid&7))*out.bwid; out.pos.x = nx; | |
| 1990/0329 | if(out.pos.x >= screen.r.max.x) | |
| 1990/03091 | screenputc('\n'); }else if(c == '\b'){ if(out.pos.x >= out.bwid+MINX){ | |
| 1990/0321/sys/src/9/gnot/screen.c:60,66 – 1990/0329/sys/src/9/gnot/screen.c:63,69 | ||
| 1990/03091 | out.pos.x -= out.bwid; } }else{ | |
| 1990/0329 | if(out.pos.x >= screen.r.max.x-out.bwid) | |
| 1990/03091 | screenputc('\n'); buf[0] = c&0x7F; buf[1] = 0; | |
| 1990/0321/sys/src/9/gnot/screen.c:77,89 – 1990/0329/sys/src/9/gnot/screen.c:80,97 | ||
| 1990/03091 | uchar cmnd; /* Command Register */ uchar data; /* RX Holding / TX Holding Register */ uchar ipc_acr; /* Input Port Change/Aux. Control Register */ | |
| 1990/0329 | #define ivr ivr /* Interrupt Vector Register */ | |
| 1990/03091 | uchar is_imr; /* Interrupt Status/Interrupt Mask Register */ | |
| 1990/0329 | #define ip_opcr is_imr /* Input Port/Output Port Configuration Register */ | |
| 1990/03091 | uchar ctur; /* Counter/Timer Upper Register */ | |
| 1990/0329 | #define scc_sopbc ctur /* Start Counter Command/Set Output Port Bits Command */ | |
| 1990/03091 | uchar ctlr; /* Counter/Timer Lower Register */ | |
| 1990/0329 | #define scc_ropbc ctlr /* Stop Counter Command/Reset Output Port Bits Command */ | |
| 1990/03091 | }; enum{ CHAR_ERR =0x00, /* MR1x - Mode Register 1 */ | |
| 1990/0329 | PAR_ENB =0x00, | |
| 1990/03091 | EVEN_PAR =0x00, ODD_PAR =0x04, NO_PAR =0x10, | |
| 1990/0321/sys/src/9/gnot/screen.c:113,118 – 1990/0329/sys/src/9/gnot/screen.c:121,129 | ||
| 1990/03091 | PAR_ERR =0x20, FRM_ERR =0x40, RCVD_BRK =0x80, | |
| 1990/0329 | BD9600 =0xBB, BD4800 =0x99, BD2400 =0x88, | |
| 1990/03091 | IM_IPC =0x80, /* IMRx/ISRx - Interrupt Mask/Interrupt Status */ IM_DBB =0x40, IM_RRDYB =0x20, | |
| 1990/0321/sys/src/9/gnot/screen.c:143,148 – 1990/0329/sys/src/9/gnot/screen.c:154,207 | ||
| 1990/03091 | }; void | |
| 1990/0329 | duartinit(void) { Duart *duart; duart = DUARTREG; /* * Keyboard */ duart[0].cmnd = RESET_RCV|DIS_TX|DIS_RX; duart[0].cmnd = RESET_TRANS; duart[0].cmnd = RESET_ERR; duart[0].cmnd = RESET_MR; duart[0].mr1_2 = CHAR_ERR|PAR_ENB|EVEN_PAR|CBITS8; duart[0].mr1_2 = NORM_OP|ONESTOPB; duart[0].sr_csr = BD4800; /* * Pen */ duart[1].cmnd = RESET_RCV|DIS_TX|DIS_RX; duart[1].cmnd = RESET_TRANS; duart[1].cmnd = RESET_ERR; duart[1].cmnd = RESET_MR; duart[1].mr1_2 = CHAR_ERR|NO_PAR|CBITS8; duart[1].mr1_2 = NORM_OP|ONESTOPB; duart[1].sr_csr = BD2400; /* * Output port */ duart[0].ipc_acr = 0xBF; /* allow change of state interrupt */ duart[1].ip_opcr = 0x00; duart[1].scc_ropbc = 0xFF; /* make sure the port is reset first */ duart[1].scc_sopbc = 0x04; /* dtr = 1, pp = 01 */ duart[0].is_imr = IM_IPC|IM_RRDYB|IM_XRDYB|IM_RRDYA; duart[0].cmnd = ENB_TX|ENB_RX; /* enable TX and RX last */ duart[1].cmnd = ENB_TX|ENB_RX; /* * Initialize keyboard */ while (!(duart[0].sr_csr & (XMT_EMT|XMT_RDY))) ; duart[0].data = 0x02; } void | |
| 1990/03091 | duartintr(void) { int cause, status, c; | |
| 1990/0321/sys/src/9/gnot/screen.c:176,180 – 1990/0329/sys/src/9/gnot/screen.c:235,248 | ||
| 1990/03091 | */ if(cause & IM_RRDYB) /* pen input */ c = duart[1].data; | |
| 1990/0329 | /* * Is it 4? */ if(cause & IM_XRDYB) duart[1].cmnd = DIS_TX; /* * Is it 3? */ if(cause & IM_IPC) mousebuttons((~duart[0].ipc_acr) & 7); | |
| 1990/03091 | } | |
| 1990/0329/sys/src/9/gnot/screen.c:4,9 – 1990/0330/sys/src/9/gnot/screen.c:4,10 (short | long) | ||
| 1990/03091 | #include "dat.h" #include "fns.h" #include "io.h" | |
| 1990/0330 | #include "ureg.h" | |
| 1990/03091 | #include "gnot.h" | |
| 1990/0329/sys/src/9/gnot/screen.c:201,209 – 1990/0330/sys/src/9/gnot/screen.c:202,237 | ||
| 1990/0329 | duart[0].data = 0x02; } | |
| 1990/0330 | enum{ Kptime=200 /* about once per ms */ }; | |
| 1990/0329 | void | |
| 1990/03091 |
| |
| 1990/0330 | duartstarttimer(void) | |
| 1990/03091 | { | |
| 1990/0330 | Duart *duart; char x; duart = DUARTREG; duart[0].ctur = (Kptime)>>8; duart[0].ctlr = (Kptime)&255; duart[0].is_imr = IM_IPC|IM_RRDYB|IM_XRDYB|IM_RRDYA|IM_CRDY; x = duart[1].scc_sopbc; } void duartstoptimer(void) { Duart *duart; char x; duart = DUARTREG; x = duart[1].scc_ropbc; duart[0].is_imr = IM_IPC|IM_RRDYB|IM_XRDYB|IM_RRDYA; } void duartintr(Ureg *ur) { | |
| 1990/03091 | int cause, status, c; Duart *duart; | |
| 1990/0329/sys/src/9/gnot/screen.c:212,217 – 1990/0330/sys/src/9/gnot/screen.c:240,256 | ||
| 1990/03091 | /* * I can guess your interrupt. */ | |
| 1990/0330 | /* * Is it 0? */ if(cause & IM_CRDY){ kproftimer(ur->pc); c = duart[1].scc_ropbc; duart[0].ctur = (Kptime)>>8; duart[0].ctlr = (Kptime)&255; c = duart[1].scc_sopbc; return; } | |
| 1990/03091 | /* * Is it 1? */ | |
| 1990/0330/sys/src/9/gnot/screen.c:11,16 – 1990/05313/sys/src/9/gnot/screen.c:11,18 (short | long) | ||
| 1990/03091 | #define MINX 8 extern Font defont0; | |
| 1990/05313 | extern Font defont1; Font *defont; | |
| 1990/03091 | struct{ Point pos; | |
| 1990/0330/sys/src/9/gnot/screen.c:33,38 – 1990/05313/sys/src/9/gnot/screen.c:35,48 | ||
| 1990/03091 | screeninit(void) { | |
| 1990/0329 | duartinit(); | |
| 1990/05313 | /* * Read HEX switch to set ldepth */ if(*(uchar*)MOUSE & (1<<4)){ screen.ldepth = 1; defont = &defont1; }else defont = &defont0; | |
| 1990/0329 | bitblt(&screen, Pt(0, 0), &screen, screen.r, 0); | |
| 1990/03091 | out.pos.x = MINX; out.pos.y = 0; | |
| 1990/0330/sys/src/9/gnot/screen.c:68,74 – 1990/05313/sys/src/9/gnot/screen.c:78,84 | ||
| 1990/03091 | screenputc('\n'); buf[0] = c&0x7F; buf[1] = 0; | |
| 1990/05313 | out.pos = string(&screen, out.pos, defont, buf, S); | |
| 1990/03091 | } } | |
| 1990/0330/sys/src/9/gnot/screen.c:186,192 – 1990/05313/sys/src/9/gnot/screen.c:196,202 | ||
| 1990/0329 | /* * Output port */ | |
| 1990/05313 | duart[0].ipc_acr = 0xB7; /* allow change of state interrupt */ | |
| 1990/0329 | duart[1].ip_opcr = 0x00; duart[1].scc_ropbc = 0xFF; /* make sure the port is reset first */ duart[1].scc_sopbc = 0x04; /* dtr = 1, pp = 01 */ | |
| 1990/0330/sys/src/9/gnot/screen.c:275,286 – 1990/05313/sys/src/9/gnot/screen.c:285,302 | ||
| 1990/03091 | if(cause & IM_RRDYB) /* pen input */ c = duart[1].data; | |
| 1990/0329 | /* | |
| 1990/05313 | * Is it 3? | |
| 1990/0329 | */ | |
| 1990/05313 | if(cause & IM_XRDYB){ | |
| 1990/0329 | duart[1].cmnd = DIS_TX; | |
| 1990/05313 | } | |
| 1990/0329 | /* | |
| 1990/05313 | * Is it 4? */ if(cause & IM_XRDYA) duart[0].cmnd = DIS_TX; /* * Is it 5? | |
| 1990/0329 | */ if(cause & IM_IPC) mousebuttons((~duart[0].ipc_acr) & 7); | |
| 1990/05313/sys/src/9/gnot/screen.c:183,189 – 1990/0629/sys/src/9/gnot/screen.c:183,189 (short | long) | ||
| 1990/0329 | duart[0].sr_csr = BD4800; /* | |
| 1990/0629 | * RS232 | |
| 1990/0329 | */ duart[1].cmnd = RESET_RCV|DIS_TX|DIS_RX; duart[1].cmnd = RESET_TRANS; | |
| 1990/05313/sys/src/9/gnot/screen.c:191,197 – 1990/0629/sys/src/9/gnot/screen.c:191,197 | ||
| 1990/0329 | duart[1].cmnd = RESET_MR; duart[1].mr1_2 = CHAR_ERR|NO_PAR|CBITS8; duart[1].mr1_2 = NORM_OP|ONESTOPB; | |
| 1990/0629 | duart[1].sr_csr = BD9600; | |
| 1990/0329 | /* * Output port | |
| 1990/05313/sys/src/9/gnot/screen.c:240,245 – 1990/0629/sys/src/9/gnot/screen.c:240,266 | ||
| 1990/0330 | } void | |
| 1990/0629 | duartrs232intr(void) { int c; Duart *duart; duart = DUARTREG; c = getrs232o(); if(c == -1) duart[1].cmnd = DIS_TX; else duart[1].data = c; } void duartstartrs232o(void) { DUARTREG[1].cmnd = ENB_TX; duartrs232intr(); } void | |
| 1990/0330 | duartintr(Ureg *ur) { | |
| 1990/03091 | int cause, status, c; | |
| 1990/05313/sys/src/9/gnot/screen.c:282,295 – 1990/0629/sys/src/9/gnot/screen.c:303,321 | ||
| 1990/03091 | /* * Is it 2? */ | |
| 1990/0629 | if(cause & IM_RRDYB){ /* rs232 input */ status = duart[1].sr_csr; | |
| 1990/03091 | c = duart[1].data; | |
| 1990/0629 | if(status & (FRM_ERR|OVR_ERR|PAR_ERR)) duart[1].cmnd = RESET_ERR; else rs232ichar(c); } | |
| 1990/0329 | /* | |
| 1990/05313 | * Is it 3? | |
| 1990/0329 | */ | |
| 1990/05313 |
| |
| 1990/0329 |
| |
| 1990/05313 |
| |
| 1990/0629 | if(cause & IM_XRDYB) /* rs232 output */ duartrs232intr(); | |
| 1990/0329 | /* | |
| 1990/05313 | * Is it 4? */ | |
| 1990/0629/sys/src/9/gnot/screen.c:200,206 – 1990/0707/sys/src/9/gnot/screen.c:200,206 (short | long) | ||
| 1990/0329 | duart[1].ip_opcr = 0x00; duart[1].scc_ropbc = 0xFF; /* make sure the port is reset first */ duart[1].scc_sopbc = 0x04; /* dtr = 1, pp = 01 */ | |
| 1990/0707 | duart[0].is_imr = IM_IPC|IM_RRDYB|IM_XRDYB|IM_RRDYA|IM_XRDYA; | |
| 1990/0329 | duart[0].cmnd = ENB_TX|ENB_RX; /* enable TX and RX last */ duart[1].cmnd = ENB_TX|ENB_RX; | |
| 1990/0707/sys/src/9/gnot/screen.c:275,281 – 1990/0709/sys/src/9/gnot/screen.c:275,281 (short | long) | ||
| 1990/0330 | * Is it 0? */ if(cause & IM_CRDY){ | |
| 1990/0709 | /* kproftimer(ur->pc);/**/ | |
| 1990/0330 | c = duart[1].scc_ropbc; duart[0].ctur = (Kptime)>>8; duart[0].ctlr = (Kptime)&255; | |
| 1990/0709/sys/src/9/gnot/screen.c:5,10 – 1990/0808/sys/src/9/gnot/screen.c:5,11 (short | long) | ||
| 1990/03091 | #include "fns.h" #include "io.h" | |
| 1990/0330 | #include "ureg.h" | |
| 1990/0808 | #include "errno.h" | |
| 1990/03091 | #include "gnot.h" | |
| 1990/0709/sys/src/9/gnot/screen.c:20,25 – 1990/0808/sys/src/9/gnot/screen.c:21,27 | ||
| 1990/03091 | }out; | |
| 1990/0329 | void duartinit(void); | |
| 1990/0808 | int duartacr; | |
| 1990/0329 | ||
| 1990/03091 | Bitmap screen = { | |
| 1990/0709/sys/src/9/gnot/screen.c:132,140 – 1990/0808/sys/src/9/gnot/screen.c:134,146 | ||
| 1990/03091 | PAR_ERR =0x20, FRM_ERR =0x40, RCVD_BRK =0x80, | |
| 1990/0329 |
| |
| 1990/0808 | BD38400 =0xCC|0x0000, BD19200 =0xCC|0x0100, BD9600 =0xBB|0x0000, BD4800 =0x99|0x0000, BD2400 =0x88|0x0000, BD1200 =0x66|0x0000, BD300 =0x44|0x0000, | |
| 1990/03091 | IM_IPC =0x80, /* IMRx/ISRx - Interrupt Mask/Interrupt Status */ IM_DBB =0x40, IM_RRDYB =0x20, | |
| 1990/0709/sys/src/9/gnot/screen.c:196,202 – 1990/0808/sys/src/9/gnot/screen.c:202,208 | ||
| 1990/0329 | /* * Output port */ | |
| 1990/05313 |
| |
| 1990/0808 | duart[0].ipc_acr = duartacr = 0xB7; /* allow change of state interrupt */ | |
| 1990/0329 | duart[1].ip_opcr = 0x00; duart[1].scc_ropbc = 0xFF; /* make sure the port is reset first */ duart[1].scc_sopbc = 0x04; /* dtr = 1, pp = 01 */ | |
| 1990/0709/sys/src/9/gnot/screen.c:210,215 – 1990/0808/sys/src/9/gnot/screen.c:216,261 | ||
| 1990/0329 | while (!(duart[0].sr_csr & (XMT_EMT|XMT_RDY))) ; duart[0].data = 0x02; | |
| 1990/0808 | } void duartbaud(int b) { int x; Duart *duart; duart = DUARTREG; switch(b){ case 38400: x = BD38400; break; case 19200: x = BD19200; break; case 9600: x = BD9600; break; case 4800: x = BD4800; break; case 2400: x = BD2400; break; case 1200: x = BD1200; break; case 300: x = BD300; break; default: error(0, Ebadarg); } if(x & 0x0100) duart[0].ipc_acr = duartacr |= 0x80; else duart[0].ipc_acr = duartacr &= ~0x80; duart[1].sr_csr = x; | |
| 1990/0329 | } | |
| 1990/0330 | enum{ | |
| 1990/0808/sys/src/9/gnot/screen.c:65,72 – 1990/08101/sys/src/9/gnot/screen.c:65,71 (short | long) | ||
| 1990/03091 | bitblt(&screen, Pt(0, out.pos.y), &screen, | |
| 1990/0329 | Rect(0, out.pos.y, screen.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 | if(out.pos.x >= screen.r.max.x) | |
| 1990/03091 | screenputc('\n'); }else if(c == '\b'){ | |
| 1990/08101/sys/src/9/gnot/screen.c:159,171 – 1990/0825/sys/src/9/gnot/screen.c:159,171 (short | long) | ||
| 1990/03091 | 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xae, 0xaf, /*B0*/ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0x80, 0xb7, 0xb8, 0xb9, 0x00, 0xbb, 0x1e, 0xbd, 0x60, 0x1f, | |
| 1990/0825 | /*C0*/ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0x58, 0xc6, 0x0a, | |
| 1990/03091 | 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /*D0*/ 0x09, 0x08, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x7f, 0x58, | |
| 1990/0825 | /*E0*/ 0x58, 0x58, 0xe2, 0x1b, 0x0d, 0xe5, 0x58, 0x0a, | |
| 1990/03091 | 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, | |
| 1990/0825 | /*F0*/ 0x09, 0x08, 0xb2, 0x1b, 0x0d, 0xf5, 0x81, 0x58, | |
| 1990/03091 | 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x7f, 0xb2, }; | |
| 1990/0825/sys/src/9/gnot/screen.c:22,27 – 1990/0830/sys/src/9/gnot/screen.c:22,28 (short | long) | ||
| 1990/03091 | ||
| 1990/0329 | void duartinit(void); | |
| 1990/0808 | int duartacr; | |
| 1990/0830 | int duartimr; | |
| 1990/0329 | ||
| 1990/03091 | Bitmap screen = { | |
| 1990/0825/sys/src/9/gnot/screen.c:205,211 – 1990/0830/sys/src/9/gnot/screen.c:206,212 | ||
| 1990/0329 | duart[1].ip_opcr = 0x00; duart[1].scc_ropbc = 0xFF; /* make sure the port is reset first */ duart[1].scc_sopbc = 0x04; /* dtr = 1, pp = 01 */ | |
| 1990/0707 |
| |
| 1990/0830 | duart[0].is_imr = duartimr = IM_IPC|IM_RRDYB|IM_XRDYB|IM_RRDYA|IM_XRDYA; | |
| 1990/0329 | duart[0].cmnd = ENB_TX|ENB_RX; /* enable TX and RX last */ duart[1].cmnd = ENB_TX|ENB_RX; | |
| 1990/0825/sys/src/9/gnot/screen.c:217,230 – 1990/0830/sys/src/9/gnot/screen.c:218,235 | ||
| 1990/0329 | duart[0].data = 0x02; | |
| 1990/0808 | } | |
| 1990/0830 | int duartinputport(void) { Duart *duart = DUARTREG; return duart[1].ip_opcr; } | |
| 1990/0808 | void duartbaud(int b) { int x; | |
| 1990/0830 | Duart *duart = DUARTREG; | |
| 1990/0808 |
| |
| 1990/0825/sys/src/9/gnot/screen.c:257,262 – 1990/0830/sys/src/9/gnot/screen.c:262,293 | ||
| 1990/0808 | duart[1].sr_csr = x; | |
| 1990/0329 | } | |
| 1990/0830 | void duartdtr(int val) { Duart *duart = DUARTREG; if (val) duart[1].scc_ropbc=0x01; else duart[1].scc_sopbc=0x01; } void duartbreak(int ms) { static QLock brk; Duart *duart = DUARTREG; if (ms<=0 || ms >20000) error(0, Ebadarg); qlock(&brk); duart[0].is_imr = duartimr &= ~IM_XRDYB; duart[1].cmnd = STRT_BRK|ENB_TX; tsleep(&u->p->sleep, return0, 0, ms); duart[1].cmnd = STOP_BRK|ENB_TX; duart[0].is_imr = duartimr |= IM_XRDYB; qunlock(&brk); } | |
| 1990/0330 | enum{ Kptime=200 /* about once per ms */ }; | |
| 1990/0825/sys/src/9/gnot/screen.c:269,275 – 1990/0830/sys/src/9/gnot/screen.c:300,306 | ||
| 1990/0330 | duart = DUARTREG; duart[0].ctur = (Kptime)>>8; duart[0].ctlr = (Kptime)&255; | |
| 1990/0830 | duart[0].is_imr = duartimr |= IM_CRDY; | |
| 1990/0330 | x = duart[1].scc_sopbc; } | |
| 1990/0825/sys/src/9/gnot/screen.c:281,287 – 1990/0830/sys/src/9/gnot/screen.c:312,318 | ||
| 1990/0330 | duart = DUARTREG; x = duart[1].scc_ropbc; | |
| 1990/0830 | duart[0].is_imr = duartimr &= ~IM_CRDY; | |
| 1990/0330 | } void | |
| 1990/0830/sys/src/9/gnot/screen.c:7,19 – 1990/0902/sys/src/9/gnot/screen.c:7,19 (short | long) | ||
| 1990/0330 | #include "ureg.h" | |
| 1990/0808 | #include "errno.h" | |
| 1990/03091 |
| |
| 1990/0902 | #include <gnot.h> | |
| 1990/03091 | #define MINX 8 | |
| 1990/05313 |
| |
| 1990/0902 | extern GFont defont0; extern GFont defont1; GFont *defont; | |
| 1990/03091 | struct{ Point pos; | |
| 1990/0830/sys/src/9/gnot/screen.c:24,30 – 1990/0902/sys/src/9/gnot/screen.c:24,30 | ||
| 1990/0808 | int duartacr; | |
| 1990/0830 | int duartimr; | |
| 1990/0329 | ||
| 1990/03091 |
| |
| 1990/0902 | GBitmap screen = | |
| 1990/03091 | { | |
| 1990/0320 | (ulong*)((4*1024*1024-256*1024)|KZERO), /* BUG */ | |
| 1990/03091 | 0, | |
| 1990/0830/sys/src/9/gnot/screen.c:46,52 – 1990/0902/sys/src/9/gnot/screen.c:46,52 | ||
| 1990/05313 | defont = &defont1; }else defont = &defont0; | |
| 1990/0329 |
| |
| 1990/0902 | gbitblt(&screen, Pt(0, 0), &screen, screen.r, 0); | |
| 1990/03091 | out.pos.x = MINX; out.pos.y = 0; out.bwid = defont0.info[' '].width; | |
| 1990/0830/sys/src/9/gnot/screen.c:63,69 – 1990/0902/sys/src/9/gnot/screen.c:63,69 | ||
| 1990/03091 | out.pos.y += defont0.height; | |
| 1990/0329 | if(out.pos.y > screen.r.max.y-defont0.height) out.pos.y = screen.r.min.y; | |
| 1990/03091 |
| |
| 1990/0902 | gbitblt(&screen, Pt(0, out.pos.y), &screen, | |
| 1990/0329 | Rect(0, out.pos.y, screen.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/0830/sys/src/9/gnot/screen.c:80,86 – 1990/0902/sys/src/9/gnot/screen.c:80,86 | ||
| 1990/03091 | screenputc('\n'); buf[0] = c&0x7F; buf[1] = 0; | |
| 1990/05313 |
| |
| 1990/0902 | out.pos = gstring(&screen, out.pos, defont, buf, S); | |
| 1990/03091 | } } | |
| 1990/0902/sys/src/9/gnot/screen.c:7,12 – 1990/0912/sys/src/9/gnot/screen.c:7,13 (short | long) | ||
| 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 | } } | |
| 1990/0912/sys/src/9/gnot/screen.c:13,19 – 1990/0914/sys/src/9/gnot/screen.c:13,18 (short | long) | ||
| 1990/03091 | #define MINX 8 | |
| 1990/0902 | extern GFont defont0; | |
| 1990/03091 | struct{ | |
| 1990/0912/sys/src/9/gnot/screen.c:42,52 – 1990/0914/sys/src/9/gnot/screen.c:41,49 | ||
| 1990/05313 | /* * Read HEX switch to set ldepth */ | |
| 1990/0914 | if(*(uchar*)MOUSE & (1<<4)) | |
| 1990/0912 | gscreen.ldepth = 1; | |
| 1990/05313 |
| |
| 1990/0914 | defont = &defont0; /* save space; let bitblt do the conversion work */ | |
| 1990/0912 | gbitblt(&gscreen, Pt(0, 0), &gscreen, gscreen.r, 0); | |
| 1990/03091 | out.pos.x = MINX; out.pos.y = 0; | |
| 1990/0912/sys/src/9/gnot/screen.c:81,87 – 1990/0914/sys/src/9/gnot/screen.c:78,84 | ||
| 1990/03091 | screenputc('\n'); buf[0] = c&0x7F; buf[1] = 0; | |
| 1990/0912 |
| |
| 1990/0914 | out.pos = gbitbltstring(&gscreen, out.pos, defont, buf, S); | |
| 1990/03091 | } } | |
| 1990/0914/sys/src/9/gnot/screen.c:24,29 – 1990/1004/sys/src/9/gnot/screen.c:24,31 (short | long) | ||
| 1990/0808 | int duartacr; | |
| 1990/0830 | int duartimr; | |
| 1990/0329 | ||
| 1990/1004 | void (*kprofp)(ulong); | |
| 1990/0912 | GBitmap gscreen = | |
| 1990/03091 | { | |
| 1990/0320 | (ulong*)((4*1024*1024-256*1024)|KZERO), /* BUG */ | |
| 1990/0914/sys/src/9/gnot/screen.c:287,293 – 1990/1004/sys/src/9/gnot/screen.c:289,295 | ||
| 1990/0830 | } | |
| 1990/0330 | enum{ | |
| 1990/1004 | Kptime=200 | |
| 1990/0330 | }; | |
| 1990/0329 | void | |
| 1990/0330 | duartstarttimer(void) | |
| 1990/0914/sys/src/9/gnot/screen.c:349,355 – 1990/1004/sys/src/9/gnot/screen.c:351,358 | ||
| 1990/0330 | * Is it 0? */ if(cause & IM_CRDY){ | |
| 1990/0709 |
| |
| 1990/1004 | if(kprofp) (*kprofp)(ur->pc); | |
| 1990/0330 | c = duart[1].scc_ropbc; duart[0].ctur = (Kptime)>>8; duart[0].ctlr = (Kptime)&255; | |
| 1990/1004/sys/src/9/gnot/screen.c:253,259 – 1990/11211/sys/src/9/gnot/screen.c:253,259 (short | long) | ||
| 1990/0808 | x = BD300; break; default: | |
| 1990/11211 | error(Ebadarg); | |
| 1990/0808 | } if(x & 0x0100) duart[0].ipc_acr = duartacr |= 0x80; | |
| 1990/1004/sys/src/9/gnot/screen.c:278,284 – 1990/11211/sys/src/9/gnot/screen.c:278,284 | ||
| 1990/0830 | static QLock brk; Duart *duart = DUARTREG; if (ms<=0 || ms >20000) | |
| 1990/11211 | error(Ebadarg); | |
| 1990/0830 | qlock(&brk); duart[0].is_imr = duartimr &= ~IM_XRDYB; duart[1].cmnd = STRT_BRK|ENB_TX; | |
| 1990/11211/sys/src/9/gnot/screen.c:230,235 – 1990/1126/sys/src/9/gnot/screen.c:230,236 (short | long) | ||
| 1990/0808 | int x; | |
| 1990/0830 | Duart *duart = DUARTREG; | |
| 1990/0808 | ||
| 1990/1126 | x = 0; /* set */ | |
| 1990/0808 | switch(b){ case 38400: x = BD38400; | |
| 1990/1126/sys/src/9/gnot/screen.c:337,347 – 1991/0105/sys/src/9/gnot/screen.c:337,488 (short | long) | ||
| 1990/0629 | duartrs232intr(); } | |
| 1991/0105 | struct latin { uchar l; char c[2]; }latintab[] = { '', "!!", /* spanish initial ! */ '', "c|", /* cent */ '', "c$", /* cent */ '', "l$", /* pound sterling */ '', "g$", /* general currency */ '', "y$", /* yen */ '', "j$", /* yen */ '', "||", /* broken vertical bar */ '', "SS", /* section symbol */ '', "\"\"", /* dieresis */ '', "cr", /* copyright */ '', "cO", /* copyright */ '', "sa", /* super a, feminine ordinal */ '', "<<", /* left angle quotation */ '', "no", /* not sign, hooked overbar */ '', "--", /* soft hyphen */ '', "rg", /* registered trademark */ '', "__", /* macron */ '', "s0", /* degree (sup o) */ '', "+-", /* plus-minus */ '', "s2", /* sup 2 */ '', "s3", /* sup 3 */ '', "''", /* grave accent */ '', "mu", /* mu */ '', "pg", /* paragraph (pilcrow) */ '', "..", /* centered . */ '', ",,", /* cedilla */ '', "s1", /* sup 1 */ '', "so", /* sup o */ '', ">>", /* right angle quotation */ '', "14", /* 1/4 */ '', "12", /* 1/2 */ '', "34", /* 3/4 */ '', "??", /* spanish initial ? */ '', "A`", /* A grave */ '', "A'", /* A acute */ '', "A^", /* A circumflex */ '', "A~", /* A tilde */ '', "A\"", /* A dieresis */ '', "A:", /* A dieresis */ '', "Ao", /* A circle */ '', "AO", /* A circle */ '', "Ae", /* AE ligature */ '', "AE", /* AE ligature */ '', "C,", /* C cedilla */ '', "E`", /* E grave */ '', "E'", /* E acute */ '', "E^", /* E circumflex */ '', "E\"", /* E dieresis */ '', "E:", /* E dieresis */ '', "I`", /* I grave */ '', "I'", /* I acute */ '', "I^", /* I circumflex */ '', "I\"", /* I dieresis */ '', "I:", /* I dieresis */ '', "D-", /* Eth */ '', "N~", /* N tilde */ '', "O`", /* O grave */ '', "O'", /* O acute */ '', "O^", /* O circumflex */ '', "O~", /* O tilde */ '', "O\"", /* O dieresis */ '', "O:", /* O dieresis */ '', "OE", /* O dieresis */ '', "Oe", /* O dieresis */ '', "xx", /* times sign */ '', "O/", /* O slash */ '', "U`", /* U grave */ '', "U'", /* U acute */ '', "U^", /* U circumflex */ '', "U\"", /* U dieresis */ '', "U:", /* U dieresis */ '', "UE", /* U dieresis */ '', "Ue", /* U dieresis */ '', "Y'", /* Y acute */ '', "P|", /* Thorn */ '', "Th", /* Thorn */ '', "TH", /* Thorn */ '', "ss", /* sharp s */ '', "a`", /* a grave */ '', "a'", /* a acute */ '', "a^", /* a circumflex */ '', "a~", /* a tilde */ '', "a\"", /* a dieresis */ '', "a:", /* a dieresis */ '', "ao", /* a circle */ '', "ae", /* ae ligature */ '', "c,", /* c cedilla */ '', "e`", /* e grave */ '', "e'", /* e acute */ '', "e^", /* e circumflex */ '', "e\"", /* e dieresis */ '', "e:", /* e dieresis */ '', "i`", /* i grave */ '', "i'", /* i acute */ '', "i^", /* i circumflex */ '', "i\"", /* i dieresis */ '', "i:", /* i dieresis */ '', "d-", /* eth */ '', "n~", /* n tilde */ '', "o`", /* o grave */ '', "o'", /* o acute */ '', "o^", /* o circumflex */ '', "o~", /* o tilde */ '', "o\"", /* o dieresis */ '', "o:", /* o dieresis */ '', "oe", /* o dieresis */ '', "-:", /* divide sign */ '', "o/", /* o slash */ '', "u`", /* u grave */ '', "u'", /* u acute */ '', "u^", /* u circumflex */ '', "u\"", /* u dieresis */ '', "u:", /* u dieresis */ '', "ue", /* u dieresis */ '', "y'", /* y acute */ '', "th", /* thorn */ '', "p|", /* thorn */ '', "y\"", /* y dieresis */ '', "y:", /* y dieresis */ 0, 0, }; int latin1(int k1, int k2) { int i; struct latin *l; for(l=latintab; l->l; l++) if(k1==l->c[0] && k2==l->c[1]) return l->l; return 0; } | |
| 1990/0629 | void | |
| 1990/0330 | duartintr(Ureg *ur) { | |
| 1990/03091 | int cause, status, c; Duart *duart; | |
| 1991/0105 | static int kbdstate, k1, k2; | |
| 1990/03091 | duart = DUARTREG; cause = duart->is_imr; | |
| 1990/1126/sys/src/9/gnot/screen.c:371,381 – 1991/0105/sys/src/9/gnot/screen.c:512,542 | ||
| 1990/0321 | if(status & PAR_ERR) /* control word: caps lock (0x4) or repeat (0x10) */ kbdrepeat((c&0x10) == 0); else{ | |
| 1991/0105 | if(c == 0x7F) /* VIEW key (bizarre) */ c = 0xFF; if(c == 0xB6) /* NUM PAD */ kbdstate = 1; else{ if(c & 0x80) c = keymap[c&0x7F]; switch(kbdstate){ case 1: k1 = c; kbdstate = 2; break; case 2: k2 = c; c = latin1(k1, k2); if(c == 0){ kbdchar(k1); c = k2; } /* fall through */ default: kbdstate = 0; kbdchar(c); } } | |
| 1990/0321 | } | |
| 1990/03091 | } /* | |
| 1991/0105/sys/src/9/gnot/screen.c:158,164 – 1991/0112/sys/src/9/gnot/screen.c:158,164 (short | long) | ||
| 1990/03091 | 0x98, 0x99, 0x9a, 0x9b, 0x58, 0x58, 0x58, 0x58, /*A0*/ 0x58, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xae, 0xaf, | |
| 1991/0112 | /*B0*/ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, | |
| 1990/03091 | 0xb8, 0xb9, 0x00, 0xbb, 0x1e, 0xbd, 0x60, 0x1f, | |
| 1990/0825 | /*C0*/ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0x58, 0xc6, 0x0a, | |
| 1990/03091 | 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, | |
| 1991/0105/sys/src/9/gnot/screen.c:167,173 – 1991/0112/sys/src/9/gnot/screen.c:167,173 | ||
| 1990/0825 | /*E0*/ 0x58, 0x58, 0xe2, 0x1b, 0x0d, 0xe5, 0x58, 0x0a, | |
| 1990/03091 | 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, | |
| 1990/0825 | /*F0*/ 0x09, 0x08, 0xb2, 0x1b, 0x0d, 0xf5, 0x81, 0x58, | |
| 1990/03091 |
| |
| 1991/0112 | 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x7f, 0x80, | |
| 1990/03091 | }; void | |
| 1991/0112/sys/src/9/gnot/screen.c:227,236 – 1991/0423/sys/src/9/gnot/screen.c:227,235 (short | long) | ||
| 1990/0808 | void duartbaud(int b) { | |
| 1991/0423 | int x = 0; | |
| 1990/0830 | Duart *duart = DUARTREG; | |
| 1990/0808 | ||
| 1990/1126 |
| |
| 1990/0808 | switch(b){ case 38400: x = BD38400; | |
| 1991/0112/sys/src/9/gnot/screen.c:333,340 – 1991/0423/sys/src/9/gnot/screen.c:332,346 | ||
| 1990/0629 | void duartstartrs232o(void) { | |
| 1991/0423 | int s; Duart *duart; duart = DUARTREG; s = splduart(); duart[1].cmnd = ENB_TX; if(duart[1].sr_csr & (XMT_RDY|XMT_EMT)) duartrs232intr(); splx(s); | |
| 1990/0629 | } | |
| 1991/0105 | struct latin | |
| 1991/0112/sys/src/9/gnot/screen.c:370,376 – 1991/0423/sys/src/9/gnot/screen.c:376,382 | ||
| 1991/0105 | '', "..", /* centered . */ '', ",,", /* cedilla */ '', "s1", /* sup 1 */ | |
| 1991/0423 | '', "so", /* sup o */ | |
| 1991/0105 | '', ">>", /* right angle quotation */ '', "14", /* 1/4 */ '', "12", /* 1/2 */ | |
| 1991/0112/sys/src/9/gnot/screen.c:542,548 – 1991/0423/sys/src/9/gnot/screen.c:548,554 | ||
| 1990/03091 | /* * Is it 2? */ | |
| 1990/0629 |
| |
| 1991/0423 | while(cause & IM_RRDYB){ /* rs232 input */ | |
| 1990/0629 | status = duart[1].sr_csr; | |
| 1990/03091 | c = duart[1].data; | |
| 1990/0629 | if(status & (FRM_ERR|OVR_ERR|PAR_ERR)) | |
| 1991/0112/sys/src/9/gnot/screen.c:549,554 – 1991/0423/sys/src/9/gnot/screen.c:555,561 | ||
| 1990/0629 | duart[1].cmnd = RESET_ERR; else rs232ichar(c); | |
| 1991/0423 | cause = duart->is_imr; | |
| 1990/0629 | } | |
| 1990/0329 | /* | |
| 1990/05313 | * Is it 3? | |
| 1991/0423/sys/src/9/gnot/screen.c:20,31 – 1991/0605/sys/src/9/gnot/screen.c:20,25 (short | long) | ||
| 1990/03091 | int bwid; }out; | |
| 1990/0329 |
| |
| 1990/0808 |
| |
| 1990/0830 |
| |
| 1990/0329 | ||
| 1990/1004 |
| |
| 1990/0912 | GBitmap gscreen = | |
| 1990/03091 | { | |
| 1990/0320 | (ulong*)((4*1024*1024-256*1024)|KZERO), /* BUG */ | |
| 1991/0423/sys/src/9/gnot/screen.c:39,45 – 1991/0605/sys/src/9/gnot/screen.c:33,38 | ||
| 1990/03091 | void screeninit(void) { | |
| 1990/0329 |
| |
| 1990/05313 | /* * Read HEX switch to set ldepth */ | |
| 1991/0423/sys/src/9/gnot/screen.c:84,575 – 1991/0605/sys/src/9/gnot/screen.c:77,85 | ||
| 1990/03091 | } } | |
| 1990/0329 |
| |
| 1990/03091 |
| |
| 1990/0329 |
| |
| 1990/03091 |
| |
| 1990/0329 |
| |
| 1990/03091 |
| |
| 1990/0329 |
| |
| 1990/03091 |
| |
| 1990/0329 |
| |
| 1990/03091 |
| |
| 1990/0808 |
| |
| 1990/03091 |
| |
| 1991/0112 |
| |
| 1990/03091 |
| |
| 1990/0825 |
| |
| 1990/03091 |
| |
| 1990/0825 |
| |
| 1990/03091 |
| |
| 1990/0825 |
| |
| 1991/0112 |
| |
| 1990/03091 |
| |
| 1990/0329 |
| |
| 1991/0605 | screenputs(char *s, int n) | |
| 1990/0329 | { | |
| 1990/0629 |
| |
| 1990/0329 |
| |
| 1990/0629 |
| |
| 1990/0329 |
| |
| 1990/0808 |
| |
| 1990/0329 |
| |
| 1990/0830 |
| |
| 1990/0329 |
| |
| 1990/0808 |
| |
| 1990/0830 |
| |
| 1990/0808 |
| |
| 1991/0423 |
| |
| 1990/0830 |
| |
| 1990/0808 |
| |
| 1990/11211 |
| |
| 1990/0808 |
| |
| 1990/0329 |
| |
| 1990/0830 |
| |
| 1990/11211 |
| |
| 1990/0830 |
| |
| 1990/0330 |
| |
| 1990/1004 |
| |
| 1990/0330 |
| |
| 1990/0329 |
| |
| 1990/0330 |
| |
| 1990/03091 |
| |
| 1990/0330 |
| |
| 1990/0830 |
| |
| 1990/0330 |
| |
| 1990/0830 |
| |
| 1990/0330 |
| |
| 1990/0629 |
| |
| 1991/0423 |
| |
| 1990/0629 |
| |
| 1991/0105 |
| |
| 1991/0423 |
| |
| 1991/0105 |
| |
| 1990/0629 |
| |
| 1990/0330 |
| |
| 1990/03091 |
| |
| 1991/0105 |
| |
| 1990/03091 |
| |
| 1990/0330 |
| |
| 1990/1004 |
| |
| 1990/0330 |
| |
| 1990/03091 |
| |
| 1990/0321 |
| |
| 1991/0105 |
| |
| 1990/0321 |
| |
| 1990/03091 |
| |
| 1991/0423 |
| |
| 1990/0629 |
| |
| 1990/03091 |
| |
| 1990/0629 |
| |
| 1991/0423 |
| |
| 1990/0629 |
| |
| 1990/0329 |
| |
| 1990/05313 |
| |
| 1990/0329 |
| |
| 1990/0629 |
| |
| 1990/0329 |
| |
| 1990/05313 |
| |
| 1990/0329 |
| |
| 1991/0605 | while(n-- > 0) screenputc(*s++); | |
| 1990/03091 | } | |
| 1991/0605/sys/src/9/gnot/screen.c:83,85 – 1991/0706/sys/src/9/gnot/screen.c:83,135 (short | long) | ||
| 1991/0605 | while(n-- > 0) screenputc(*s++); | |
| 1990/03091 | } | |
| 1991/0706 | int screenbits(void) { if(*(uchar*)MOUSE & (1<<4)) return 2; else return 1; } void getcolor(ulong p, ulong *pr, ulong *pg, ulong *pb) { ulong ans; /* * The gnot says 0 is white (max intensity) */ if(gscreen.ldepth == 0){ if(p == 0) ans = ~0; else ans = 0; }else{ switch(p){ case 0: ans = ~0; break; case 1: ans = 0xAAAAAAAA; break; case 2: ans = 0x55555555; break; default: ans = 0; break; } *pr = *pg = *pb = ans; } int setcolor(ulong p, ulong r, ulong g, ulong b) { return 0; /* can't change mono screen colormap */ } int hwcursset(uchar *s, uchar *c, int ox, int oy) { return 0; } int hwcursmove(int x, int y) { return 0; } | |
| 1991/0706/sys/src/9/gnot/screen.c:9,14 – 1991/0707/sys/src/9/gnot/screen.c:9,15 (short | long) | ||
| 1990/03091 | ||
| 1990/0912 | #include <libg.h> | |
| 1990/0902 | #include <gnot.h> | |
| 1991/0707 | #include "mouse.h" | |
| 1990/03091 | #define MINX 8 | |
| 1991/0706/sys/src/9/gnot/screen.c:77,83 – 1991/0707/sys/src/9/gnot/screen.c:78,91 | ||
| 1990/03091 | } } | |
| 1991/0707 | /* Use the balu version */ | |
| 1990/03091 | void | |
| 1991/0707 | gbitblt(GBitmap *d, Point p, GBitmap *s, Rectangle r, Fcode f) { balubitblt(d, p, s, r, f); } void | |
| 1991/0605 | screenputs(char *s, int n) | |
| 1990/0329 | { | |
| 1991/0605 | while(n-- > 0) | |
| 1991/0706/sys/src/9/gnot/screen.c:112,117 – 1991/0707/sys/src/9/gnot/screen.c:120,126 | ||
| 1991/0706 | case 1: ans = 0xAAAAAAAA; break; case 2: ans = 0x55555555; break; default: ans = 0; break; | |
| 1991/0707 | } | |
| 1991/0706 | } *pr = *pg = *pb = ans; } | |
| 1991/0706/sys/src/9/gnot/screen.c:132,135 – 1991/0707/sys/src/9/gnot/screen.c:141,164 | ||
| 1991/0706 | hwcursmove(int x, int y) { return 0; | |
| 1991/0707 | } void mouseclock(void) /* called spl6 */ { ++mouse.clock; } void mousetry(Ureg *ur) { int s; if(mouse.clock && mouse.track && (ur->sr&SPL(7)) == 0 && canlock(&cursor)){ s = spl1(); mouseupdate(0); splx(s); unlock(&cursor); wakeup(&mouse.r); } | |
| 1991/0706 | } | |
| 1991/0707/sys/src/9/gnot/screen.c:9,16 – 1991/0708/sys/src/9/gnot/screen.c:9,19 (short | long) | ||
| 1990/03091 | ||
| 1990/0912 | #include <libg.h> | |
| 1990/0902 | #include <gnot.h> | |
| 1991/0707 |
| |
| 1991/0708 | #include "screen.h" | |
| 1990/03091 | ||
| 1991/0708 | /* gnot screen.h defines gbitblt to use balu; doesn't work here */ #undef gbitblt | |
| 1990/03091 | #define MINX 8 | |
| 1990/0902 | extern GFont defont0; | |
| 1991/0707/sys/src/9/gnot/screen.c:76,88 – 1991/0708/sys/src/9/gnot/screen.c:79,84 | ||
| 1990/03091 | buf[1] = 0; | |
| 1990/0914 | out.pos = gbitbltstring(&gscreen, out.pos, defont, buf, S); | |
| 1990/03091 | } | |
| 1991/0707 |
| |
| 1990/03091 |
| |
| 1991/0707 |
| |
| Too many diffs (26 > 25). Stopping. | ||