Source:NetHack 3.4.0/pcconf.h

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

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

1.   /*	SCCS Id: @(#)pcconf.h	3.4	1995/10/11	*/ 2.   /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3.    /* NetHack may be freely redistributed. See license for details. */ 4.     5.    #ifndef PCCONF_H 6.   #define PCCONF_H 7.    8.    #define MICRO		/* always define this! */ 9.     10.   #ifdef MSDOS		/* some of this material is MS-DOS specific */ 11.   12.   /*  13.    *  Automatic Defines: 14.   *  15.    *     __GO32__ is defined automatically by the djgpp port of gcc. 16.   *     __DJGPP__ is defined automatically by djgpp version 2 and above. 17.   *     _MSC_VER is defined automatically by Microsoft C.  18. *    __BORLANDC__ is defined automatically by Borland C.  19. *    __SC__ is defined automatically by Symantec C.  20. *	Note: 3.4.0 was not verified with Symantec C. 21. */ 22.    23.   /*  24.    *  The following options are somewhat configurable depending on  25. * your compiler. 26.   */  27.    28.   /*  29.    *  For pre-V7.0 Microsoft Compilers only, manually define OVERLAY here. 30.   */  31.    32.   /*#define OVERLAY */	/* Manual overlay definition (MSC 6.0ax only) */ 33.   34.   # ifndef __GO32__ 35.  #define MFLOPPY		/* Support for floppy drives and ramdisks by dgk */ 36.  # endif 37.   38.   # define SHELL		/* via exec of COMMAND.COM */ 39.   40.   # ifdef __BORLANDC__ 41.  #define PCMUSIC		/* Music option, enable very basic pc speaker music notes */ 42.  # endif 43.   44.   /*  45.    * Screen control options 46.   *  47.    * You may uncomment: 48.   *		       ANSI_DEFAULT 49.   *		  or   TERMLIB 50.   *		  or   ANSI_DEFAULT and TERMLIB 51.   *		  or   NO_TERMS 52.   */  53.    54.   /* # define TERMLIB */	   /* enable use of termcap file /etc/termcap */ 55.  			/* or ./termcap for MSDOS (SAC) */ 56.  			/* compile and link in Fred Fish's termcap library, */ 57.  			/* enclosed in TERMCAP.ARC, to use this */ 58.   59.   /* # define ANSI_DEFAULT */   /* allows NetHack to run without a ./termcap */ 60.   61.   # define NO_TERMS	/* Allows Nethack to run without ansi.sys by linking */ 62.  			/* screen routines into the .exe     */ 63.   64.   # ifdef NO_TERMS	/* if NO_TERMS select one screen package below */ 65.  #define SCREEN_BIOS		/* Use bios calls for all screen control */ 66.  /* #define SCREEN_DJGPPFAST */	/* Use djgpp fast screen routines	*/ 67.  # endif 68.   69.    70.   /* # define PC9800 */	/* Allows NetHack to run on NEC PC-9800 machines */ 71.  			/* Yamamoto Keizo */ 72.   73.    74.   /*  75.    * PC video hardware support options (for graphical tile support) 76.   *  77.    * You may uncomment any/all of the options below. 78.   *  79.    */  80.   # ifndef SUPPRESS_GRAPHICS 81.  #  if (defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST)) && !defined(PC9800) 82.  #   ifdef USE_TILES 83.  #define SCREEN_VGA	/* Include VGA	  graphics routines in the build */ 84.  #   endif 85.  #  endif 86.  # else 87.  # undef NO_TERMS 88.  # undef SCREEN_BIOS 89.  # undef SCREEN_DJGPPFAST 90.  # undef SCREEN_VGA 91.  # undef TERMLIB 92.  # define ANSI_DEFAULT 93.  # endif 94.   95.   # define RANDOM		/* have Berkeley random(3) */ 96.   97.   # define MAIL		/* Allows for fake mail daemon to deliver mail */ 98.  			/* in the MSDOS version. (For AMIGA MAIL see */  99.   			/* amiconf.h). In the future this will be the */ 100. 			/* hook for mail reader implementation. */ 101.   102.  /*# define PC_LOCKING */	/* Allow confirmation before overwriting game  */ 103. 			/* that is in progress or aborted when another */ 104. 			/* game is started with the same player name. */ 105.   106.  /* The following is needed for prototypes of certain functions */ 107.  108.  #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__SC__) 109. #include 	/* Provides prototypes of exit, spawn      */ 110. #endif 111.  112.  #if defined(__BORLANDC__) && defined(STRNCMPI) 113. #include 	/* Provides prototypes of strncmpi, etc.     */ 114. #endif 115.  116.  #if defined(__DJGPP__) 117. #define _NAIVE_DOS_REGS 118. #include   119. #include 	/* Provides prototypes of strncmpi, etc.    */ 120. #endif 121.  122.  /*  123.   * On the VMS and unix, this option controls whether a delay is done by  124. * the clock, or whether it is done by excess output. On the PC, however, 125.  * there is always a clock to use for the delay. The TIMED_DELAY option 126.  * on MSDOS (without the termcap routines) is used to determine whether to  127. * include the delay routines in the code (and thus, provides a compile time 128.   * method to turn off napping for visual effect). However, it is also used 129.  * in the music code to wait between different notes. So it is needed in that 130.  * case as well. 131.  132.   * Whereas on the VMS and unix, flags.nap is a run-time option controlling 133.  * whether there is a delay by clock or by excess output, on MSDOS it is  134. * simply a flag to turn on or off napping for visual effects at run-time. 135.  */  136.   137.  #define TIMED_DELAY	/* enable the `timed_delay' run-time option */ 138.  139.  # ifdef PCMUSIC 140. #define TIMED_DELAY	/* need it anyway */ 141. # endif 142. #define NOCWD_ASSUMPTIONS	/* Allow paths to be specified for HACKDIR, 143. 				   LEVELDIR, SAVEDIR, BONESDIR, DATADIR, 144. 				   SCOREDIR, LOCKDIR, and CONFIGDIR */ 145.  146.  #endif /* MSDOS configuration stuff */ 147.  148.  #define PATHLEN		64	/* maximum pathlength */ 149. #define FILENAME	80	/* maximum filename length (conservative) */ 150. #ifndef MICRO_H 151. #include "micro.h"		/* contains necessary externs for [os_name].c */ 152. #endif 153.  154.   155.  /* ===================================================  156.   *  The remaining code shouldn't need modification. 157.  */  158.   159.  #ifndef SYSTEM_H 160. #include "system.h"  161. #endif 162.  163.  #ifdef __GO32__ 164. #include  /* close, etc. */ 165. /* setmode is in io.h but lock in io.h interferes with lock[] in decl.h */ 166. extern int FDECL(setmode, (int,int)); 167. #include  /* kbhit */ 168. #define PC_LOCKING 169. #endif 170.  171.  # ifdef MSDOS 172. #  ifndef EXEPATH 173. #define EXEPATH		/* HACKDIR is .exe location if not explicitly defined */ 174. #  endif 175. # endif 176.  177.  # if defined(_MSC_VER) && defined(MSDOS) 178. #  if (_MSC_VER >= 700) && !defined(FUNCTION_LEVEL_LINKING) 179. #   ifndef MOVERLAY 180. #define MOVERLAY	/* Microsoft's MOVE overlay system (MSC >= 7.0) */ 181. #   endif 182. #  endif 183. #define PC_LOCKING 184. # endif 185.  186.  /* Borland Stuff */ 187. # if defined(__BORLANDC__) 188. #  if defined(__OVERLAY__) && !defined(VROOMM) 189. /* __OVERLAY__ is automatically defined by Borland C if overlay option is on */ 190. #define VROOMM		/* Borland's VROOMM overlay system */ 191. #  endif 192. #  if !defined(STKSIZ) 193. #define STKSIZ	5*1024	/* Use a default of 5K stack for Borland C	*/ 194. 			/* This macro is used in any file that contains */ 195. 			/* a main function. */ 196.  #  endif 197. #define PC_LOCKING 198. # endif 199.  200.  #ifdef PC_LOCKING 201. #define HLOCK "NHPERM" 202. #endif 203.  204.  #ifndef index 205. # define index	strchr 206. #endif 207. #ifndef rindex 208. # define rindex strrchr 209. #endif 210.  211.  #ifndef AMIGA 212. #include   213. #endif 214.  215.  #ifdef RANDOM 216. /* Use the high quality random number routines. */ 217.  # define Rand random 218. #else 219. # define Rand rand 220. #endif 221.  222.  #ifndef TOS 223. # define FCMASK 0660	/* file creation mask */ 224. #endif 225.  226.  #include   227. 228. #ifndef REDO 229. # undef Getchar 230. # define Getchar nhgetch 231. #endif 232.  233.  #ifdef MSDOS 234. # define TEXTCOLOR /* */ 235. # define PORT_HELP "msdoshlp.txt" /* msdos port specific help file */ 236. #endif 237.  238.   239.  /* Sanity check, do not modify these blocks. */ 240.   241.  /* OVERLAY must be defined with MOVERLAY or VROOMM */ 242. #if (defined(MOVERLAY) || defined(VROOMM)) 243. # ifndef OVERLAY 244. #  define OVERLAY 245. # endif 246. #endif 247.  248.  #if defined(FUNCTION_LEVEL_LINKING) 249. #define OVERLAY 250. #define OVL0 251. #define OVL1 252. #define OVL2 253. #define OVL3 254. #define OVLB 255. #endif 256.  257.  #if defined(OVERLAY) && !defined(MOVERLAY) && !defined(VROOMM) && !defined(FUNCTION_LEVEL_LINKING) 258. #define USE_TRAMPOLI 259. #endif 260.  261.  #if defined(MSDOS) && defined(NO_TERMS) 262. # ifdef TERMLIB 263. #  if defined(_MSC_VER) || defined(__SC__) 264. #   pragma message("Warning -- TERMLIB defined with NO_TERMS in pcconf.h") 265. #   pragma message("           Forcing undef of TERMLIB") 266. #  endif 267. #undef TERMLIB 268. # endif 269. # ifdef ANSI_DEFAULT 270. #  if defined(_MSC_VER) || defined(__SC__) 271. #   pragma message("Warning -- ANSI_DEFAULT defined with NO_TERMS in pcconf.h") 272. #   pragma message("           Forcing undef of ANSI_DEFAULT") 273. #  endif 274. #undef ANSI_DEFAULT 275. # endif 276. /* only one screen package is allowed */ 277. # if defined(SCREEN_BIOS) && defined(SCREEN_DJGPPFAST) 278. #  if defined(_MSC_VER) || defined(__SC__) 279. #   pragma message("Warning -- More than one screen package defined in pcconf.h") 280. #  endif 281. #  if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__SC__) 282. #   if defined(SCREEN_DJGPPFAST) 283. #    if defined(_MSC_VER) || defined(__SC__) 284. #    pragma message("           Forcing undef of SCREEN_DJGPPFAST") 285. #    endif 286. #undef SCREEN_DJGPPFAST   /* Can't use djgpp fast with other compilers anyway */ 287. #   endif 288. #  else 289. /* djgpp C compiler	*/ 290. #   if defined(SCREEN_BIOS) 291. #undef SCREEN_BIOS 292. #   endif 293. #  endif 294. # endif 295. # define ASCIIGRAPH 296. # ifdef TEXTCOLOR 297. #  define VIDEOSHADES 298. # endif 299. /* SCREEN_8514, SCREEN_VESA are only placeholders presently - sub VGA instead */ 300. # if defined(SCREEN_8514) || defined(SCREEN_VESA) 301. #  undef SCREEN_8514 302. #  undef SCREEN_VESA 303. #  define SCREEN_VGA 304. # endif 305. /* Graphical tile sanity checks */ 306. # ifdef SCREEN_VGA 307. #  define SIMULATE_CURSOR 308. #  define POSITIONBAR 309. /* Select appropriate tile file format, and map size */ 310. #  define PLANAR_FILE 311. #  define SMALL_MAP 312. # endif 313. #endif			/* End of sanity check block */ 314.  315.  #if defined(MSDOS) && defined(DLB) 316. #define FILENAME_CMP  stricmp		      /* case insensitive */ 317. #endif 318.  319.  #ifdef MSC7_WARN	/* define with cl /DMSC7_WARN	*/ 320. #pragma warning(disable:4131) 321. #endif 322.  323.  #ifdef TIMED_DELAY 324. # ifdef __DJGPP__ 325. # define msleep(k) (void) usleep((k)*1000) 326. # endif 327. # ifdef __BORLANDC__ 328. # define msleep(k) delay(k) 329. # endif 330. # ifdef __SC__ 331. # define msleep(k) (void) usleep((long)((k)*1000)) 332. # endif 333. #endif 334.  335.  #endif /* PCCONF_H */