diff --git a/src/conio/win32cio.c b/src/conio/win32cio.c index 62d63fbbe08f4f62f40d4cb871eb704cc3f8f585..fac67c83c5e7de65bde31e8768a5f9f6469f9702 100644 --- a/src/conio/win32cio.c +++ b/src/conio/win32cio.c @@ -1,6 +1,7 @@ #include <windows.h> /* INPUT_RECORD, etc. */ #include <stdio.h> /* stdin */ #include "conio.h" +#define CIOLIB_NO_MACROS #include "ciolib.h" #include "keys.h" @@ -40,7 +41,7 @@ int win32_kbhit(void) return(0); } -int win32_getch() +int win32_getch(void) { char str[128]; INPUT_RECORD input; @@ -128,7 +129,7 @@ int win32_getche(void) if(ansi_nextchar) return(ansi_getch()); #endif - ch=ansi_getch(); + ch=win32_getch(); if(ch) putch(ch); return(ch); @@ -138,7 +139,7 @@ int win32_initciolib(long inmode) { DWORD conmode; - if(!isatty(stdin)) + if(!isatty(fileno(stdin))) return(0); textmode(inmode); if(!GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), &conmode)) @@ -177,4 +178,96 @@ void textmode(int mode) { } +void clreol(void) +{ +} + +void clrscr(void) +{ +} + +void delline(void) +{ +} + + +int gettext(int left, int top, int right, int bottom, void* buf) +{ + return 1; +} + +void gettextinfo(struct text_info* info) +{ +} + + +void gotoxy(int x, int y) +{ +} + + +void highvideo(void) +{ +} + + +void insline(void) +{ +} + + +void lowvideo(void) +{ +} + + +int movetext(int left, int top, int right, int bottom, int destleft, int desttop) +{ + return 1; +} + + +void normvideo(void) +{ +} + + +int puttext(int left, int top, int right, int bottom, void* buf) +{ + return 1; +} + + +void textattr(int newattr) +{ +} + + +void textbackground(int newcolor) +{ +} + + +void textcolor(int newcolor) +{ +} + +void window(int left, int top, int right, int bottom) +{ +} + +void _setcursortype(int type) +{ +} + +int wherex(void) +{ + return 0; +} + +int wherey(void) +{ + return 0; +} + #endif diff --git a/src/conio/win32cio.h b/src/conio/win32cio.h index 8498fc0b5101932b8634f34c4b68e33dfc7689e8..3cb3b33bbcb937cc3e4b2474629cbdf9d57a04cb 100644 --- a/src/conio/win32cio.h +++ b/src/conio/win32cio.h @@ -5,7 +5,7 @@ extern "C" { #endif int win32_kbhit(void); -int win32_getch(); +int win32_getch(void); int win32_getche(void); int win32_getmouse(struct cio_mouse_event *mevent); int win32_hidemouse(void);