diff options
author | cgd <cgd@NetBSD.org> | 2001-02-19 22:39:39 +0000 |
---|---|---|
committer | cgd <cgd@NetBSD.org> | 2001-02-19 22:39:39 +0000 |
commit | 4832de76416d1277e4fafba9c7ba75fa872d1694 (patch) | |
tree | 0ce80d0939fb40bab63de635df84d46bb0455354 | |
parent | 15bf83f7e83e3076dc22955921f05bebbce89551 (diff) | |
download | bsdgames-darwin-4832de76416d1277e4fafba9c7ba75fa872d1694.tar.gz bsdgames-darwin-4832de76416d1277e4fafba9c7ba75fa872d1694.tar.zst bsdgames-darwin-4832de76416d1277e4fafba9c7ba75fa872d1694.zip |
convert to use getprogname()
-rw-r--r-- | arithmetic/arithmetic.c | 8 | ||||
-rw-r--r-- | fortune/fortune/fortune.c | 9 |
2 files changed, 7 insertions, 10 deletions
diff --git a/arithmetic/arithmetic.c b/arithmetic/arithmetic.c index 03e00106..45a7109e 100644 --- a/arithmetic/arithmetic.c +++ b/arithmetic/arithmetic.c @@ -1,4 +1,4 @@ -/* $NetBSD: arithmetic.c,v 1.16 2001/02/05 00:20:58 christos Exp $ */ +/* $NetBSD: arithmetic.c,v 1.17 2001/02/19 22:41:45 cgd Exp $ */ /* * Copyright (c) 1989, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: arithmetic.c,v 1.16 2001/02/05 00:20:58 christos Exp $"); +__RCSID("$NetBSD: arithmetic.c,v 1.17 2001/02/19 22:41:45 cgd Exp $"); #endif #endif /* not lint */ @@ -106,8 +106,6 @@ int nright, nwrong; time_t qtime; #define NQUESTS 20 -extern char *__progname; /* from crt0.o */ - /* * Select keys from +-x/ to be asked addition, subtraction, multiplication, * and division problems. More than one key may be given. The default is @@ -389,6 +387,6 @@ void usage() { (void)fprintf(stderr, "Usage: %s [-o +-x/] [-r range]\n", - __progname); + getprogname()); exit(1); } diff --git a/fortune/fortune/fortune.c b/fortune/fortune/fortune.c index 5a383bc1..0593b0c7 100644 --- a/fortune/fortune/fortune.c +++ b/fortune/fortune/fortune.c @@ -1,4 +1,4 @@ -/* $NetBSD: fortune.c,v 1.26 2001/02/05 00:29:44 christos Exp $ */ +/* $NetBSD: fortune.c,v 1.27 2001/02/19 22:41:45 cgd Exp $ */ /*- * Copyright (c) 1986, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 1993\n\ #if 0 static char sccsid[] = "@(#)fortune.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: fortune.c,v 1.26 2001/02/05 00:29:44 christos Exp $"); +__RCSID("$NetBSD: fortune.c,v 1.27 2001/02/19 22:41:45 cgd Exp $"); #endif #endif /* not lint */ @@ -206,8 +206,6 @@ regex_t *Re_pat = NULL; #define NAMLEN(d) ((d)->d_namlen) #endif -extern char *__progname; - int main(ac, av) int ac; @@ -1357,7 +1355,8 @@ matches_in_list(list) void usage() { - (void) fprintf(stderr, "Usage: %s [-a", __progname); + + (void) fprintf(stderr, "Usage: %s [-a", getprogname()); #ifdef DEBUG (void) fprintf(stderr, "D"); #endif /* DEBUG */ |