xref: /plan9/sys/src/cmd/htmlroff/t12.c (revision 426d2b71458df9b491ba6c167f699b3f1f7b0428)
1 #include "a.h"
2 
3 /*
4  * 12. Overstrike, bracket, line-drawing, graphics, and zero-width functions.
5  */
6 
7 /*
8 	\o'asdf'
9 	\zc
10 	\b'asdf'
11 	\l'Nc'
12 	\L'Nc'
13 	\D'xxx'
14 */
15 
16 int
e_o(void)17 e_o(void)
18 {
19 	pushinputstring(getqarg());
20 	return 0;
21 }
22 
23 int
e_z(void)24 e_z(void)
25 {
26 	getnext();
27 	return 0;
28 }
29 
30 int
e_b(void)31 e_b(void)
32 {
33 	pushinputstring(getqarg());
34 	return 0;
35 }
36 
37 int
e_l(void)38 e_l(void)
39 {
40 	getqarg();
41 	return 0;
42 }
43 
44 int
e_L(void)45 e_L(void)
46 {
47 	getqarg();
48 	return 0;
49 }
50 
51 int
e_D(void)52 e_D(void)
53 {
54 	getqarg();
55 	return 0;
56 }
57 
58 void
t12init(void)59 t12init(void)
60 {
61 	addesc('o', e_o, 0);
62 	addesc('z', e_z, 0);
63 	addesc('b', e_b, 0);
64 	addesc('l', e_l, 0);
65 	addesc('L', e_L, 0);
66 	addesc('D', e_D, 0);
67 }
68