6 #include <atalk/util.h>
8 static const char hexdig[] = "0123456789ABCDEF";
13 void bprint( data, len )
17 char xout[ BPXLEN ], aout[ BPALEN ];
20 memset( xout, 0, BPXLEN );
21 memset( aout, 0, BPALEN );
23 for ( i = 0; len; len--, data++, i++ ) {
25 printf( "%-48s\t%-16s\n", xout, aout );
26 memset( xout, 0, BPXLEN );
27 memset( aout, 0, BPALEN );
31 if (isprint( (unsigned char)*data )) {
37 xout[ (i*3) ] = hexdig[ ( *data & 0xf0 ) >> 4 ];
38 xout[ (i*3) + 1 ] = hexdig[ *data & 0x0f ];
39 xout[ (i*3) + 2 ] = ' ';
43 printf( "%-48s\t%-16s\n", xout, aout );