Merge pull request #13 from philburk/fixrom
[pforth] / csrc / stdio / pf_io_stdio.c
CommitLineData
bb6b2dcd 1/* $Id$ */\r
2/***************************************************************\r
3** I/O subsystem for PForth for common systems.\r
4**\r
5** Author: Phil Burk\r
6** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom\r
7**\r
8** The pForth software code is dedicated to the public domain,\r
9** and any third party may reproduce, distribute and modify\r
10** the pForth software code or any derivative works thereof\r
11** without any compensation or license. The pForth software\r
12** code is provided on an "as is" basis without any warranty\r
13** of any kind, including, without limitation, the implied\r
14** warranties of merchantability and fitness for a particular\r
15** purpose and their equivalents under the laws of any jurisdiction.\r
16**\r
17****************************************************************\r
18** 941004 PLB Extracted IO calls from pforth_main.c\r
19***************************************************************/\r
20\r
21#include "../pf_all.h"\r
22\r
23/* Default portable terminal I/O. */\r
24int sdTerminalOut( char c )\r
25{\r
26 return putchar(c);\r
27}\r
28/* We don't need to echo because getchar() echos. */\r
29int sdTerminalEcho( char c )\r
30{\r
31 return 0;\r
32}\r
33int sdTerminalIn( void )\r
34{\r
35 return getchar();\r
36}\r
37int sdQueryTerminal( void )\r
38{\r
39 return 0;\r
40}\r
41\r
42int sdTerminalFlush( void )\r
43{\r
44#ifdef PF_NO_FILEIO\r
45 return -1;\r
46#else\r
47 return fflush(PF_STDOUT);\r
48#endif\r
49}\r
50\r
51void sdTerminalInit( void )\r
52{\r
53}\r
54void sdTerminalTerm( void )\r
55{\r
56}\r
57\r