Allow MICRO and WIN32 code paths to diverge
There's still a lot of overlap for 3.4.1, but not 100% any longer and it facilitates some improvements - Allow error save files on WIN32
This commit is contained in:
@@ -130,7 +130,7 @@ long FDECL(dlb_ftell, (DLB_P));
|
||||
#else
|
||||
#define WRTMODE "w+"
|
||||
#endif
|
||||
#if (defined(MICRO) && !defined(AMIGA)) || defined(THINK_C) || defined(__MWERKS__)
|
||||
#if (defined(MICRO) && !defined(AMIGA)) || defined(THINK_C) || defined(__MWERKS__) || defined(WIN32)
|
||||
# define RDBMODE "rb"
|
||||
# define WRBMODE "w+b"
|
||||
#else
|
||||
|
||||
@@ -1176,7 +1176,7 @@ E struct monst *FDECL(mk_mplayer, (struct permonst *,XCHAR_P,
|
||||
E void FDECL(create_mplayers, (int,BOOLEAN_P));
|
||||
E void FDECL(mplayer_talk, (struct monst *));
|
||||
|
||||
#ifdef MICRO
|
||||
#if defined(MICRO) || defined(WIN32)
|
||||
|
||||
/* ### msdos.c,os2.c,tos.c,winnt.c ### */
|
||||
|
||||
@@ -1226,7 +1226,7 @@ E int NDECL((*nt_kbhit));
|
||||
E void FDECL(Delay, (int));
|
||||
# endif /* WIN32 */
|
||||
|
||||
#endif /* MICRO */
|
||||
#endif /* MICRO || WIN32 */
|
||||
|
||||
/* ### mthrowu.c ### */
|
||||
|
||||
@@ -1366,15 +1366,15 @@ E int NDECL(dohistory);
|
||||
|
||||
/* ### pcmain.c ### */
|
||||
|
||||
#if defined(MICRO)
|
||||
#if defined(MICRO) || defined(WIN32)
|
||||
# ifdef CHDIR
|
||||
E void FDECL(chdirx, (char *,BOOLEAN_P));
|
||||
# endif /* CHDIR */
|
||||
#endif /* MICRO */
|
||||
#endif /* MICRO || WIN32 */
|
||||
|
||||
/* ### pcsys.c ### */
|
||||
|
||||
#ifdef MICRO
|
||||
#if defined(MICRO) || defined(WIN32)
|
||||
E void NDECL(flushout);
|
||||
E int NDECL(dosh);
|
||||
# ifdef MFLOPPY
|
||||
@@ -1390,11 +1390,11 @@ E void FDECL(getreturn, (const char *));
|
||||
E void VDECL(msmsg, (const char *,...));
|
||||
# endif
|
||||
E FILE *FDECL(fopenp, (const char *,const char *));
|
||||
#endif /* MICRO */
|
||||
#endif /* MICRO || WIN32 */
|
||||
|
||||
/* ### pctty.c ### */
|
||||
|
||||
#if defined(MICRO)
|
||||
#if defined(MICRO) || defined(WIN32)
|
||||
E void NDECL(gettty);
|
||||
E void FDECL(settty, (const char *));
|
||||
E void NDECL(setftty);
|
||||
@@ -1402,7 +1402,7 @@ E void VDECL(error, (const char *,...));
|
||||
#if defined(TIMED_DELAY) && defined(_MSC_VER)
|
||||
E void FDECL(msleep, (unsigned));
|
||||
#endif
|
||||
#endif /* MICRO */
|
||||
#endif /* MICRO || WIN32 */
|
||||
|
||||
/* ### pcunix.c ### */
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ typedef xchar boolean; /* 0 or 1 */
|
||||
#endif
|
||||
|
||||
#if defined(MICRO)
|
||||
#if !defined(AMIGA) && !defined(TOS) && !defined(OS2_HPFS) && !defined(WIN32)
|
||||
#if !defined(AMIGA) && !defined(TOS) && !defined(OS2_HPFS)
|
||||
#define SHORT_FILENAMES /* filenames are 8.3 */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
|
||||
#define PC_LOCKING /* Prevent overwrites of aborted or in-progress games */
|
||||
/* without first receiving confirmation. */
|
||||
#define NOCWD_ASSUMPTIONS /* Allow paths to be specified for HACKDIR,
|
||||
LEVELDIR, SAVEDIR, BONESDIR, DATADIR,
|
||||
SCOREDIR, LOCKDIR, and CONFIGDIR */
|
||||
|
||||
|
||||
/*
|
||||
* -----------------------------------------------------------------
|
||||
@@ -29,7 +27,15 @@
|
||||
*/
|
||||
/* #define SHORT_FILENAMES /* All NT filesystems support long names now */
|
||||
|
||||
#define MICRO /* always define this! */
|
||||
#ifdef MICRO
|
||||
#undef MICRO /* never define this! */
|
||||
#endif
|
||||
|
||||
#define NOCWD_ASSUMPTIONS /* Always define this. There are assumptions that
|
||||
it is defined for WIN32.
|
||||
Allow paths to be specified for HACKDIR,
|
||||
LEVELDIR, SAVEDIR, BONESDIR, DATADIR,
|
||||
SCOREDIR, LOCKDIR, and CONFIGDIR */
|
||||
#define NO_TERMS
|
||||
#define ASCIIGRAPH
|
||||
|
||||
@@ -104,11 +110,22 @@
|
||||
#define FILENAME_CMP stricmp /* case insensitive */
|
||||
#endif
|
||||
|
||||
#ifdef MICRO
|
||||
# ifndef MICRO_H
|
||||
#include "micro.h" /* contains necessary externs for [os_name].c */
|
||||
# endif
|
||||
#if 0
|
||||
#ifndef C
|
||||
#define C(c) (0x1f & (c))
|
||||
#endif
|
||||
#ifndef M
|
||||
#define M(c) (0x80 | (c))
|
||||
#endif
|
||||
extern char levels[], bones[], permbones[],
|
||||
#endif /* 0 */
|
||||
|
||||
/* this was part of the MICRO stuff in the past */
|
||||
extern const char *alllevels, *allbones;
|
||||
extern char hackdir[];
|
||||
#define ABORT C('a')
|
||||
#define getuid() 1
|
||||
#define getlogin() ((char *)0)
|
||||
|
||||
#include <fcntl.h>
|
||||
#ifndef __BORLANDC__
|
||||
|
||||
Reference in New Issue
Block a user