summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-04-05 22:22:33 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-04-05 22:22:33 +0000
commitefc9d46da492571c565d083e947aea288dafb2d4 (patch)
tree0cf9905627db984531d52c821b43c7d35cd7672b
parentc73e7b1e9e172c0f362a6145a6b377c517a5e289 (diff)
downloadmandoc-efc9d46da492571c565d083e947aea288dafb2d4.tar.gz
On .de macro lines, after the macro name, space and tab are equivalent.
Bug reported by Tristan dot LeGuern at gmail dot com in fvwm2(1). tweaks and ok kristaps@; earlier version looked good to espie@ as well
-rw-r--r--roff.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/roff.c b/roff.c
index e5f5a2a2..4789f7c8 100644
--- a/roff.c
+++ b/roff.c
@@ -739,10 +739,10 @@ roff_block(ROFF_ARGS)
mandoc_msg(MANDOCERR_REQUEST, r->parse, ln, ppos,
roffs[tok].name);
- while ((*bufp)[pos] && ' ' != (*bufp)[pos])
+ while ((*bufp)[pos] && ! isspace((unsigned char)(*bufp)[pos]))
pos++;
- while (' ' == (*bufp)[pos])
+ while (isspace((unsigned char)(*bufp)[pos]))
(*bufp)[pos++] = '\0';
}
@@ -763,9 +763,7 @@ roff_block(ROFF_ARGS)
/* If present, process the custom end-of-line marker. */
sv = pos;
- while ((*bufp)[pos] &&
- ' ' != (*bufp)[pos] &&
- '\t' != (*bufp)[pos])
+ while ((*bufp)[pos] && ! isspace((unsigned char)(*bufp)[pos]))
pos++;
/*