Skip to content

Support for Visual Studio (sloppy version) #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pansk
Copy link

@pansk pansk commented Dec 13, 2024

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);

@pansk
Copy link
Author

pansk commented Dec 13, 2024

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.

@maurymarkowitz
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants