]> git.cameronkatri.com Git - mandoc.git/commitdiff
Smarten BADCHAR check to allow ASCII_HYPH.
authorKristaps Dzonsons <kristaps@bsd.lv>
Tue, 25 May 2010 12:44:53 +0000 (12:44 +0000)
committerKristaps Dzonsons <kristaps@bsd.lv>
Tue, 25 May 2010 12:44:53 +0000 (12:44 +0000)
Fix index.sgml not to puke (the relevant section will be re-written for the release anyway, but I hate seeing errors).

index.sgml
man_validate.c
mdoc_validate.c

index abc99b19e3a6f9cf4256853d6bbd8c5e6479a8d5..64020151a93073fc4af0bfa15e579313f63dffa8 100644 (file)
                                                <TBODY>
                                                        <TR>
                                                                <TD VALIGN="top"><SPAN CLASS="date">xx-05-2010</SPAN></TD>
                                                <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
                                                                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
                        <TR>
                                <TD>
                                        <DIV CLASS="foot">
                        <TR>
                                <TD>
                                        <DIV CLASS="foot">
-                                               Copyright &#169; 2008&#8211;2010 Kristaps Dzonsons, $Date: 2010/05/17 23:50:05 $
+                                               Copyright &#169; 2008&#8211;2010 Kristaps Dzonsons, $Date: 2010/05/25 12:44:53 $
                                        </DIV>
                                </TD>
                        </TR>
                                        </DIV>
                                </TD>
                        </TR>
index d13e5e0419f0dc9968866a403b6f7f5d441bb6bb..00ad2ef9986d26bdb2044c7de1bb154bbf80e101 100644 (file)
@@ -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 <kristaps@kth.se>
  *
 /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -223,7 +223,7 @@ check_text(CHKARGS)
                                return(c);
                }
 
                                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);
                        continue;
                if ( ! man_pmsg(m, n->line, pos, MANDOCERR_BADCHAR))
                        return(0);
index ded07a083895adad2fce97dfe935672fd5e956be..409b462472184ca90d8c4d7e0708f055e9413d60 100644 (file)
@@ -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>
  *
 /*
  * 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);
                        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);
 
                        if ( ! mdoc_pmsg(mdoc, line, pos, MANDOCERR_BADCHAR))
                                return(0);