2001-05-15 23:41:01 +00:00
|
|
|
#if defined(LIBC_RCS) && !defined(lint)
|
|
|
|
static const char rcsid[] =
|
|
|
|
"$FreeBSD$";
|
|
|
|
#endif /* LIBC_RCS and not lint */
|
|
|
|
|
2001-08-21 17:28:39 +00:00
|
|
|
#include <stdlib.h>
|
2001-08-21 17:16:32 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
2001-05-15 23:41:01 +00:00
|
|
|
extern const char *__progname;
|
|
|
|
|
|
|
|
void
|
|
|
|
setprogname(const char *progname)
|
|
|
|
{
|
2001-08-21 17:28:39 +00:00
|
|
|
const char *p;
|
2001-05-15 23:41:01 +00:00
|
|
|
|
2001-08-21 17:16:32 +00:00
|
|
|
p = strrchr(progname, '/');
|
2001-08-21 19:27:07 +00:00
|
|
|
if (p != NULL)
|
|
|
|
__progname = p + 1;
|
|
|
|
else
|
|
|
|
__progname = progname;
|
2001-05-15 23:41:01 +00:00
|
|
|
}
|