/* dn.c - routines for dealing with distinguished names */
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#include "portable.h"
-#include "slap.h"
-static char **dn_explode();
+#include <stdio.h>
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
+#include "slap.h"
-#define DNSEPARATOR(c) (c == ',' || c == ';')
-#define SEPARATOR(c) (c == ',' || c == ';' || c == '+')
-#define SPACE(c) (c == ' ' || c == '\n')
-#define NEEDSESCAPE(c) (c == '\\' || c == '"')
#define B4TYPE 0
#define INTYPE 1
#define B4EQUAL 2
if ( *(s + 1) == '\0' ) {
return( NULL );
} else {
- return( strdup( s + 1 ) );
+ return( ch_strdup( s + 1 ) );
}
}
if ( *s == '"' )
inquote = 1;
else if ( DNSEPARATOR( *s ) )
- return( strdup( s + 1 ) );
+ return( ch_strdup( s + 1 ) );
}
}
- return( NULL );
+ return( ch_strdup("") );
}
/*
return( 0 );
}
- return( strcasecmp( dn + dnlen - suffixlen, suffix ) == 0 );
+ return( strcmp( dn + dnlen - suffixlen, suffix ) == 0 );
}
/*