diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2011-04-05 22:22:33 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2011-04-05 22:22:33 +0000 |
commit | 94c8a196416f057a484f8dc53340f3b1d8944ea7 (patch) | |
tree | 0883bfe8fd6ffb2808e4eb068533c390555ea9e3 /roff.c | |
parent | a6aa462c05e3d4172d4ea1ef30658fab2b5f89c6 (diff) | |
download | mandoc-94c8a196416f057a484f8dc53340f3b1d8944ea7.tar.gz mandoc-94c8a196416f057a484f8dc53340f3b1d8944ea7.tar.zst mandoc-94c8a196416f057a484f8dc53340f3b1d8944ea7.zip |
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
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.130 2011/03/29 09:00:48 kristaps Exp $ */ +/* $Id: roff.c,v 1.131 2011/04/05 22:22:33 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -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++; /* |