2002-02-01 00:57:29 +00:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
__FBSDID("$FreeBSD$");
|
2001-05-15 23:41:01 +00:00
|
|
|
|
2001-08-21 17:28:39 +00:00
|
|
|
#include <stdlib.h>
|
2001-08-21 17:16:32 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
2002-03-29 22:43:43 +00:00
|
|
|
#include "libc_private.h"
|
2001-05-15 23:41:01 +00:00
|
|
|
|
|
|
|
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
|
|
|
}
|