(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
This commit is contained in:
nethack.allison
2002-03-10 17:35:16 +00:00
parent 62ea5a9345
commit d40c1b8202
3 changed files with 27 additions and 19 deletions

View File

@@ -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

View File

@@ -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++)

View File

@@ -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])) {