From 94c8a196416f057a484f8dc53340f3b1d8944ea7 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 5 Apr 2011 22:22:33 +0000 Subject: 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 --- roff.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/roff.c b/roff.c index 3aa3972b..62633bde 100644 --- a/roff.c +++ b/roff.c @@ -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 * Copyright (c) 2010, 2011 Ingo Schwarze @@ -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++; /* -- cgit v1.2.3