setprogname() should set __progname to the last component of the given
path.
This commit is contained in:
parent
d280a62e1c
commit
43702240bb
@ -8,6 +8,8 @@ extern const char *__progname;
|
||||
void
|
||||
setprogname(const char *progname)
|
||||
{
|
||||
char *p;
|
||||
|
||||
__progname = progname;
|
||||
p = strrchr('/', progname);
|
||||
__progname = p ? p+1 : progname;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user