Diff for /gforth/engine/io.c between versions 1.12 and 1.18

version 1.12, 2000/09/23 15:06:08 version 1.18, 2006/02/19 17:27:13
Line 1 Line 1
 /* direct key io driver  /* direct key io driver
   
   Copyright (C) 1995,1996,1997,1998,1999 Free Software Foundation, Inc.    Copyright (C) 1995,1996,1997,1998,1999,2002,2003 Free Software Foundation, Inc.
   
   This file is part of Gforth.    This file is part of Gforth.
   
Line 16 Line 16
   
   You should have received a copy of the GNU General Public License    You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software    along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
   
   The following is stolen from the readline library for bash    The following is stolen from the readline library for bash
 */  */
Line 26 Line 26
 */  */
   
 #include "config.h"  #include "config.h"
   #include "forth.h"
 #include <sys/time.h>  #include <sys/time.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <unistd.h>  #include <unistd.h>
Line 51  typedef unsigned int uint32_t; Line 52  typedef unsigned int uint32_t;
 #include <sys/filio.h>  #include <sys/filio.h>
 #endif  #endif
 #include <setjmp.h>  #include <setjmp.h>
 #include "forth.h"  
 #include "io.h"  #include "io.h"
   
 #ifndef MSDOS  #ifndef MSDOS
Line 447  void deprep_terminal () Line 447  void deprep_terminal ()
 #define VTIME VEOL  #define VTIME VEOL
 #endif  #endif
   
   #include <locale.h>
   
 void prep_terminal ()  void prep_terminal ()
 {  {
   int tty = fileno (stdin);    int tty = fileno (stdin);
Line 472  void prep_terminal () Line 474  void prep_terminal ()
     return;      /* added by MdG */      return;      /* added by MdG */
   }      /* added by MdG */    }      /* added by MdG */
         
     setlocale(LC_ALL, "");
   
   /* Try to keep this function from being INTerrupted.  We can do it    /* Try to keep this function from being INTerrupted.  We can do it
      on POSIX and systems with BSD-like signal handling. */       on POSIX and systems with BSD-like signal handling. */
 #if defined (HAVE_POSIX_SIGNALS)  #if defined (HAVE_POSIX_SIGNALS)
Line 626  long key_avail (FILE * stream) Line 630  long key_avail (FILE * stream)
   
   if(!terminal_prepped)  prep_terminal();    if(!terminal_prepped)  prep_terminal();
   
 #ifndef _WIN32  #if defined(FIONREAD) && !defined(_WIN32)
   if(isatty (tty)) {    if(isatty (tty)) {
     result = ioctl (tty, FIONREAD, &chars_avail);      result = ioctl (tty, FIONREAD, &chars_avail);
   }    }

Removed from v.1.12  
changed lines
  Added in v.1.18


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>