2 /***************************************************************
3 ** I/O subsystem for PForth for WIN32 systems.
6 ** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom
8 ** The pForth software code is dedicated to the public domain,
9 ** and any third party may reproduce, distribute and modify
10 ** the pForth software code or any derivative works thereof
11 ** without any compensation or license. The pForth software
12 ** code is provided on an "as is" basis without any warranty
13 ** of any kind, including, without limitation, the implied
14 ** warranties of merchantability and fitness for a particular
15 ** purpose and their equivalents under the laws of any jurisdiction.
17 ****************************************************************
18 ** 941004 PLB Extracted IO calls from pforth_main.c
19 ***************************************************************/
21 #include "../pf_all.h"
25 /* Use console mode I/O so that KEY and ?TERMINAL will work. */
26 #if defined(WIN32) || defined(__NT__)
27 int sdTerminalOut( char c )
29 #if defined(__WATCOMC__)
30 return putch((char)(c));
32 return _putch((char)(c));
36 /* Needed cuz _getch() does not echo. */
37 int sdTerminalEcho( char c )
39 #if defined(__WATCOMC__)
40 return putch((char)(c));
42 return _putch((char)(c));
46 int sdTerminalIn( void )
51 int sdQueryTerminal( void )
56 int sdTerminalFlush( void )
61 return fflush(PF_STDOUT);
65 void sdTerminalInit( void )
69 void sdTerminalTerm( void )