summaryrefslogtreecommitdiff
path: root/games/hack/hack.main.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/hack/hack.main.c')
-rw-r--r--games/hack/hack.main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/games/hack/hack.main.c b/games/hack/hack.main.c
index ca58f8ec830..abf079b1a50 100644
--- a/games/hack/hack.main.c
+++ b/games/hack/hack.main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hack.main.c,v 1.18 2015/11/04 21:22:10 tedu Exp $ */
+/* $OpenBSD: hack.main.c,v 1.19 2015/12/16 14:21:50 tb Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -90,7 +90,6 @@ int locknum; /* max num of players */
char *catmore; /* default pager */
#endif
char SAVEF[PL_NSIZ + 11] = "save/"; /* save/99999player */
-char *hname; /* name of the game (argv[0] of call) */
char obuf[BUFSIZ]; /* BUFSIZ is defined in stdio.h */
extern char *nomovemsg;
@@ -103,12 +102,12 @@ static void chdirx(char *, boolean);
int
main(int argc, char **argv)
{
+ extern char *__progname;
int fd;
#ifdef CHDIR
char *dir;
#endif
- hname = argv[0];
hackpid = getpid();
#ifdef CHDIR /* otherwise no chdir() */
@@ -187,7 +186,7 @@ main(int argc, char **argv)
* Find the creation date of this game,
* so as to avoid restoring outdated savefiles.
*/
- gethdate(hname);
+ gethdate(__progname);
/*
* We cannot do chdir earlier, otherwise gethdate will fail.