diff options
author | Hans Insulander <hin@cvs.openbsd.org> | 2003-08-05 11:04:13 +0000 |
---|---|---|
committer | Hans Insulander <hin@cvs.openbsd.org> | 2003-08-05 11:04:13 +0000 |
commit | 4d65caede88f071a592e0a9e0dd1ec28ade13487 (patch) | |
tree | f98b2b9c8b6ca3fdff3bd86b713c17a8d5ccc1a2 | |
parent | 3ba2b6094fa1ad97766c664000e20bec85b5034b (diff) |
getprogname() -> __progname
-rw-r--r-- | usr.sbin/afs/src/lib/ko/agetarg.c | 7 | ||||
-rw-r--r-- | usr.sbin/afs/src/lib/sl/sl.c | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/afs/src/lib/ko/agetarg.c b/usr.sbin/afs/src/lib/ko/agetarg.c index 0e71ebe28c2..51a52bb4cf3 100644 --- a/usr.sbin/afs/src/lib/ko/agetarg.c +++ b/usr.sbin/afs/src/lib/ko/agetarg.c @@ -92,6 +92,7 @@ mandoc_template(struct agetargs *args, char timestr[64], cmd[64]; const char *p; time_t t; + extern char *__progname; printf(".\\\" Things to fix:\n"); printf(".\\\" * correct section, and operating system\n"); @@ -101,8 +102,8 @@ mandoc_template(struct agetargs *args, t = time(NULL); strftime(timestr, sizeof(timestr), "%b %d, %Y", localtime(&t)); printf(".Dd %s\n", timestr); - p = strrchr(getprogname(), '/'); - if(p) p++; else p = getprogname(); + p = strrchr(__progname, '/'); + if(p) p++; else p = __progname; strncpy(cmd, p, sizeof(cmd)); cmd[sizeof(cmd)-1] = '\0'; strupr(cmd); @@ -176,7 +177,7 @@ aarg_printusage (struct agetargs *args, size_t max_len = 0; if (progname == NULL) - progname = getprogname(); + progname = __progname; if(getenv("GETARGMANDOC")){ mandoc_template(args, extra_string, style); diff --git a/usr.sbin/afs/src/lib/sl/sl.c b/usr.sbin/afs/src/lib/sl/sl.c index e8bf933a156..dde33a6f123 100644 --- a/usr.sbin/afs/src/lib/sl/sl.c +++ b/usr.sbin/afs/src/lib/sl/sl.c @@ -64,6 +64,7 @@ mandoc_template(SL_cmd *cmds, char timestr[64], cmd[64]; const char *p; time_t t; + extern char *__progname; printf(".\\\" Things to fix:\n"); printf(".\\\" * correct section, and operating system\n"); @@ -73,8 +74,8 @@ mandoc_template(SL_cmd *cmds, t = time(NULL); strftime(timestr, sizeof(timestr), "%b %d, %Y", localtime(&t)); printf(".Dd %s\n", timestr); - p = strrchr(getprogname(), '/'); - if(p) p++; else p = getprogname(); + p = strrchr(__progname, '/'); + if(p) p++; else p = __progname; strncpy(cmd, p, sizeof(cmd)); cmd[sizeof(cmd)-1] = '\0'; strupr(cmd); |