Diff for /gforth/engine/select.c between versions 1.1 and 1.4

version 1.1, 1997/05/21 20:40:11 version 1.4, 1998/12/13 23:30:03
Line 1 Line 1
 /* select replacement for DOS computers for ms only  /* select replacement for DOS computers for ms only
   
   Copyright (C) 1995 Free Software Foundation, Inc.    Copyright (C) 1995,1998 Free Software Foundation, Inc.
   
   This file is part of Gforth.    This file is part of Gforth.
   
Line 31  int select(int n, fd_set *a, fd_set *b, Line 31  int select(int n, fd_set *a, fd_set *b,
    gettimeofday(&time1,&zone1);     gettimeofday(&time1,&zone1);
    time1.tv_sec += timeout->tv_sec;     time1.tv_sec += timeout->tv_sec;
    time1.tv_usec += timeout->tv_usec;     time1.tv_usec += timeout->tv_usec;
    if(time1.tv_usec >= 1000000)     if(time1.tv_usec >= 1000000) {
      {       time1.tv_sec += time1.tv_usec / 1000000;
         time1.tv_sec += time1.tv_usec / 1000000;       time1.tv_usec %= 1000000;
         time1.tv_usec %= 1000000;     }
      }     do {
    do       gettimeofday(&time2,&zone1);
      {     } while((time2.tv_sec < time1.tv_sec) ||
         gettimeofday(&time2,&zone1);             ((time2.tv_usec < time1.tv_usec) &&
      }              (time2.tv_sec == time1.tv_sec)));
    while(time2.tv_sec < time1.tv_sec);  
   
    do  
      {  
         gettimeofday(&time2,&zone1);  
      }  
    while(time2.tv_usec < time1.tv_usec &&  
          time2.tv_sec == time1.tv_sec);  
   
 }  }

Removed from v.1.1  
changed lines
  Added in v.1.4


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