From: nethack.allison Date: Sun, 10 Mar 2002 17:35:16 +0000 (+0000) Subject: (from Yitzhak) part1 X-Git-Tag: MOVE2GIT~3011 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d40c1b82021c86ae01bdad8f4f75f0f1c52e3661;p=nethack (from Yitzhak) part1 part 1 touches core files ntconf.h changes differ slightly from Yitzhak's original. Makes Borland happy with current sources. Hides "rawio" on Graphical Port which doesn't do anything with rawio --- diff --git a/include/ntconf.h b/include/ntconf.h index 2ce336a31..532a003e0 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -1,4 +1,4 @@ -/* 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. */ @@ -8,15 +8,12 @@ /* #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 */ @@ -63,6 +60,19 @@ #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 diff --git a/src/drawing.c b/src/drawing.c index ceb7fedde..02d96e92c 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -794,15 +794,12 @@ boolean is_rlevel; /* 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++) diff --git a/src/options.c b/src/options.c index f74cdaef0..2f9a46490 100644 --- a/src/options.c +++ b/src/options.c @@ -140,7 +140,7 @@ static struct Bool_Opt {"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}, @@ -3166,36 +3166,37 @@ char *op; 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])) {