From 2b78f44203076b45ac9ad8692892ea702b538560 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 30 Aug 2001 04:54:59 +0000 Subject: [PATCH] More updates. --- doc/man/man3/lber-memory.3 | 35 ++++++++++---------------------- doc/man/man3/lber-types.3 | 41 +++++++++++++++++++++++++++++++++++--- 2 files changed, 48 insertions(+), 28 deletions(-) diff --git a/doc/man/man3/lber-memory.3 b/doc/man/man3/lber-memory.3 index beeadc6a72..547739f679 100644 --- a/doc/man/man3/lber-memory.3 +++ b/doc/man/man3/lber-memory.3 @@ -1,4 +1,4 @@ -.TH LBER_MEMORY 3 "12 July 2000" "OpenLDAP LDVERSION" +.TH LBER_MEMORY 3 "29 August 2001" "OpenLDAP LDVERSION" .\" $OpenLDAP$ .\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved. .\" Copying restrictions apply. See COPYRIGHT/LICENSE. @@ -13,30 +13,15 @@ ber_memalloc, ber_memcalloc, ber_memrealloc, ber_memfree \- LBER memory allocato .LP .nf .ft B -void * ber_memalloc( - ber_len_t bytes ) -.ft -.fi -.LP -.nf -.ft B -void * ber_memcalloc( - ber_len_t nelems, ber_len_t bytes ) -.ft -.fi -.LP -.nf -.ft B -void * ber_memrealloc( - void \(**ptr, - ber_len_t bytes); -.ft -.fi -.LP -.nf -.ft B -void * ber_memfree( - void \(**ptr ); +void * ber_memalloc( ber_len_t bytes ) + +void * ber_memcalloc( ber_len_t nelems, ber_len_t bytes ) + +void * ber_memrealloc( void *ptr, ber_len_t bytes); + +void ber_memfree( void *ptr ); + +void ber_memvfree( void **vec ); .ft .fi .SH DESCRIPTION diff --git a/doc/man/man3/lber-types.3 b/doc/man/man3/lber-types.3 index 1cd28f1ae1..7bfd315132 100644 --- a/doc/man/man3/lber-types.3 +++ b/doc/man/man3/lber-types.3 @@ -19,17 +19,33 @@ typedef impl_uint_t ber_uint_t; typedef impl_len_t ber_len_t; typedef impl_slen_t ber_slen_t; + typedef struct berval { ber_len_t bv_len; char *bv_val; } BerValue; +void ber_bvfree( struct berval *bv ); + +void ber_bvecfree( struct berval **bvec ); + +struct berval *ber_bvdup( const struct berval *bv ); + +struct berval *ber_bvstr( const char *str ); + +struct berval *ber_bvstrdup( const char *str ); + + typedef struct berelement BerElement; + +void ber_free( BerElement *ber, int freebuf ); + .ft .fi .SH DESCRIPTION .LP -The are basic types defined for use with the Lightweight BER library. +The following are the basic types and structures defined for use +with the Lightweight BER library. .LP .B ber_int_t is a signed integer of at least 32 bits. It is commonly equivalent to @@ -64,10 +80,29 @@ points to octets. .B bv_val is not necessarly terminated by a NULL (zero) octet. +.BR ber_bvfree () +frees a BerValue, pointed to by bv, returned from this API. If bv +is NULL, the routine does nothing. +.BR ber_bvecfree () +frees an array of BerValues (and the array), pointed to by bvec, +returned from this API. If bvec is NULL, the routine does nothing. +.BR ber_bvdup () +returns a copy of a BerValue. The routine returns NULL upon error +(e.g. out of memory). +.BR ber_bvstr () +returns a BerValue containing the string pointed to by str. +.BR ber_bvstrdup () +returns a BerValue containing a copy of the string pointed to by str. .LP .B BerElement -is an opaque structure used to hold state information for LBER encoding -and decoding routines. +is an opaque structure used to maintain state information used in +encoding and decoding. BerElement structures are created using +.BR ber_alloc_t (3) +and +.BR ber_init (3). +.BR ber_free () +frees a BerElement pointed to by ber. If ber is NULL, the routine +does nothing. If freebuf is zero, the internal buffer is not freed. .SH SEE ALSO .BR lber-encode (3) .BR lber-decode (3) -- 2.39.5