Diff for /gforth/engine/io.c between versions 1.34 and 1.35

version 1.34, 2008/11/01 22:19:30 version 1.35, 2009/06/13 10:22:24
Line 622  long key_avail (FILE * stream) Line 622  long key_avail (FILE * stream)
   int tty = fileno (stream);    int tty = fileno (stream);
   fd_set selin;    fd_set selin;
   static struct timeval now = { 0 , 0 };    static struct timeval now = { 0 , 0 };
     int chars_avail;
   
   setvbuf(stream, NULL, _IONBF, 0);    setvbuf(stream, NULL, _IONBF, 0);
   if(!terminal_prepped && stream == stdin)    if(!terminal_prepped && stream == stdin)
Line 629  long key_avail (FILE * stream) Line 630  long key_avail (FILE * stream)
   
   FD_ZERO(&selin);    FD_ZERO(&selin);
   FD_SET(tty, &selin);    FD_SET(tty, &selin);
   return select(1, &selin, NULL, NULL, &now);    chars_avail = select(1, &selin, NULL, NULL, &now);
     return (chars_avail == -1) ? 0 : chars_avail;
 }  }
   
 /* Get a key from the buffer of characters to be read.  /* Get a key from the buffer of characters to be read.

Removed from v.1.34  
changed lines
  Added in v.1.35


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