X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fdisptmpl.c;h=7ddad7700afe0e18fb2df0b569451c253cae249b;hb=7573a81efea63bc0e07d88ba4c9b6973d51d857d;hp=d9d768ef9b94412031d434ba68418b4d3e735e5c;hpb=716523f1ac707e62f61f1ad5a253a643612529e8;p=openldap diff --git a/libraries/libldap/disptmpl.c b/libraries/libldap/disptmpl.c index d9d768ef9b..7ddad7700a 100644 --- a/libraries/libldap/disptmpl.c +++ b/libraries/libldap/disptmpl.c @@ -1,5 +1,6 @@ +/* $OpenLDAP$ */ /* - * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ /* Portions @@ -20,7 +21,8 @@ #include "portable.h" #include -#include + +#include #include #include @@ -35,7 +37,7 @@ #include "disptmpl.h" static void free_disptmpl LDAP_P(( struct ldap_disptmpl *tmpl )); -static int read_next_tmpl LDAP_P(( char **bufp, long *blenp, +static int read_next_tmpl LDAP_P(( char **bufp, ber_len_t *blenp, struct ldap_disptmpl **tmplp, int dtversion )); static const char *const tmploptions[] = { @@ -138,7 +140,7 @@ ldap_init_templates( char *file, struct ldap_disptmpl **tmpllistp ) int -ldap_init_templates_buf( char *buf, long buflen, +ldap_init_templates_buf( char *buf, ber_len_t buflen, struct ldap_disptmpl **tmpllistp ) { int rc=-1, version; @@ -388,7 +390,7 @@ ldap_tmplattrs( struct ldap_disptmpl *tmpl, char **includeattrs, for ( i = 0; !memerr && includeattrs[ i ] != NULL; ++i ) { if (( attrs = (char **)LDAP_REALLOC( attrs, ( attrcnt + 2 ) * sizeof( char * ))) == NULL || ( attrs[ attrcnt++ ] = - strdup( includeattrs[ i ] )) == NULL ) { + LDAP_STRDUP( includeattrs[ i ] )) == NULL ) { memerr = 1; } else { attrs[ attrcnt ] = NULL; @@ -415,7 +417,7 @@ ldap_tmplattrs( struct ldap_disptmpl *tmpl, char **includeattrs, if ( ticolp->ti_attrname != NULL ) { if (( attrs = (char **)LDAP_REALLOC( attrs, ( attrcnt + 2 ) * sizeof( char * ))) == NULL || ( attrs[ attrcnt++ ] = - strdup( ticolp->ti_attrname )) == NULL ) { + LDAP_STRDUP( ticolp->ti_attrname )) == NULL ) { memerr = 1; } else { attrs[ attrcnt ] = NULL; @@ -440,7 +442,7 @@ ldap_tmplattrs( struct ldap_disptmpl *tmpl, char **includeattrs, static int -read_next_tmpl( char **bufp, long *blenp, struct ldap_disptmpl **tmplp, +read_next_tmpl( char **bufp, ber_len_t *blenp, struct ldap_disptmpl **tmplp, int dtversion ) { int i, j, tokcnt, samerow, adsource;