From 14ba55c0db55e7e743a85eb666d993e1177b8c91 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sat, 11 Jun 2022 22:03:59 +0200 Subject: [PATCH] [dos] I don't know why it did not work when compiled by g++ --- src/osdep/dos/dos.c | 2 +- src/osdep/dos/dos.h | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/osdep/dos/dos.c b/src/osdep/dos/dos.c index ff9c161ae..c34fe2ed2 100644 --- a/src/osdep/dos/dos.c +++ b/src/osdep/dos/dos.c @@ -1033,7 +1033,7 @@ void init_osdep(void) EINTRLOOP(rs, close(s)); } - tcp_cbreak(1); + //tcp_cbreak(1); memset(&sa, 0, sizeof sa); sa.sa_handler = sigbreak; diff --git a/src/osdep/dos/dos.h b/src/osdep/dos/dos.h index bb9df1324..8bb01e141 100644 --- a/src/osdep/dos/dos.h +++ b/src/osdep/dos/dos.h @@ -1,12 +1,13 @@ #ifndef EL__OSDEP_DOS_DOS_H #define EL__OSDEP_DOS_DOS_H -#ifdef CONFIG_OS_DOS - #ifdef __cplusplus extern "C" { #endif +#ifdef CONFIG_OS_DOS + + #define DOS_EXTRA_KEYBOARD #ifdef DOS_EXTRA_KEYBOARD @@ -22,6 +23,7 @@ do { \ #include + struct timeval; int dos_read(int fd, void *buf, size_t size); @@ -35,6 +37,22 @@ int dos_setraw(int ctl, int save); void os_seed_random(unsigned char **pool, int *pool_size); int os_default_charset(void); +void done_draw(void); +int get_system_env(void); +void get_terminal_size(int fd, int *x, int *y); +void *handle_mouse(int cons, void (*fn)(void *, char *, int), void *data); +void handle_terminal_resize(int fd, void (*fn)(void)); +void init_osdep(void); +int is_xterm(void); +void resume_mouse(void *data); +int set_nonblocking_fd(int fd); +void suspend_mouse(void *data); +void terminate_osdep(void); +void unhandle_mouse(void *data); +void unhandle_terminal_resize(int fd); +void want_draw(void); + + #ifndef DOS_OVERRIDES_SELF @@ -45,10 +63,10 @@ int os_default_charset(void); #endif +#endif + #ifdef __cplusplus } #endif #endif - -#endif