X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Fliblber%2Flber-int.h;h=b04c43b09283c0b39fe108b40a7f4593d8269665;hb=afa2cd1893875266c58677cc640514c1d9eef41f;hp=14f02ca555a9d7df24f8ddef18ef103c24d1652d;hpb=4298f5d991137266f9162c2a3e0764232c31e557;p=openldap diff --git a/libraries/liblber/lber-int.h b/libraries/liblber/lber-int.h index 14f02ca555..b04c43b092 100644 --- a/libraries/liblber/lber-int.h +++ b/libraries/liblber/lber-int.h @@ -1,6 +1,6 @@ /* $OpenLDAP$ */ /* - * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ /* Portions @@ -38,16 +38,20 @@ struct lber_options { }; #ifdef NEW_LOGGING +/* # ifdef LDAP_DEBUG # ifdef LDAP_LOG # undef LDAP_LOG # endif # define LDAP_LOG(a) ber_pvt_log_output a + */ # define BER_DUMP(a) ber_output_dump a +/* # else # define LDAP_LOG(a) # define BER_DUMP(a) # endif + */ #endif LBER_F( int ) ber_pvt_log_output( @@ -80,6 +84,7 @@ struct berelement { struct seqorset *ber_sos; char *ber_rwptr; + void *ber_memctx; }; #define LBER_VALID(ber) ((ber)->ber_valid==LBER_VALID_BERELEMENT) @@ -119,6 +124,11 @@ ber_realloc LDAP_P(( BerElement *ber, ber_len_t len )); +LBER_F (char *) ber_start LDAP_P(( BerElement * )); +LBER_F (int) ber_len LDAP_P(( BerElement * )); +LBER_F (int) ber_ptrlen LDAP_P(( BerElement * )); +LBER_F (void) ber_rewind LDAP_P(( BerElement * )); + /* * bprint.c */ @@ -160,18 +170,8 @@ LBER_V (FILE *) ber_pvt_err_file; /* simple macros to realloc for now */ LBER_V (BerMemoryFunctions *) ber_int_memory_fns; LBER_F (char *) ber_strndup( LDAP_CONST char *, ber_len_t ); -LBER_F (char *) ber_strndup__( LDAP_CONST char *, size_t ); - -#ifdef CSRIMALLOC -#define LBER_MALLOC malloc -#define LBER_CALLOC calloc -#define LBER_REALLOC realloc -#define LBER_FREE free -#define LBER_VFREE ber_memvfree -#define LBER_STRDUP strdup -#define LBER_STRNDUP ber_strndup__ - -#else +LBER_F (char *) ber_strndup_x( LDAP_CONST char *, ber_len_t, void *ctx ); + #define LBER_MALLOC(s) ber_memalloc((s)) #define LBER_CALLOC(n,s) ber_memcalloc((n),(s)) #define LBER_REALLOC(p,s) ber_memrealloc((p),(s)) @@ -179,7 +179,6 @@ LBER_F (char *) ber_strndup__( LDAP_CONST char *, size_t ); #define LBER_VFREE(v) ber_memvfree((void**)(v)) #define LBER_STRDUP(s) ber_strdup((s)) #define LBER_STRNDUP(s,l) ber_strndup((s),(l)) -#endif /* sockbuf.c */