#endif
#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ascii.c,v 1.7 2002-04-24 06:55:55 guy Exp $";
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ascii.c,v 1.10.2.2 2003-11-16 08:51:11 guy Exp $";
#endif
+#include <tcpdump-stdinc.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <ctype.h>
#include "interface.h"
#define HEXDUMP_HEXSTUFF_PER_SHORT 5 /* 4 hex digits and a space */
#define HEXDUMP_HEXSTUFF_PER_LINE \
(HEXDUMP_HEXSTUFF_PER_SHORT * HEXDUMP_SHORTS_PER_LINE)
-
+
void
ascii_print_with_offset(register const u_char *cp, register u_int length,
register u_int oset)
register int nshorts;
char hexstuff[HEXDUMP_SHORTS_PER_LINE*HEXDUMP_HEXSTUFF_PER_SHORT+1], *hsp;
char asciistuff[ASCII_LINELENGTH+1], *asp;
- int maxlength = (Aflag ? ASCII_LINELENGTH : HEXDUMP_SHORTS_PER_LINE);
+ u_int maxlength = (Aflag ? ASCII_LINELENGTH : HEXDUMP_SHORTS_PER_LINE);
nshorts = length / sizeof(u_short);
i = 0;
{
ascii_print_with_offset(cp, length, 0);
}
-
+
/*
* telnet_print() wants this. It is essentially default_print_unaligned()
*/