-/* SCCS Id: @(#)ntconf.h 3.4 1996/10/14 */
+/* SCCS Id: @(#)ntconf.h 3.4 2002/03/10 */
/* Copyright (c) NetHack PC Development Team 1993, 1994. */
/* NetHack may be freely redistributed. See license for details. */
/* #define SHELL /* nt use of pcsys routines caused a hang */
#define RANDOM /* have Berkeley random(3) */
-
#define TEXTCOLOR /* Color text */
-#define PATHLEN 64 /* maximum pathlength */
-#define FILENAME 80 /* maximum filename length (conservative) */
#define EXEPATH /* Allow .exe location to be used as HACKDIR */
#define TRADITIONAL_GLYPHMAP /* Store glyph mappings at level change time */
#ifdef WIN32CON
-#define LAN_FEATURES /* Include code for lan-aware features. */
+#define LAN_FEATURES /* Include code for lan-aware features. Untested in 3.4.0*/
#endif
#define PC_LOCKING /* Prevent overwrites of aborted or in-progress games */
#undef random
#endif
+#define PATHLEN BUFSZ /* maximum pathlength */
+#define FILENAME BUFSZ /* maximum filename length (conservative) */
+
+#if defined(_MAX_PATH) && defined(_MAX_FNAME)
+# if (_MAX_PATH < BUFSZ) && (_MAX_FNAME < BUFSZ)
+#undef PATHLEN
+#undef FILENAME
+#define PATHLEN _MAX_PATH
+#define FILENAME _MAX_FNAME
+# endif
+#endif
+
+
#define NO_SIGNAL
#define index strchr
#define rindex strrchr
/* Use a loop: char != uchar on some machines. */
for (i = 0; i < MAXMCLASSES; i++)
monsyms[i] = def_monsyms[i];
-# ifdef ASCIIGRAPH
+# if defined(ASCIIGRAPH) && !defined(MSWIN_GRAPHICS)
if (iflags.IBMgraphics
# if defined(USE_TILES) && defined(MSDOS)
&& !iflags.grmode
# endif
-# if defined(MSWIN_GRAPHICS)
- && 0
-# endif
- )
+ )
monsyms[S_HUMAN] = 0x01; /* smiley face */
# endif
for (i = 0; i < MAXPCHARS; i++)
{"prayconfirm", &flags.prayconfirm, TRUE, SET_IN_GAME},
{"preload_tiles", &iflags.wc_preload_tiles, TRUE, DISP_IN_GAME}, /*WC*/
{"pushweapon", &flags.pushweapon, FALSE, SET_IN_GAME},
-#if defined(MICRO) && !defined(AMIGA)
+#if defined(MICRO) && !defined(AMIGA) && !defined(MSWIN_GRAPHICS)
{"rawio", &iflags.rawio, FALSE, DISP_IN_GAME},
#else
{"rawio", (boolean *)0, FALSE, SET_IN_FILE},
wn = tfg = tbg = (char *)0;
- /* until first non-space in case there's leading spaces*/
+ /* until first non-space in case there's leading spaces - before colorname*/
while(*newop && isspace(*newop)) newop++;
if (*newop) wn = newop;
else return 0;
- /* until first space */
+ /* until first space - colorname*/
while(*newop && !isspace(*newop)) newop++;
if (*newop) *newop = '\0';
+ else return 0;
newop++;
- /* until first non-space */
+ /* until first non-space - before foreground*/
while(*newop && isspace(*newop)) newop++;
if (*newop) tfg = newop;
else return 0;
- /* until slash */
+ /* until slash - foreground */
while(*newop && *newop != '/') newop++;
if (*newop) *newop = '\0';
else return 0;
newop++;
- /* until first non-space (in case there's leading space after slash) */
+ /* until first non-space (in case there's leading space after slash) - before background */
while(*newop && isspace(*newop)) newop++;
if (*newop) tbg = newop;
else return 0;
- /* until first space */
+ /* until first space - background */
while(*newop && !isspace(*newop)) newop++;
- if (*newop) *newop = '\0';
- newop++;
+ if (*newop) *newop++ = '\0';
+
for (j = 0; j < 4; ++j) {
if (!strcmpi(wn, wnames[j]) ||
!strcmpi(wn, shortnames[j])) {