summaryrefslogtreecommitdiffstats
path: root/man_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-09 19:22:56 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-09 19:22:56 +0000
commitc92be367f7c707418fe2a4beb17688dffa614781 (patch)
treead1bf921cea730c33b344ec8d7a420a9c758d32d /man_validate.c
parenta560a18cf09008f29e00db4014ecd394727489c8 (diff)
downloadmandoc-c92be367f7c707418fe2a4beb17688dffa614781.tar.gz
Squash bug noted by Ulrich Spoerlein where "-" were being converted to
ASCII_HYPH, as per normal, but were screwing up mandoc_special(). Fixed by making mandoc_special() first check isspace() instead of ! isgraph(), then normalise its string as it passes out. This require de-constifying some validation routines not already de-constified (those in libman), but that's ok, because I'd like to be pushing actions into validation routines to save on space and redundant calculations.
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/man_validate.c b/man_validate.c
index 362b0da9..38a36258 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -31,7 +31,7 @@
#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);
@@ -101,7 +101,7 @@ static const struct man_valid man_valids[MAN_MAX] = {
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;
@@ -204,7 +204,7 @@ check_title(CHKARGS)
static int
check_text(CHKARGS)
{
- const char *p;
+ char *p;
int pos, c;
assert(n->string);