summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-16 22:19:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-16 22:19:19 +0000
commit0f78a072b396e52a775bdbe9f6687c67bf1439bb (patch)
treeb27a8c382f8dea4d64b1e228090f7c5197a03726 /mdoc.c
parent0f40156e5aa1d8acdf0a8c560bdeabb48fdd4271 (diff)
downloadmandoc-0f78a072b396e52a775bdbe9f6687c67bf1439bb.tar.gz
Fixed mdoc_phrase escape handling.
Added MDOC_IGNDELIM (Pf, soon Li, etc.). macro_constant_delimited ignargs -> argv.c parsing. Renamed macro functions to correspond to ontologies. `Fo' and `St' made callable (compat documented). strings.sh deprecated (directly using CPP). Abstracted ASCII translation into ascii.{c,in}. ASCII table uses a self-reordering chained hashtable. Removed old regressions.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mdoc.c b/mdoc.c
index aaee0efa..83bcb351 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -74,7 +74,8 @@ const char *const __mdoc_macronames[MDOC_MAX] = {
"Fr", "Ud", "Lb", "Ap",
"Lp", "Lk", "Mt", "Brq",
/* LINTED */
- "Bro", "Brc", "\%C"
+ "Bro", "Brc", "\%C", "Es",
+ "En"
};
const char *const __mdoc_argnames[MDOC_ARG_MAX] = {
@@ -527,9 +528,9 @@ parsemacro(struct mdoc *m, int ln, char *buf)
if (0 == buf[1])
return(1);
- if (isspace((unsigned char)buf[1])) {
+ if (' ' == buf[1]) {
i = 2;
- while (buf[i] && isspace((unsigned char)buf[i]))
+ while (buf[i] && ' ' == buf[i])
i++;
if (0 == buf[i])
return(1);
@@ -545,7 +546,7 @@ parsemacro(struct mdoc *m, int ln, char *buf)
for (i = 1; i < 5; i++) {
if (0 == (mac[i - 1] = buf[i]))
break;
- else if (isspace((unsigned char)buf[i]))
+ else if (' ' == buf[i])
break;
}
@@ -565,7 +566,7 @@ parsemacro(struct mdoc *m, int ln, char *buf)
/* The macro is sane. Jump to the next word. */
- while (buf[i] && isspace((unsigned char)buf[i]))
+ while (buf[i] && ' ' == buf[i])
i++;
/* Begin recursive parse sequence. */