VS 2013 build of NetHack.exe and also fix level file locking

This commit is contained in:
nhmall
2015-02-28 00:37:05 -05:00
parent 528e8b34e0
commit 796f6f85d0
14 changed files with 507 additions and 217 deletions
+1 -1
View File
@@ -402,7 +402,7 @@ char *argv[];
hackpid = 1;
#endif
write(fd, (genericptr_t) &hackpid, sizeof(hackpid));
close(fd);
nhclose(fd);
}
#ifdef MFLOPPY
level_info[0].where = ACTIVE;
+2 -2
View File
@@ -282,7 +282,7 @@ int start;
if (sysflags.asksavedisk) {
/* Don't prompt if you can find the save file */
if ((fd = open_savefile()) >= 0) {
(void) close(fd);
(void) nhclose(fd);
return 1;
}
clear_nhwindow(WIN_MESSAGE);
@@ -335,7 +335,7 @@ comspec_exists()
if ((comspec = getcomspec()))
if ((fd = open(comspec, O_RDONLY)) >= 0) {
(void) close(fd);
(void) nhclose(fd);
return TRUE;
}
return FALSE;
+2 -2
View File
@@ -150,7 +150,7 @@ getlock()
error("Cannot open %s", fq_lock);
}
(void) close(fd);
(void) nhclose(fd);
if(iflags.window_inited) {
# ifdef SELF_RECOVER
@@ -248,7 +248,7 @@ gotlock:
# endif
error("cannot write lock (%s)", fq_lock);
}
if(close(fd) == -1) {
if(nhclose(fd) == -1) {
# if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS)
chdirx(orgdir, 0);
# endif
+3 -1
View File
@@ -1,6 +1,6 @@
@REM NetHack 3.5 nhsetup.bat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
@REM NetHack 3.5 nhsetup.bat $Date: 2010/09/05 14:22:16 $ $Revision: 1.21 $ */
@REM Copyright (c) NetHack PC Development Team 1993-2010
@REM Copyright (c) NetHack PC Development Team 1993-2015
@REM NetHack may be freely redistributed. See license for details.
@REM Win32 setup batch file, see Install.nt for details
@REM
@@ -118,6 +118,7 @@ if NOT exist %SRCPATH%\tile2bmp.vcxproj goto skipvcexpress
if NOT exist %SRCPATH%\tilemap.vcxproj goto skipvcexpress
if NOT exist %SRCPATH%\uudecode.vcxproj goto skipvcexpress
if NOT exist %SRCPATH%\NetHackW.vcxproj goto skipvcexpress
if NOT exist %SRCPATH%\NetHack.vcxproj goto skipvcexpress
if NOT exist %SRCPATH%\dgncomp.vcxproj goto skipvcexpress
if NOT exist %SRCPATH%\dgnstuff.vcxproj goto skipvcexpress
if NOT exist %SRCPATH%\dlb_main.vcxproj goto skipvcexpress
@@ -131,6 +132,7 @@ copy %SRCPATH%\tile2bmp.vcxproj %BUILDPATH% >nul
copy %SRCPATH%\tilemap.vcxproj %BUILDPATH% >nul
copy %SRCPATH%\uudecode.vcxproj %BUILDPATH% >nul
copy %SRCPATH%\NetHackW.vcxproj %BUILDPATH% >nul
copy %SRCPATH%\NetHack.vcxproj %BUILDPATH% >nul
copy %SRCPATH%\dgncomp.vcxproj %BUILDPATH% >nul
copy %SRCPATH%\dgnstuff.vcxproj %BUILDPATH% >nul
copy %SRCPATH%\dlb_main.vcxproj %BUILDPATH% >nul