Fandom

Wikihack

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

Also on Fandom

Random Wiki