1 /* NetHack 3.6 ntconf.h $NHDT-Date: 1447424077 2015/11/13 14:14:37 $ $NHDT-Branch: master $:$NHDT-Revision: 1.48 $ */
2 /* Copyright (c) NetHack PC Development Team 1993, 1994. */
3 /* NetHack may be freely redistributed. See license for details. */
8 /* #define SHELL /* nt use of pcsys routines caused a hang */
10 #define RANDOM /* have Berkeley random(3) */
11 #define TEXTCOLOR /* Color text */
13 #define EXEPATH /* Allow .exe location to be used as HACKDIR */
14 #define TRADITIONAL_GLYPHMAP /* Store glyph mappings at level change time */
16 #define LAN_FEATURES /* Include code for lan-aware features. Untested in \
19 #define PC_LOCKING /* Prevent overwrites of aborted or in-progress games */
20 /* without first receiving confirmation. */
22 #define HOLD_LOCKFILE_OPEN /* Keep an exclusive lock on the .0 file */
24 #define SELF_RECOVER /* Allow the game itself to recover from an aborted \
27 #define SYSCF /* Use a global configuration */
28 #define SYSCF_FILE "sysconf" /* Use a file to hold the SYSCF configuration \
31 #define DUMPLOG /* Enable dumplog files */
32 /*#define DUMPLOG_FILE "nethack-%n-%d.log"*/
33 #define DUMPLOG_MSG_COUNT 50
37 /*#define CHANGE_COLOR*/ /* allow palette changes */
38 #define SELECTSAVED /* Provide menu of saved games to choose from at start \
42 * -----------------------------------------------------------------
43 * The remaining code shouldn't need modification.
44 * -----------------------------------------------------------------
46 /* #define SHORT_FILENAMES /* All NT filesystems support long names now
50 #undef MICRO /* never define this! */
53 #define NOCWD_ASSUMPTIONS /* Always define this. There are assumptions that \
54 it is defined for WIN32. \
55 Allow paths to be specified for HACKDIR, \
56 LEVELDIR, SAVEDIR, BONESDIR, DATADIR, \
57 SCOREDIR, LOCKDIR, CONFIGDIR, and TROUBLEDIR */
64 #define OPTIONS_USED "options"
65 #define OPTIONS_FILE OPTIONS_USED
67 #define PORT_HELP "porthelp"
69 #define PORT_DEBUG /* include ability to debug international keyboard issues \
72 #define RUNTIME_PORT_ID /* trigger run-time port identification for \
73 * identification of exe CPU architecture \
75 #define RUNTIME_PASTEBUF_SUPPORT
78 #define SAFERHANGUP /* Define SAFERHANGUP to delay hangup processing \
79 * until the main command loop. 'safer' because it \
80 * avoids certain cheats and also avoids losing \
81 * objects being thrown when the hangup occurs. \
84 /* Stuff to help the user with some common, yet significant errors */
85 #define INTERJECT_PANIC 0
86 #define INTERJECTION_TYPES (INTERJECT_PANIC + 1)
87 extern void FDECL(interject_assistance,
88 (int, int, genericptr_t, genericptr_t));
89 extern void FDECL(interject, (int));
92 *===============================================
93 * Compiler-specific adjustments
94 *===============================================
98 /* Visual C 8 warning elimination */
99 #ifndef _CRT_SECURE_NO_DEPRECATE
100 #define _CRT_SECURE_NO_DEPRECATE
102 #ifndef _SCL_SECURE_NO_DEPRECATE
103 #define _SCL_SECURE_NO_DEPRECATE
105 #ifndef _CRT_NONSTDC_NO_DEPRECATE
106 #define _CRT_NONSTDC_NO_DEPRECATE
108 #pragma warning(disable : 4996) /* VC8 deprecation warnings */
109 #pragma warning(disable : 4142) /* benign redefinition */
110 #pragma warning(disable : 4267) /* conversion from 'size_t' to XX */
111 #if (_MSC_VER > 1600)
112 #pragma warning(disable : 4459) /* hide global declaration */
113 #endif /* _MSC_VER > 1600 */
114 #endif /* _MSC_VER > 1000 */
115 #pragma warning(disable : 4761) /* integral size mismatch in arg; conv \
118 #pragma warning(disable : 4102) /* unreferenced label */
121 /* suppress a warning in cppregex.cpp */
122 #pragma warning(disable : 4101) /* unreferenced local variable */
124 #endif /* _MSC_VER */
126 /* The following is needed for prototypes of certain functions */
127 #if defined(_MSC_VER)
128 #include <process.h> /* Provides prototypes of exit(), spawn() */
131 #include <string.h> /* Provides prototypes of strncmpi(), etc. */
133 #define strncmpi(a, b, c) strnicmp(a, b, c)
136 /* Visual Studio defines this in their own headers, which we don't use */
138 #define snprintf _snprintf
140 disable : 4996) /* deprecation warning suggesting snprintf_s */
143 #include <sys/types.h>
151 #define PATHLEN BUFSZ /* maximum pathlength */
152 #define FILENAME BUFSZ /* maximum filename length (conservative) */
154 #if defined(_MAX_PATH) && defined(_MAX_FNAME)
155 #if (_MAX_PATH < BUFSZ) && (_MAX_FNAME < BUFSZ)
158 #define PATHLEN _MAX_PATH
159 #define FILENAME _MAX_FNAME
165 #define rindex strrchr
172 /* Use the high quality random number routines. */
173 #define Rand() random()
175 #define Rand() rand()
178 #include <sys/stat.h>
179 #define FCMASK (_S_IREAD | _S_IWRITE) /* file creation mask */
180 #define regularize nt_regularize
181 #define HLOCK "NHPERM"
184 #define M(c) ((char) (0x80 | (c)))
185 /* #define M(c) ((c) - 128) */
189 #define C(c) (0x1f & (c))
193 #define FILENAME_CMP stricmp /* case insensitive */
196 /* this was part of the MICRO stuff in the past */
197 extern const char *alllevels, *allbones;
198 extern char hackdir[];
201 #define getlogin() ((char *) 0)
202 extern void NDECL(win32_abort);
203 extern void FDECL(nttty_preference_update, (const char *));
204 extern void NDECL(toggle_mouse_support);
205 extern void FDECL(map_subkeyvalue, (char *));
206 extern void NDECL(load_keyboard_handler);
207 extern void NDECL(raw_clear_screen);
214 int _RTLENTRY _EXPFUNC access(const char _FAR *__path, int __amode);
215 int _RTLENTRY _EXPFUNC _chdrive(int __drive);
216 int _RTLENTRYF _EXPFUNC32 chdir(const char _FAR *__path);
217 char _FAR *_RTLENTRY _EXPFUNC getcwd(char _FAR *__buf, int __buflen);
218 int _RTLENTRY _EXPFUNC
219 write(int __handle, const void _FAR *__buf, unsigned __len);
220 int _RTLENTRY _EXPFUNC creat(const char _FAR *__path, int __amode);
221 int _RTLENTRY _EXPFUNC close(int __handle);
222 int _RTLENTRY _EXPFUNC _close(int __handle);
223 int _RTLENTRY _EXPFUNC
224 open(const char _FAR *__path, int __access, ... /*unsigned mode*/);
225 long _RTLENTRY _EXPFUNC lseek(int __handle, long __offset, int __fromwhere);
226 int _RTLENTRY _EXPFUNC read(int __handle, void _FAR *__buf, unsigned __len);
229 #undef kbhit /* Use our special NT kbhit */
230 #define kbhit (*nt_kbhit)
233 #define MAX_LAN_USERNAME 20
237 #define ALLOCA_HACK /* used in util/panic.c */
240 extern int FDECL(set_win32_option, (const char *, const char *));
241 #define LEFTBUTTON FROM_LEFT_1ST_BUTTON_PRESSED
242 #define RIGHTBUTTON RIGHTMOST_BUTTON_PRESSED
243 #define MIDBUTTON FROM_LEFT_2ND_BUTTON_PRESSED
244 #define MOUSEMASK (LEFTBUTTON | RIGHTBUTTON | MIDBUTTON)
246 extern int FDECL(alternative_palette, (char *));
249 #endif /* NTCONF_H */