Diff for /include/lber.h between versions 1.1.3.1 and 1.1.3.1.20.2

version 1.1.3.1, 1998/08/08 22:43:13 version 1.1.3.1.20.2, 1998/10/19 21:51:47
Line 13 Line 13
 #ifndef _LBER_H  #ifndef _LBER_H
 #define _LBER_H  #define _LBER_H
   
 #ifdef __cplusplus  #include <ldap_cdefs.h>
 extern "C" {  
 #endif  LDAP_BEGIN_DECL
   
 #if !defined( NEEDPROTOS ) && defined(__STDC__)  
 #define NEEDPROTOS      1  
 #endif  
   
 /* BER classes and mask */  /* BER classes and mask */
 #define LBER_CLASS_UNIVERSAL    0x00  #define LBER_CLASS_UNIVERSAL    0x00
Line 58  extern "C" { Line 54  extern "C" {
 #define OLD_LBER_SEQUENCE       0x10L   /* w/o constructed bit - broken */  #define OLD_LBER_SEQUENCE       0x10L   /* w/o constructed bit - broken */
 #define OLD_LBER_SET            0x11L   /* w/o constructed bit - broken */  #define OLD_LBER_SET            0x11L   /* w/o constructed bit - broken */
   
 #ifdef NEEDPROTOS  typedef int (*BERTranslateProc) LDAP_P(( char **bufp,
 typedef int (*BERTranslateProc)( char **bufp, unsigned long *buflenp,          unsigned long *buflenp,
         int free_input );          int free_input ));
 #else /* NEEDPROTOS */  
 typedef int (*BERTranslateProc)();  
 #endif /* NEEDPROTOS */  
   
 typedef struct berelement {  typedef struct berelement {
         char            *ber_buf;          char            *ber_buf;
Line 123  struct berval { Line 116  struct berval {
         char            *bv_val;          char            *bv_val;
 };  };
   
 #ifndef NEEDPROTOS  
 extern BerElement *ber_alloc();  
 extern BerElement *der_alloc();  
 extern BerElement *ber_alloc_t();  
 extern BerElement *ber_dup();  
 extern int lber_debug;  extern int lber_debug;
 extern void ber_bvfree();  
 extern void ber_bvecfree();  
 extern struct berval *ber_bvdup();  
 extern void ber_dump();  
 extern void ber_sos_dump();  
 extern void lber_bprint();  
 extern void ber_reset();  
 extern void ber_init();  
 #else /* NEEDPROTOS */  
 #if defined(WINSOCK)  
 #include "proto-lb.h"  
 #else  
 #include "proto-lber.h"  
 #endif  
 #endif /* NEEDPROTOS */  
   
 #if !defined(__alpha) || defined(VMS)  
   
 #define LBER_HTONL( l ) htonl( l )  
 #define LBER_NTOHL( l ) ntohl( l )  
   
 #else /* __alpha */  
 /*  /*
  * htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the   * in bprint.c:
  * lower-order 32-bits of a (64-bit) long, so we define correct versions  
  * here.  
  */   */
 #define LBER_HTONL( l ) (((long)htonl( (l) & 0x00000000FFFFFFFF )) << 32 \  LDAP_F void lber_bprint LDAP_P(( char *data, int len ));
                         | htonl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 ))  
   
 #define LBER_NTOHL( l ) (((long)ntohl( (l) & 0x00000000FFFFFFFF )) << 32 \  /*
                         | ntohl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 ))   * in decode.c:
 #endif /* __alpha */   */
   LDAP_F unsigned long ber_get_tag LDAP_P(( BerElement *ber ));
   LDAP_F unsigned long ber_skip_tag LDAP_P(( BerElement *ber, unsigned long *len ));
   LDAP_F unsigned long ber_peek_tag LDAP_P(( BerElement *ber, unsigned long *len ));
   LDAP_F unsigned long ber_get_int LDAP_P(( BerElement *ber, long *num ));
   LDAP_F unsigned long ber_get_stringb LDAP_P(( BerElement *ber, char *buf,
           unsigned long *len ));
   LDAP_F unsigned long ber_get_stringa LDAP_P(( BerElement *ber, char **buf ));
   LDAP_F unsigned long ber_get_stringal LDAP_P(( BerElement *ber, struct berval **bv ));
   LDAP_F unsigned long ber_get_bitstringa LDAP_P(( BerElement *ber, char **buf,
           unsigned long *len ));
   LDAP_F unsigned long ber_get_null LDAP_P(( BerElement *ber ));
   LDAP_F unsigned long ber_get_boolean LDAP_P(( BerElement *ber, int *boolval ));
   LDAP_F unsigned long ber_first_element LDAP_P(( BerElement *ber, unsigned long *len,
           char **last ));
   LDAP_F unsigned long ber_next_element LDAP_P(( BerElement *ber, unsigned long *len,
           char *last ));
   LDAP_F unsigned long ber_scanf LDAP_P(( BerElement *ber, char *fmt, ... ));
   LDAP_F void ber_bvfree LDAP_P(( struct berval *bv ));
   LDAP_F void ber_bvecfree LDAP_P(( struct berval **bv ));
   LDAP_F struct berval *ber_bvdup LDAP_P(( struct berval *bv ));
   LDAP_F void ber_set_string_translators LDAP_P(( BerElement *ber,
           BERTranslateProc encode_proc, BERTranslateProc decode_proc ));
   
   /*
    * in encode.c
    */
   LDAP_F int ber_put_enum LDAP_P(( BerElement *ber, long num, unsigned long tag ));
   LDAP_F int ber_put_int LDAP_P(( BerElement *ber, long num, unsigned long tag ));
   LDAP_F int ber_put_ostring LDAP_P(( BerElement *ber, char *str, unsigned long len,
           unsigned long tag ));
   LDAP_F int ber_put_string LDAP_P(( BerElement *ber, char *str, unsigned long tag ));
   LDAP_F int ber_put_bitstring LDAP_P(( BerElement *ber, char *str,
           unsigned long bitlen, unsigned long tag ));
   LDAP_F int ber_put_null LDAP_P(( BerElement *ber, unsigned long tag ));
   LDAP_F int ber_put_boolean LDAP_P(( BerElement *ber, int boolval,
           unsigned long tag ));
   LDAP_F int ber_start_seq LDAP_P(( BerElement *ber, unsigned long tag ));
   LDAP_F int ber_start_set LDAP_P(( BerElement *ber, unsigned long tag ));
   LDAP_F int ber_put_seq LDAP_P(( BerElement *ber ));
   LDAP_F int ber_put_set LDAP_P(( BerElement *ber ));
   LDAP_F int ber_printf LDAP_P(( BerElement *ber, char *fmt, ... ));
   
 /*  /*
  * SAFEMEMCPY is an overlap-safe copy from s to d of n bytes   * in io.c:
  */   */
 #ifdef MACOS  LDAP_F long ber_read LDAP_P(( BerElement *ber, char *buf, unsigned long len ));
 #define SAFEMEMCPY( d, s, n )   BlockMoveData( (Ptr)s, (Ptr)d, n )  LDAP_F long ber_write LDAP_P(( BerElement *ber, char *buf, unsigned long len,
 #else /* MACOS */          int nosos ));
 #ifdef sunos4  LDAP_F void ber_free LDAP_P(( BerElement *ber, int freebuf ));
 #define SAFEMEMCPY( d, s, n )   bcopy( s, d, n )  LDAP_F int ber_flush LDAP_P(( Sockbuf *sb, BerElement *ber, int freeit ));
 #else /* sunos4 */  LDAP_F BerElement *ber_alloc LDAP_P(( void ));
 #define SAFEMEMCPY( d, s, n )   memmove( d, s, n )  LDAP_F BerElement *der_alloc LDAP_P(( void ));
 #endif /* sunos4 */  LDAP_F BerElement *ber_alloc_t LDAP_P(( int options ));
 #endif /* MACOS */  LDAP_F BerElement *ber_dup LDAP_P(( BerElement *ber ));
   LDAP_F void ber_dump LDAP_P(( BerElement *ber, int inout ));
   LDAP_F void ber_sos_dump LDAP_P(( Seqorset *sos ));
   LDAP_F unsigned long ber_get_next LDAP_P(( Sockbuf *sb, unsigned long *len,
           BerElement *ber ));
   LDAP_F void ber_init LDAP_P(( BerElement *ber, int options ));
   LDAP_F void ber_reset LDAP_P(( BerElement *ber, int was_writing ));
   
   LDAP_END_DECL
   
 #ifdef __cplusplus  
 }  
 #endif  
 #endif /* _LBER_H */  #endif /* _LBER_H */

Removed from v.1.1.3.1  
changed lines
  Added in v.1.1.3.1.20.2


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org