diff options
author | 2010-05-15 18:25:50 +0000 | |
---|---|---|
committer | 2010-05-15 18:25:50 +0000 | |
commit | 92c0ca7f381ce064b39c434378700daf14b9b003 (patch) | |
tree | b9da072fb7a53f0cac694a9f1f17773a603d3165 /usr.bin/mandoc/mdoc_validate.c | |
parent | removed restriction on integer manual sections in -man; (diff) | |
download | wireguard-openbsd-92c0ca7f381ce064b39c434378700daf14b9b003.tar.xz wireguard-openbsd-92c0ca7f381ce064b39c434378700daf14b9b003.zip |
allow non-numeric manual sections in -mdoc;
while here, allow LIBRARY in section 9;
by kristaps@
Diffstat (limited to 'usr.bin/mandoc/mdoc_validate.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 239e16f1f9c..079cf795c42 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.53 2010/05/15 16:48:12 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.54 2010/05/15 18:25:51 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -1236,20 +1236,19 @@ post_sh_head(POST_ARGS) /* * Check particular section/manual conventions. LIBRARY can - * only occur in msec 2, 3 (TODO: are there more of these?). + * only occur in manual section 2, 3, and 9. */ switch (sec) { case (SEC_LIBRARY): - switch (mdoc->meta.msec) { - case (2): - /* FALLTHROUGH */ - case (3): + assert(mdoc->meta.msec); + if (*mdoc->meta.msec == '2') break; - default: - return(mdoc_nwarn(mdoc, mdoc->last, EWRONGMSEC)); - } - break; + if (*mdoc->meta.msec == '3') + break; + if (*mdoc->meta.msec == '9') + break; + return(mdoc_nwarn(mdoc, mdoc->last, EWRONGMSEC)); default: break; } |