mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
ccbe835258
Submitted by: nectar
22 lines
350 B
C
22 lines
350 B
C
#if defined(LIBC_RCS) && !defined(lint)
|
|
static const char rcsid[] =
|
|
"$FreeBSD$";
|
|
#endif /* LIBC_RCS and not lint */
|
|
|
|
#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;
|
|
}
|