NetBSD/dist/ipf/lib/printsbuf.c
he 4a9ab9770a Apply patch from Darren for the ctype() functions/macros.
Encapsulates the ctype() functions so that the casts are centralized.
2004-11-13 19:14:48 +00:00

25 lines
356 B
C

/* $NetBSD: printsbuf.c,v 1.2 2004/11/13 19:16:10 he Exp $ */
#ifdef IPFILTER_SCAN
#include <ctype.h>
#include <stdio.h>
#include "ipf.h"
#include "netinet/ip_scan.h"
void printsbuf(buf)
char *buf;
{
u_char *s;
int i;
for (s = (u_char *)buf, i = ISC_TLEN; i; i--, s++) {
if (ISPRINT(*s))
putchar(*s);
else
printf("\\%o", *s);
}
}
#endif