|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1983 Regents of the University of California. ! 3: * All rights reserved. ! 4: * ! 5: * Redistribution and use in source and binary forms are permitted ! 6: * provided that the above copyright notice and this paragraph are ! 7: * duplicated in all such forms and that any documentation, ! 8: * advertising materials, and other materials related to such ! 9: * distribution and use acknowledge that the software was developed ! 10: * by the University of California, Berkeley. The name of the ! 11: * University may not be used to endorse or promote products derived ! 12: * from this software without specific prior written permission. ! 13: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 14: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 15: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 16: */ ! 17: ! 18: #ifndef lint ! 19: static char sccsid[] = "@(#)tth29.c 3.6 (Berkeley) 6/29/88"; ! 20: #endif /* not lint */ ! 21: ! 22: #include "ww.h" ! 23: #include "tt.h" ! 24: ! 25: /* ! 26: * H29 Driver ! 27: * ! 28: * WWM_USR mode is alternate character set. ! 29: * ! 30: kC|h29|heath-29|z29|zenith-29:\ ! 31: :am:bc=\ED:bt=\E-:cr=^M:do=^J:nl=^J:bl=^G:\ ! 32: :al=\EL:le=^H:bs:cd=\EJ:ce=\EK:cl=\EE:cm=\EY%+ %+ :co#80:dc=\EN:\ ! 33: :dl=1*\EM:do=\EB:ei=\EO:ho=\EH:im=\E@:li#24:mi:nd=\EC:as=\EF:ae=\EG:\ ! 34: :ms:ta=^I:pt:sr=\EI:se=\Eq:so=\Ep:up=\EA:vs=\Ex4:ve=\Ey4:\ ! 35: :kb=^H:ku=\EA:kd=\EB:kl=\ED:kr=\EC:kh=\EH:kn#1:k0=\E~:l0=HOME:\ ! 36: :k1=\ES:k2=\ET:k3=\EU:k4=\EV:k5=\EW:k6=\EP:k7=\EQ:k8=\ER:k9=\E01:\ ! 37: :es:hs:ts=\Ej\Ex5\Ex1\EY8%+ \Eo:fs=\Ek\Ey5:ds=\Ey1:us=\Es8:ue=\Es0: ! 38: * ! 39: */ ! 40: ! 41: #define pc(c) ttputc('c') ! 42: #define esc() pc(\033) ! 43: ! 44: h29_setmodes(new) ! 45: register new; ! 46: { ! 47: register modes = '0'; ! 48: ! 49: if (new & WWM_REV) ! 50: modes += 0x01; ! 51: if (new & WWM_BLK) ! 52: modes += 0x02; ! 53: if (new & WWM_DIM) ! 54: modes += 0x04; ! 55: if (new & WWM_UL) ! 56: modes += 0x08; ! 57: if (new & WWM_USR) ! 58: modes += 0x10; ! 59: esc(); ! 60: pc(s); ! 61: ttputc(modes); ! 62: if (new & WWM_GRP) { ! 63: if ((tt.tt_modes & WWM_GRP) == 0) ! 64: esc(), pc(F); ! 65: } else ! 66: if (tt.tt_modes & WWM_GRP) ! 67: esc(), pc(G); ! 68: tt.tt_modes = new; ! 69: } ! 70: ! 71: tt_h29() ! 72: { ! 73: if (tt_h19() < 0) ! 74: return -1; ! 75: tt.tt_setmodes = h29_setmodes; ! 76: tt.tt_availmodes |= WWM_BLK|WWM_UL|WWM_DIM|WWM_USR; ! 77: return 0; ! 78: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.