20 lines
278 B
C
20 lines
278 B
C
#include <sys/cdefs.h>
|
|
__FBSDID("$FreeBSD$");
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
extern const char *__progname;
|
|
|
|
void
|
|
setprogname(const char *progname)
|
|
{
|
|
const char *p;
|
|
|
|
p = strrchr(progname, '/');
|
|
if (p != NULL)
|
|
__progname = p + 1;
|
|
else
|
|
__progname = progname;
|
|
}
|