openbsd-ports/net/netatalk/patches/patch-etcafpd-bprintc

42 lines
934 B
Plaintext

--- etc/afpd/bprint.c.orig Wed Sep 15 07:31:43 1993
+++ etc/afpd/bprint.c Thu Nov 11 14:42:31 1999
@@ -1,8 +1,11 @@
#define BPXLEN 50
#define BPALEN 18
+#include <stdio.h>
#include <ctype.h>
+#include <string.h>
char hexdig[] = "0123456789ABCDEF";
+void
bprint( data, len )
char *data;
int len;
@@ -10,14 +13,14 @@
char xout[ BPXLEN ], aout[ BPALEN ];
int i = 0;
- bzero( xout, BPXLEN );
- bzero( aout, BPALEN );
+ memset( xout, 0, BPXLEN );
+ memset( aout, 0, BPALEN );
- for ( i = 0; len; len--, *data++, i++ ) {
+ for ( i = 0; len; len--, data++, i++ ) {
if ( i == 16 ) {
printf( "%-48s\t%-16s\n", xout, aout );
- bzero( xout, BPXLEN );
- bzero( aout, BPALEN );
+ memset( xout, 0, BPXLEN );
+ memset( aout, 0, BPALEN );
i = 0;
}
@@ -37,6 +40,4 @@
printf( "%-48s\t%-16s\n", xout, aout );
}
printf( "%s\n", "(end)" );
-
- return;
}