-/* $Id: man.c,v 1.84 2010/07/22 23:03:15 kristaps Exp $ */
+/* $Id: man.c,v 1.85 2010/08/07 20:57:33 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
#include <sys/types.h>
#include <assert.h>
-#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
/* 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) {
-/* $Id: mdoc.c,v 1.160 2010/08/07 20:33:55 kristaps Exp $ */
+/* $Id: mdoc.c,v 1.161 2010/08/07 20:57:33 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
#include <sys/types.h>
#include <assert.h>
-#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
* copying when a tab, space, or eoln is encountered.
*/
- 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] || '\t' == buf[i])
break;
- /* Check for invalid characters. */
- /* TODO: remove me, already done in main.c. */
-
- if (isgraph((u_char)buf[i]))
- continue;
- if ( ! mdoc_pmsg(m, ln, i, MANDOCERR_BADCHAR))
- return(0);
- i--;
- }
-
mac[j] = '\0';
if (j == 4 || j < 2) {