Commit 34c945b8 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

added ber_print_error() and renamed lber_bprint into ber_ namespace.

parent 80cf83ac
......@@ -164,7 +164,7 @@ base object for the search. The default is to never dereference aliases.
wait at most \fItimelimit\fP seconds for a search to complete.
.TP
.B \-z sizelimit
retrieve at most \fIsizelimit\fP seconds for a search to complete.
retrieve at most \fIsizelimit\fP entries for a search.
.SH OUTPUT FORMAT
If one or more entries are found, each entry is written to standard output
in the form:
......
......@@ -97,7 +97,9 @@ extern int lber_debug;
/*
* in bprint.c:
*/
LDAP_F void lber_bprint LDAP_P(( char *data, int len ));
LDAP_F void ber_print_error LDAP_P(( char *data ));
LDAP_F void ber_bprint LDAP_P(( char *data, int len ));
#define lber_bprint(d,l) ber_bprint((d),(l))
/*
* in decode.c:
......
#include "portable.h"
#if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI )
#include <stdio.h>
#if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI )
#include <ac/ctype.h>
#include <ac/string.h>
#endif /* LDAP_DEBUG && LDAP_LIBUI */
......@@ -11,12 +11,21 @@
#include "lber-int.h"
/*
* Print arbitrary stuff, for debugging.
* Print stuff
*/
void
ber_print_error( char *data)
{
fputs( data, stderr );
fflush( stderr );
}
/*
* Print arbitrary stuff, for debugging.
*/
void
lber_bprint( char *data, int len )
ber_bprint( char *data, int len )
{
#if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI )
#define BPLEN 48
......@@ -48,7 +57,9 @@ lber_bprint( char *data, int len )
data++;
if ( i > BPLEN - 2 ) {
fprintf( stderr, "\t%s\n", out );
char data[128 + BPLEN];
sprintf( data, "\t%s\n", out );
ber_print_error(data);
memset( out, 0, BPLEN );
i = 0;
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment