Source:SLASH'EM 0.0.7E7F2/config.h

Below is the full text to config.h from the source code of SLASH'EM 0.0.7E7F2. To link to a particular line, write [[SLASH'EM 0.0.7E7F2/config.h#line123 ]], for example.

The latest source code for vanilla NetHack is at Source code.

1.   /*	SCCS Id: @(#)config.h	3.4	2003/12/06	*/ 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.    #undef SHORT_FILENAMES 9.    10.    11.   /*#define DEBUG*/ 12.  /*#define DDEBUG*/ 13.  /*#define MONITOR_HEAP*/ 14.  #if defined(MONITOR_HEAP) && (defined(UNIX) || defined(WIN32)) 15.  #define INTERNAL_MALLOC		/* Use internal malloc implementation */ 16.  #endif 17.   18.   /*  19.    * Section 1:	Operating and window systems selection. 20.   *		Select the version of the OS you are using. 21.   *		For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h.  22. *		A "VMS" option is not needed since the VMS C-compilers 23.   *		provide it (no need to change sec#1, vmsconf.h handles it). 24.   */  25.    26.   #define UNIX		/* delete if no fork, exec available */ 27.   28.   /* #define MSDOS */	/* in case it's not auto-detected */ 29.     30.   /* #define OS2 */	/* in case it's not auto-detected */ 31.     32.   /* #define TOS */	/* define for Atari ST/TT */ 33.     34.   /* #define STUPID */	/* avoid some complicated expressions if  35. your C compiler chokes on them */ 36.  /* #define MINIMAL_TERM */ 37.  			/* if a terminal handles highlighting or tabs poorly, 38.    			   try this define, used in pager.c and termcap.c */ 39.  /* #define ULTRIX_CC20 */ 40.  			/* define only if using cc v2.0 on a DECstation */ 41.  /* #define ULTRIX_PROTO */ 42.  			/* define for Ultrix 4.0 (or higher) on a DECstation; 43.    			 * if you get compiler errors, don't define this. */ 44.     			/* Hint: if you're not developing code, don't define 45.    			   ULTRIX_PROTO. */ 46.      47.   #include "config1.h"	/* should auto-detect MSDOS, MAC, AMIGA, WIN32 and OS2 */ 48.     49.   /* Windowing systems...  50. * Define all of those you want supported in your binary. 51.   * Some combinations make no sense. See the installation document. 52.   */  53.   #define TTY_GRAPHICS		/* good old tty based graphics */ 54.  /* #define X11_GRAPHICS */	/* X11 interface */ 55.  /* #define QT_GRAPHICS */	/* Qt Interface */ 56.  /* #define KDE */		/* KDE Interface */ 57.  /* #define GTK_GRAPHICS */	/* GTK Interface */ 58.  /* #define GNOME_GRAPHICS */	/* Gnome interface */ 59.  /* #define PROXY_GRAPHICS */	/* Plug-in interfaces */ 60.  /* #define MSWIN_GRAPHICS */	/* Windows NT, CE, Graphics */ 61.  /* #define GL_GRAPHICS */	/* OpenGL graphics */ 62.  /* #define SDL_GRAPHICS */	/* Software SDL graphics */ 63.   64.   /*  65.    * Define the default window system. This should be one that is compiled 66.   * into your system (see defines above). Known window systems are: 67.   *  68.    *	tty, X11, mac, amii, BeOS, Qt, Gem, Gnome, gtk, proxy, GL, SDL 69.   */  70.    71.   /* MAC also means MAC windows */ 72.  #ifdef MAC 73.  # ifndef	AUX 74.  #  define DEFAULT_WINDOW_SYS "Mac" 75.  # endif 76.  #endif 77.   78.   /* Amiga supports AMII_GRAPHICS and/or TTY_GRAPHICS */ 79.  #ifdef AMIGA 80.  # define AMII_GRAPHICS			/* (optional) */ 81.  # define DEFAULT_WINDOW_SYS "amii"	/* "amii", "amitile" or "tty" */ 82.  #endif 83.   84.   #if 0 /* Removed in 3.3.0 */ 85.  /* Windows NT supports TTY_GRAPHICS */ 86.  #ifdef WIN32 87.  #  define DEFAULT_WINDOW_SYS "tty" 88.  #endif 89.  #endif 90.   91.   /* Atari supports GEM_GRAPHICS and/or TTY_GRAPHICS */ 92.  #ifdef TOS 93.  # define GEM_GRAPHICS			/* Atari GEM interface (optional) */ 94.  # define DEFAULT_WINDOW_SYS "Gem"	/* "Gem" or "tty" */ 95.  #endif 96.   97.   #ifdef __BEOS__ 98.  #define BEOS_GRAPHICS /* (optional) */ 99.  #define DEFAULT_WINDOW_SYS "BeOS"  /* "tty" */ 100. #ifndef HACKDIR	/* override the default hackdir below */ 101. # define HACKDIR "/boot/apps/NetHack" 102. #endif 103. #endif 104.  105.  #ifdef QT_GRAPHICS 106. # define DEFAULT_WC_TILED_MAP   /* Default to tiles if users doesn't say wc_ascii_map */ 107. # define USER_SOUNDS		/* Use sounds */ 108. # ifndef __APPLE__ 109. #  define USER_SOUNDS_REGEX 110. # endif 111. # define USE_XPM		/* Use XPM format for images (required) */ 112. # define GRAPHIC_TOMBSTONE	/* Use graphical tombstone (rip.xpm) */ 113. # ifndef DEFAULT_WINDOW_SYS 114. #  define DEFAULT_WINDOW_SYS "Qt" 115. # endif 116. #endif 117.  118.  #ifdef GNOME_GRAPHICS 119. # define USE_XPM		/* Use XPM format for images (required) */ 120. # define GRAPHIC_TOMBSTONE	/* Use graphical tombstone (rip.ppm) */ 121. # ifndef DEFAULT_WINDOW_SYS 122. #  define DEFAULT_WINDOW_SYS "Gnome" 123. # endif 124. #endif 125.  126.  #ifdef GTK_GRAPHICS 127. # define USE_XPM		/* Use XPM format for images (required) */ 128. # define GRAPHIC_TOMBSTONE	/* Use graphical tombstone (rip.xpm) */ 129. /* # define GTK_PROXY */	/* Build for proxy interface */ 130. # ifndef DEFAULT_WINDOW_SYS 131. #  define DEFAULT_WINDOW_SYS "gtk" 132. # endif 133. #endif 134.  135.  #ifdef PROXY_GRAPHICS 136. # define USE_XPM		/* Use XPM format for images */ 137. /*  138.   * The proxy interface shouldn't be used as the default window system. 139.  * This will cause it to always be initialized with undesirable side 140.  * effects. Instead, use the windowtype option. --ALI 141.  */  142.  #endif 143.  144.  #ifdef MSWIN_GRAPHICS 145. # ifndef DEFAULT_WINDOW_SYS 146. #  define DEFAULT_WINDOW_SYS "mswin" 147. # endif 148. # define HACKDIR "\\nethack" 149. #endif 150.  151.  #ifdef GL_GRAPHICS 152. # ifndef DEFAULT_WINDOW_SYS 153. #  define DEFAULT_WINDOW_SYS "GL" 154. # endif 155. #endif 156.  157.  #ifdef SDL_GRAPHICS 158. # ifndef DEFAULT_WINDOW_SYS 159. #  define DEFAULT_WINDOW_SYS "SDL" 160. # endif 161. #endif 162.  163.  #if defined(GL_GRAPHICS) || defined(SDL_GRAPHICS) 164. # define GRAPHIC_TOMBSTONE     /* Use graphical tombstone */ 165. /* -AJA- workaround for clash with ZLIB headers */ 166. # if defined(VANILLA_GLHACK) 167. #  define compress    nh_compress 168. #  define uncompress  nh_uncompress 169. # endif 170. #endif 171.  172.  #ifndef DEFAULT_WINDOW_SYS 173. # define DEFAULT_WINDOW_SYS "tty" 174. #endif 175.  176.  #ifdef X11_GRAPHICS 177. /*  178.   * There are two ways that X11 tiles may be defined. (1) using a custom 179.  * format loaded by NetHack code, or (2) using the XPM format loaded by  180. * the free XPM library. The second option allows you to then use other 181.  * programs to generate tiles files. For example, the PBMPlus tools 182.  * would allow: 183.  *  xpmtoppm x11tiles_big.xpm 185.  */  186.  /* # define USE_XPM */		/* Disable if you do not have the XPM library */ 187. # ifdef USE_XPM 188. #  define GRAPHIC_TOMBSTONE	/* Use graphical tombstone (rip.xpm) */ 189. # endif 190. #endif 191.  192.  /*  193.   * Section 2:	Some global parameters and filenames. 194.  *		Commenting out WIZARD, LOGFILE, NEWS or PANICLOG removes that 195.  *		feature from the game; otherwise set the appropriate wizard 196.  *		name. LOGFILE, NEWS and PANICLOG refer to files in the 197.  *		playground. 198.  */  199.   200.  #ifndef WIZARD		/* allow for compile-time or Makefile changes */ 201. # ifndef KR1ED 202. #  define WIZARD  "wizard" /* the person allowed to use the -D option */ 203. # else 204. #  define WIZARD 205. #  define WIZARD_NAME "wizard" 206. # endif 207. #endif 208.  209.  #define LOGFILE "logfile"	/* larger file for debugging purposes */ 210. #define LOGAREA FILE_AREA_VAR 211. #define NEWS "news"		/* the file containing the latest hack news */ 212. #define NEWS_AREA FILE_AREA_SHARE 213. #define PANICLOG "paniclog"	/* log of panic and impossible events */ 214.  215.  /*  216.   *	If COMPRESS is defined, it should contain the full path name of your 217.  *	'compress' program. Defining INTERNAL_COMP causes NetHack to do 218. *	simpler byte-stream compression internally. Both COMPRESS and 219.  *	INTERNAL_COMP create smaller bones/level/save files, but require 220.  *	additional code and time. Currently, only UNIX fully implements 221.  *	COMPRESS; other ports should be able to uncompress save files a  222. *	la unixmain.c if so inclined. 223.  *	If you define COMPRESS, you must also define COMPRESS_EXTENSION 224.  *	as the extension your compressor appends to filenames after 225.  *	compression. 226.  */  227.   228.  #ifdef UNIX 229. /* path and file name extension for compression program */ 230. # define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ 231. # define COMPRESS_EXTENSION ".Z"	     /* compress's extension */ 232.  233.  /* An example of one alternative you might want to use: */ 234. /* # define COMPRESS "/usr/local/bin/gzip" */   /* FSF gzip compression */ 235. /* # define COMPRESS_EXTENSION ".gz" */	     /* normal gzip extension */ 236.  237.  /* # define COMPRESS "/usr/bin/bzip2"	*//* bzip2 compression */ 238. /* # define COMPRESS_EXTENSION ".bz2"	*//* bzip2 extension */ 239. #endif 240. #ifndef COMPRESS 241. # define INTERNAL_COMP	/* control use of NetHack's compression routines */ 242. #endif 243.  244.  /*  245.   *	Data librarian. Defining DLB places most of the support files into 246.  *	a tar-like file, thus making a neater installation. See *conf.h 247. *	for detailed configuration. 248.  */  249.  /* #define DLB */             /* not supported on all platforms */ 250.  251.  /*  252.   *	Defining INSURANCE slows down level changes, but allows games that 253.  *	died due to program or system crashes to be resumed from the point 254.  *	of the last level change, after running a utility program. 255.  */  256.  #define INSURANCE	/* allow crashed game recovery */ 257.  258.  #ifndef MAC 259. # define CHDIR		/* delete if no chdir available */ 260. #endif 261.  262.  #ifdef CHDIR 263. /*  264.   * If you define HACKDIR, then this will be the default playground; 265.  * otherwise it will be the current directory. 266.  */  267.  # ifndef HACKDIR 268. #  ifdef __APPLE__ 269. #    define HACKDIR "nethackdir"      /* nethack directory */ 270. #  else 271. #    define HACKDIR "." 272. #  endif 273. # endif 274.  275.  /*  276.   * Some system administrators are stupid enough to make Hack suid root 277.  * or suid daemon, where daemon has other powers besides that of reading or  278. * writing Hack files. In such cases one should be careful with chdir's 279. * since the user might create files in a directory of his choice. 280.  * Of course SECURE is meaningful only if HACKDIR is defined. 281.  */  282.  /* #define SECURE */	/* do setuid(getuid) after chdir */ 283.  284.  /*  285.   * If it is desirable to limit the number of people that can play Hack 286.  * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS. 287.  * #define MAX_NR_OF_PLAYERS 6 288.  */  289.  #endif /* CHDIR */ 290.  291.   292.   293.  /*  294.   * Section 3:	Definitions that may vary with system type. 295.  *		For example, both schar and uchar should be short ints on  296. *		the AT&T 3B2/3B5/etc. family. 297.  */  298.   299.  /*  300.   * Uncomment the following line if your compiler doesn't understand the 301.  * 'void' type (and thus would give all sorts of compile errors without  302.   * this definition). 303.  */  304.  /* #define NOVOID */			/* define if no "void" data type. */ 305.   306.  /*  307.   * Uncomment the following line if your compiler falsely claims to be  308. * a standard C compiler (i.e., defines __STDC__ without cause). 309.  * Examples are Apollo's cc (in some versions) and possibly SCO UNIX's rcc. 310.  */  311.  /* #define NOTSTDC */			/* define for lying compilers */ 312.  313.  #include "tradstdc.h"  314. 315. /*  316.   * type schar: small signed integers (8 bits suffice) (eg. TOS) 317.  *  318.   *	typedef char	schar; 319.  *  320.   *      will do when you have signed characters; otherwise use 321.  *  322.   *	typedef short int schar; 323.  */  324.  #ifdef AZTEC 325. # define schar	char 326. #else 327. typedef signed char	schar; 328. #endif 329.  330.  /*  331.   * type uchar: small unsigned integers (8 bits suffice - but 7 bits do not) 332.  *  333.   *	typedef unsigned char	uchar; 334.  *  335.   *	will be satisfactory if you have an "unsigned char" type; 336.  *	otherwise use 337.  *  338.   *	typedef unsigned short int uchar; 339.  */  340.  #ifndef _AIX32		/* identical typedef in system file causes trouble */ 341. typedef unsigned char	uchar; 342. #endif 343.  344.  #define RECORD_CONDUCT /* Record conduct challenges in logfile */ 345.  346.  /*  347.   * Various structures have the option of using bitfields to save space. 348.  * If your C compiler handles bitfields well (e.g., it can initialize structs  349.   * containing bitfields), you can define BITFIELDS. Otherwise, the game will 350.  * allocate a separate character for each bitfield. (The bitfields used never 351.   * have more than 7 bits, and most are only 1 bit.) 352.  */  353.  #define BITFIELDS	/* Good bitfield handling */ 354.  355.  /* #define STRNCMPI */ /* compiler/library has the strncmpi function */ 356.  357.  /*  358.   * There are various choices for the NetHack vision system. There is a 359. * choice of two algorithms with the same behavior. Defining VISION_TABLES 360.  * creates huge (60K) tables at compile time, drastically increasing data 361.  * size, but runs slightly faster than the alternate algorithm. (MSDOS in 362.   * particular cannot tolerate the increase in data size; other systems can  363.   * flip a coin weighted to local conditions.) 364.  *  365.   * If VISION_TABLES is not defined, things will be faster if you can use 366.  * MACRO_CPATH. Some cpps, however, cannot deal with the size of the 367.  * functions that have been macroized. 368.  */  369.  /* WAC Can be defined under DJGPP,  even though it's DOS*/ 370. /*#define VISION_TABLES */ /* use vision tables generated at compile time */ 371. #ifndef VISION_TABLES 372. # ifndef NO_MACRO_CPATH 373. #  define MACRO_CPATH	/* use clear_path macros instead of functions */ 374. # endif 375. #endif 376.  377.  /*  378.   * Section 4:  THE FUN STUFF!!! 379.  *  380.   * Conditional compilation of special options are controlled here. 381.  * If you define the following flags, you will add not only to the 382.  * complexity of the game but also to the size of the load module. 383.  */  384.   385.  /* dungeon features */ 386. #define SINKS		/* Kitchen sinks - Janet Walz */ 387. #define LIGHT_SRC_SPELL /* WAC Light sourced spells (wac@intergate.bc.ca)*/ 388.  389.  /* dungeon levels */ 390. #define WALLIFIED_MAZE	/* Fancy mazes - Jean-Christophe Collet */ 391. /* #define REINCARNATION */     /* Special Rogue-like levels */ 392. #define BLACKMARKET     /* Massimo Campostrini (campo@sunthpi3.difi.unipi.it) */ 393.  394.  /* monsters & objects */ 395. #define KOPS		/* Keystone Kops by Scott R. Turner */ 396. #define SEDUCE		/* Succubi/incubi seduction, by KAA, suggested by IM */ 397. #define INVISIBLE_OBJECTS /* Not yet fully implemented */ 398. #define UNPOLYPILE	/* WAC -- Items can unpolymorph */ 399. #define WALLET_O_P      /* Perseus' Wallet, and all related code (tsanth@iname.com)*/ 400. #define LIGHTSABERS 401. #ifdef LIGHTSABERS 402. # define D_SABER	/* Enable WEAPON(dimsaber), and all related code (tsanth@iname.com)*/ 403. #endif 404. #define P_SPOON         /* Enable WEPTOOL(spoon), and all related code (tsanth@iname.com)*/ 405. #define FIREARMS	/* KMH -- Guns and bullets */ 406. #define EATEN_MEMORY	/* WAC -- Remember which monsters have been eaten */ 407. #define STEED		/* The ability to ride monsters */ 408.  409.  /* Roles */ 410. #define DWARF		/* Dwarf Patch, Osku Salerma (osku@iki.fi) */ 411. #define TOURIST		/* Tourist players with cameras and Hawaiian shirts */ 412. #define YEOMAN		/* KMH -- Yeoman class  */ 413. /* #define ZOUTHERN */	/* KMH -- Zoutherner class and its animals */ 414.  415.  /* I/O */ 416. #define REDO		/* support for redoing last command - DGK */ 417. #if !defined(MAC) 418. # define CLIPPING	/* allow smaller screens -- ERS */ 419. #endif 420. #ifdef TTY_GRAPHICS 421. # define MENU_COLOR 422. #endif 423.  424.  #if defined(UNIX) 425. #define USE_REGEX_MATCH 426. /* if USE_REGEX_MATCH is defined, use regular expressions (GNU regex.h)  427. * otherwise use pmatch to match menu color lines. 428.  * pmatch provides basic globbing: '*' and '?' wildcards. 429.  */  430.  #endif 431.  432.  /* difficulty */ 433. #define ELBERETH	/* Engraving the E-word repels monsters */ 434. /* #define NOARTIFACTWISH */  /* No wishing for special artifacts -- swhite@cs.mun.ca */ 435. /* #define NO_BONES */	/*Disables loading and saving bones levels*/ 436.  437.  /* The following are best left disabled until their bugs are completely fixed */ 438.  439.   440.  /* User_sounds are sounds matches with messages. The messages are defined 441.  * in the player's .nethackrc using lines of the form: 442.  *  443.   * SOUND=MESG   444.  *  445.   * For example: 446.  *  447.   * SOUND=MESG "board beneath .....* squeaks" "squeak.au" 60 448.  *  449.   * By default, the filenames are relative to the nethack install directory, 450.  * but this can be set in the .nethackrc via: 451.  *  452.   * SOUNDDIR= 453.  */  454.  /* #define USER_SOUNDS */   /* Allow user-defined regex mappings from messages to sounds */ 455.                       /* Only supported on Qt with NAS - Network Audio System */ 456.  457.   458.  #ifdef REDO 459. # define DOAGAIN '\001'	/* ^A, the "redo" key used in cmd.c and getline.c */ 460. #endif 461.  462.  #define EXP_ON_BOTL	/* Show experience on bottom line */ 463. /* #define SCORE_ON_BOTL */	/* added by Gary Erickson (erickson@ucivax) */ 464. /* #define BORG */            /* Works only under DOS */ 465. /* #define KEEP_SAVE */       /* Keep savefiles after Restore (wac@intergate.bc.ca)*/ 466. /* #define CHARON */	/* Charon's boat, enables Cerebus - not implemented */ 467. #define SHOW_DMG        /* WAC made dmg reports optional (wac@intergate.bc.ca)*/ 468. #define SHOW_WEIGHT     /* [max] added display of object weight when picking up */ 469.                         /* and in inventory (madmax@fly.cc.fer.hr). */ 470.                          /* Originally added by zaga. */ 471.  #define OTHER_SERVICES  /* shopkeeper services */ 472. #define DUNGEON_GROWTH 473.  474.  /* #define SHOUT */ /* JRN -- shouting and petcommands - not implemented */ 475.  476.  #define DISPLAY_LAYERS	/* Improved support for transparent tile sets - ALI */ 477.  478.  /*  479.   * Section 5:  EXPERIMENTAL STUFF 480.  *  481.   * Conditional compilation of new or experimental options are controlled here. 482.  * Enable any of these at your own risk -- there are almost certainly 483.  * bugs left here. 484.  */  485.   486.  /*#define GOLDOBJ */	/* Gold is kept on obj chains - Helge Hafting */ 487. /*#define AUTOPICKUP_EXCEPTIONS */ /* exceptions to autopickup */ 488.  489.  /* End of Section 5 */ 490.  491.  #include "global.h"	/* Define everything else according to choices above */ 492.  493.  #endif /* CONFIG_H */