Skip to content
Snippets Groups Projects
Commit c8c59285 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Changes necessary to build with MSVC2019.

parent faf4e453
Branches
Tags
No related merge requests found
......@@ -123,6 +123,7 @@
<ClCompile Include="ooii_cmenus.c" />
<ClCompile Include="ooii_logons.c" />
<ClCompile Include="ooii_sounds.c" />
<ClCompile Include="ripper.c" />
<ClCompile Include="rlogin.c" />
<ClCompile Include="syncterm.c" />
<ClCompile Include="telnet_io.c" />
......
......@@ -36,7 +36,21 @@ struct FontList {
} 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];
uint16_t height;
uint8_t style;
......@@ -52,6 +66,10 @@ struct FontHeader {
uint32_t charlocOffset;
uint32_t fontSpaceOffset;
uint32_t kernOffset;
} __attribute__((packed)); // TODO: Deal with Microsoft.
};
#if defined(PRAGMA_PACK)
#pragma pack(pop) /* original packing */
#endif
#endif
......@@ -3,6 +3,9 @@
*/
#include <sys/stat.h>
 
#if defined(_MSC_VER)
#define _USE_MATH_DEFINES // for C
#endif
#include <math.h>
#include <string.h>
#include <stdbool.h>
......@@ -17,7 +20,9 @@
#include <genwrap.h>
#include <sockwrap.h>
#include <strwrap.h>
#include <unistd.h>
#if defined(__unix__)
#include <unistd.h>
#endif
#include <vidmodes.h>
#include <xpbeep.h>
 
......
......@@ -2479,7 +2479,7 @@ BOOL doterm(struct bbslist *bbs)
#endif
int ooii_mode=0;
recv_byte_buffer_len=recv_byte_buffer_pos=0;
struct mouse_state ms = {};
struct mouse_state ms = {0};
int speedwatch = 0;
gettextinfo(&txtinfo);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment