]> git.cameronkatri.com Git - mandoc.git/blobdiff - chars.in
Start fixing issues that beck@ helped find:
[mandoc.git] / chars.in
index 5945aad06071806739b12328e91cd9f643a8b516..098504fa164838d1880529f1bddc00be448f62a0 100644 (file)
--- a/chars.in
+++ b/chars.in
@@ -1,6 +1,7 @@
-/*     $Id: chars.in,v 1.31 2010/07/26 13:59:00 kristaps Exp $ */
+/*     $Id: chars.in,v 1.46 2014/04/20 16:46:04 schwarze Exp $ */
 /*
- * Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  */
 
 /*
- * 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.
+ * The ASCII translation tables.
  *
- * 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.
+ * 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!
  */
 
-/* Non-breaking, non-collapsing space uses unit separator. */
+/* Special break control characters. */
 static const char ascii_nbrsp[2] = { ASCII_NBRSP, '\0' };
+static const char ascii_break[2] = { ASCII_BREAK, '\0' };
 
 CHAR_TBL_START
 
 /* Spacing. */
-CHAR("c",                      "",             0)
-CHAR("0",                      " ",            8194)
 CHAR(" ",                      ascii_nbrsp,    160)
 CHAR("~",                      ascii_nbrsp,    160)
-CHAR("%",                      "",             0)
-CHAR("&",                      "",             0)
-CHAR("^",                      "",             0)
+CHAR("0",                      " ",            8194)
 CHAR("|",                      "",             0)
+CHAR("^",                      "",             0)
+CHAR("&",                      "",             0)
+CHAR("%",                      "",             0)
+CHAR(":",                      ascii_break,    0)
+/* XXX The following three do not really belong into this file. */
+CHAR("t",                      "",             0)
+CHAR("c",                      "",             0)
 CHAR("}",                      "",             0)
 
 /* Accents. */
-CHAR("a\"",                    "\"",           779)
+CHAR("a\"",                    "\"",           733)
 CHAR("a-",                     "-",            175)
 CHAR("a.",                     ".",            729)
-CHAR("a^",                     "^",            770)
-BOTH("\'",                     "\'",           769)
-BOTH("aa",                     "\'",           769)
-BOTH("ga",                     "`",            768)
-BOTH("`",                      "`",            768)
-CHAR("ab",                     "`",            774)
-CHAR("ac",                     ",",            807)
-CHAR("ad",                     "\"",           776)
+CHAR("a^",                     "^",            94)
+CHAR("\'",                     "\'",           180)
+CHAR("aa",                     "\'",           180)
+CHAR("ga",                     "`",            96)
+CHAR("`",                      "`",            96)
+CHAR("ab",                     "`",            728)
+CHAR("ac",                     ",",            184)
+CHAR("ad",                     "\"",           168)
 CHAR("ah",                     "v",            711)
 CHAR("ao",                     "o",            730)
-CHAR("a~",                     "~",            771)
-CHAR("ho",                     ",",            808)
+CHAR("a~",                     "~",            126)
+CHAR("ho",                     ",",            731)
 CHAR("ha",                     "^",            94)
 CHAR("ti",                     "~",            126)
 
 /* Quotes. */
 CHAR("Bq",                     ",,",           8222)
 CHAR("bq",                     ",",            8218)
-BOTH("lq",                     "``",           8220)
-BOTH("rq",                     "\'\'",         8221)
+CHAR("lq",                     "``",           8220)
+CHAR("rq",                     "\'\'",         8221)
 CHAR("oq",                     "`",            8216)
 CHAR("cq",                     "\'",           8217)
 CHAR("aq",                     "\'",           39)
@@ -187,7 +189,7 @@ CHAR(":U",                  "U",            220)
 CHAR(":a",                     "a",            228)
 CHAR(":e",                     "e",            235)
 CHAR(":i",                     "i",            239)
-CHAR(":o",                     "o",            245)
+CHAR(":o",                     "o",            246)
 CHAR(":u",                     "u",            252)
 CHAR(":y",                     "y",            255)
 CHAR("\'A",                    "A",            193)
@@ -232,8 +234,8 @@ CHAR("<-",                  "<-",           8592)
 CHAR("->",                     "->",           8594)
 CHAR("<>",                     "<>",           8596)
 CHAR("da",                     "v",            8595)
-BOTH("ua",                     "^",            8593)
-BOTH("va",                     "^v",           8597)
+CHAR("ua",                     "^",            8593)
+CHAR("va",                     "^v",           8597)
 CHAR("lA",                     "<=",           8656)
 CHAR("rA",                     "=>",           8658)
 CHAR("hA",                     "<=>",          8660)
@@ -270,8 +272,8 @@ CHAR("di",                  "-:-",          247)
 CHAR("tdi",                    "-:-",          247)
 CHAR("f/",                     "/",            8260)
 CHAR("**",                     "*",            8727)
-BOTH("<=",                     "<=",           8804)
-BOTH(">=",                     ">=",           8805)
+CHAR("<=",                     "<=",           8804)
+CHAR(">=",                     ">=",           8805)
 CHAR("<<",                     "<<",           8810)
 CHAR(">>",                     ">>",           8811)
 CHAR("eq",                     "=",            61)
@@ -315,6 +317,9 @@ CHAR("Im",                  "I",            8465)
 CHAR("Re",                     "R",            8476)
 CHAR("pd",                     "a",            8706)
 CHAR("-h",                     "/h",           8463)
+CHAR("12",                     "1/2",          189)
+CHAR("14",                     "1/4",          188)
+CHAR("34",                     "3/4",          190)
 
 /* Ligatures. */
 CHAR("ff",                     "ff",           64256)
@@ -322,8 +327,8 @@ CHAR("fi",                  "fi",           64257)
 CHAR("fl",                     "fl",           64258)
 CHAR("Fi",                     "ffi",          64259)
 CHAR("Fl",                     "ffl",          64260)
-BOTH("AE",                     "AE",           198)
-BOTH("ae",                     "ae",           230)
+CHAR("AE",                     "AE",           198)
+CHAR("ae",                     "ae",           230)
 CHAR("OE",                     "OE",           338)
 CHAR("oe",                     "oe",           339)
 CHAR("ss",                     "ss",           223)
@@ -348,55 +353,6 @@ CHAR("Po",                 "L",            163)
 CHAR("Cs",                     "x",            164)
 CHAR("Fn",                     "f",            402)
 
-/* pod2man holdovers. */
-STRING("--",                   "--",           8212)
-STRING("PI",                   "pi",           960)
-STRING("L\"",                  "``",           8220)
-STRING("R\"",                  "\'\'",         8221)
-STRING("C+",                   "C++",          0)
-STRING("C`",                   "`",            8216)
-STRING("C\'",                  "\'",           8217)
-STRING("Aq",                   "\'",           39)
-STRING("^",                    "^",            94)
-STRING(",",                    ",",            44)
-STRING("~",                    "~",            126)
-STRING("/",                    "/",            47)
-STRING(":",                    "\"",           776)
-STRING("8",                    "B",            946)
-STRING("o",                    "o",            176)
-STRING("D-",                   "D",            208)
-STRING("d-",                   "o",            240)
-STRING("Th",                   "b",            222)
-STRING("th",                   "b",            254)
-
-/* Old style. */
-STRING("Am",                   "&",            38)
-STRING("Ba",                   "|",            124)
-STRING("Ge",                   ">=",           8805)
-STRING("Gt",                   ">",            62)
-STRING("If",                   "infinity",     0)
-STRING("Le",                   "<=",           8804)
-STRING("Lq",                   "``",           8220)
-STRING("Lt",                   "<",            60)
-STRING("Na",                   "NaN",          0)
-STRING("Ne",                   "!=",           8800)
-STRING("Pi",                   "pi",           960)
-STRING("Pm",                   "+-",           177)
-STRING("R",                    "(R)",          174)
-STRING("Rq",                   "\'\'",         8221)
-STRING("Tm",                   "tm",           8482)
-STRING("left-bracket",         "[",            91)
-STRING("left-parenthesis",     "(",            40)
-STRING("left-singlequote",     "`",            8216)
-STRING("lp",                   "(",            40)
-STRING("q",                    "\"",           34)
-STRING("quote-left",           "`",            8216)
-STRING("quote-right",          "\'",           8217)
-STRING("right-bracket",                "]",            93)
-STRING("right-parenthesis",    ")",            41)
-STRING("right-singlequote",    "\'",           8217)
-STRING("rp",                   ")",            41)
-
 /* Lines. */
 CHAR("ba",                     "|",            124)
 CHAR("br",                     "|",            9474)