Source:NetHack 5.0.0/include/vmsconf.h
Jump to navigation
Jump to search
Below is the full text to vmsconf.h from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/include/vmsconf.h#line12]], for example.
The NetHack General Public License applies to screenshots, source code and other content from NetHack.
This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.
1. /* NetHack 5.0 vmsconf.h $NHDT-Date: 1596498569 2020/08/03 23:49:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.33 $ */ 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /*-Copyright (c) Robert Patrick Rankin, 2011. */ 4. /* NetHack may be freely redistributed. See license for details. */ 5. 6. #ifdef VMS 7. #ifndef VMSCONF_H 8. #define VMSCONF_H 9. 10. /* 11. * Edit these to choose values appropriate for your site. 12. * WIZARD is the username allowed to use the debug option of nethack; no harm 13. * is done by leaving it as a username that doesn't exist at your site. 14. * HACKDIR can be overridden at run-time with the logical name HACKDIR, as in 15. * $ define hackdir disk$users:[games.nethack] 16. * Trailing NULs are present in the default values in order to make some 17. * extra room for patching longer values into an existing executable. 18. */ 19. #define Local_WIZARD "NHWIZARD\0\0\0\0" 20. #define Local_HACKDIR "DISK$USERS:[GAMES.NETHACK.3_7_X.PLAY]\0\0\0\0\0\0\0\0" 21. 22. /* 23. * This section cleans up the stuff done in config.h so that it 24. * shouldn't need to be modified. It's conservative so that if 25. * config.h is actually edited, the changes won't impact us. 26. */ 27. #ifdef UNIX 28. #undef UNIX 29. #endif 30. #ifdef HACKDIR 31. #undef HACKDIR 32. #endif 33. #ifdef WIZARD_NAME 34. #undef WIZARD_NAME 35. #endif 36. #define HACKDIR Local_HACKDIR 37. #define WIZARD_NAME Local_WIZARD 38. #ifndef SYSCF 39. #define SYSCF 40. #endif 41. 42. /* filenames require punctuation to avoid redirection via logical names */ 43. #undef RECORD 44. #define RECORD "record;1" /* scoreboard file (retains high scores) */ 45. #undef LOGFILE 46. #define LOGFILE "logfile;0" /* optional file (records all games) */ 47. #undef SYSCF_FILE 48. #define SYSCF_FILE "sysconf;0" 49. 50. #define HLOCK "perm;1" /* an empty file used for locking purposes */ 51. 52. /* want compression--for level & save files--performed within NetHack itself 53. */ 54. #ifdef COMPRESS 55. #undef COMPRESS 56. #endif 57. #ifndef INTERNAL_COMP 58. #define INTERNAL_COMP 59. #endif 60. 61. /* 62. * If nethack.exe will be installed with privilege so that the playground 63. * won't need to be left unprotected, define SECURE to suppress a couple 64. * of file protection fixups (protection of bones files and ownership of 65. * save files). 66. */ 67. /* #define SECURE */ 68. 69. /* 70. * If you use SECURE you'll need to link /noTraceback, in which case 71. * there's no point trying to get extra PANICTRACE info and this might 72. * as well be commented out. When enabled, the sysconf file controls 73. * how to handle it (note that we're hijacking the Unix GDB setting): 74. PANICTRACE_GDB=0 #behave as if PANICTRACE was disabled 75. PANICTRACE_GDB=1 #at conclusion of panic, show a call traceback and exit 76. PANICTRACE_GDB=2 #at conclusion of panic, show a call traceback and then 77. * # remain in the debugger for more interactive debugging 78. * # (not as useful as it might sound since we're normally 79. * # linked /noDebug so there's no symbol table accessible) 80. */ 81. #define PANICTRACE 82. 83. /* 84. * Put the readonly data files into a single container rather than into 85. * separate files in the playground directory. 86. */ 87. #define DLB /* use data librarian code */ 88. 89. /* 90. * Provide menu of saved games to choose from at start. 91. * [Player needs to use ``nethack "-ugames" for this to work.] 92. */ 93. #define SELECTSAVED 94. 95. /* 96. * If you define USE_QIO_INPUT, then you'll get raw characters from the 97. * keyboard, not unlike those of the unix version of Nethack. This will 98. * allow you to use the Escape key in normal gameplay, and the appropriate 99. * control characters in Wizard mode. It will work most like the unix 100. * version. 101. * It will also avoid "<interrupt>" being displayed when ^Y is pressed. 102. * 103. * Otherwise, the VMS SMG calls will be used. These calls block use of 104. * the escape key, as well as certain control keys, so gameplay is not 105. * the same, although the differences are fairly negligible. You must 106. * then use a VTxxx function key or two <escape>s to give an ESC response. 107. */ 108. #define USE_QIO_INPUT /* use SYS$QIOW instead of SMG$READ_KEYSTROKE */ 109. 110. /* 111. * Allow the user to decide whether to pause via timer or excess screen 112. * output for various display effects like explosions and moving objects. 113. */ 114. #define TIMED_DELAY /* enable the `timed_delay' run-time option */ 115. 116. /* 117. * If you define MAIL, then NetHack will capture incoming broadcast 118. * messages such as "New mail from so-and-so" and "Print job completed," 119. * and then deliver them to the player. For mail and phone broadcasts 120. * a scroll of mail will be created, which when read will cause NetHack 121. * to prompt the player for a command to spawn in order to respond. The 122. * latter capability will not be available if SHELL is disabled below. 123. * If you undefine MAIL, broadcasts will go straight to the terminal, 124. * resulting in disruption of the screen display; use <ctrl/R> to redraw. 125. */ 126. #define MAIL /* enable broadcast trapping */ 127. 128. /* 129. * SHELL enables the player to 'escape' into a spawned subprocess via 130. * the '!' command. Logout or attach back to the parent to resume play. 131. * If the player attaches back to NetHack, then a subsequent escape will 132. * re-attach to the existing subprocess. Any such subprocess left over 133. * at game exit will be deleted by an exit handler. 134. * SUSPEND enables someone running NetHack in a subprocess to reconnect 135. * to the parent process with the <ctrl/Z> command; this is not very 136. * close to Unix job control, but it's better than nothing. 137. */ 138. #define SHELL /* do not delete the '!' command */ 139. #define SUSPEND /* don't delete the ^Z command, such as it is */ 140. 141. /* 142. * Some terminals or terminal emulators send two character sequence "ESC c" 143. * when Alt+c is pressed. The altmeta run-time option allows the user to 144. * request that "ESC c" be treated as M-c, which means that if nethack sees 145. * ESC when it is waiting for a command, it will wait for another character 146. * (even if user intended that ESC to be standalone to cancel a count prefix). 147. */ 148. #define ALTMETA /* support altmeta run-time option */ 149. 150. #define RANDOM /* use sys/share/random.c instead of vaxcrtl rand */ 151. 152. /* config.h defines USE_ISAAC64; we'll use it on Alpha or IA64 but not VAX; 153. it overrides RANDOM */ 154. #if !defined(VMSVSI) 155. #if (defined(VAX) || defined(vax) || defined(__vax)) && defined(USE_ISAAC64) 156. #undef ISAAC64 157. #endif 158. #endif 159. 160. #define FCMASK 0660 /* file creation mask */ 161. 162. /* 163. * The remainder of the file should not need to be changed. 164. */ 165. 166. /* This used to be force-defined for VMS in topten.c, but with 167. * the global variable consolidation into g in 5.0, it has to be 168. * defined here so that decl.h includes the field in g. 169. */ 170. #define UPDATE_RECORD_IN_PLACE 171. 172. /* data librarian defs */ 173. #ifdef DLB 174. #define DLBFILE "nh-data.dlb" 175. /* 176. * Since we can do without case insensitive filename comparison, 177. * avoid enabling it because that requires compiling and linking 178. * src/hacklib into util/dlb_main. 179. */ 180. /* # define FILENAME_CMP strcmpi */ /* case insensitive */ 181. #endif 182. 183. #ifndef VMSVSI 184. #if defined(VAXC) && !defined(ANCIENT_VAXC) 185. #ifdef volatile 186. #undef volatile 187. #endif 188. #ifdef const 189. #undef const 190. #endif 191. #endif 192. 193. #ifdef __DECC 194. #define STRICT_REF_DEF /* used in lev_main.c */ 195. #endif 196. #ifdef STRICT_REF_DEF 197. #define DEFINE_OSPEED 198. #endif 199. 200. #ifndef alloca 201. /* bison generated foo_yacc.c might try to use alloca() */ 202. #ifdef __GNUC__ 203. #define alloca __builtin_alloca 204. #else 205. #define ALLOCA_HACK /* used in util/panic.c */ 206. #endif 207. #endif 208. #endif /* !VMSVSI */ 209. 210. #ifdef VMSVSI 211. #define NO_TERMCAP_HEADERS 212. /* C99 */ 213. #include <types.h> 214. #include <unistd.h> 215. #include <fcntl.h> 216. #include <signal.h> 217. #include <stat.h> 218. #include <errno.h> 219. #include <stsdef.h> 220. #endif 221. 222. #ifdef _DECC_V4_SOURCE 223. /* <types.h> excludes some necessary typedefs when _DECC_V4_SOURCE is defined 224. */ 225. #include <types.h> 226. #ifndef __PID_T 227. #define __PID_T 228. typedef __pid_t pid_t; 229. #endif 230. #ifndef __UID_T 231. #define __UID_T 232. typedef __uid_t uid_t; 233. #endif 234. #ifndef __GID_T 235. #define __GID_T 236. typedef __gid_t gid_t; 237. #endif 238. #ifndef __MODE_T 239. #define __MODE_T 240. typedef __mode_t mode_t; 241. #endif 242. #ifndef __OFF_T 243. #define __OFF_T 244. typedef int32_t off_t; 245. #endif 246. #endif /* _DECC_V4_SOURCE */ 247. 248. #ifndef VMSVSI 249. #if 0 /* <file.h> is missing for old gcc versions; skip it to save time */ 250. #include <file.h> 251. #else /* values needed from missing include file */ 252. #define O_RDONLY 0 253. #define O_WRONLY 1 254. #define O_RDWR 2 255. #define O_CREAT 0x200 256. #define O_TRUNC 0x400 257. #endif 258. #endif 259. 260. #define tgetch vms_getchar 261. 262. #ifndef VMSVSI 263. #if defined(__DECC_VER) && (__DECC_VER >= 50000000) 264. /* for cc/Standard=ANSI89, suppress notification that '$' in identifiers 265. is an extension; sys/vms/*.c needs it regardless of strict ANSI mode */ 266. # pragma message disable DOLLARID 267. #endif 268. #endif 269. 270. /* #include "system.h" */ 271. 272. /* Use the high quality random number routines. */ 273. #ifndef USE_ISAAC64 274. # if defined(RANDOM) 275. # define Rand() random() 276. /* VMS V7 adds these entry points to DECC$SHR; stick with the nethack-supplied 277. code to avoid having to deal with version-specific conditionalized builds */ 278. # define random nh_random 279. # define srandom nh_srandom 280. # define initstate nh_initstate 281. # define setstate nh_setstate 282. # else 283. # define Rand() rand() 284. # endif 285. #endif 286. 287. #if !defined(VMSVSI) 288. #ifndef __GNUC__ 289. #ifndef bcopy 290. #define bcopy(s, d, n) memcpy((d), (s), (n)) /* vaxcrtl */ 291. #endif 292. #endif 293. #define abort() vms_abort() /* vmsmisc.c */ 294. #define creat(f, m) vms_creat(f, m) /* vmsfiles.c */ 295. #define exit(sts) vms_exit(sts) /* vmsmisc.c */ 296. #define getuid() vms_getuid() /* vmsunix.c */ 297. #define link(f1, f2) vms_link(f1, f2) /* vmsfiles.c */ 298. #define open(f, k, m) vms_open(f, k, m) /* vmsfiles.c */ 299. #define fopen(f, m) vms_fopen(f, m) /* vmsfiles.c */ 300. /* #define unlink(f0) vms_unlink(f0) */ /* vmsfiles.c */ 301. #ifdef VERYOLD_VMS 302. #define unlink(f0) delete (f0) /* vaxcrtl */ 303. #else 304. #define unlink(f0) remove(f0) /* vaxcrtl, decc$shr */ 305. #endif 306. #endif /* VMSVSI */ 307. 308. #define C$$TRANSLATE(n) c__translate(n) /* vmsfiles.c */ 309. 310. #if !defined(VMSVSI) 311. /* VMS global names are case insensitive... */ 312. #define An vms_an 313. #define The vms_the 314. #define Shk_Your vms_shk_your 315. #endif /* VMSVSI */ 316. 317. /* avoid global symbol in Alpha/VMS V1.5 STARLET library (link trouble) */ 318. #define ospeed vms_ospeed 319. 320. /* used in several files which don't #include "extern.h" */ 321. extern void vms_exit(int); 322. extern int vms_open(const char *, int, unsigned); 323. extern FILE *vms_fopen(const char *, const char *); 324. char *vms_basename(const char *, boolean); /* vmsfiles.c */ 325. 326. #endif /* VMSCONF_H */ 327. #endif /* VMS */