Source:NetHack 3.2.0/ntconf.h

From NetHackWiki
(Redirected from NetHack 3.2.0/ntconf.h)
Jump to navigation Jump to search

Below is the full text to ntconf.h from the source code of NetHack 3.2.0. To link to a particular line, write [[NetHack 3.2.0/ntconf.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: @(#)ntconf.h	3.2	94/12/08	*/
2.    /* Copyright (c) NetHack PC Development Team 1993, 1994.  */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifndef NTCONF_H
6.    #define NTCONF_H
7.    
8.    /* #define SHELL	/* nt use of pcsys routines caused a hang */
9.    
10.   #define RANDOM		/* have Berkeley random(3) */
11.   
12.   #define TEXTCOLOR	/* Color text */
13.   
14.   #define PATHLEN		64	/* maximum pathlength */
15.   #define FILENAME	80	/* maximum filename length (conservative) */
16.   #define SHORT_FILENAMES
17.   #define EXEPATH			/* Allow .exe location to be used as HACKDIR */
18.   /*
19.    * -----------------------------------------------------------------
20.    *  The remaining code shouldn't need modification.
21.    * -----------------------------------------------------------------
22.    */
23.   
24.   #define MICRO		/* always define this! */
25.   #define NO_TERMS
26.   #define ASCIIGRAPH
27.   
28.   /* The following is needed for prototypes of certain functions */
29.   #if defined(_MSC_VER)
30.   #include <process.h>	/* Provides prototypes of exit(), spawn()      */
31.   #endif
32.   
33.   #ifndef SYSTEM_H
34.   #include "system.h"
35.   #endif
36.   #define index	strchr
37.   #define rindex	strrchr
38.   
39.   #include <time.h>
40.   
41.   #ifdef RANDOM
42.   /* Use the high quality random number routines. */
43.   #define Rand()	random()
44.   #else
45.   #define Rand()	rand()
46.   #endif
47.   
48.   #define FCMASK	0660	/* file creation mask */
49.   #define regularize	nt_regularize
50.   
51.   #ifndef M
52.   #define M(c)		(0x80 | (c))
53.   /* #define M(c)		((c) - 128) */
54.   #endif
55.   
56.   #ifndef C
57.   #define C(c)		(0x1f & (c))
58.   #endif
59.   
60.   #if defined(DLB)
61.   #define FILENAME_CMP  stricmp                 /* case insensitive */
62.   #endif
63.   
64.   #ifdef MICRO
65.   # ifndef MICRO_H
66.   #include "micro.h"      /* contains necessary externs for [os_name].c */
67.   # endif
68.   #endif
69.   
70.   #include <fcntl.h>
71.   #include <io.h>
72.   #include <direct.h>
73.   #include <conio.h>
74.   #undef kbhit	        /* Use our special NT kbhit */
75.   #define kbhit (*nt_kbhit)
76.   
77.   #ifndef alloca
78.   #define ALLOCA_HACK	/* used in util/panic.c */
79.   #endif
80.   
81.   #ifdef MICRO
82.   #define exit	msexit		/* do chdir first */
83.   #endif
84.   
85.   #ifndef REDO
86.   #undef	Getchar
87.   #define Getchar nhgetch
88.   #endif
89.   
90.   #ifdef _MSC_VER
91.   #pragma warning(disable:4018)	/* signed/unsigned mismatch */
92.   #pragma warning(disable:4305)	/* init, conv from 'const int' to 'char' */
93.   #endif
94.   
95.   #endif /* NTCONF_H */