--- gforth/engine/io.c 2007/07/01 19:05:00 1.28 +++ gforth/engine/io.c 2007/12/31 18:40:25 1.32 @@ -1,12 +1,12 @@ /* direct key io driver - Copyright (C) 1995,1996,1997,1998,1999,2002,2003,2006 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,1999,2002,2003,2006,2007 Free Software Foundation, Inc. This file is part of Gforth. Gforth is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 + as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -15,8 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. + along with this program; if not, see http://www.gnu.org/licenses/. The following is stolen from the readline library for bash */ @@ -651,7 +650,7 @@ Cell getkey(FILE * stream) prep_terminal(); result = fread(&c, sizeof(c), 1, stream); - return result==0 ? EOF : c; + return result==0 ? (errno == EINTR ? 12 : 4) : c; } #ifdef STANDALONE