summaryrefslogtreecommitdiffstats
path: root/chars.in
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-09-17 07:41:28 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-09-17 07:41:28 +0000
commit06166fb5422a88c888ec7c043633b2fac84766aa (patch)
tree55137418db8558815c66dc101e15948c4b71fdfd /chars.in
parent16615cc0fed4c4eb818ce562c0cb3d225577a225 (diff)
downloadmandoc-06166fb5422a88c888ec7c043633b2fac84766aa.tar.gz
ascii_xxx -> chars_xxx (intended to hold more than just ascii encoding).
More html work.
Diffstat (limited to 'chars.in')
-rw-r--r--chars.in300
1 files changed, 300 insertions, 0 deletions
diff --git a/chars.in b/chars.in
new file mode 100644
index 00000000..57f2dee7
--- /dev/null
+++ b/chars.in
@@ -0,0 +1,300 @@
+/* $Id$ */
+/*
+ * Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * The ASCII translation tables. STRING corresponds to predefined
+ * strings (cf. mdoc_samples.7 and tmac/mdoc/doc-nroff). CHAR
+ * corresponds to special characters (cf. groff_char.7). BOTH contains
+ * sequences that are equivalent in both STRING and CHAR.
+ *
+ * Either way, the left-hand side corresponds to the input sequence (\x,
+ * \(xx, \*(xx and so on) whose length is listed second element. The
+ * right-hand side is what's produced by the front-end, with the fourth
+ * element being its length.
+ *
+ * XXX - C-escape strings!
+ * XXX - update LINES_MAX if adding more!
+ */
+
+STRING("Am", 2, "&", 1)
+STRING("Ba", 2, "|", 1)
+STRING("Ge", 2, ">=", 2)
+STRING("Gt", 2, ">", 1)
+STRING("If", 2, "infinity", 8)
+STRING("Le", 2, "<=", 2)
+STRING("Lq", 2, "``", 2)
+STRING("Lt", 2, "<", 1)
+STRING("Na", 2, "NaN", 3)
+STRING("Ne", 2, "!=", 2)
+STRING("Pi", 2, "pi", 2)
+STRING("Pm", 2, "+-", 2)
+STRING("R", 1, "(R)", 3)
+STRING("Rq", 2, "\'\'", 2)
+STRING("Tm", 2, "tm", 2)
+STRING("left-bracket", 12, "[", 1)
+STRING("left-parenthesis", 16, "(", 1)
+STRING("left-singlequote", 16, "`", 1)
+STRING("lp", 2, "(", 1)
+STRING("q", 1, "\"", 1)
+STRING("quote-left", 10, "`", 1)
+STRING("quote-right", 11, "\'", 1)
+STRING("right-bracket", 13, "]", 1)
+STRING("right-parenthesis", 17, ")", 1)
+STRING("right-singlequote", 17, "\'", 1)
+STRING("rp", 2, ")", 1)
+
+BOTH("<=", 2, "<=", 2)
+BOTH(">=", 2, ">=", 2)
+BOTH("aa", 2, "\'", 1)
+BOTH("ga", 2, "`", 1)
+BOTH("lq", 2, "``", 2)
+BOTH("rq", 2, "\'\'", 2)
+BOTH("ua", 2, "^", 1)
+
+CHAR(" ", 1, " ", 1)
+CHAR("!=", 2, "!=", 2)
+CHAR("%", 1, "", 0)
+CHAR("&", 1, "", 0)
+CHAR("(=", 2, "(=", 2)
+CHAR("**", 2, "*", 1)
+CHAR("*A", 2, "A", 1)
+CHAR("*B", 2, "B", 1)
+CHAR("*C", 2, "H", 1)
+CHAR("*D", 2, "/\\", 2)
+CHAR("*E", 2, "E", 1)
+CHAR("*F", 2, "O_", 1)
+CHAR("*G", 2, "|", 1)
+CHAR("*H", 2, "O", 1)
+CHAR("*I", 2, "I", 1)
+CHAR("*K", 2, "K", 1)
+CHAR("*L", 2, "/\\", 2)
+CHAR("*M", 2, "M", 1)
+CHAR("*N", 2, "N", 1)
+CHAR("*O", 2, "O", 1)
+CHAR("*P", 2, "TT", 2)
+CHAR("*Q", 2, "Y", 1)
+CHAR("*R", 2, "P", 1)
+CHAR("*S", 2, ">", 1)
+CHAR("*T", 2, "T", 1)
+CHAR("*U", 2, "Y", 1)
+CHAR("*W", 2, "O", 1)
+CHAR("*X", 2, "X", 1)
+CHAR("*Y", 2, "H", 1)
+CHAR("*Z", 2, "Z", 1)
+CHAR("*a", 2, "a", 1)
+CHAR("*b", 2, "B", 1)
+CHAR("*c", 2, "E", 1)
+CHAR("*d", 2, "d", 1)
+CHAR("*e", 2, "e", 1)
+CHAR("*f", 2, "o", 1)
+CHAR("*g", 2, "y", 1)
+CHAR("*h", 2, "0", 1)
+CHAR("*i", 2, "i", 1)
+CHAR("*k", 2, "k", 1)
+CHAR("*l", 2, "\\", 1)
+CHAR("*m", 2, "u", 1)
+CHAR("*n", 2, "v", 1)
+CHAR("*o", 2, "o", 1)
+CHAR("*p", 2, "n", 1)
+CHAR("*q", 2, "u", 1)
+CHAR("*r", 2, "p", 1)
+CHAR("*s", 2, "o", 1)
+CHAR("*t", 2, "t", 1)
+CHAR("*u", 2, "u", 1)
+CHAR("*w", 2, "w", 1)
+CHAR("*x", 2, "x", 1)
+CHAR("*y", 2, "n", 1)
+CHAR("*z", 2, "C", 1)
+CHAR("+-", 2, "+-", 2)
+CHAR("+f", 2, "o", 1)
+CHAR("+h", 2, "0", 1)
+CHAR("+p", 2, "w", 1)
+CHAR(",C", 2, "C", 1)
+CHAR(",c", 2, "c", 1)
+CHAR("-", 1, "-", 1)
+CHAR("->", 2, "->", 2)
+CHAR("-D", 2, "D", 1)
+CHAR(".", 1, ".", 1)
+CHAR("/L", 2, "L", 1)
+CHAR("/O", 2, "O", 1)
+CHAR("/l", 2, "l", 1)
+CHAR("/o", 2, "o", 1)
+CHAR("0", 1, " ", 1)
+CHAR(":A", 2, "A", 1)
+CHAR(":E", 2, "E", 1)
+CHAR(":I", 2, "I", 1)
+CHAR(":O", 2, "O", 1)
+CHAR(":U", 2, "U", 1)
+CHAR(":a", 2, "a", 1)
+CHAR(":e", 2, "e", 1)
+CHAR(":i", 2, "i", 1)
+CHAR(":o", 2, "o", 1)
+CHAR(":u", 2, "u", 1)
+CHAR(":y", 2, "y", 1)
+CHAR("<-", 2, "<-", 2)
+CHAR("<=", 2, "<=", 2)
+CHAR("<>", 2, "<>", 2)
+CHAR("=)", 2, "=)", 2)
+CHAR("==", 2, "==", 2)
+CHAR("=~", 2, "=~", 2)
+CHAR(">=", 2, ">=", 2)
+CHAR("AE", 2, "AE", 2)
+CHAR("AN", 2, "^", 1)
+CHAR("Ah", 2, "N", 1)
+CHAR("Bq", 2, ",,", 2)
+CHAR("Cs", 2, "x", 1)
+CHAR("Do", 2, "$", 1)
+CHAR("Eu", 2, "EUR", 3)
+CHAR("Fc", 2, ">>", 2)
+CHAR("Fi", 2, "ffi", 3)
+CHAR("Fl", 2, "ffl", 3)
+CHAR("Fn", 2, "f", 1)
+CHAR("Fo", 2, "<<", 2)
+CHAR("Im", 2, "I", 1)
+CHAR("OE", 2, "OE", 2)
+CHAR("OR", 2, "v", 1)
+CHAR("Po", 2, "L", 1)
+CHAR("Re", 2, "R", 1)
+CHAR("Sd", 2, "o", 1)
+CHAR("TP", 2, "b", 1)
+CHAR("Tp", 2, "b", 1)
+CHAR("Ye", 2, "Y", 1)
+CHAR("\'", 1, "\'", 1)
+CHAR("\'A", 2, "A", 1)
+CHAR("\'E", 2, "E", 1)
+CHAR("\'I", 2, "I", 1)
+CHAR("\'O", 2, "O", 1)
+CHAR("\'U", 2, "U", 1)
+CHAR("\'a", 2, "a", 1)
+CHAR("\'e", 2, "e", 1)
+CHAR("\'i", 2, "i", 1)
+CHAR("\'o", 2, "o", 1)
+CHAR("\'u", 2, "u", 1)
+CHAR("\\", 1, "\\", 1)
+CHAR("^", 1, "", 0)
+CHAR("^A", 2, "A", 1)
+CHAR("^E", 2, "E", 1)
+CHAR("^I", 2, "I", 1)
+CHAR("^O", 2, "O", 1)
+CHAR("^U", 2, "U", 1)
+CHAR("^a", 2, "a", 1)
+CHAR("^e", 2, "e", 1)
+CHAR("^i", 2, "i", 1)
+CHAR("^o", 2, "o", 1)
+CHAR("^u", 2, "u", 1)
+CHAR("`", 1, "`", 1)
+CHAR("`A", 2, "A", 1)
+CHAR("`E", 2, "E", 1)
+CHAR("`I", 2, "I", 1)
+CHAR("`O", 2, "O", 1)
+CHAR("`U", 2, "U", 1)
+CHAR("`a", 2, "a", 1)
+CHAR("`e", 2, "e", 1)
+CHAR("`i", 2, "i", 1)
+CHAR("`o", 2, "o", 1)
+CHAR("`u", 2, "u", 1)
+CHAR("a-", 2, "-", 1)
+CHAR("a\"", 2, "\"", 1)
+CHAR("a^", 2, "^", 1)
+CHAR("aa", 2, "\'", 1)
+CHAR("ab", 2, "`", 1)
+CHAR("ac", 2, ",", 1)
+CHAR("ad", 2, "\"", 1)
+CHAR("ae", 2, "ae", 2)
+CHAR("ah", 2, "v", 1)
+CHAR("ao", 2, "o", 1)
+CHAR("ap", 2, "~", 1)
+CHAR("aq", 2, "\'", 1)
+CHAR("a~", 2, "~", 1)
+CHAR("ba", 2, "|", 1)
+CHAR("bb", 2, "|", 1)
+CHAR("bq", 2, ",", 1)
+CHAR("bu", 2, "o", 1)
+CHAR("c", 1, "", 0)
+CHAR("ca", 2, "(^)", 3)
+CHAR("ci", 2, "O", 1)
+CHAR("co", 2, "(C)", 3)
+CHAR("ct", 2, "c", 1)
+CHAR("cu", 2, "U", 1)
+CHAR("dA", 2, "v", 1)
+CHAR("da", 2, "v", 1)
+CHAR("dd", 2, "=", 1)
+CHAR("de", 2, "o", 1)
+CHAR("dg", 2, "-", 1)
+CHAR("di", 2, "-:-", 3)
+CHAR("e", 1, "\\", 1)
+CHAR("em", 2, "--", 2)
+CHAR("en", 2, "-", 1)
+CHAR("eq", 2, "=", 1)
+CHAR("es", 2, "{}", 2)
+CHAR("eu", 2, "EUR", 3)
+CHAR("fa", 2, "V", 1)
+CHAR("fc", 2, ">", 1)
+CHAR("ff", 2, "ff", 2)
+CHAR("fi", 2, "fi", 2)
+CHAR("fl", 2, "fl", 2)
+CHAR("fo", 2, "<", 1)
+CHAR("ga", 2, "`", 1)
+CHAR("gr", 2, "V", 1)
+CHAR("hA", 2, "<=>", 3)
+CHAR("ho", 2, ",", 1)
+CHAR("hy", 2, "-", 1)
+CHAR("if", 2, "oo", 2)
+CHAR("lA", 2, "<=", 2)
+CHAR("lB", 2, "[", 1)
+CHAR("lC", 2, "{", 1)
+CHAR("la", 2, "<", 1)
+CHAR("lh", 2, "<=", 2)
+CHAR("mo", 2, "E", 1)
+CHAR("mu", 2, "x", 1)
+CHAR("na", 2, "NaN", 3)
+CHAR("nm", 2, "E", 1)
+CHAR("no", 2, "~", 1)
+CHAR("oA", 2, "A", 1)
+CHAR("oa", 2, "a", 1)
+CHAR("oe", 2, "oe", 2)
+CHAR("oq", 2, "`", 1)
+CHAR("pd", 2, "a", 1)
+CHAR("pl", 2, "+", 1)
+CHAR("ps", 2, "9|", 2)
+CHAR("r!", 2, "i", 1)
+CHAR("r?", 2, "c", 1)
+CHAR("rA", 2, "=>", 2)
+CHAR("rB", 2, "]", 1)
+CHAR("rC", 2, "}", 1)
+CHAR("ra", 2, ">", 1)
+CHAR("rg", 2, "(R)", 3)
+CHAR("rh", 2, "=>", 2)
+CHAR("sc", 2, "S", 1)
+CHAR("ss", 2, "ss", 2)
+CHAR("st", 2, "-)", 2)
+CHAR("te", 2, "3", 1)
+CHAR("tf", 2, ".:.", 3)
+CHAR("tm", 2, "tm", 2)
+CHAR("ts", 2, "s", 1)
+CHAR("uA", 2, "^", 1)
+CHAR("ua", 2, "^", 1)
+CHAR("|", 1, "", 0)
+CHAR("~", 1, " ", 1)
+CHAR("~=", 2, "~=", 2)
+CHAR("~A", 2, "A", 1)
+CHAR("~N", 2, "N", 1)
+CHAR("~O", 2, "O", 1)
+CHAR("~a", 2, "a", 1)
+CHAR("~n", 2, "n", 1)
+CHAR("~o", 2, "o", 1)
+CHAR("~~", 2, "~~", 2)