Source:NetHack 3.0.0/config.h

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to config.h from the source code of NetHack 3.0.0. To link to a particular line, write [[NetHack 3.0.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.

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.    /*	SCCS Id: @(#)config.h	3.0	89/06/23
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:	OS selection.
11.    *		Select the version of the OS you are using.
12.    *		For "UNIX" select either SYSV or BSD in unixconf.h
13.    */
14.   
15.   #define	UNIX		/* delete if no fork(), exec() available */
16.   
17.   #ifdef __MSDOS__	/* Turbo C auto-defines __MSDOS__, others MSDOS */
18.   #define MSDOS	 	/* define for MS-DOS (actually defined by compiler) */
19.   #else
20.   /* # define MSDOS	/* define for MS-DOS and most other micros */
21.   /* # define AMIGA	/* define for Commodore-Amiga */
22.   /* #define TOS		/* for Atari 520/1040 */
23.   
24.   /* #define STUPID	/* avoid some complicated expressions if
25.   			   your C compiler chokes on them */
26.   /* #define STUPID_CPP	/* use many small functions instead of macros to
27.   			   avoid overloading limited preprocessors */
28.   /* #define TERMINFO	/* uses terminfo rather than termcap */
29.   			/* should be defined for most, but not all, SYSV */
30.   /* #define MINIMAL_TERM	/* if a terminal handles highlighting or tabs poorly,
31.   			   try this define, used in pager.c and termcap.c */
32.   #endif
33.   
34.   
35.   
36.   /*
37.    * Section 2:	Some global parameters and filenames.
38.    *		Commenting out WIZARD, LOGFILE, or NEWS removes that feature
39.    *		from the game; otherwise set the appropriate wizard name.
40.    *		LOGFILE and NEWS refer to files in the playground.
41.    */
42.   
43.   #ifndef WIZARD		/* allow for compile-time or Makefile changes */
44.   #define WIZARD  "izchak" /* the person allowed to use the -D option */
45.   #endif
46.   
47.   #define	LOGFILE	"logfile" /* larger file for debugging purposes */
48.   #define	NEWS	"news"	  /* the file containing the latest hack news */
49.   
50.   
51.   #define	CHDIR		/* delete if no chdir() available */
52.   
53.   #ifdef CHDIR
54.   /*
55.    * If you define HACKDIR, then this will be the default playground;
56.    * otherwise it will be the current directory.
57.    */
58.   #define HACKDIR	"/usr/games/lib/nethackdir"
59.   
60.   /*
61.    * Some system administrators are stupid enough to make Hack suid root
62.    * or suid daemon, where daemon has other powers besides that of reading or
63.    * writing Hack files.  In such cases one should be careful with chdir's
64.    * since the user might create files in a directory of his choice.
65.    * Of course SECURE is meaningful only if HACKDIR is defined.
66.    */
67.   /* #define SECURE			/* do setuid(getuid()) after chdir() */
68.   
69.   /*
70.    * If it is desirable to limit the number of people that can play Hack
71.    * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS.
72.    * #define MAX_NR_OF_PLAYERS	6
73.    */
74.   #endif /* CHDIR /**/
75.   
76.   
77.   
78.   /*
79.    * Section 3:	Definitions that may vary with system type.
80.    *		For example, both schar and uchar should be short ints on
81.    *		the AT&T 3B2/3B5/etc. family.
82.    */
83.   
84.   /*
85.    * Uncomment the following line if your compiler doesn't understand the
86.    * 'void' type (and thus would give all sorts of compile errors without
87.    * this definition).
88.    */
89.   /* #define void int			/* define if no "void" data type. */
90.   
91.   #include "tradstdc.h"
92.   
93.   /*
94.    * type schar: small signed integers (8 bits suffice) (eg. TOS)
95.    *
96.    *	typedef	char	schar;
97.    *
98.    *      will do when you have signed characters; otherwise use
99.    *
100.   *	typedef	short int schar;
101.   */
102.  typedef	signed char	schar;
103.  
104.  /*
105.   * type uchar: small unsigned integers (8 bits suffice - but 7 bits do not)
106.   *
107.   *	typedef	unsigned char	uchar;
108.   *
109.   *	will be satisfactory if you have an "unsigned char" type;
110.   *	otherwise use
111.   *
112.   *	typedef unsigned short int uchar;
113.   */
114.  typedef	unsigned char	uchar;
115.  
116.  /*
117.   * Various structures have the option of using bitfields to save space.
118.   * If your C compiler handles bitfields well (e.g., it can initialize structs
119.   * containing bitfields), you can define BITFIELDS.  Otherwise, the game will
120.   * allocate a separate character for each bitfield.  (The bitfields used never
121.   * have more than 7 bits, and most are only 1 bit.)
122.   */
123.  #define BITFIELDS	/* Good bitfield handling */
124.  
125.  
126.  
127.  /*
128.   * Section 4:  THE FUN STUFF!!!
129.   *
130.   * Conditional compilation of special options are controlled here.
131.   * If you define the following flags, you will add not only to the
132.   * complexity of the game but also to the size of the load module.
133.   */ 
134.  
135.  #define	SPELLS		/* Spell casting by M. Stephenson */
136.  #define POLYSELF	/* Polymorph self code by Ken Arromdee */
137.  #define THRONES		/* Thrones and Courts by M. Stephenson */
138.  #define	PROBING		/* Wand of probing code by Gil Neiger */
139.  #define REDO 		/* support for redoing last command - DGK */
140.  #define	HARD		/* Enhanced wizard code by M. Stephenson */
141.  #define	WALKIES		/* Leash code by M. Stephenson */
142.  #define FOUNTAINS	/* Fountain code by SRT (+ GAN + EB) */
143.  #define KOPS		/* Keystone Kops by Scott R. Turner */
144.  #define COM_COMPL	/* Command line completion by John S. Bien */
145.  #define MEDUSA		/* Mirrors and the Medusa by Richard P. Hughey */
146.  #define NAMED_ITEMS	/* Special named items handling */
147.  #define ARMY		/* Soldiers, barracks by Steve Creps */
148.  #define	SHIRT		/* Hawaiian shirt code by Steve Linhart */
149.  #define THEOLOGY	/* Smarter gods - The Unknown Hacker */
150.  #define SINKS		/* Kitchen sinks - Janet Walz */
151.  #define COMPRESS "/usr/local/compress"	/* the location of 'compress' */
152.  			/* Compressed bones / save files - Izchak Miller */
153.  /* #define ZEROCOMP	/* Zero-run compression of files - Olaf Seibert */
154.  			/* Use only if COMPRESS is not used */
155.  #define SOUNDS		/* Add more life to the dungeon */
156.  #define REINCARNATION	/* Rogue-like levels */
157.  #define ELBERETH	/* Allow for disabling the E word - Mike 3point */
158.  #define WORM		/* Long worms */
159.  #define ORACLE		/* Include another source of information */
160.  #define EXPLORE_MODE	/* Allow non-scoring play with additional powers */
161.  #define ALTARS		/* Sacrifice sites - Jean-Christophe Collet */
162.  #define WALLIFIED_MAZE	/* Fancy mazes - Jean-Christophe Collet */
163.  #ifdef HARD
164.  #define SEDUCE		/* Succubi/incubi additions, by KAA, suggested by IM */
165.  #endif
166.  #define STRONGHOLD	/* Challenging special levels - Jean-Christophe Collet*/
167.  #define MUSIC		/* Musical instruments - Jean-Christophe Collet */
168.  #define GOLEMS		/* Golems, by KAA */
169.  #define TOLKIEN		/* More varieties of objects and monsters */
170.  #define KICK		/* Allow kicking things besides doors -Izchak Miller */
171.  
172.  #ifdef REDO
173.  #define DOAGAIN	'\001'		/* The "redo" key Used in tty.c and cmd.c */
174.  #endif
175.  
176.  #define	EXP_ON_BOTL	/* Show experience on bottom line */
177.  /* #define SCORE_ON_BOTL	/* added by Gary Erickson (erickson@ucivax) */
178.  
179.  
180.  
181.  #include "global.h"	/* Define everything else according to choices above */
182.  
183.  #endif /* CONFIG_H /**/