From 92f964701d55ae3a7c2060da3a78fe6d3b665bcb Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 29 Mar 2025 06:19:21 +0300 Subject: MS-DOS real-mode (8086) port It can be cross-compiled or compiled natively on 32-bit DOS with OpenWatcom C v1.9. Compiling on an 8086 might be possible later on - but we would have to add support for some ancient ANSI C compiler. --- tecparse.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'tecparse.c') diff --git a/tecparse.c b/tecparse.c index e726ea6..a1426fa 100644 --- a/tecparse.c +++ b/tecparse.c @@ -1004,6 +1004,19 @@ char inbuf[4]; if(errno == EINTR) continue; #endif +#ifdef MSDOS + waiting_for_input_flag = YES; + /* does not echo */ + i = getch(); + waiting_for_input_flag = NO; + + intr_flag = 0; + + if(i != EOF){ + inbuf[0] = i; + break; + } +#endif #ifdef VMS waiting_for_input_flag = YES; i = sys$qiow(0,tty_input_chan,IO$_READVBLK|IO$M_NOECHO|IO$M_NOFILTR, @@ -1091,7 +1104,7 @@ register struct buff_header *qbp; * The return code determines whether this was done okay or not. */ int -unpreserve_rubout_char( struct cmd_token *ct __attribute__((unused))) +unpreserve_rubout_char( struct cmd_token *ct ) { register struct buff_header *qbp; int c; @@ -1133,7 +1146,7 @@ int c; * special Q-register so that it doesn't grow without bounds. */ void -parser_clean_preserve_list() +parser_clean_preserve_list( void ) { register struct buff_header *qbp; -- cgit v1.2.3