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:
@@ -56,7 +56,7 @@ STATIC_DCL boolean NDECL(comspec_exists);
|
||||
extern int GUILaunched; /* from nttty.c */
|
||||
#endif
|
||||
|
||||
#ifdef MICRO
|
||||
#if defined(MICRO) || defined(WIN32)
|
||||
|
||||
void
|
||||
flushout()
|
||||
@@ -528,25 +528,4 @@ static void msexit()
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#ifdef WIN32
|
||||
/*
|
||||
* This is a kludge. Just before the release of 3.3.0 the latest
|
||||
* version of a popular MAPI mail product was found to exhibit
|
||||
* a strange result where the current directory was changed out
|
||||
* from under NetHack resulting in a failure of all subsequent
|
||||
* file operations in NetHack. This routine is called prior
|
||||
* to all file open/renames/deletes in file.c.
|
||||
*
|
||||
* A more elegant solution will be sought after 3.3.0 is released.
|
||||
*/
|
||||
void dircheck()
|
||||
{
|
||||
char dirbuf[BUFSZ];
|
||||
dirbuf[0] = '\0';
|
||||
if (getcwd(dirbuf, sizeof dirbuf) != (char *)0)
|
||||
/* pline("%s,%s",dirbuf,hackdir); */
|
||||
if (strcmp(dirbuf,hackdir) != 0)
|
||||
chdir(hackdir); /* chdir, not chdirx */
|
||||
}
|
||||
#endif
|
||||
#endif /* MICRO || WIN32 || OS2 */
|
||||
|
||||
@@ -48,7 +48,7 @@ int fd;
|
||||
return(0);
|
||||
}
|
||||
# else
|
||||
# if defined(MICRO) && !defined(NO_FSTAT)
|
||||
# if (defined(MICRO) || defined(WIN32)) && !defined(NO_FSTAT)
|
||||
if(fstat(fd, &buf)) {
|
||||
if(moves > 1) pline("Cannot get status of saved level? ");
|
||||
else pline("Cannot get status of saved game");
|
||||
|
||||
Reference in New Issue
Block a user