freebsd-skq/lib/libc/gen/setprogname.c
David E. O'Brien ea8d448a92 Fix SCM ID's.
2002-02-01 00:57:29 +00:00

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;
}