1cd18ccdcSDima Dorfman #if defined(LIBC_RCS) && !defined(lint) 2cd18ccdcSDima Dorfman static const char rcsid[] = 3cd18ccdcSDima Dorfman "$FreeBSD$"; 4cd18ccdcSDima Dorfman #endif /* LIBC_RCS and not lint */ 5cd18ccdcSDima Dorfman 680578ef3SJacques Vidrine #include <string.h> 780578ef3SJacques Vidrine 8cd18ccdcSDima Dorfman extern const char *__progname; 9cd18ccdcSDima Dorfman 10cd18ccdcSDima Dorfman void 11cd18ccdcSDima Dorfman setprogname(const char *progname) 12cd18ccdcSDima Dorfman { 13dbdb228cSJacques Vidrine char *p; 14cd18ccdcSDima Dorfman 1580578ef3SJacques Vidrine p = strrchr(progname, '/'); 16dbdb228cSJacques Vidrine __progname = p ? p + 1 : progname; 17cd18ccdcSDima Dorfman } 18