#include <ldap_schema.h>
-static LDAP_CONST char *
-choose_name( char *names[], LDAP_CONST char *fallback )
+static const char *
+choose_name( char *names[], const char *fallback )
{
return( (names != NULL && names[0] != NULL) ? names[0] : fallback );
}
}
char *
-ldap_syntax2str( const LDAPSyntax * syn )
+ldap_syntax2str( LDAPSyntax * syn )
{
safe_string * ss;
char * retstring;
}
char *
-ldap_matchingrule2str( const LDAPMatchingRule * mr )
+ldap_matchingrule2str( LDAPMatchingRule * mr )
{
safe_string * ss;
char * retstring;
}
char *
-ldap_matchingruleuse2str( const LDAPMatchingRuleUse * mru )
+ldap_matchingruleuse2str( LDAPMatchingRuleUse * mru )
{
safe_string * ss;
char * retstring;
}
char *
-ldap_objectclass2str( const LDAPObjectClass * oc )
+ldap_objectclass2str( LDAPObjectClass * oc )
{
safe_string * ss;
char * retstring;
}
char *
-ldap_attributetype2str( const LDAPAttributeType * at )
+ldap_attributetype2str( LDAPAttributeType * at )
{
safe_string * ss;
char * retstring;
};
static int
-get_token(const char ** sp, char ** token_val)
+get_token( const char ** sp, char ** token_val )
{
int kind;
const char * p;
}
LDAPSyntax *
-ldap_str2syntax( const char * s, int * code, const char ** errp, const int flags )
+ldap_str2syntax( LDAP_CONST char * s,
+ int * code,
+ LDAP_CONST char ** errp,
+ LDAP_CONST int flags )
{
int kind;
const char * ss = s;
}
LDAPMatchingRule *
-ldap_str2matchingrule( const char * s, int * code, const char ** errp, const int flags )
+ldap_str2matchingrule( LDAP_CONST char * s,
+ int * code,
+ LDAP_CONST char ** errp,
+ LDAP_CONST int flags )
{
int kind;
const char * ss = s;
}
LDAPMatchingRuleUse *
-ldap_str2matchingruleuse( const char * s, int * code, const char ** errp, const int flags )
+ldap_str2matchingruleuse( LDAP_CONST char * s,
+ int * code,
+ LDAP_CONST char ** errp,
+ LDAP_CONST int flags )
{
int kind;
const char * ss = s;
}
LDAPAttributeType *
-ldap_str2attributetype( const char * s, int * code, const char ** errp, const int flags )
+ldap_str2attributetype( LDAP_CONST char * s,
+ int * code,
+ LDAP_CONST char ** errp,
+ LDAP_CONST int flags )
{
int kind;
const char * ss = s;
}
LDAPObjectClass *
-ldap_str2objectclass( const char * s, int * code, const char ** errp, const int flags )
+ldap_str2objectclass( LDAP_CONST char * s,
+ int * code,
+ LDAP_CONST char ** errp,
+ LDAP_CONST int flags )
{
int kind;
const char * ss = s;
/* local functions */
#ifndef HAVE_GETLINE
-static char *getline LDAP_P(( char *line, int len, FILE *fp, char *prompt ));
+static char *getline LDAP_P(( char *line, int len, FILE *fp, const char *prompt ));
#endif
-static char **get_list LDAP_P(( char *prompt ));
-static int file_read LDAP_P(( char *path, struct berval *bv ));
-static LDAPMod **get_modlist LDAP_P(( char *prompt1, char *prompt2, char *prompt3 ));
+static char **get_list LDAP_P(( const char *prompt ));
+static int file_read LDAP_P(( const char *path, struct berval *bv ));
+static LDAPMod **get_modlist LDAP_P(( const char *prompt1,
+ const char *prompt2, const char *prompt3 ));
static void handle_result LDAP_P(( LDAP *ld, LDAPMessage *lm ));
-static void print_ldap_result LDAP_P(( LDAP *ld, LDAPMessage *lm, char *s ));
+static void print_ldap_result LDAP_P(( LDAP *ld, LDAPMessage *lm,
+ const char *s ));
static void print_search_entry LDAP_P(( LDAP *ld, LDAPMessage *res ));
static void free_list LDAP_P(( char **list ));
#ifndef HAVE_GETLINE
static char *
-getline( char *line, int len, FILE *fp, char *prompt )
+getline( char *line, int len, FILE *fp, const char *prompt )
{
printf(prompt);
#endif
static char **
-get_list( char *prompt )
+get_list( const char *prompt )
{
static char buf[256];
int num;
static int
-file_read( char *path, struct berval *bv )
+file_read( const char *path, struct berval *bv )
{
FILE *fp;
ber_slen_t rlen;
static LDAPMod **
-get_modlist( char *prompt1, char *prompt2, char *prompt3 )
+get_modlist(
+ const char *prompt1,
+ const char *prompt2,
+ const char *prompt3 )
{
static char buf[256];
int num;
}
static void
-print_ldap_result( LDAP *ld, LDAPMessage *lm, char *s )
+print_ldap_result( LDAP *ld, LDAPMessage *lm, const char *s )
{
ldap_result2error( ld, lm, 1 );
ldap_perror( ld, s );