Support for Visual Studio (sloppy version)
This is a very sloppy version of the visual studio support. I'm linking two external libraries for support, unfortunately one needs to be patched, you'll need to move the following lines:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
#ifdef _MSC_VER
#pragma comment(lib, "Ws2_32.lib")
#endif
from termiWin.h to termiWin.c
then, in termiWin.h, add the declaration for HANDLE:
typedef void* HANDLE;
and lastly modify the select_serial declaration to:
int select_serial(int nfds, struct fd_set *readfds, struct fd_set *writefds, struct fd_set *exceptfds, struct timeval *timeout);
I also had to add the pre-generated flex and bison sources - I couldn't find a way to simply download and run flex and bison from the visual studio solution.
Hey pan, I only noticed this now when I was looking at another repo. I've done some major re-arrangement of the IO stuff since you posted this. Can you see how much effort it would be to make this patch work with the new version? It might actually be easier because some of it is more cleanly separated. I'm also thinking of moving the implementation of PRINT and INPUT to io.c, do you think that would help or hinder?