LDAP_F( char * )
ldap_friendly_name LDAP_P(( /* deprecated */
LDAP_CONST char *filename,
- /* LDAP_CONST */ char *uname,
+ LDAP_CONST char *uname,
LDAPFriendlyMap **map ));
LDAP_F( void )
#endif /* LDAP_DEBUG */
-LDAP_LUTIL_F(int) lutil_mnem2level LDAP_P(( char *level ));
-LDAP_LUTIL_F(void) lutil_log_initialize(int argc, char **argv);
-LDAP_LUTIL_F(void) lutil_set_debug_level LDAP_P(( char *subsys, int level ));
-LDAP_LUTIL_F(void) lutil_log LDAP_P(( char *subsys, int level, const char *fmt, ... ));
+LDAP_LUTIL_F(int) lutil_mnem2level LDAP_P(( const char *level ));
+LDAP_LUTIL_F(void) lutil_log_initialize LDAP_P((
+ int argc, char **argv ));
+LDAP_LUTIL_F(void) lutil_set_debug_level LDAP_P((
+ const char *subsys, int level ));
+LDAP_LUTIL_F(void) lutil_log LDAP_P((
+ const char *subsys, int level, const char *fmt, ... ));
LDAP_LUTIL_F(int) lutil_debug_file LDAP_P(( FILE *file ));
char *
ldap_friendly_name(
LDAP_CONST char *filename,
- /* LDAP_CONST */ char *uname,
+ LDAP_CONST char *uname,
LDAPFriendlyMap **map )
{
int i, entries;
if ( map == NULL ) {
errno = EINVAL;
- return( uname );
+ return (char *) uname;
}
if ( *map == NULL ) {
if ( (fp = fopen( filename, "r" )) == NULL )
- return( uname );
+ return (char *) uname;
entries = 0;
while ( fgets( buf, sizeof(buf), fp ) != NULL ) {
if ( (*map = (LDAPFriendlyMap *) LDAP_MALLOC( (entries + 1) *
sizeof(LDAPFriendlyMap) )) == NULL ) {
fclose( fp );
- return( uname );
+ return (char *) uname;
}
i = 0;
if ( strcasecmp( uname, (*map)[i].lf_unfriendly ) == 0 )
return( (*map)[i].lf_friendly );
}
- return( uname );
+ return (char *) uname;
}
"results", "detail1", "detail2",
NULL};
-int lutil_mnem2level( char *level )
+int lutil_mnem2level( const char *level )
{
int i;
for( i = 0; lutil_levels[i] != NULL; i++ )
return;
}
-void lutil_set_debug_level( char* subsys, int level )
+void lutil_set_debug_level( const char* subsys, int level )
{
addSubsys( subsys, level );
}
void lutil_log_int(
FILE* file,
- char *subsys, int level,
+ const char *subsys, int level,
const char *fmt, va_list vl )
{
time_t now;
* level of the log output and the format and data. Send this on to the
* internal routine with the print file, if any.
*/
-void lutil_log( char *subsys, int level, const char *fmt, ... )
+void lutil_log( const char *subsys, int level, const char *fmt, ... )
{
FILE* outfile = NULL;
va_list vl;