1 /* $Id: chars.in,v 1.46 2014/04/20 16:46:04 schwarze Exp $ */
3 * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4 * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 * The ASCII translation tables.
22 * The left-hand side corresponds to the input sequence (\x, \(xx, \*(xx
23 * and so on) whose length is listed second element. The right-hand
24 * side is what's produced by the front-end, with the fourth element
27 * XXX - C-escape strings!
28 * XXX - update LINES_MAX if adding more!
31 /* Special break control characters. */
32 static const char ascii_nbrsp[2] = { ASCII_NBRSP, '\0' };
33 static const char ascii_break[2] = { ASCII_BREAK, '\0' };
38 CHAR(" ", ascii_nbrsp, 160)
39 CHAR("~", ascii_nbrsp, 160)
45 CHAR(":", ascii_break, 0)
46 /* XXX The following three do not really belong into this file. */
52 CHAR("a\"", "\"", 733)
71 CHAR("Bq", ",,", 8222)
73 CHAR("lq", "``", 8220)
74 CHAR("rq", "\'\'", 8221)
76 CHAR("cq", "\'", 8217)
92 CHAR("braceex", "|", 9130)
93 CHAR("bracketlefttp", "|", 9121)
94 CHAR("bracketleftbp", "|", 9123)
95 CHAR("bracketleftex", "|", 9122)
96 CHAR("bracketrighttp", "|", 9124)
97 CHAR("bracketrightbp", "|", 9126)
98 CHAR("bracketrightex", "|", 9125)
99 CHAR("lt", ",-", 9127)
100 CHAR("bracelefttp", ",-", 9127)
101 CHAR("lk", "{", 9128)
102 CHAR("braceleftmid", "{", 9128)
103 CHAR("lb", ",-", 9129)
104 CHAR("braceleftbp", "`-", 9129)
105 CHAR("braceleftex", "|", 9130)
106 CHAR("rt", "-.", 9131)
107 CHAR("bracerighttp", "-.", 9131)
108 CHAR("rk", "}", 9132)
109 CHAR("bracerightmid", "}", 9132)
110 CHAR("rb", "-\'", 9133)
111 CHAR("bracerightbp", "-\'", 9133)
112 CHAR("bracerightex", "|", 9130)
113 CHAR("parenlefttp", "/", 9115)
114 CHAR("parenleftbp", "\\", 9117)
115 CHAR("parenleftex", "|", 9116)
116 CHAR("parenrighttp", "\\", 9118)
117 CHAR("parenrightbp", "/", 9120)
118 CHAR("parenrightex", "|", 9119)
120 /* Greek characters. */
124 CHAR("*D", "/\\", 916)
131 CHAR("*L", "/\\", 923)
136 CHAR("*P", "TT", 928)
141 CHAR("*F", "O_", 934)
155 CHAR("*l", "\\", 955)
172 CHAR("+e", "e", 1013)
175 /* Accented letters. */
195 CHAR("\'A", "A", 193)
196 CHAR("\'E", "E", 201)
197 CHAR("\'I", "I", 205)
198 CHAR("\'O", "O", 211)
199 CHAR("\'U", "U", 218)
200 CHAR("\'a", "a", 225)
201 CHAR("\'e", "e", 233)
202 CHAR("\'i", "i", 237)
203 CHAR("\'o", "o", 243)
204 CHAR("\'u", "u", 250)
232 /* Arrows and lines. */
233 CHAR("<-", "<-", 8592)
234 CHAR("->", "->", 8594)
235 CHAR("<>", "<>", 8596)
236 CHAR("da", "v", 8595)
237 CHAR("ua", "^", 8593)
238 CHAR("va", "^v", 8597)
239 CHAR("lA", "<=", 8656)
240 CHAR("rA", "=>", 8658)
241 CHAR("hA", "<=>", 8660)
242 CHAR("dA", "v", 8659)
243 CHAR("uA", "^", 8657)
244 CHAR("vA", "^=v", 8661)
247 CHAR("AN", "^", 8743)
248 CHAR("OR", "v", 8744)
250 CHAR("tno", "~", 172)
251 CHAR("te", "3", 8707)
252 CHAR("fa", "V", 8704)
253 CHAR("st", "-)", 8715)
254 CHAR("tf", ".:.", 8756)
255 CHAR("3d", ".:.", 8756)
260 CHAR("mi", "-", 8722)
262 CHAR("-+", "-+", 8723)
263 CHAR("+-", "+-", 177)
264 CHAR("t+-", "+-", 177)
266 CHAR("md", ".", 8901)
268 CHAR("tmu", "x", 215)
269 CHAR("c*", "x", 8855)
270 CHAR("c+", "+", 8853)
271 CHAR("di", "-:-", 247)
272 CHAR("tdi", "-:-", 247)
273 CHAR("f/", "/", 8260)
274 CHAR("**", "*", 8727)
275 CHAR("<=", "<=", 8804)
276 CHAR(">=", ">=", 8805)
277 CHAR("<<", "<<", 8810)
278 CHAR(">>", ">>", 8811)
280 CHAR("!=", "!=", 8800)
281 CHAR("==", "==", 8801)
282 CHAR("ne", "!==", 8802)
283 CHAR("=~", "=~", 8773)
284 CHAR("-~", "-~", 8771)
285 CHAR("ap", "~", 8764)
286 CHAR("~~", "~~", 8776)
287 CHAR("~=", "~=", 8780)
288 CHAR("pt", "oc", 8733)
289 CHAR("es", "{}", 8709)
290 CHAR("mo", "E", 8712)
291 CHAR("nm", "!E", 8713)
292 CHAR("sb", "(=", 8834)
293 CHAR("nb", "(!=", 8836)
294 CHAR("sp", "=)", 8835)
295 CHAR("nc", "!=)", 8837)
296 CHAR("ib", "(=", 8838)
297 CHAR("ip", "=)", 8839)
298 CHAR("ca", "(^)", 8745)
299 CHAR("cu", "U", 8746)
300 CHAR("/_", "/_", 8736)
301 CHAR("pp", "_|_", 8869)
302 CHAR("is", "I", 8747)
303 CHAR("integral", "I", 8747)
304 CHAR("sum", "E", 8721)
305 CHAR("product", "TT", 8719)
306 CHAR("coproduct", "U", 8720)
307 CHAR("gr", "V", 8711)
308 CHAR("sr", "\\/", 8730)
309 CHAR("sqrt", "\\/", 8730)
310 CHAR("lc", "|~", 8968)
311 CHAR("rc", "~|", 8969)
312 CHAR("lf", "|_", 8970)
313 CHAR("rf", "_|", 8971)
314 CHAR("if", "oo", 8734)
315 CHAR("Ah", "N", 8501)
316 CHAR("Im", "I", 8465)
317 CHAR("Re", "R", 8476)
318 CHAR("pd", "a", 8706)
319 CHAR("-h", "/h", 8463)
320 CHAR("12", "1/2", 189)
321 CHAR("14", "1/4", 188)
322 CHAR("34", "3/4", 190)
325 CHAR("ff", "ff", 64256)
326 CHAR("fi", "fi", 64257)
327 CHAR("fl", "fl", 64258)
328 CHAR("Fi", "ffi", 64259)
329 CHAR("Fl", "ffl", 64260)
330 CHAR("AE", "AE", 198)
331 CHAR("ae", "ae", 230)
332 CHAR("OE", "OE", 338)
333 CHAR("oe", "oe", 339)
334 CHAR("ss", "ss", 223)
335 CHAR("IJ", "IJ", 306)
336 CHAR("ij", "ij", 307)
338 /* Special letters. */
349 CHAR("Eu", "EUR", 8364)
350 CHAR("eu", "EUR", 8364)
358 CHAR("br", "|", 9474)
360 CHAR("rl", "-", 8254)
366 CHAR("ci", "o", 9675)
367 CHAR("bu", "o", 8226)
368 CHAR("dd", "=", 8225)
369 CHAR("dg", "-", 8224)
370 CHAR("lz", "<>", 9674)
371 CHAR("sq", "[]", 9633)
372 CHAR("ps", "9|", 182)
374 CHAR("lh", "<=", 9756)
375 CHAR("rh", "=>", 9758)
378 CHAR("CR", "_|", 8629)
379 CHAR("OK", "\\/", 10003)
382 CHAR("co", "(C)", 169)
383 CHAR("rg", "(R)", 174)
384 CHAR("tm", "tm", 8482)
390 CHAR("em", "--", 8212)
391 CHAR("en", "-", 8211)
392 CHAR("hy", "-", 8208)
397 CHAR("%0", "%o", 8240)
398 CHAR("fm", "\'", 8242)
399 CHAR("sd", "\"", 8243)
400 CHAR("mc", "mu", 181)