From: Kristaps Dzonsons Date: Tue, 25 May 2010 12:44:53 +0000 (+0000) Subject: Smarten BADCHAR check to allow ASCII_HYPH. X-Git-Tag: VERSION_1_10_1~72 X-Git-Url: https://git.cameronkatri.com/mandoc.git/commitdiff_plain/71cd7398da2aa89d10c8268134292464d0dd22d2?ds=sidebyside;hp=c8ecda0e5cf2aaebd59fa2863d609c4f50215656 Smarten BADCHAR check to allow ASCII_HYPH. Fix index.sgml not to puke (the relevant section will be re-written for the release anyway, but I hate seeing errors). --- diff --git a/index.sgml b/index.sgml index abc99b19..64020151 100644 --- a/index.sgml +++ b/index.sgml @@ -252,6 +252,7 @@ xx-05-2010 + Day 1 of Rostock hackathon: proper handling of quotations in tab-separated column lists, finished patching of SYNOPSIS breaking (1.9.25), fixed pre-comment white-space stripping, added end-of-sentence spacing to black partial-implicit @@ -370,7 +371,7 @@
- Copyright © 2008–2010 Kristaps Dzonsons, $Date: 2010/05/17 23:50:05 $ + Copyright © 2008–2010 Kristaps Dzonsons, $Date: 2010/05/25 12:44:53 $
diff --git a/man_validate.c b/man_validate.c index d13e5e04..00ad2ef9 100644 --- a/man_validate.c +++ b/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.41 2010/05/17 22:11:42 kristaps Exp $ */ +/* $Id: man_validate.c,v 1.42 2010/05/25 12:44:53 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -223,7 +223,7 @@ check_text(CHKARGS) return(c); } - if ('\t' == *p || isprint((u_char)*p)) + if ('\t' == *p || isprint((u_char)*p) || ASCII_HYPH == *p) continue; if ( ! man_pmsg(m, n->line, pos, MANDOCERR_BADCHAR)) return(0); diff --git a/mdoc_validate.c b/mdoc_validate.c index ded07a08..409b4624 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.81 2010/05/24 12:31:16 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.82 2010/05/25 12:44:53 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -463,7 +463,7 @@ check_text(struct mdoc *mdoc, int line, int pos, const char *p) if ( ! (MDOC_LITERAL & mdoc->flags)) if ( ! mdoc_pmsg(mdoc, line, pos, MANDOCERR_BADCHAR)) return(0); - } else if ( ! isprint((u_char)*p)) + } else if ( ! isprint((u_char)*p) && ASCII_HYPH != *p) if ( ! mdoc_pmsg(mdoc, line, pos, MANDOCERR_BADCHAR)) return(0);