diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-12 15:55:11 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-12 15:55:11 +0000 |
commit | dd35a6706a756677ff1c2734a6eb2fad8a6784fb (patch) | |
tree | d375e2db00e997a1b57edabdfeabcb581c94d6b1 /mdoc.c | |
parent | cef86e599370c167a95de14673094692334f586e (diff) | |
download | mandoc-dd35a6706a756677ff1c2734a6eb2fad8a6784fb.tar.gz |
NetBSD '.[[:whitespace:]]*' properly handled.
mdoc.3 indicates compatibilities and bugs.
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -520,7 +520,19 @@ parsemacro(struct mdoc *m, int ln, char *buf) int i, c; char mac[5]; - /* Comments are quickly ignored. */ + /* Comments and empties are quickly ignored. */ + + if (0 == buf[1]) + return(1); + + if (isspace((unsigned char)buf[1])) { + i = 2; + while (buf[i] && isspace((unsigned char)buf[i])) + i++; + if (0 == buf[i]) + return(1); + return(mdoc_perr(m, ln, 1, "invalid syntax")); + } if (buf[1] && '\\' == buf[1]) if (buf[2] && '\"' == buf[2]) |