openldap/libraries/liblutil/utils.c
Kurt Zeilenga 403f4479bc Add OpenLDAP RCSid to *.[ch] in clients, libraries, and servers.
Replace old Id as needed (back-tcl).
Leave updating of contribWare to contributors (for now).
1999-09-08 19:06:24 +00:00

28 lines
517 B
C

/* $OpenLDAP$ */
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
#include <ac/stdlib.h>
#include <ac/string.h>
#include <lutil.h>
#include <ldap_defaults.h>
char* lutil_progname( const char* name, int argc, char *argv[] )
{
char *progname;
if(argc == 0) {
return strdup( name );
}
progname = strrchr ( argv[0], *LDAP_DIRSEP );
progname = strdup( progname ? &progname[1] : argv[0] );
return progname;
}