00001 /* SCCS Id: @(#)vmsconf.h 3.4 2003/05/19 */ 00002 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 00003 /* NetHack may be freely redistributed. See license for details. */ 00004 00005 #ifdef VMS 00006 #ifndef VMSCONF_H 00007 #define VMSCONF_H 00008 00009 /* 00010 * Edit these to choose values appropriate for your site. 00011 * WIZARD is the username allowed to use the debug option of nethack; no harm 00012 * is done by leaving it as a username that doesn't exist at your site. 00013 * HACKDIR can be overridden at run-time with the logical name HACKDIR, as in 00014 * $ define hackdir disk$users:[games.nethack] 00015 * Trailing NULs are present in the default values in order to make some 00016 * extra room for patching longer values into an existing executable. 00017 */ 00018 #define Local_WIZARD "NHWIZARD\0\0\0\0" 00019 #define Local_HACKDIR "DISK$USERS:[GAMES.NETHACK.3_4_X.PLAY]\0\0\0\0\0\0\0\0" 00020 00021 /* 00022 * This section cleans up the stuff done in config.h so that it 00023 * shouldn't need to be modified. It's conservative so that if 00024 * config.h is actually edited, the changes won't impact us. 00025 */ 00026 #ifdef UNIX 00027 # undef UNIX 00028 #endif 00029 #ifdef HACKDIR 00030 # undef HACKDIR 00031 #endif 00032 #ifdef WIZARD 00033 # undef WIZARD 00034 #endif 00035 #ifdef WIZARD_NAME 00036 # undef WIZARD_NAME 00037 #endif 00038 #define HACKDIR Local_HACKDIR 00039 #ifndef KR1ED 00040 # define WIZARD Local_WIZARD 00041 # define WIZARD_NAME WIZARD 00042 #else 00043 # define WIZARD 1 00044 # define WIZARD_NAME Local_WIZARD 00045 #endif 00046 00047 /* filenames require punctuation to avoid redirection via logical names */ 00048 #undef RECORD 00049 #define RECORD "record;1" /* scoreboard file (retains high scores) */ 00050 #undef LOGFILE 00051 #define LOGFILE "logfile;0" /* optional file (records all games) */ 00052 00053 #define HLOCK "perm;1" /* an empty file used for locking purposes */ 00054 00055 /* want compression--for level & save files--performed within NetHack itself */ 00056 #ifdef COMPRESS 00057 # undef COMPRESS 00058 #endif 00059 #ifndef INTERNAL_COMP 00060 # define INTERNAL_COMP 00061 #endif 00062 00063 /* 00064 * If nethack.exe will be installed with privilege so that the playground 00065 * won't need to be left unprotected, define SECURE to suppress a couple 00066 * of file protection fixups (protection of bones files and ownership of 00067 * save files). 00068 */ 00069 /* #define SECURE */ 00070 00071 /* 00072 * Put the readonly data files into a single container rather than into 00073 * separate files in the playground directory. 00074 */ 00075 #define DLB /* use data librarian code */ 00076 00077 /* 00078 * You may define TEXTCOLOR if your system has any terminals that recognize 00079 * ANSI color sequences of the form ``<ESCAPE>[#;#m'', where the first # is 00080 * a number between 40 and 47 represented background color, and the second 00081 * # is a number between 30 and 37 representing the foreground color. 00082 * GIGI terminals and DECterm windows on color VAXstations support these 00083 * color escape sequences, as do some 3rd party terminals and many micro 00084 * computers. 00085 */ 00086 /* #define TEXTCOLOR */ 00087 00088 /* 00089 * If you define USE_QIO_INPUT, then you'll get raw characters from the 00090 * keyboard, not unlike those of the unix version of Nethack. This will 00091 * allow you to use the Escape key in normal gameplay, and the appropriate 00092 * control characters in Wizard mode. It will work most like the unix version. 00093 * It will also avoid "<interrupt>" being displayed when ^Y is pressed. 00094 * 00095 * Otherwise, the VMS SMG calls will be used. These calls block use of 00096 * the escape key, as well as certain control keys, so gameplay is not 00097 * the same, although the differences are fairly negligible. You must 00098 * then use a VTxxx function key or two <escape>s to give an ESC response. 00099 */ 00100 #define USE_QIO_INPUT /* use SYS$QIOW instead of SMG$READ_KEYSTROKE */ 00101 00102 /* 00103 * Allow the user to decide whether to pause via timer or excess screen 00104 * output for various display effects like explosions and moving objects. 00105 */ 00106 #define TIMED_DELAY /* enable the `timed_delay' run-time option */ 00107 00108 /* 00109 * If you define MAIL, then NetHack will capture incoming broadcast 00110 * messages such as "New mail from so-and-so" and "Print job completed," 00111 * and then deliver them to the player. For mail and phone broadcasts 00112 * a scroll of mail will be created, which when read will cause NetHack 00113 * to prompt the player for a command to spawn in order to respond. The 00114 * latter capability will not be available if SHELL is disabled below. 00115 * If you undefine MAIL, broadcasts will go straight to the terminal, 00116 * resulting in disruption of the screen display; use <ctrl/R> to redraw. 00117 */ 00118 #define MAIL /* enable broadcast trapping */ 00119 00120 /* 00121 * SHELL enables the player to 'escape' into a spawned subprocess via 00122 * the '!' command. Logout or attach back to the parent to resume play. 00123 * If the player attaches back to NetHack, then a subsequent escape will 00124 * re-attach to the existing subprocess. Any such subprocess left over 00125 * at game exit will be deleted by an exit handler. 00126 * SUSPEND enables someone running NetHack in a subprocess to reconnect 00127 * to the parent process with the <ctrl/Z> command; this is not very 00128 * close to Unix job control, but it's better than nothing. 00129 */ 00130 #define SHELL /* do not delete the '!' command */ 00131 #define SUSPEND /* don't delete the ^Z command, such as it is */ 00132 00133 #define RANDOM /* use sys/share/random.c instead of vaxcrtl rand */ 00134 00135 #define FCMASK 0660 /* file creation mask */ 00136 00137 00138 /* 00139 * The remainder of the file should not need to be changed. 00140 */ 00141 00142 /* data librarian defs */ 00143 #ifdef DLB 00144 # define DLBFILE "nh-data.dlb" 00145 /* 00146 * Since we can do without case insensitive filename comparison, 00147 * avoid enabling it because that requires compiling and linking 00148 * src/hacklib into util/dlb_main. 00149 */ 00150 /* # define FILENAME_CMP strcmpi */ /* case insensitive */ 00151 #endif 00152 00153 #if defined(VAXC) && !defined(ANCIENT_VAXC) 00154 # ifdef volatile 00155 # undef volatile 00156 # endif 00157 # ifdef const 00158 # undef const 00159 # endif 00160 #endif 00161 00162 #ifdef __DECC 00163 # define STRICT_REF_DEF /* used in lev_main.c */ 00164 #endif 00165 #ifdef STRICT_REF_DEF 00166 # define DEFINE_OSPEED 00167 #endif 00168 00169 #ifndef alloca 00170 /* bison generated foo_yacc.c might try to use alloca() */ 00171 # ifdef __GNUC__ 00172 # define alloca __builtin_alloca 00173 # else 00174 # define ALLOCA_HACK /* used in util/panic.c */ 00175 # endif 00176 #endif 00177 00178 #ifdef _DECC_V4_SOURCE 00179 /* <types.h> excludes some necessary typedefs when _DECC_V4_SOURCE is defined */ 00180 #include <types.h> 00181 # ifndef __PID_T 00182 # define __PID_T 00183 typedef __pid_t pid_t; 00184 # endif 00185 # ifndef __UID_T 00186 # define __UID_T 00187 typedef __uid_t uid_t; 00188 # endif 00189 # ifndef __GID_T 00190 # define __GID_T 00191 typedef __gid_t gid_t; 00192 # endif 00193 # ifndef __MODE_T 00194 # define __MODE_T 00195 typedef __mode_t mode_t; 00196 # endif 00197 #endif /* _DECC_V4_SOURCE */ 00198 00199 #include <time.h> 00200 #if 0 /* <file.h> is missing for old gcc versions; skip it to save time */ 00201 #include <file.h> 00202 #else /* values needed from missing include file */ 00203 # define O_RDONLY 0 00204 # define O_WRONLY 1 00205 # define O_RDWR 2 00206 # define O_CREAT 0x200 00207 # define O_TRUNC 0x400 00208 #endif 00209 00210 #ifndef REDO 00211 # define Getchar nhgetch 00212 #endif 00213 #define tgetch vms_getchar 00214 00215 #include "system.h" 00216 00217 #define index strchr 00218 #define rindex strrchr 00219 00220 /* Use the high quality random number routines. */ 00221 #if defined(RANDOM) 00222 #define Rand() random() 00223 /* VMS V7 adds these entry points to DECC$SHR; stick with the nethack-supplied 00224 code to avoid having to deal with version-specific conditionalized builds */ 00225 #define random nh_random 00226 #define srandom nh_srandom 00227 #define initstate nh_initstate 00228 #define setstate nh_setstate 00229 #else 00230 #define Rand() rand() 00231 #endif 00232 00233 #ifndef __GNUC__ 00234 # ifndef bcopy 00235 #define bcopy(s,d,n) memcpy((d),(s),(n)) /* vaxcrtl */ 00236 # endif 00237 #endif 00238 #define abort() vms_abort() /* vmsmisc.c */ 00239 #define creat(f,m) vms_creat(f,m) /* vmsfiles.c */ 00240 #define exit(sts) vms_exit(sts) /* vmsmisc.c */ 00241 #define getuid() vms_getuid() /* vmsunix.c */ 00242 #define link(f1,f2) vms_link(f1,f2) /* vmsfiles.c */ 00243 #define open(f,k,m) vms_open(f,k,m) /* vmsfiles.c */ 00244 /* #define unlink(f0) vms_unlink(f0) /* vmsfiles.c */ 00245 #ifdef VERYOLD_VMS 00246 #define unlink(f0) delete(f0) /* vaxcrtl */ 00247 #else 00248 #define unlink(f0) remove(f0) /* vaxcrtl, decc$shr */ 00249 #endif 00250 #define C$$TRANSLATE(n) c__translate(n) /* vmsfiles.c */ 00251 00252 /* VMS global names are case insensitive... */ 00253 #define An vms_an 00254 #define The vms_the 00255 #define Shk_Your vms_shk_your 00256 00257 /* avoid global symbol in Alpha/VMS V1.5 STARLET library (link trouble) */ 00258 #define ospeed vms_ospeed 00259 00260 /* used in several files which don't #include "extern.h" */ 00261 extern void FDECL(vms_exit, (int)); 00262 extern int FDECL(vms_open, (const char *,int,unsigned)); 00263 00264 #endif /* VMSCONF_H */ 00265 #endif /* VMS */