Fandom

Wikihack

Source:NetHack 3.1.0/vmsconf.h

2,034pages on
this wiki
Add New Page
Talk0

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Below is the full text to vmsconf.h from the source code of NetHack 3.1.0. To link to a particular line, write [[NetHack 3.1.0/vmsconf.h#line123]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

The NetHack General Public License applies to screenshots, source code and other content from NetHack.
1.    /*	SCCS Id: @(#)vmsconf.h	3.1	92/12/11	*/
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifdef VMS
6.    #ifndef VMSCONF_H
7.    #define VMSCONF_H
8.    
9.    /*
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.
17.    */
18.   #define Local_WIZARD	"NHWIZARD\0\0\0\0"
19.   #define Local_HACKDIR	"DISK$USERS:[GAMES.NETHACK.3-1-0.PLAY]\0\0\0\0\0\0"
20.   
21.   /*
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.
25.    */
26.   #ifdef UNIX
27.   # undef UNIX
28.   #endif
29.   #ifdef HACKDIR
30.   # undef HACKDIR
31.   #endif
32.   #ifdef WIZARD
33.   # undef WIZARD
34.   #endif
35.   #ifdef WIZARD_NAME
36.   # undef WIZARD_NAME
37.   #endif
38.   #define HACKDIR Local_HACKDIR
39.   #ifndef KR1ED
40.   # define WIZARD Local_WIZARD
41.   # define WIZARD_NAME WIZARD
42.   #else
43.   # define WIZARD 1
44.   # define WIZARD_NAME Local_WIZARD
45.   #endif
46.   
47.   /* filenames require punctuation to avoid redirection via logical names */
48.   #undef RECORD
49.   #define RECORD	"record;1"	/* scoreboard file (retains high scores) */
50.   #undef LOGFILE
51.   #define LOGFILE	"logfile;0"	/* optional file (records all games) */
52.   
53.   #define HLOCK	"perm;1"	/* an empty file used for locking purposes */
54.   
55.   /* want compression--for level & save files--performed within NetHack itself */
56.   #ifdef COMPRESS
57.   # undef COMPRESS
58.   #endif
59.   #ifndef ZEROCOMP
60.   # define ZEROCOMP
61.   #endif
62.   
63.   /* vision algorithm */
64.   #ifdef VISION_TABLES
65.   # if defined(VAXC) && defined(BRACES)
66.   #  undef BRACES
67.   # endif
68.   # if defined(__GNUC__) && !defined(BRACES)
69.   #  define BRACES		/* put braces around rows of 2d arrays */
70.   # endif
71.   #else	/* not VISION_TABLES */
72.   # define MACRO_CPATH	/* use clear_path macro instead of function */
73.   #endif
74.   
75.   /*
76.    * If nethack.exe will be installed with privilege so that the playground
77.    * won't need to be left unprotected, define SECURE to suppress a couple
78.    * of file protection fixups (protection of bones files and ownership of
79.    * save files).
80.    */
81.   /* #define SECURE /**/
82.   
83.   /*
84.    * You may define TEXTCOLOR if your system has any terminals that recognize
85.    * ANSI color sequences of the form ``<ESCAPE>[#;#m, where the first # is
86.    * a number between 40 and 47 represented background color, and the second
87.    * # is a number between 30 and 37 representing the foreground color.
88.    * GIGI terminals and DECterm windows on color VAXstations support these
89.    * color escape sequences, as do some 3rd party terminals and many micro
90.    * computers.
91.    */
92.   /* #define TEXTCOLOR /**/
93.   
94.   /*
95.    * If you define USE_QIO_INPUT, then you'll get raw characters from the
96.    * keyboard, not unlike those of the unix version of Nethack.  This will
97.    * allow you to use the Escape key in normal gameplay, and the appropriate
98.    * control characters in Wizard mode.  It will work most like the unix version.
99.    * It will also avoid "<interrupt>" being displayed when ^Y is pressed.
100.   *
101.   * Otherwise, the VMS SMG calls will be used.  These calls block use of
102.   * the escape key, as well as certain control keys, so gameplay is not
103.   * the same, although the differences are fairly negligible.  You must
104.   * then use a VTxxx function key or two <escape>s to give an ESC response.
105.   */
106.  #define USE_QIO_INPUT	/* use SYS$QIOW instead of SMG$READ_KEYSTROKE */
107.  
108.  /*
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.
117.   */
118.  #define MAIL		/* enable broadcast trapping */
119.  
120.  /*
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.
129.   */
130.  #define SHELL		/* do not delete the '!' command */
131.  #define SUSPEND		/* don't delete the ^Z command, such as it is */
132.  
133.  #define RANDOM		/* use sys/share/random.c instead of vaxcrtl rand */
134.  
135.  #define FCMASK	0660	/* file creation mask */
136.  
137.  /*
138.   * The remainder of the file should not need to be changed.
139.   */
140.  
141.  #if defined(VAXC) && !defined(ANCIENT_VAXC)
142.  # ifdef volatile
143.  #  undef volatile
144.  # endif
145.  # ifdef const
146.  #  undef const
147.  # endif
148.  #endif
149.  
150.  #ifdef __DECC
151.  # define STRICT_REF_DEF	/* used in lev_main.c */
152.  #endif
153.  #ifdef STRICT_REF_DEF
154.  # define DEFINE_OSPEED
155.  #endif
156.  
157.  #ifndef alloca
158.  	/* bison generated foo_yacc.c might try to use alloca() */
159.  # ifdef __GNUC__
160.  #  define alloca __builtin_alloca
161.  # else
162.  #  define ALLOCA_HACK	/* used in util/panic.c */
163.  # endif
164.  #endif
165.  
166.  #include <time.h>
167.  #if 0	/* <file.h> is missing for old gcc versions; skip it to save time */
168.  #include <file.h>
169.  #else	/* values needed from missing include file */
170.  # define O_RDONLY 0
171.  # define O_WRONLY 1
172.  # define O_RDWR   2
173.  # define O_CREAT 0x200
174.  #endif
175.  
176.  #ifndef REDO
177.  # define Getchar nhgetch
178.  #endif
179.  #define tgetch vms_getchar
180.  
181.  #include "system.h"
182.  
183.  #define index	strchr
184.  #define rindex	strrchr
185.  
186.  /* Use the high quality random number routines. */
187.  #if defined(RANDOM)
188.  #define Rand()	random()
189.  #else
190.  #define Rand()	rand()
191.  #endif
192.  
193.  #ifndef __GNUC__
194.  #define bcopy(s,d,n)	memcpy((d),(s),(n))	/* vaxcrtl */
195.  #endif
196.  #define abort()		vms_abort()		/* vmsmisc.c */
197.  #define creat(f,m)	vms_creat(f,m)		/* vmsfiles.c */
198.  #define exit(sts)	vms_exit(sts)		/* vmsmisc.c */
199.  #define getuid()	vms_getuid()		/* vmsunix.c */
200.  #define link(f1,f2)	vms_link(f1,f2)		/* vmsfiles.c */
201.  #define open(f,k,m)	vms_open(f,k,m)		/* vmsfiles.c */
202.  /* #define unlink(f0)	vms_unlink(f0)		/* vmsfiles.c */
203.  #ifdef VERYOLD_VMS
204.  #define unlink(f0)	delete(f0)		/* vaxcrtl */
205.  #else
206.  #define unlink(f0)	remove(f0)		/* vaxcrtl, decc$shr */
207.  #endif
208.  #define C$$TRANSLATE(n)	c__translate(n)	/* vmsfiles.c */
209.  
210.  /* VMS global names are case insensitive... */
211.  #define An vms_an
212.  #define The vms_the
213.  
214.  /* used in several files which don't #include "extern.h" */
215.  extern void FDECL(vms_exit, (int));
216.  
217.  #endif	/* VMSCONF_H */
218.  #endif	/* VMS */

Also on Fandom

Random Wiki