...
 
Commits (4)
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>WITH_SDL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\3rdp\win32.release\sdl2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>..\..\3rdp\win32.release\sdl2\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<Link>
<AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
\ No newline at end of file
...@@ -34,16 +34,20 @@ ...@@ -34,16 +34,20 @@
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
<Import Project="..\xpdev\xpdev.props" /> <Import Project="..\xpdev\xpdev.props" />
<Import Project="..\build\target_ia32.props" /> <Import Project="..\build\target_ia32.props" />
<Import Project="..\build\sdl.props" />
<Import Project="..\smblib\smblib.props" /> <Import Project="..\smblib\smblib.props" />
<Import Project="..\build\sdl2.props" />
<Import Project="..\encode\encode.props" />
<Import Project="..\hash\hash.props" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
<Import Project="..\xpdev\xpdev.props" /> <Import Project="..\xpdev\xpdev.props" />
<Import Project="..\build\target_ia32.props" /> <Import Project="..\build\target_ia32.props" />
<Import Project="..\build\sdl.props" />
<Import Project="..\smblib\smblib.props" /> <Import Project="..\smblib\smblib.props" />
<Import Project="..\build\sdl2.props" />
<Import Project="..\encode\encode.props" />
<Import Project="..\hash\hash.props" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
......
...@@ -123,6 +123,7 @@ ...@@ -123,6 +123,7 @@
<ClCompile Include="ooii_cmenus.c" /> <ClCompile Include="ooii_cmenus.c" />
<ClCompile Include="ooii_logons.c" /> <ClCompile Include="ooii_logons.c" />
<ClCompile Include="ooii_sounds.c" /> <ClCompile Include="ooii_sounds.c" />
<ClCompile Include="ripper.c" />
<ClCompile Include="rlogin.c" /> <ClCompile Include="rlogin.c" />
<ClCompile Include="syncterm.c" /> <ClCompile Include="syncterm.c" />
<ClCompile Include="telnet_io.c" /> <ClCompile Include="telnet_io.c" />
......
...@@ -36,7 +36,21 @@ struct FontList { ...@@ -36,7 +36,21 @@ struct FontList {
} entry[]; } entry[];
}; };
struct FontHeader { #if defined(_WIN32) || defined(__BORLANDC__)
#define PRAGMA_PACK
#endif
#if defined(PRAGMA_PACK) || defined(__WATCOMC__)
#define _PACK
#else
#define _PACK __attribute__ ((packed))
#endif
#if defined(PRAGMA_PACK)
#pragma pack(push,1) /* Disk image structures must be packed */
#endif
struct _PACK FontHeader {
uint8_t ignore[0x6E]; uint8_t ignore[0x6E];
uint16_t height; uint16_t height;
uint8_t style; uint8_t style;
...@@ -52,6 +66,10 @@ struct FontHeader { ...@@ -52,6 +66,10 @@ struct FontHeader {
uint32_t charlocOffset; uint32_t charlocOffset;
uint32_t fontSpaceOffset; uint32_t fontSpaceOffset;
uint32_t kernOffset; uint32_t kernOffset;
} __attribute__((packed)); // TODO: Deal with Microsoft. };
#if defined(PRAGMA_PACK)
#pragma pack(pop) /* original packing */
#endif
#endif #endif
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
*/ */
#include <sys/stat.h> #include <sys/stat.h>
#if defined(_MSC_VER)
#define _USE_MATH_DEFINES // for C
#endif
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
...@@ -17,7 +20,9 @@ ...@@ -17,7 +20,9 @@
#include <genwrap.h> #include <genwrap.h>
#include <sockwrap.h> #include <sockwrap.h>
#include <strwrap.h> #include <strwrap.h>
#include <unistd.h> #if defined(__unix__)
#include <unistd.h>
#endif
#include <vidmodes.h> #include <vidmodes.h>
#include <xpbeep.h> #include <xpbeep.h>
......
...@@ -2479,7 +2479,7 @@ BOOL doterm(struct bbslist *bbs) ...@@ -2479,7 +2479,7 @@ BOOL doterm(struct bbslist *bbs)
#endif #endif
int ooii_mode=0; int ooii_mode=0;
recv_byte_buffer_len=recv_byte_buffer_pos=0; recv_byte_buffer_len=recv_byte_buffer_pos=0;
struct mouse_state ms = {}; struct mouse_state ms = {0};
int speedwatch = 0; int speedwatch = 0;
gettextinfo(&txtinfo); gettextinfo(&txtinfo);
......
#include <stdio.h> #include <stdio.h>
#include <malloc.h>
#include <string.h>
#if !defined _MSC_VER && !defined __BORLANDC__ #if !defined _MSC_VER && !defined __BORLANDC__
char* itoa(int val, char* str, int radix) char* itoa(int val, char* str, int radix)
...@@ -40,7 +42,7 @@ char* ltoa(long val, char* str, int radix) ...@@ -40,7 +42,7 @@ char* ltoa(long val, char* str, int radix)
} }
#endif #endif
#ifdef _WIN32 #if defined(_WIN32) && !defined(_MSC_VER)
/* From FreeBSD */ /* From FreeBSD */
size_t size_t
strnlen(const char *s, size_t maxlen) strnlen(const char *s, size_t maxlen)
...@@ -53,7 +55,9 @@ strnlen(const char *s, size_t maxlen) ...@@ -53,7 +55,9 @@ strnlen(const char *s, size_t maxlen)
} }
return (len); return (len);
} }
#endif
#ifdef _WIN32
/* From FreeBSD */ /* From FreeBSD */
char * char *
strndup(const char *str, size_t maxlen) strndup(const char *str, size_t maxlen)
......
...@@ -182,6 +182,7 @@ ...@@ -182,6 +182,7 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<ClCompile Include="strwrap.c" />
<ClCompile Include="str_list.c"> <ClCompile Include="str_list.c">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
......