diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-04-03 16:24:18 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-04-03 16:24:18 +0000 |
commit | 2563c9e78c5ee0daf4204e7057cd9e7b8e7c16e0 (patch) | |
tree | ba08a70e810a4c1c88c0624095345dc0a711d660 /usr.bin/mandoc/mdoc.c | |
parent | fa976d0ce1ef36d6cfc730237373ffbf339d58a9 (diff) |
* outside literal context in mdoc(7), handle blank lines like .Pp
* a missing NAME section in mdoc(7) need not be fatal
ok deraadt@
Diffstat (limited to 'usr.bin/mandoc/mdoc.c')
-rw-r--r-- | usr.bin/mandoc/mdoc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c index 1bdf339541b..13f3683450d 100644 --- a/usr.bin/mandoc/mdoc.c +++ b/usr.bin/mandoc/mdoc.c @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.37 2010/04/02 12:39:47 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.38 2010/04/03 16:24:17 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -596,8 +596,12 @@ parsetext(struct mdoc *m, int line, char *buf) for (i = 0; ' ' == buf[i]; i++) /* Skip leading whitespace. */ ; - if ('\0' == buf[i]) - return(mdoc_perr(m, line, 0, ENOBLANK)); + if ('\0' == buf[i]) { + if ( ! mdoc_pwarn(m, line, 0, ENOBLANK)) + return(0); + if ( ! mdoc_elem_alloc(m, line, 0, MDOC_Pp, NULL)) + return(0); + } /* * Break apart a free-form line into tokens. Spaces are |