aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-25 12:44:53 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-25 12:44:53 +0000
commit71cd7398da2aa89d10c8268134292464d0dd22d2 (patch)
treea12a31807f3bdd841fe1280d6ce0c8d4a6008276 /mdoc_validate.c
parentc8ecda0e5cf2aaebd59fa2863d609c4f50215656 (diff)
downloadmandoc-71cd7398da2aa89d10c8268134292464d0dd22d2.tar.gz
mandoc-71cd7398da2aa89d10c8268134292464d0dd22d2.tar.zst
mandoc-71cd7398da2aa89d10c8268134292464d0dd22d2.zip
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).
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c4
1 files changed, 2 insertions, 2 deletions
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 <kristaps@bsd.lv>
*
@@ -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);