-/* $Id: man_validate.c,v 1.41 2010/05/17 22:11:42 kristaps Exp $ */
+/* $Id: man_validate.c,v 1.43 2010/06/09 19:22:56 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
#include "libman.h"
#include "libmandoc.h"
-#define CHKARGS struct man *m, const struct man_node *n
+#define CHKARGS struct man *m, struct man_node *n
typedef int (*v_check)(CHKARGS);
int
-man_valid_pre(struct man *m, const struct man_node *n)
+man_valid_pre(struct man *m, struct man_node *n)
{
v_check *cp;
static int
check_text(CHKARGS)
{
- const char *p;
+ char *p;
int pos, c;
assert(n->string);
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);