repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
etc/services - sync with NetBSD-8
[minix.git]
/
external
/
bsd
/
blacklist
/
port
/
getprogname.c
blob
983d6740c88c347780e11e8c4909b647a416d35c
1
#ifdef HAVE_CONFIG_H
2
#include
"config.h"
3
#endif
4
#include <string.h>
5
6
extern
char
*
__progname
;
7
8
const char
*
9
getprogname
(
void
)
10
{
11
return
__progname
;
12
}
13
14
void
15
setprogname
(
char
*
p
)
16
{
17
char
*
q
;
18
if
(
p
==
NULL
)
19
return
;
20
if
((
q
=
strrchr
(
p
,
'/'
)) !=
NULL
)
21
__progname
= ++
q
;
22
else
23
__progname
=
p
;
24
}