int
ldif_parse_line(
- char *line,
+ LDAP_CONST char *line,
char **type,
char **value,
int *vlen
for ( s = line; *s && *s != ':'; s++ )
; /* NULL */
if ( *s == '\0' ) {
- lber_pvt_log_printf( LDAP_DEBUG_PARSE, ldif_debug,
+ ber_pvt_log_printf( LDAP_DEBUG_PARSE, ldif_debug,
"ldif_parse_line missing ':'\n");
return( -1 );
}
/* if no value is present, error out */
if ( *s == '\0' ) {
- lber_pvt_log_printf( LDAP_DEBUG_PARSE, ldif_debug,
+ ber_pvt_log_printf( LDAP_DEBUG_PARSE, ldif_debug,
"ldif_parse_line missing value\n");
return( -1 );
}
for ( i = 0; i < 4; i++ ) {
if ( p[i] != '=' && (p[i] & 0x80 ||
b642nib[ p[i] & 0x7f ] > 0x3f) ) {
- lber_pvt_log_printf( LDAP_DEBUG_ANY, ldif_debug,
+ ber_pvt_log_printf( LDAP_DEBUG_ANY, ldif_debug,
"ldif_parse_line: invalid base 64 encoding char (%c) 0x%x\n",
p[i], p[i] );
return( -1 );
}
void
-ldif_put_type_and_value( char **out, char *t, char *val, int vlen )
+ldif_put_type_and_value(
+ char **out,
+ LDAP_CONST char *t,
+ LDAP_CONST char *val,
+ int vlen )
{
unsigned char *byte, *p, *stop;
unsigned char buf[3];
char *
-ldif_type_and_value( char *type, char *val, int vlen )
+ldif_type_and_value( LDAP_CONST char *type, LDAP_CONST char *val, int vlen )
/*
* return malloc'd, zero-terminated LDIF line
*/
if (( buf = (char *) malloc( LDIF_SIZE_NEEDED( tlen, vlen ) + 1 ))
== NULL )
{
- lber_pvt_log_printf( LDAP_DEBUG_ANY, ldif_debug,
+ ber_pvt_log_printf( LDAP_DEBUG_ANY, ldif_debug,
"ldif_type_and_value: malloc failed!" );
return NULL;
}