We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The include ioctl.h is not a part of Visual Studio C stuff. I have a patched version here that works:
ioctl.h
#include <lua.h> #include <lauxlib.h> #include <lualib.h> #ifdef __linux__ #include <sys/ioctl.h> int lua_winsize(lua_State *L) { struct winsize sz; ioctl(0, TIOCGWINSZ, &sz); lua_pushinteger(L, sz.ws_col); lua_pushinteger(L, sz.ws_row); return 2; } #elif _WIN32 #include <windows.h> int lua_winsize(lua_State *L) { CONSOLE_SCREEN_BUFFER_INFO csbi; int columns, rows; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); columns = csbi.srWindow.Right - csbi.srWindow.Left + 1; rows = csbi.srWindow.Bottom - csbi.srWindow.Top + 1; lua_pushinteger(L, columns); lua_pushinteger(L, rows); return 2; } #endif int luaopen_sirocco_winsize(lua_State *L) { lua_pushcfunction(L, lua_winsize); return 1; }
Sorry for not sending a PR but downloaded the source as a zip.
The text was updated successfully, but these errors were encountered:
Sirocco does not support Windows right now. PR is welcome when you have the time.
Sorry, something went wrong.
No branches or pull requests
The include
ioctl.h
is not a part of Visual Studio C stuff. I have a patched version here that works:Sorry for not sending a PR but downloaded the source as a zip.
The text was updated successfully, but these errors were encountered: