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. --- libmandoc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmandoc.h') diff --git a/libmandoc.h b/libmandoc.h index bdc119d4..4b053032 100644 --- a/libmandoc.h +++ b/libmandoc.h @@ -1,4 +1,4 @@ -/* $Id: libmandoc.h,v 1.6 2010/05/25 12:37:20 kristaps Exp $ */ +/* $Id: libmandoc.h,v 1.7 2010/06/09 19:22:56 kristaps Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons * @@ -19,7 +19,7 @@ __BEGIN_DECLS -int mandoc_special(const char *); +int mandoc_special(char *); void *mandoc_calloc(size_t, size_t); char *mandoc_strdup(const char *); void *mandoc_malloc(size_t); -- cgit v1.2.3-56-ge451