new copyright notice
[unix-history] / usr / src / usr.bin / window / tth29.c
CommitLineData
60de5df9 1/*
46e9ea25
KB
2 * Copyright (c) 1983 Regents of the University of California.
3 * All rights reserved.
4 *
87f529ec 5 * %sccs.include.redist.c%
60de5df9
EW
6 */
7
46e9ea25 8#ifndef lint
87f529ec 9static char sccsid[] = "@(#)tth29.c 3.9 (Berkeley) %G%";
46e9ea25
KB
10#endif /* not lint */
11
a0a9320a
EW
12#include "ww.h"
13#include "tt.h"
27c9228e 14#include "char.h"
a0a9320a
EW
15
16/*
a6833679
EW
17 * H29 Driver
18 *
19 * WWM_USR mode is alternate character set.
20 *
a0a9320a
EW
21kC|h29|heath-29|z29|zenith-29:\
22 :am:bc=\ED:bt=\E-:cr=^M:do=^J:nl=^J:bl=^G:\
23 :al=\EL:le=^H:bs:cd=\EJ:ce=\EK:cl=\EE:cm=\EY%+ %+ :co#80:dc=\EN:\
24 :dl=1*\EM:do=\EB:ei=\EO:ho=\EH:im=\E@:li#24:mi:nd=\EC:as=\EF:ae=\EG:\
25 :ms:ta=^I:pt:sr=\EI:se=\Eq:so=\Ep:up=\EA:vs=\Ex4:ve=\Ey4:\
26 :kb=^H:ku=\EA:kd=\EB:kl=\ED:kr=\EC:kh=\EH:kn#1:k0=\E~:l0=HOME:\
27 :k1=\ES:k2=\ET:k3=\EU:k4=\EV:k5=\EW:k6=\EP:k7=\EQ:k8=\ER:k9=\E01:\
28 :es:hs:ts=\Ej\Ex5\Ex1\EY8%+ \Eo:fs=\Ek\Ey5:ds=\Ey1:us=\Es8:ue=\Es0:
a6833679
EW
29 *
30 */
a0a9320a 31
a0a9320a
EW
32h29_setmodes(new)
33register new;
34{
35 register modes = '0';
36
37 if (new & WWM_REV)
a6833679 38 modes += 0x01;
a0a9320a 39 if (new & WWM_BLK)
a6833679
EW
40 modes += 0x02;
41 if (new & WWM_DIM)
42 modes += 0x04;
a0a9320a 43 if (new & WWM_UL)
a6833679
EW
44 modes += 0x08;
45 if (new & WWM_USR)
46 modes += 0x10;
27c9228e
EW
47 ttesc('s');
48 ttputc(modes);
a0a9320a
EW
49 if (new & WWM_GRP) {
50 if ((tt.tt_modes & WWM_GRP) == 0)
27c9228e 51 ttesc('F');
a0a9320a
EW
52 } else
53 if (tt.tt_modes & WWM_GRP)
27c9228e 54 ttesc('G');
a0a9320a
EW
55 tt.tt_modes = new;
56}
57
a0a9320a
EW
58tt_h29()
59{
60 if (tt_h19() < 0)
61 return -1;
c1a57462 62 tt.tt_setmodes = h29_setmodes;
a6833679 63 tt.tt_availmodes |= WWM_BLK|WWM_UL|WWM_DIM|WWM_USR;
a0a9320a
EW
64 return 0;
65}