visual studio build fix (for recover)
This commit is contained in:
@@ -4253,13 +4253,14 @@ boolean
|
|||||||
recover_savefile(void)
|
recover_savefile(void)
|
||||||
{
|
{
|
||||||
NHFILE *gnhfp, *lnhfp, *snhfp;
|
NHFILE *gnhfp, *lnhfp, *snhfp;
|
||||||
int lev, savelev, hpid, pltmpsiz, filecmc;
|
int lev, savelev, hpid, pltmpsiz;
|
||||||
xint8 levc;
|
xint8 levc;
|
||||||
struct version_info version_data;
|
struct version_info version_data;
|
||||||
int processed[256];
|
int processed[256];
|
||||||
char savename[SAVESIZE], errbuf[BUFSZ], indicator;
|
char savename[SAVESIZE], errbuf[BUFSZ], indicator;
|
||||||
char tmpplbuf[PL_NSIZ_PLUS];
|
char tmpplbuf[PL_NSIZ_PLUS];
|
||||||
const char *savewrite_failure = (const char *) 0;
|
const char *savewrite_failure = (const char *) 0;
|
||||||
|
int ccbresult = 0;
|
||||||
|
|
||||||
for (lev = 0; lev < 256; lev++)
|
for (lev = 0; lev < 256; lev++)
|
||||||
processed[lev] = 0;
|
processed[lev] = 0;
|
||||||
@@ -4298,8 +4299,7 @@ recover_savefile(void)
|
|||||||
!= sizeof savename)
|
!= sizeof savename)
|
||||||
|| (read(gnhfp->fd, (genericptr_t) &indicator, sizeof indicator)
|
|| (read(gnhfp->fd, (genericptr_t) &indicator, sizeof indicator)
|
||||||
!= sizeof indicator)
|
!= sizeof indicator)
|
||||||
|| (read(gnhfp->fd, (genericptr_t) &filecmc, sizeof filecmc)
|
|| ((ccbresult = compare_critical_bytes(gnhfp)) != 0)
|
||||||
!= sizeof filecmc)
|
|
||||||
|| (read(gnhfp->fd, (genericptr_t) &version_data, sizeof version_data)
|
|| (read(gnhfp->fd, (genericptr_t) &version_data, sizeof version_data)
|
||||||
!= sizeof version_data)
|
!= sizeof version_data)
|
||||||
|| (read(gnhfp->fd, (genericptr_t) &pltmpsiz, sizeof pltmpsiz)
|
|| (read(gnhfp->fd, (genericptr_t) &pltmpsiz, sizeof pltmpsiz)
|
||||||
@@ -4312,7 +4312,7 @@ recover_savefile(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* save file should contain:
|
/* save file should contain:
|
||||||
* format indicator and cmc
|
* format indicator and critical_bytes
|
||||||
* version info
|
* version info
|
||||||
* plnametmp = player name size (int, 2 bytes)
|
* plnametmp = player name size (int, 2 bytes)
|
||||||
* player name (PL_NSIZ_PLUS)
|
* player name (PL_NSIZ_PLUS)
|
||||||
|
|||||||
@@ -30,6 +30,9 @@
|
|||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="$(UtilDir)recover.c" />
|
<ClCompile Include="$(UtilDir)recover.c" />
|
||||||
|
<ClCompile Include="..\..\..\..\src\version.c">
|
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32CON;DLB;MSWIN_GRAPHICS;HAS_STDINT_H;MINIMAL_FOR_RECOVER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="$(IncDir)config.h" />
|
<ClInclude Include="$(IncDir)config.h" />
|
||||||
|
|||||||
Reference in New Issue
Block a user