Fandom

Wikihack

Source:NetHack 3.4.0/config.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 config.h from the source code of NetHack 3.4.0. To link to a particular line, write [[NetHack 3.4.0/config.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: @(#)config.h	3.4	2002/03/17	*/
2.    /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifndef CONFIG_H /* make sure the compiler does not see the typedefs twice */
6.    #define CONFIG_H
7.    
8.    
9.    /*
10.    * Section 1:	Operating and window systems selection.
11.    *		Select the version of the OS you are using.
12.    *		For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h.
13.    *		A "VMS" option is not needed since the VMS C-compilers
14.    *		provide it (no need to change sec#1, vmsconf.h handles it).
15.    */
16.   
17.   #define UNIX		/* delete if no fork(), exec() available */
18.   
19.   /* #define MSDOS */	/* in case it's not auto-detected */
20.   
21.   /* #define OS2 */	/* define for OS/2 */
22.   
23.   /* #define TOS */	/* define for Atari ST/TT */
24.   
25.   /* #define STUPID */	/* avoid some complicated expressions if
26.   			   your C compiler chokes on them */
27.   /* #define MINIMAL_TERM */
28.   			/* if a terminal handles highlighting or tabs poorly,
29.   			   try this define, used in pager.c and termcap.c */
30.   /* #define ULTRIX_CC20 */
31.   			/* define only if using cc v2.0 on a DECstation */
32.   /* #define ULTRIX_PROTO */
33.   			/* define for Ultrix 4.0 (or higher) on a DECstation;
34.   			 * if you get compiler errors, don't define this. */
35.   			/* Hint: if you're not developing code, don't define
36.   			   ULTRIX_PROTO. */
37.   
38.   #include "config1.h"	/* should auto-detect MSDOS, MAC, AMIGA, and WIN32 */
39.   
40.   
41.   /* Windowing systems...
42.    * Define all of those you want supported in your binary.
43.    * Some combinations make no sense.  See the installation document.
44.    */
45.   #define TTY_GRAPHICS	/* good old tty based graphics */
46.   /* #define X11_GRAPHICS */	/* X11 interface */
47.   /* #define QT_GRAPHICS */	/* Qt interface */
48.   /* #define GNOME_GRAPHICS */	/* Gnome interface */
49.   /* #define MSWIN_GRAPHICS */	/* Windows NT, CE, Graphics */
50.   
51.   /*
52.    * Define the default window system.  This should be one that is compiled
53.    * into your system (see defines above).  Known window systems are:
54.    *
55.    *	tty, X11, mac, amii, BeOS, Qt, Gem, Gnome
56.    */
57.   
58.   /* MAC also means MAC windows */
59.   #ifdef MAC
60.   # ifndef	AUX
61.   #  define DEFAULT_WINDOW_SYS "mac"
62.   # endif
63.   #endif
64.   
65.   /* Amiga supports AMII_GRAPHICS and/or TTY_GRAPHICS */
66.   #ifdef AMIGA
67.   # define AMII_GRAPHICS			/* (optional) */
68.   # define DEFAULT_WINDOW_SYS "amii"	/* "amii", "amitile" or "tty" */
69.   #endif
70.   
71.   /* Atari supports GEM_GRAPHICS and/or TTY_GRAPHICS */
72.   #ifdef TOS
73.   # define GEM_GRAPHICS			/* Atari GEM interface (optional) */
74.   # define DEFAULT_WINDOW_SYS "Gem"	/* "Gem" or "tty" */
75.   #endif
76.   
77.   #ifdef __BEOS__
78.   #define BEOS_GRAPHICS /* (optional) */
79.   #define DEFAULT_WINDOW_SYS "BeOS"  /* "tty" */
80.   #ifndef HACKDIR	/* override the default hackdir below */
81.   # define HACKDIR "/boot/apps/NetHack"
82.   #endif
83.   #endif
84.   
85.   #ifdef QT_GRAPHICS
86.   # define USER_SOUNDS		/* Use sounds */
87.   # define USE_XPM		/* Use XPM format for images (required) */
88.   # define GRAPHIC_TOMBSTONE	/* Use graphical tombstone (rip.ppm) */
89.   # ifndef DEFAULT_WINDOW_SYS
90.   #  define DEFAULT_WINDOW_SYS "Qt"
91.   # endif
92.   #endif
93.   
94.   #ifdef GNOME_GRAPHICS
95.   # define USE_XPM		/* Use XPM format for images (required) */
96.   # define GRAPHIC_TOMBSTONE	/* Use graphical tombstone (rip.ppm) */
97.   # ifndef DEFAULT_WINDOW_SYS
98.   #  define DEFAULT_WINDOW_SYS "Gnome"
99.   # endif
100.  #endif
101.  
102.  #ifdef MSWIN_GRAPHICS
103.  # ifdef TTY_GRAPHICS
104.  # undef TTY_GRAPHICS
105.  # endif
106.  # ifndef DEFAULT_WINDOW_SYS
107.  #  define DEFAULT_WINDOW_SYS "mswin"
108.  # endif
109.  # define HACKDIR "\\nethack"
110.  #endif
111.  
112.  #ifndef DEFAULT_WINDOW_SYS
113.  # define DEFAULT_WINDOW_SYS "tty"
114.  #endif
115.  
116.  #ifdef X11_GRAPHICS
117.  /*
118.   * There are two ways that X11 tiles may be defined.  (1) using a custom
119.   * format loaded by NetHack code, or (2) using the XPM format loaded by
120.   * the free XPM library.  The second option allows you to then use other
121.   * programs to generate tiles files.  For example, the PBMPlus tools
122.   * would allow:
123.   *  xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
124.   */
125.  /* # define USE_XPM */		/* Disable if you do not have the XPM library */
126.  # ifdef USE_XPM
127.  #  define GRAPHIC_TOMBSTONE	/* Use graphical tombstone (rip.xpm) */
128.  # endif
129.  #endif
130.  
131.  
132.  /*
133.   * Section 2:	Some global parameters and filenames.
134.   *		Commenting out WIZARD, LOGFILE, or NEWS removes that feature
135.   *		from the game; otherwise set the appropriate wizard name.
136.   *		LOGFILE and NEWS refer to files in the playground.
137.   */
138.  
139.  #ifndef WIZARD		/* allow for compile-time or Makefile changes */
140.  # ifndef KR1ED
141.  #  define WIZARD  "wizard" /* the person allowed to use the -D option */
142.  # else
143.  #  define WIZARD
144.  #  define WIZARD_NAME "wizard"
145.  # endif
146.  #endif
147.  
148.  #define LOGFILE "logfile"	/* larger file for debugging purposes */
149.  #define NEWS "news"		/* the file containing the latest hack news */
150.  
151.  /*
152.   *	If COMPRESS is defined, it should contain the full path name of your
153.   *	'compress' program.  Defining INTERNAL_COMP causes NetHack to do
154.   *	simpler byte-stream compression internally.  Both COMPRESS and
155.   *	INTERNAL_COMP create smaller bones/level/save files, but require
156.   *	additional code and time.  Currently, only UNIX fully implements
157.   *	COMPRESS; other ports should be able to uncompress save files a
158.   *	la unixmain.c if so inclined.
159.   *	If you define COMPRESS, you must also define COMPRESS_EXTENSION
160.   *	as the extension your compressor appends to filenames after
161.   *	compression.
162.   */
163.  
164.  #ifdef UNIX
165.  /* path and file name extension for compression program */
166.  #define COMPRESS "/usr/bin/compress"	/* Lempel-Ziv compression */
167.  #define COMPRESS_EXTENSION ".Z"		/* compress's extension */
168.  /* An example of one alternative you might want to use: */
169.  /* #define COMPRESS "/usr/local/bin/gzip" */	/* FSF gzip compression */
170.  /* #define COMPRESS_EXTENSION ".gz" */		/* normal gzip extension */
171.  #endif
172.  
173.  #ifndef COMPRESS
174.  # define INTERNAL_COMP	/* control use of NetHack's compression routines */
175.  #endif
176.  
177.  /*
178.   *	Data librarian.  Defining DLB places most of the support files into
179.   *	a tar-like file, thus making a neater installation.  See *conf.h
180.   *	for detailed configuration.
181.   */
182.  /* #define DLB */	/* not supported on all platforms */
183.  
184.  /*
185.   *	Defining INSURANCE slows down level changes, but allows games that
186.   *	died due to program or system crashes to be resumed from the point
187.   *	of the last level change, after running a utility program.
188.   */
189.  #define INSURANCE	/* allow crashed game recovery */
190.  
191.  #ifndef MAC
192.  # define CHDIR		/* delete if no chdir() available */
193.  #endif
194.  
195.  #ifdef CHDIR
196.  /*
197.   * If you define HACKDIR, then this will be the default playground;
198.   * otherwise it will be the current directory.
199.   */
200.  # ifndef HACKDIR
201.  #  ifdef __APPLE__
202.  #    define HACKDIR "nethackdir"	/* nethack directory */
203.  #  else
204.  #    define HACKDIR "/usr/games/lib/nethackdir"
205.  #  endif
206.  # endif
207.  
208.  /*
209.   * Some system administrators are stupid enough to make Hack suid root
210.   * or suid daemon, where daemon has other powers besides that of reading or
211.   * writing Hack files.	In such cases one should be careful with chdir's
212.   * since the user might create files in a directory of his choice.
213.   * Of course SECURE is meaningful only if HACKDIR is defined.
214.   */
215.  /* #define SECURE */	/* do setuid(getuid()) after chdir() */
216.  
217.  /*
218.   * If it is desirable to limit the number of people that can play Hack
219.   * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS.
220.   * #define MAX_NR_OF_PLAYERS 6
221.   */
222.  #endif /* CHDIR */
223.  
224.  
225.  
226.  /*
227.   * Section 3:	Definitions that may vary with system type.
228.   *		For example, both schar and uchar should be short ints on
229.   *		the AT&T 3B2/3B5/etc. family.
230.   */
231.  
232.  /*
233.   * Uncomment the following line if your compiler doesn't understand the
234.   * 'void' type (and thus would give all sorts of compile errors without
235.   * this definition).
236.   */
237.  /* #define NOVOID */			/* define if no "void" data type. */
238.  
239.  /*
240.   * Uncomment the following line if your compiler falsely claims to be
241.   * a standard C compiler (i.e., defines __STDC__ without cause).
242.   * Examples are Apollo's cc (in some versions) and possibly SCO UNIX's rcc.
243.   */
244.  /* #define NOTSTDC */			/* define for lying compilers */
245.  
246.  #include "tradstdc.h"
247.  
248.  /*
249.   * type schar: small signed integers (8 bits suffice) (eg. TOS)
250.   *
251.   *	typedef char	schar;
252.   *
253.   *	will do when you have signed characters; otherwise use
254.   *
255.   *	typedef short int schar;
256.   */
257.  #ifdef AZTEC
258.  # define schar	char
259.  #else
260.  typedef signed char	schar;
261.  #endif
262.  
263.  /*
264.   * type uchar: small unsigned integers (8 bits suffice - but 7 bits do not)
265.   *
266.   *	typedef unsigned char	uchar;
267.   *
268.   *	will be satisfactory if you have an "unsigned char" type;
269.   *	otherwise use
270.   *
271.   *	typedef unsigned short int uchar;
272.   */
273.  #ifndef _AIX32		/* identical typedef in system file causes trouble */
274.  typedef unsigned char	uchar;
275.  #endif
276.  
277.  /*
278.   * Various structures have the option of using bitfields to save space.
279.   * If your C compiler handles bitfields well (e.g., it can initialize structs
280.   * containing bitfields), you can define BITFIELDS.  Otherwise, the game will
281.   * allocate a separate character for each bitfield.  (The bitfields used never
282.   * have more than 7 bits, and most are only 1 bit.)
283.   */
284.  #define BITFIELDS	/* Good bitfield handling */
285.  
286.  /* #define STRNCMPI */	/* compiler/library has the strncmpi function */
287.  
288.  /*
289.   * There are various choices for the NetHack vision system.  There is a
290.   * choice of two algorithms with the same behavior.  Defining VISION_TABLES
291.   * creates huge (60K) tables at compile time, drastically increasing data
292.   * size, but runs slightly faster than the alternate algorithm.  (MSDOS in
293.   * particular cannot tolerate the increase in data size; other systems can
294.   * flip a coin weighted to local conditions.)
295.   *
296.   * If VISION_TABLES is not defined, things will be faster if you can use
297.   * MACRO_CPATH.  Some cpps, however, cannot deal with the size of the
298.   * functions that have been macroized.
299.   */
300.  
301.  /* #define VISION_TABLES */ /* use vision tables generated at compile time */
302.  #ifndef VISION_TABLES
303.  # ifndef NO_MACRO_CPATH
304.  #  define MACRO_CPATH	/* use clear_path macros instead of functions */
305.  # endif
306.  #endif
307.  
308.  /*
309.   * Section 4:  THE FUN STUFF!!!
310.   *
311.   * Conditional compilation of special options are controlled here.
312.   * If you define the following flags, you will add not only to the
313.   * complexity of the game but also to the size of the load module.
314.   */
315.  
316.  /* dungeon features */
317.  #define SINKS		/* Kitchen sinks - Janet Walz */
318.  /* dungeon levels */
319.  #define WALLIFIED_MAZE	/* Fancy mazes - Jean-Christophe Collet */
320.  #define REINCARNATION	/* Special Rogue-like levels */
321.  /* monsters & objects */
322.  #define KOPS		/* Keystone Kops by Scott R. Turner */
323.  #define SEDUCE		/* Succubi/incubi seduction, by KAA, suggested by IM */
324.  #define STEED		/* Riding steeds */
325.  #define TOURIST		/* Tourist players with cameras and Hawaiian shirts */
326.  /* difficulty */
327.  #define ELBERETH	/* Engraving the E-word repels monsters */
328.  /* I/O */
329.  #define REDO		/* support for redoing last command - DGK */
330.  #if !defined(MAC)
331.  # define CLIPPING	/* allow smaller screens -- ERS */
332.  #endif
333.  
334.  #ifdef REDO
335.  # define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */
336.  #endif
337.  
338.  #define EXP_ON_BOTL	/* Show experience on bottom line */
339.  /* #define SCORE_ON_BOTL */	/* added by Gary Erickson (erickson@ucivax) */
340.  
341.  /*
342.   * Section 5:  EXPERIMENTAL STUFF
343.   *
344.   * Conditional compilation of new or experimental options are controlled here.
345.   * Enable any of these at your own risk -- there are almost certainly
346.   * bugs left here.
347.   */
348.  
349.  /*#define GOLDOBJ */	/* Gold is kept on obj chains - Helge Hafting */
350.  
351.  /* End of Section 5 */
352.  
353.  #include "global.h"	/* Define everything else according to choices above */
354.  
355.  #endif /* CONFIG_H */

Also on Fandom

Random Wiki