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: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 16:55:34 +00:00
|
|
|
char *p;
|
2001-05-15 23:41:01 +00:00
|
|
|
|
2001-08-21 17:16:32 +00:00
|
|
|
p = strrchr(progname, '/');
|
|
|
|
__progname = p ? p + 1 : progname;
|
2001-05-15 23:41:01 +00:00
|
|
|
}
|