diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-16 22:19:19 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-16 22:19:19 +0000 |
commit | 08508ed7e6368876201309aff6964a039f011045 (patch) | |
tree | df76daf7d386d0316d975ca1e126b77eb8efba16 /mdoc.c | |
parent | c13583a4f480a20774e466fbef54590c6dd6bb48 (diff) | |
download | mandoc-08508ed7e6368876201309aff6964a039f011045.tar.gz mandoc-08508ed7e6368876201309aff6964a039f011045.tar.zst mandoc-08508ed7e6368876201309aff6964a039f011045.zip |
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.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.64 2009/03/12 16:30:50 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.65 2009/03/16 22:19:19 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -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. */ |