summaryrefslogtreecommitdiffstats
path: root/mdoc_argv.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-05-15 08:54:04 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-05-15 08:54:04 +0000
commit5fadafddea49706c5055def118c8904d73035bcc (patch)
treef057963290f09cf5a35666f3a40cdd59169db1ea /mdoc_argv.c
parent3064cfc6740a059eb0e9762939e5241b95eeba7e (diff)
downloadmandoc-5fadafddea49706c5055def118c8904d73035bcc.tar.gz
Distinguish OPEN, MIDDLE and CLOSE delimiters (using an enum).
Only OPEN are drawn before the beginning of a macro; this is new, before this, MIDDLE ('|') were drawn in front, too. Only CLOSE are pushed after the end of a macro (as before). ok kristaps@
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r--mdoc_argv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c
index 95c92e3e..33d03062 100644
--- a/mdoc_argv.c
+++ b/mdoc_argv.c
@@ -421,9 +421,10 @@ args(struct mdoc *m, int line, int *pos,
* we ONLY care about closing delimiters.
*/
- if ((fl & ARGS_DELIM) && mdoc_iscdelim(buf[*pos]) > 1) {
+ if ((fl & ARGS_DELIM) && DELIM_CLOSE == mdoc_iscdelim(buf[*pos])) {
for (i = *pos; buf[i]; ) {
- if (mdoc_iscdelim(buf[i]) < 2)
+ enum mdelim d = mdoc_iscdelim(buf[i]);
+ if (DELIM_NONE == d || DELIM_OPEN == d)
break;
i++;
if ('\0' == buf[i] || ' ' != buf[i])