From 1aea6f050761f70bdfd8647816b23774b971050c Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 9 Jun 2010 19:22:56 +0000 Subject: 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. --- man_validate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'man_validate.c') diff --git a/man_validate.c b/man_validate.c index 00ad2ef9..8d04e2ea 100644 --- a/man_validate.c +++ b/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.42 2010/05/25 12:44:53 kristaps Exp $ */ +/* $Id: man_validate.c,v 1.43 2010/06/09 19:22:56 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -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); -- cgit v1.2.3-56-ge451