From 556aafc9aef6fb2d86a1cc5928f39267b81bc0a8 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 7 Aug 2010 20:57:33 +0000 Subject: Clean out the isgraph() checks in mdoc.c and man.c. These code paths were never taken since main.c begin skipping over unrecognisable characters, so they were noops. --- man.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'man.c') diff --git a/man.c b/man.c index 228ca0e0..b4f4f1e3 100644 --- a/man.c +++ b/man.c @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -483,21 +482,12 @@ man_pmacro(struct man *m, int ln, char *buf, int offs) /* Copy the first word into a nil-terminated buffer. */ - for (j = 0; j < 4; j++, i++) { + for (j = 0; j < 4; j++, i++) if ('\0' == (mac[j] = buf[i])) break; else if (' ' == buf[i]) break; - /* Check for invalid characters. */ - - if (isgraph((u_char)buf[i])) - continue; - if ( ! man_pmsg(m, ln, i, MANDOCERR_BADCHAR)) - return(0); - i--; - } - mac[j] = '\0'; if (j == 4 || j < 1) { -- cgit