]> granicus.if.org Git - nethack/commitdiff
wizkit enhancement
authornethack.rankin <nethack.rankin>
Sun, 24 Feb 2002 06:51:36 +0000 (06:51 +0000)
committernethack.rankin <nethack.rankin>
Sun, 24 Feb 2002 06:51:36 +0000 (06:51 +0000)
     Allow a WIZKIT file name to be specified via the environment.
If none is specified there, get it from the run-time config file.

src/files.c

index 98e1de24e4143c8cbbf4022aabf443e6f4768cdc..538cad1f9fd75457e50b2959607c7f92777475cb 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)files.c    3.4     2000/04/27      */
+/*     SCCS Id: @(#)files.c    3.4     2002/02/23      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1604,6 +1604,8 @@ fopen_wizkit_file()
        char *envp;
 #endif
 
+       envp = nh_getenv("WIZKIT");
+       if (envp && *envp) Strcpy(wizkit, envp);
        if (!wizkit[0]) return (FILE *)0;
 
 #ifdef UNIX