mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
setprogname() should set __progname to the last component of the given
path.
This commit is contained in:
parent
d2cb5f3137
commit
dbdb228cf7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82075
@ -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…
Reference in New Issue
Block a user