1 /* SCCS Id: @(#)vmsconf.h 3.4 2003/05/19 */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed. See license for details. */
10 * Edit these to choose values appropriate for your site.
11 * WIZARD is the username allowed to use the debug option of nethack; no harm
12 * is done by leaving it as a username that doesn't exist at your site.
13 * HACKDIR can be overridden at run-time with the logical name HACKDIR, as in
14 * $ define hackdir disk$users:[games.nethack]
15 * Trailing NULs are present in the default values in order to make some
16 * extra room for patching longer values into an existing executable.
18 #define Local_WIZARD "NHWIZARD\0\0\0\0"
19 #define Local_HACKDIR "DISK$USERS:[GAMES.NETHACK.3_4_X.PLAY]\0\0\0\0\0\0\0\0"
22 * This section cleans up the stuff done in config.h so that it
23 * shouldn't need to be modified. It's conservative so that if
24 * config.h is actually edited, the changes won't impact us.
38 #define HACKDIR Local_HACKDIR
40 # define WIZARD Local_WIZARD
41 # define WIZARD_NAME WIZARD
44 # define WIZARD_NAME Local_WIZARD
47 /* filenames require punctuation to avoid redirection via logical names */
49 #define RECORD "record;1" /* scoreboard file (retains high scores) */
51 #define LOGFILE "logfile;0" /* optional file (records all games) */
53 #define HLOCK "perm;1" /* an empty file used for locking purposes */
55 /* want compression--for level & save files--performed within NetHack itself */
60 # define INTERNAL_COMP
64 * If nethack.exe will be installed with privilege so that the playground
65 * won't need to be left unprotected, define SECURE to suppress a couple
66 * of file protection fixups (protection of bones files and ownership of
72 * Put the readonly data files into a single container rather than into
73 * separate files in the playground directory.
75 #define DLB /* use data librarian code */
78 * You may define TEXTCOLOR if your system has any terminals that recognize
79 * ANSI color sequences of the form ``<ESCAPE>[#;#m'', where the first # is
80 * a number between 40 and 47 represented background color, and the second
81 * # is a number between 30 and 37 representing the foreground color.
82 * GIGI terminals and DECterm windows on color VAXstations support these
83 * color escape sequences, as do some 3rd party terminals and many micro
86 /* #define TEXTCOLOR */
89 * If you define USE_QIO_INPUT, then you'll get raw characters from the
90 * keyboard, not unlike those of the unix version of Nethack. This will
91 * allow you to use the Escape key in normal gameplay, and the appropriate
92 * control characters in Wizard mode. It will work most like the unix version.
93 * It will also avoid "<interrupt>" being displayed when ^Y is pressed.
95 * Otherwise, the VMS SMG calls will be used. These calls block use of
96 * the escape key, as well as certain control keys, so gameplay is not
97 * the same, although the differences are fairly negligible. You must
98 * then use a VTxxx function key or two <escape>s to give an ESC response.
100 #define USE_QIO_INPUT /* use SYS$QIOW instead of SMG$READ_KEYSTROKE */
103 * Allow the user to decide whether to pause via timer or excess screen
104 * output for various display effects like explosions and moving objects.
106 #define TIMED_DELAY /* enable the `timed_delay' run-time option */
109 * If you define MAIL, then NetHack will capture incoming broadcast
110 * messages such as "New mail from so-and-so" and "Print job completed,"
111 * and then deliver them to the player. For mail and phone broadcasts
112 * a scroll of mail will be created, which when read will cause NetHack
113 * to prompt the player for a command to spawn in order to respond. The
114 * latter capability will not be available if SHELL is disabled below.
115 * If you undefine MAIL, broadcasts will go straight to the terminal,
116 * resulting in disruption of the screen display; use <ctrl/R> to redraw.
118 #define MAIL /* enable broadcast trapping */
121 * SHELL enables the player to 'escape' into a spawned subprocess via
122 * the '!' command. Logout or attach back to the parent to resume play.
123 * If the player attaches back to NetHack, then a subsequent escape will
124 * re-attach to the existing subprocess. Any such subprocess left over
125 * at game exit will be deleted by an exit handler.
126 * SUSPEND enables someone running NetHack in a subprocess to reconnect
127 * to the parent process with the <ctrl/Z> command; this is not very
128 * close to Unix job control, but it's better than nothing.
130 #define SHELL /* do not delete the '!' command */
131 #define SUSPEND /* don't delete the ^Z command, such as it is */
133 #define RANDOM /* use sys/share/random.c instead of vaxcrtl rand */
135 #define FCMASK 0660 /* file creation mask */
139 * The remainder of the file should not need to be changed.
142 /* data librarian defs */
144 # define DLBFILE "nh-data.dlb"
146 * Since we can do without case insensitive filename comparison,
147 * avoid enabling it because that requires compiling and linking
148 * src/hacklib into util/dlb_main.
150 /* # define FILENAME_CMP strcmpi */ /* case insensitive */
153 #if defined(VAXC) && !defined(ANCIENT_VAXC)
163 # define STRICT_REF_DEF /* used in lev_main.c */
165 #ifdef STRICT_REF_DEF
166 # define DEFINE_OSPEED
170 /* bison generated foo_yacc.c might try to use alloca() */
172 # define alloca __builtin_alloca
174 # define ALLOCA_HACK /* used in util/panic.c */
178 #ifdef _DECC_V4_SOURCE
179 /* <types.h> excludes some necessary typedefs when _DECC_V4_SOURCE is defined */
183 typedef __pid_t pid_t;
187 typedef __uid_t uid_t;
191 typedef __gid_t gid_t;
195 typedef __mode_t mode_t;
197 #endif /* _DECC_V4_SOURCE */
200 #if 0 /* <file.h> is missing for old gcc versions; skip it to save time */
202 #else /* values needed from missing include file */
206 # define O_CREAT 0x200
207 # define O_TRUNC 0x400
211 # define Getchar nhgetch
213 #define tgetch vms_getchar
218 #define rindex strrchr
220 /* Use the high quality random number routines. */
222 #define Rand() random()
223 /* VMS V7 adds these entry points to DECC$SHR; stick with the nethack-supplied
224 code to avoid having to deal with version-specific conditionalized builds */
225 #define random nh_random
226 #define srandom nh_srandom
227 #define initstate nh_initstate
228 #define setstate nh_setstate
230 #define Rand() rand()
235 #define bcopy(s,d,n) memcpy((d),(s),(n)) /* vaxcrtl */
238 #define abort() vms_abort() /* vmsmisc.c */
239 #define creat(f,m) vms_creat(f,m) /* vmsfiles.c */
240 #define exit(sts) vms_exit(sts) /* vmsmisc.c */
241 #define getuid() vms_getuid() /* vmsunix.c */
242 #define link(f1,f2) vms_link(f1,f2) /* vmsfiles.c */
243 #define open(f,k,m) vms_open(f,k,m) /* vmsfiles.c */
244 /* #define unlink(f0) vms_unlink(f0) /* vmsfiles.c */
246 #define unlink(f0) delete(f0) /* vaxcrtl */
248 #define unlink(f0) remove(f0) /* vaxcrtl, decc$shr */
250 #define C$$TRANSLATE(n) c__translate(n) /* vmsfiles.c */
252 /* VMS global names are case insensitive... */
255 #define Shk_Your vms_shk_your
257 /* avoid global symbol in Alpha/VMS V1.5 STARLET library (link trouble) */
258 #define ospeed vms_ospeed
260 /* used in several files which don't #include "extern.h" */
261 extern void FDECL(vms_exit, (int));
262 extern int FDECL(vms_open, (const char *,int,unsigned));
264 #endif /* VMSCONF_H */