#include <stdio.h>
#include <stdlib.h>
-#include <ctype.h>
+#include <ac/ctype.h>
#include <ac/errno.h>
#include <ac/regex.h>
#include <ac/string.h>
+#include <ac/time.h>
#include <ac/unistd.h>
-#include <sys/types.h>
#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
-#include "lber.h"
-#include "ldap.h"
+#include "ldap-int.h"
static int break_into_words LDAP_P(( char *str, char *delims, char ***wordsp ));
-int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp ));
-void free_strarray LDAP_P(( char **sap ));
#define FILT_MAX_LINE_LEN 1024
ldap_getfilter_free( lfdp );
return( NULL );
}
- nextflp->lfl_tag = strdup( tag );
+ nextflp->lfl_tag = ldap_strdup( tag );
nextflp->lfl_pattern = tok[ 0 ];
if ( (rc = regcomp( &re, nextflp->lfl_pattern, 0 )) != 0 ) {
#ifdef LDAP_LIBUI
ldap_getfilter_free( lfdp );
fprintf( stderr, "bad regular expresssion %s, %s\n",
nextflp->lfl_pattern, error );
-#if !defined( MACOS ) && !defined( DOS )
errno = EINVAL;
-#endif
#endif /* LDAP_LIBUI */
free_strarray( tok );
return( NULL );
} else {
free_strarray( tok );
ldap_getfilter_free( lfdp );
-#if !defined( MACOS ) && !defined( DOS )
errno = EINVAL;
-#endif
return( NULL );
}
free( tok[ 2 ] );
default:
free_strarray( tok );
ldap_getfilter_free( lfdp );
-#if !defined( MACOS ) && !defined( DOS )
errno = EINVAL;
-#endif
return( NULL );
}
}
if ( lfdp->lfd_filtprefix != NULL ) {
free( lfdp->lfd_filtprefix );
}
- lfdp->lfd_filtprefix = ( prefix == NULL ) ? NULL : strdup( prefix );
+ lfdp->lfd_filtprefix = ( prefix == NULL ) ? NULL : ldap_strdup( prefix );
if ( lfdp->lfd_filtsuffix != NULL ) {
free( lfdp->lfd_filtsuffix );
}
- lfdp->lfd_filtsuffix = ( suffix == NULL ) ? NULL : strdup( suffix );
+ lfdp->lfd_filtsuffix = ( suffix == NULL ) ? NULL : ldap_strdup( suffix );
}
return( NULL );
}
- if (( lfdp->lfd_curvalcopy = strdup( value )) == NULL ) {
+ if (( lfdp->lfd_curvalcopy = ldap_strdup( value )) == NULL ) {
return( NULL );
}