# HG changeset patch
# User John "Elwin" Edwards
# Date 1448632764 18000
# Node ID 4438569c1b02579c5fc099a2fdc3e6cd7c2ae279
# Parent 4146e2a06bc12a8209e8f8d2f1332478084adcb0# Parent ca876944b1960e9804c68d0a8fe043855f966896
Merge the MSVC branch.
diff -r ca876944b196 -r 4438569c1b02 README.txt
--- a/README.txt Sat Aug 22 10:55:53 2015 -0400
+++ b/README.txt Fri Nov 27 08:59:24 2015 -0500
@@ -26,8 +26,12 @@
To install on Windows:
-Use the included Visual Studio solution files. Warning: they have not been
-tested recently.
+Visual Studio solution and project files are included. They are still being
+tested but should work with Visual Studio 2015 on Windows 8.1.
+
+You will need pdcurses before you can build. Create a folder called 'pdcurses'
+in this folder and copy into it curses.h, term.h, and pdcurses.lib from the
+pdcurses distribution.
You can also build on Windows using MinGW. Make sure pdcurses is installed.
You will have to go into the '/lib' folder and copy 'libpdcurses.a' to
@@ -37,8 +41,8 @@
It is recommended to run 'configure' with the '--disable-logfile' option, and
'make' with the 'LDFLAGS=-static' option.
-The games should all build with MinGW and run, but Super-Rogue has problems
-with restoring saved games.
+Note that Super-Rogue has problems with restoring saved games on Windows,
+whichever build system is used.
See the individual games' subdirectories for further documentation. Some of
the manpages may be outdated, but the guides to playing should be accurate.
diff -r ca876944b196 -r 4438569c1b02 arogue5/arogue5.vcxproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/arogue5/arogue5.vcxproj Fri Nov 27 08:59:24 2015 -0500
@@ -0,0 +1,184 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ {F9B8E5FE-F748-453D-8A6B-012D28841D5A}
+ arogue5
+ 8.1
+
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Level3
+ Disabled
+ true
+ ..\pdcurses
+ _CRT_SECURE_NO_WARNINGS;SCOREFILE="arogue5.scr";SAVEDIR=".";%(PreprocessorDefinitions)
+
+
+ true
+ ..\pdcurses
+ pdcurses.lib;%(AdditionalDependencies)
+
+
+
+
+ Level3
+ Disabled
+ true
+ ..\pdcurses
+ _CRT_SECURE_NO_WARNINGS;SCOREFILE="arogue5.scr";SAVEDIR=".";%(PreprocessorDefinitions)
+
+
+ true
+ ..\pdcurses
+ pdcurses.lib;%(AdditionalDependencies)
+
+
+
+
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ ..\pdcurses
+ _CRT_SECURE_NO_WARNINGS;SCOREFILE="arogue5.scr";SAVEDIR=".";%(PreprocessorDefinitions)
+
+
+ true
+ true
+ true
+ ..\pdcurses
+ pdcurses.lib;%(AdditionalDependencies)
+
+
+
+
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ ..\pdcurses
+ _CRT_SECURE_NO_WARNINGS;SCOREFILE="arogue5.scr";SAVEDIR=".";%(PreprocessorDefinitions)
+
+
+ true
+ true
+ true
+ ..\pdcurses
+ pdcurses.lib;%(AdditionalDependencies)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r ca876944b196 -r 4438569c1b02 arogue5/arogue5.vcxproj.filters
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/arogue5/arogue5.vcxproj.filters Fri Nov 27 08:59:24 2015 -0500
@@ -0,0 +1,144 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
\ No newline at end of file
diff -r ca876944b196 -r 4438569c1b02 arogue5/arogue58.sln
--- a/arogue5/arogue58.sln Sat Aug 22 10:55:53 2015 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "arogue58", "arogue58.vcproj", "{2EEE53AB-A85A-4D4D-8DB2-B5F23513F415}"
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- ConfigName.0 = Debug
- ConfigName.1 = Release
- ConfigName.2 = test
- EndGlobalSection
- GlobalSection(ProjectDependencies) = postSolution
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {2EEE53AB-A85A-4D4D-8DB2-B5F23513F415}.Debug.ActiveCfg = Debug|Win32
- {2EEE53AB-A85A-4D4D-8DB2-B5F23513F415}.Debug.Build.0 = Debug|Win32
- {2EEE53AB-A85A-4D4D-8DB2-B5F23513F415}.Release.ActiveCfg = Release|Win32
- {2EEE53AB-A85A-4D4D-8DB2-B5F23513F415}.Release.Build.0 = Release|Win32
- {2EEE53AB-A85A-4D4D-8DB2-B5F23513F415}.test.ActiveCfg = Debug|Win32
- {2EEE53AB-A85A-4D4D-8DB2-B5F23513F415}.test.Build.0 = Debug|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff -r ca876944b196 -r 4438569c1b02 arogue5/arogue58.vcproj
--- a/arogue5/arogue58.vcproj Sat Aug 22 10:55:53 2015 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,305 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff -r ca876944b196 -r 4438569c1b02 arogue5/init.c
--- a/arogue5/init.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue5/init.c Fri Nov 27 08:59:24 2015 -0500
@@ -15,6 +15,7 @@
#include "curses.h"
#include
#include
+#include
#include "rogue.h"
#include "mach_dep.h"
diff -r ca876944b196 -r 4438569c1b02 arogue5/mdport.c
--- a/arogue5/mdport.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue5/mdport.c Fri Nov 27 08:59:24 2015 -0500
@@ -36,7 +36,6 @@
#if defined(_WIN32)
#include
#include
-#include
#include
#include
#undef MOUSE_MOVED
@@ -69,6 +68,10 @@
#include
#endif
+#if defined(_WIN32)
+#include
+#endif
+
#include
#include
#include
@@ -209,6 +212,15 @@
return(fd);
}
+FILE *
+md_fdopen(int fd, char *mode)
+{
+#ifdef _WIN32
+ return( _fdopen(fd, mode) );
+#else
+ return( fdopen(fd, mode) );
+#endif
+}
int
md_normaluser()
@@ -322,16 +334,6 @@
return(homedir);
}
-int
-md_sleep(int s)
-{
-#ifdef _WIN32
- _sleep(s);
-#else
- sleep(s);
-#endif
-}
-
char *
md_getshell()
{
diff -r ca876944b196 -r 4438569c1b02 arogue5/player.c
--- a/arogue5/player.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue5/player.c Fri Nov 27 08:59:24 2015 -0500
@@ -168,7 +168,7 @@
else if (slow_invent) {
register char c;
- char *spellp;
+ char *spellp = "";
for (i=0; it_stats.s_hpt;
turn_off(*tp, CANSURPRISE);
@@ -783,7 +783,7 @@
int segments; /* Number of segments since last called */
{
register struct linked_list *item;
- register struct thing *tp;
+ register struct thing *tp = NULL;
register min_time = 20; /* Minimum time until a monster can act */
/*
diff -r ca876944b196 -r 4438569c1b02 arogue7/arogue7.vcxproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/arogue7/arogue7.vcxproj Fri Nov 27 08:59:24 2015 -0500
@@ -0,0 +1,187 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ {93C1D81C-0424-4DC3-8671-D1B5F4BB6E5F}
+ arogue7
+ 8.1
+
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Level3
+ Disabled
+ true
+ ..\pdcurses
+ _CRT_SECURE_NO_WARNINGS;SCOREFILE="arogue7.scr";SAVEDIR=".";%(PreprocessorDefinitions)
+
+
+ true
+ ..\pdcurses
+ pdcurses.lib;%(AdditionalDependencies)
+
+
+
+
+ Level3
+ Disabled
+ true
+ _CRT_SECURE_NO_WARNINGS;SCOREFILE="arogue7.scr";SAVEDIR=".";%(PreprocessorDefinitions)
+ ..\pdcurses
+
+
+ true
+ ..\pdcurses
+ pdcurses.lib;%(AdditionalDependencies)
+
+
+
+
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ _CRT_SECURE_NO_WARNINGS;SCOREFILE="arogue7.scr";SAVEDIR=".";%(PreprocessorDefinitions)
+ ..\pdcurses
+
+
+ true
+ true
+ true
+ ..\pdcurses
+ pdcurses.lib;%(AdditionalDependencies)
+
+
+
+
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ _CRT_SECURE_NO_WARNINGS;SCOREFILE="arogue7.scr";SAVEDIR=".";%(PreprocessorDefinitions)
+ ..\pdcurses
+
+
+ true
+ true
+ true
+ ..\pdcurses
+ pdcurses.lib;%(AdditionalDependencies)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r ca876944b196 -r 4438569c1b02 arogue7/arogue7.vcxproj.filters
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/arogue7/arogue7.vcxproj.filters Fri Nov 27 08:59:24 2015 -0500
@@ -0,0 +1,153 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff -r ca876944b196 -r 4438569c1b02 arogue7/arogue77.sln
--- a/arogue7/arogue77.sln Sat Aug 22 10:55:53 2015 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "arogue77", "arogue77.vcproj", "{D95CFDAC-E66E-47D3-87B7-F76149F6A51D}"
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- ConfigName.0 = Debug
- ConfigName.1 = Release
- EndGlobalSection
- GlobalSection(ProjectDependencies) = postSolution
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {D95CFDAC-E66E-47D3-87B7-F76149F6A51D}.Debug.ActiveCfg = Debug|Win32
- {D95CFDAC-E66E-47D3-87B7-F76149F6A51D}.Debug.Build.0 = Debug|Win32
- {D95CFDAC-E66E-47D3-87B7-F76149F6A51D}.Release.ActiveCfg = Release|Win32
- {D95CFDAC-E66E-47D3-87B7-F76149F6A51D}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff -r ca876944b196 -r 4438569c1b02 arogue7/arogue77.vcproj
--- a/arogue7/arogue77.vcproj Sat Aug 22 10:55:53 2015 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,270 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff -r ca876944b196 -r 4438569c1b02 arogue7/command.c
--- a/arogue7/command.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/command.c Fri Nov 27 08:59:24 2015 -0500
@@ -1078,7 +1078,7 @@
bool mark;
{
register struct object *obj;
- register char **guess, *elsewise;
+ register char **guess = NULL, *elsewise = NULL;
register bool *know;
if (item == NULL) {
diff -r ca876944b196 -r 4438569c1b02 arogue7/daemons.c
--- a/arogue7/daemons.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/daemons.c Fri Nov 27 08:59:24 2015 -0500
@@ -417,7 +417,7 @@
alchemy(obj)
register struct object *obj;
{
- register struct object *tobj;
+ register struct object *tobj = NULL;
register struct linked_list *item;
/*
@@ -535,7 +535,7 @@
*/
quill_charge()
{
- register struct object *tobj;
+ register struct object *tobj = NULL;
register struct linked_list *item;
/*
diff -r ca876944b196 -r 4438569c1b02 arogue7/fight.c
--- a/arogue7/fight.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/fight.c Fri Nov 27 08:59:24 2015 -0500
@@ -331,7 +331,7 @@
bool back_stab;
{
register struct stats *att, *def;
- register char *cp;
+ register char *cp = NULL;
register int ndice, nsides, nplus, def_arm;
bool did_hit = FALSE;
int prop_hplus, prop_dplus;
diff -r ca876944b196 -r 4438569c1b02 arogue7/mach_dep.h
--- a/arogue7/mach_dep.h Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/mach_dep.h Fri Nov 27 08:59:24 2015 -0500
@@ -44,7 +44,8 @@
/*
* where scorefile should live
*/
-#ifndef HAVE_CONFIG_H
+/* File locations can be defined here, if necessary. */
+#if 0
#define SCOREFILE "arogue7.scr"
#define LOGFILE "arogue7.log"
#endif
diff -r ca876944b196 -r 4438569c1b02 arogue7/mdport.c
--- a/arogue7/mdport.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/mdport.c Fri Nov 27 08:59:24 2015 -0500
@@ -32,7 +32,6 @@
#if defined(_WIN32)
#include
#include
-#include
#include
#include
#include
@@ -48,7 +47,7 @@
#include
#if defined(_WIN32) && !defined(__MINGW32__)
-#define PATH_MAX _PATH_MAX
+#define PATH_MAX _MAX_PATH
#endif
#include
@@ -61,6 +60,10 @@
#endif
#endif
+#if defined(_WIN32)
+#include
+#endif
+
#include
#include
#include
@@ -89,18 +92,6 @@
#endif
}
-int
-md_hasclreol()
-{
-#ifndef attron
- return(!CE);
-#elif !defined(__PDCURSES__)
- return(clr_eol != NULL);
-#else
- return(TRUE);
-#endif
-}
-
#ifdef attron
# define _puts(s) tputs(s, 0, md_putchar);
# define SO enter_standout_mode
@@ -184,6 +175,26 @@
#endif
}
+FILE *
+md_fdopen(int fd, char *mode)
+{
+#ifdef _WIN32
+ return( _fdopen(fd, mode) );
+#else
+ return( fdopen(fd, mode) );
+#endif
+}
+
+int
+md_fileno(FILE *fp)
+{
+#ifdef _WIN32
+ return( _fileno(fp) );
+#else
+ return( fileno(fp) );
+#endif
+}
+
int
md_creat(char *file, int mode)
{
@@ -306,16 +317,6 @@
return(homedir);
}
-int
-md_sleep(int s)
-{
-#ifdef _WIN32
- _sleep(s);
-#else
- sleep(s);
-#endif
-}
-
char *
md_getshell()
{
diff -r ca876944b196 -r 4438569c1b02 arogue7/misc.c
--- a/arogue7/misc.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/misc.c Fri Nov 27 08:59:24 2015 -0500
@@ -277,7 +277,7 @@
register struct linked_list *item;
{
- register struct linked_list *titem;
+ register struct linked_list *titem = NULL;
register struct object *obj, *tobj;
bool doit = TRUE;
@@ -838,8 +838,8 @@
use_mm(which)
int which;
{
- register struct object *obj;
- register struct linked_list *item;
+ register struct object *obj = NULL;
+ register struct linked_list *item = NULL;
bool cursed, blessed, is_mm;
cursed = FALSE;
diff -r ca876944b196 -r 4438569c1b02 arogue7/move.c
--- a/arogue7/move.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/move.c Fri Nov 27 08:59:24 2015 -0500
@@ -46,10 +46,10 @@
register coord *tc;
{
register struct trap *tp;
- register char ch, *mname;
+ register char ch, *mname = "";
register bool is_player = (th == &player),
can_see;
- register struct linked_list *mitem;
+ register struct linked_list *mitem = NULL;
register struct thing *mp;
@@ -764,7 +764,7 @@
register struct room *rp, *orp;
register char ch;
struct linked_list *item;
- register struct thing *tp;
+ register struct thing *tp = NULL;
coord old_hero;
register int wasfirstmove, moved, num_hits;
bool changed=FALSE; /* Did we switch places with a friendly monster? */
diff -r ca876944b196 -r 4438569c1b02 arogue7/pack.c
--- a/arogue7/pack.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/pack.c Fri Nov 27 08:59:24 2015 -0500
@@ -34,8 +34,8 @@
register struct linked_list *item, **packret;
bool silent;
{
- register struct linked_list *ip, *lp, *ap;
- register struct object *obj, *op;
+ register struct linked_list *ip, *lp = NULL, *ap;
+ register struct object *obj, *op = NULL;
register bool exact, from_floor;
if (packret != NULL)
@@ -576,7 +576,7 @@
reg struct linked_list *item;
reg struct object *obj;
reg int cnt, pagecnt, ch, och, maxx, curx, confused;
- struct linked_list *saveitem;
+ struct linked_list *saveitem = NULL;
char description[2*LINELEN+1];
char cost[LINELEN/2];
#ifdef PC7300
diff -r ca876944b196 -r 4438569c1b02 arogue7/passages.c
--- a/arogue7/passages.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/passages.c Fri Nov 27 08:59:24 2015 -0500
@@ -28,7 +28,7 @@
do_passages()
{
- register struct rdes *r1, *r2;
+ register struct rdes *r1, *r2 = NULL;
register int i, j;
register int roomcount;
static struct rdes
@@ -137,7 +137,7 @@
conn(r1, r2)
int r1, r2;
{
- register struct room *rpf, *rpt;
+ register struct room *rpf, *rpt = NULL;
register char rmt;
register int distance, max_diag, offset, i;
register int rm;
diff -r ca876944b196 -r 4438569c1b02 arogue7/rogue.h
--- a/arogue7/rogue.h Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/rogue.h Fri Nov 27 08:59:24 2015 -0500
@@ -1303,3 +1303,5 @@
extern int demoncnt, fusecnt, between, chance;
#define CCHAR(x) ( (char) (x & A_CHARTEXT) )
extern char *md_gethostname(), *md_getusername(), *md_gethomedir(), *md_getroguedir(), *md_crypt();
+extern FILE * md_fdopen(int fd, char *mode);
+extern int md_fileno(FILE *fp);
diff -r ca876944b196 -r 4438569c1b02 arogue7/save.c
--- a/arogue7/save.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/save.c Fri Nov 27 08:59:24 2015 -0500
@@ -111,7 +111,7 @@
*/
if (save_file(savefd) == FALSE) {
msg("Cannot create save file.");
- unlink(file_name);
+ md_unlink(file_name);
return(FALSE);
}
else return(TRUE);
@@ -160,7 +160,7 @@
num_written = ENCWRITE(version, num_to_write, savefd);
sprintf(prbuf,"%d x %d\n", LINES, COLS);
ENCWRITE(prbuf,80,savefd);
- savef = (FILE *) fdopen(savefd,"wb");
+ savef = (FILE *) md_fdopen(savefd,"wb");
ret = rs_save_file(savef);
fclose(savef);
if (num_to_write == num_written && ret == 0) return(TRUE);
diff -r ca876944b196 -r 4438569c1b02 arogue7/scrolls.c
--- a/arogue7/scrolls.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/scrolls.c Fri Nov 27 08:59:24 2015 -0500
@@ -62,7 +62,7 @@
int flag;
bool is_scroll;
{
- register struct object *obj, *nobj;
+ register struct object *obj = NULL, *nobj;
register struct linked_list *item, *nitem;
register int i,j;
register char ch, nch;
diff -r ca876944b196 -r 4438569c1b02 arogue7/state.c
--- a/arogue7/state.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/state.c Fri Nov 27 08:59:24 2015 -0500
@@ -79,7 +79,7 @@
if (write_error)
return(WRITESTAT);
- if (encwrite(ptr, size, fileno(savef)) != size)
+ if (encwrite(ptr, size, md_fileno(savef)) != size)
write_error = 1;
return(WRITESTAT);
diff -r ca876944b196 -r 4438569c1b02 arogue7/sticks.c
--- a/arogue7/sticks.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/sticks.c Fri Nov 27 08:59:24 2015 -0500
@@ -33,13 +33,13 @@
int which;
int flags;
{
- register struct linked_list *item;
+ register struct linked_list *item = NULL;
register struct thing *tp;
register int y, x, bonus;
struct linked_list *nitem;
struct object *nobj;
bool cursed, blessed, is_player;
- char *mname;
+ char *mname = "";
cursed = flags & ISCURSED;
blessed = flags & ISBLESSED;
diff -r ca876944b196 -r 4438569c1b02 arogue7/util.c
--- a/arogue7/util.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/util.c Fri Nov 27 08:59:24 2015 -0500
@@ -1006,7 +1006,7 @@
move_hero(why)
int why;
{
- char *action;
+ char *action = "";
char which;
coord c;
@@ -1207,7 +1207,7 @@
tr_name(ch)
char ch;
{
- register char *s;
+ register char *s = "";
switch (ch)
{
diff -r ca876944b196 -r 4438569c1b02 arogue7/wizard.c
--- a/arogue7/wizard.c Sat Aug 22 10:55:53 2015 -0400
+++ b/arogue7/wizard.c Fri Nov 27 08:59:24 2015 -0500
@@ -537,7 +537,7 @@
teleport()
{
- register struct room *new_rp, *old_rp = roomin(&hero);
+ register struct room *new_rp = NULL, *old_rp = roomin(&hero);
register int rm, which;
coord old;
bool got_position = FALSE;
diff -r ca876944b196 -r 4438569c1b02 rogue3/chase.c
--- a/rogue3/chase.c Sat Aug 22 10:55:53 2015 -0400
+++ b/rogue3/chase.c Fri Nov 27 08:59:24 2015 -0500
@@ -162,7 +162,7 @@
int x, y;
int dist, thisdist;
struct linked_list *item;
- struct object *obj;
+ struct object *obj = NULL;
coord *er = &tp->t_pos;
int ch;
diff -r ca876944b196 -r 4438569c1b02 rogue3/move.c
--- a/rogue3/move.c Sat Aug 22 10:55:53 2015 -0400
+++ b/rogue3/move.c Fri Nov 27 08:59:24 2015 -0500
@@ -339,7 +339,7 @@
int ch;
int ex, ey, nopen = 0;
struct linked_list *item;
- struct object *obj;
+ struct object *obj = NULL;
static coord ret; /* what we will be returning */
static coord dest;
diff -r ca876944b196 -r 4438569c1b02 rogue3/pack.c
--- a/rogue3/pack.c Sat Aug 22 10:55:53 2015 -0400
+++ b/rogue3/pack.c Fri Nov 27 08:59:24 2015 -0500
@@ -22,8 +22,8 @@
void
add_pack(struct linked_list *item, int silent)
{
- struct linked_list *ip, *lp;
- struct object *obj, *op;
+ struct linked_list *ip, *lp = NULL;
+ struct object *obj, *op = NULL;
int exact, from_floor;
if (item == NULL)
diff -r ca876944b196 -r 4438569c1b02 rogue3/passages.c
--- a/rogue3/passages.c Sat Aug 22 10:55:53 2015 -0400
+++ b/rogue3/passages.c Fri Nov 27 08:59:24 2015 -0500
@@ -22,7 +22,7 @@
void
do_passages()
{
- struct rdes *r1, *r2;
+ struct rdes *r1, *r2 = NULL;
int i, j;
int roomcount;
static struct rdes
@@ -131,7 +131,7 @@
void
conn(int r1, int r2)
{
- struct room *rpf, *rpt;
+ struct room *rpf, *rpt = NULL;
int rmt;
int distance, turn_spot, turn_distance;
int rm;
diff -r ca876944b196 -r 4438569c1b02 rogue3/rogue3.vcxproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/rogue3/rogue3.vcxproj Fri Nov 27 08:59:24 2015 -0500
@@ -0,0 +1,177 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ {0CD113D6-2654-41FC-8A77-240A0CCF7BC5}
+ rogue3
+ 8.1
+
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+ Application
+ true
+ v140
+ MultiByte
+
+
+ Application
+ false
+ v140
+ true
+ MultiByte
+
+
+
+
+
+
+
+