summaryrefslogtreecommitdiffstats
path: root/man.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-08-07 20:57:33 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-08-07 20:57:33 +0000
commit556aafc9aef6fb2d86a1cc5928f39267b81bc0a8 (patch)
tree329ee68f9f7e22aa3865e64184bb12d15452e0ae /man.c
parent75b5b6f467d4105ac3e51ff98ad5284835968682 (diff)
downloadmandoc-556aafc9aef6fb2d86a1cc5928f39267b81bc0a8.tar.gz
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.
Diffstat (limited to 'man.c')
-rw-r--r--man.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/man.c b/man.c
index 228ca0e0..b4f4f1e3 100644
--- a/man.c
+++ b/man.c
@@ -21,7 +21,6 @@
#include <sys/types.h>
#include <assert.h>
-#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
@@ -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) {