--- gforth/engine/io.c 2006/04/09 08:24:47 1.23 +++ gforth/engine/io.c 2007/07/01 18:32:11 1.27 @@ -1,6 +1,6 @@ /* direct key io driver - Copyright (C) 1995,1996,1997,1998,1999,2002,2003 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,1999,2002,2003,2006 Free Software Foundation, Inc. This file is part of Gforth. @@ -475,6 +475,7 @@ void prep_terminal () } /* added by MdG */ setlocale(LC_ALL, ""); + setlocale(LC_NUMERIC, "C"); /* Try to keep this function from being INTerrupted. We can do it on POSIX and systems with BSD-like signal handling. */ @@ -621,7 +622,7 @@ long key_avail (FILE * stream) { int tty = fileno (stream); fd_set selin; - static int now[2] = { 0 , 0 }; + static long int now[2] = { 0 , 0 }; int res; setvbuf(stream, NULL, _IONBF, 0); @@ -653,6 +654,18 @@ Cell getkey(FILE * stream) return result==0 ? EOF : c; } +#ifdef STANDALONE +void emit_char(char x) +{ + putc(x, stdout); +} + +void type_chars(char *addr, unsigned int l) +{ + fwrite(addr, l, 1, stdout); +} +#endif + #ifdef TEST #include