11 #include <atalk/util.h>
13 static const char hexdig[] = "0123456789ABCDEF";
18 void bprint( data, len )
22 char xout[ BPXLEN ], aout[ BPALEN ];
25 memset( xout, 0, BPXLEN );
26 memset( aout, 0, BPALEN );
28 for ( i = 0; len; len--, data++, i++ ) {
30 printf( "%-48s\t%-16s\n", xout, aout );
31 memset( xout, 0, BPXLEN );
32 memset( aout, 0, BPALEN );
36 if (isprint( (unsigned char)*data )) {
42 xout[ (i*3) ] = hexdig[ ( *data & 0xf0 ) >> 4 ];
43 xout[ (i*3) + 1 ] = hexdig[ *data & 0x0f ];
44 xout[ (i*3) + 2 ] = ' ';
48 printf( "%-48s\t%-16s\n", xout, aout );