xref: /original-bsd/usr.bin/window/ttwyse75.c (revision 6fcea464)
1 /*
2  * Copyright 1987 by David C. Elliott, MIPS Computer Systems.
3  *
4  * Unlimited redistribution allowed as long as this notice
5  * is kept intact.
6  */
7 
8 /*
9  * Copyright (c) 1988 The Regents of the University of California.
10  * All rights reserved.
11  *
12  * This code is derived from software contributed to Berkeley by
13  * David C. Elliott.
14  *
15  * Redistribution and use in source and binary forms are permitted
16  * provided that the above copyright notice and this paragraph are
17  * duplicated in all such forms and that any documentation,
18  * advertising materials, and other materials related to such
19  * distribution and use acknowledge that the software was developed
20  * by the University of California, Berkeley.  The name of the
21  * University may not be used to endorse or promote products derived
22  * from this software without specific prior written permission.
23  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
24  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
25  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
26  */
27 
28 #ifndef lint
29 static char sccsid[] = "@(#)ttwyse75.c	3.2 (Berkeley) 12/28/88";
30 #endif /* not lint */
31 
32 #include "ww.h"
33 #include "tt.h"
34 
35 #define G (WWM_GRP << WWC_MSHIFT)
36 short wyse75_frame[16] = {
37 	' ',	'x'|G,	'q'|G,	'm'|G,
38 	'x'|G,	'x'|G,	'l'|G,	't'|G,
39 	'q'|G,	'j'|G,	'q'|G,	'v'|G,
40 	'k'|G,	'u'|G,	'w'|G,	'v'|G
41 };
42 
43 extern struct tt_str *gen_AS;
44 extern struct tt_str *gen_AE;
45 
46 tt_wyse75()
47 {
48 	static struct tt_str ae = { "\033(B", 3 };
49 	static struct tt_str as = { "\033(0", 3 };
50 
51 	if (tt_generic() < 0)
52 		return -1;
53 	tt.tt_availmodes |= WWM_GRP;
54 	tt.tt_frame = wyse75_frame;
55 	if (gen_AS == 0)
56 		gen_AS = &as;
57 	if (gen_AE == 0)
58 		gen_AE = &ae;
59 	return 0;
60 }
61