Diff for /gforth/engine/io.c between versions 1.41 and 1.42

version 1.41, 2010/12/31 18:09:02 version 1.42, 2012/04/03 22:57:00
Line 673  long key_avail (FILE *stream) Line 673  long key_avail (FILE *stream)
   if(!terminal_prepped && stream == stdin)    if(!terminal_prepped && stream == stdin)
     prep_terminal();      prep_terminal();
   
   FD_ZERO(&selin);  #if defined(FIONREAD) && !defined(_WIN32)
   FD_SET(tty, &selin);    if(isatty (tty)) {
   chars_avail = select(1, &selin, NULL, NULL, &now);      int result = ioctl (tty, FIONREAD, &chars_avail);
     } else
   #endif
     {
       FD_ZERO(&selin);
       FD_SET(tty, &selin);
       chars_avail = select(1, &selin, NULL, NULL, &now);
     }
   if (chars_avail > 0) {    if (chars_avail > 0) {
     /* getc won't block */      /* getc won't block */
     int c = getc(stream);      int c = getc(stream);

Removed from v.1.41  
changed lines
  Added in v.1.42


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