1 /* line64.c - routines for dealing with the slapd line format */
10 #include <ac/socket.h>
24 LDAP_CONST char *urlstr,
39 url = fetchGetURL( (char*) urlstr, "" );
42 if( strncasecmp( "file://", urlstr, sizeof("file://")-1 ) == 0 ) {
43 p = strchr( &urlstr[sizeof("file://")-1], '/' );
48 if( *p != *LDAP_DIRSEP ) {
49 /* skip over false root */
54 ldap_pvt_hex_unescape( p );
56 url = fopen( p, "r" );
69 while( bytes = fread( buffer, 1, sizeof(buffer), url ) ) {
70 char *newp = ber_memrealloc( p, total + bytes );
77 SAFEMEMCPY( &p[total], buffer, bytes );