summaryrefslogtreecommitdiffstats
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
commit2b24cf82e4bfafe4a1ed27ccc831c8f46f317fe1 (patch)
tree70fcfc82eb2a2a618fa7fb3ae7f502d79dd4525e
parentc21b0099041cd45b4ceafb3d8c1021ea8f04e0a2 (diff)
downloadmandoc-2b24cf82e4bfafe4a1ed27ccc831c8f46f317fe1.tar.gz
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).
-rw-r--r--index.sgml1
-rw-r--r--man_validate.c2
-rw-r--r--mdoc_validate.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/index.sgml b/index.sgml
index bc99c57f..4d07e654 100644
--- a/index.sgml
+++ b/index.sgml
@@ -252,6 +252,7 @@
<TBODY>
<TR>
<TD VALIGN="top"><SPAN CLASS="date">xx-05-2010</SPAN></TD>
+ <TD VALIGN="top">
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
diff --git a/man_validate.c b/man_validate.c
index c568e4cb..362b0da9 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -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 a4852804..7527cfb0 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -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);