6 #if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI )
8 #endif /* LDAP_DEBUG && LDAP_LIBUI */
17 ber_print_error( char *data)
19 fputs( data, stderr );
24 * Print arbitrary stuff, for debugging.
28 ber_bprint( char *data, int len )
30 #if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI )
33 static char hexdig[] = "0123456789abcdef";
37 memset( out, 0, BPLEN );
40 fprintf( stderr, "\t%s\n", ( i == 0 ) ? "(end)" : out );
45 if ( isgraph( (unsigned char)*data )) {
50 out[ i ] = hexdig[ ( *data & 0xf0 ) >> 4 ];
51 out[ i+1 ] = hexdig[ *data & 0x0f ];
59 if ( i > BPLEN - 2 ) {
60 char data[128 + BPLEN];
61 sprintf( data, "\t%s\n", out );
62 ber_print_error(data);
63 memset( out, 0, BPLEN );
70 #endif /* LDAP_DEBUG && LDAP_LIBUI */