1 #if defined(LIBC_RCS) && !defined(lint) 2 static const char rcsid[] = 3 "$FreeBSD$"; 4 #endif /* LIBC_RCS and not lint */ 5 6 #include <stdlib.h> 7 #include <string.h> 8 9 extern const char *__progname; 10 11 void 12 setprogname(const char *progname) 13 { 14 const char *p; 15 16 p = strrchr(progname, '/'); 17 if (p != NULL) 18 __progname = p + 1; 19 else 20 __progname = progname; 21 } 22