[BACK]Return to sys_bsd.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / telnet

Diff for /src/usr.bin/telnet/sys_bsd.c between version 1.18 and 1.19

version 1.18, 2014/07/20 06:39:41 version 1.19, 2014/07/20 07:35:04
Line 64 
Line 64 
 }  }
   
   
     int  
 TerminalWrite(buf, n)  
     char *buf;  
     int  n;  
 {  
     return write(tout, buf, n);  
 }  
   
     int  
 TerminalRead(buf, n)  
     unsigned char *buf;  
     int  n;  
 {  
     return read(tin, buf, n);  
 }  
   
 /*  
  *  
  */  
   
     int  
 TerminalAutoFlush()  
 {  
 #if     defined(LNOFLSH)  
     int flush;  
   
     ioctl(0, TIOCLGET, (char *)&flush);  
     return !(flush&LNOFLSH);    /* if LNOFLSH, no autoflush */  
 #else   /* LNOFLSH */  
     return 1;  
 #endif  /* LNOFLSH */  
 }  
   
 #ifdef  KLUDGELINEMODE  #ifdef  KLUDGELINEMODE
 extern int kludgelinemode;  extern int kludgelinemode;
 #endif  #endif
Line 151 
Line 118 
     return 1;      return 1;
 }  }
   
   
 /*  
  * Flush output to the terminal  
  */  
   
     void      void
 TerminalFlushOutput()  
 {  
 #ifdef  TIOCFLUSH  
     int com = FWRITE;  
     (void) ioctl(fileno(stdout), TIOCFLUSH, (int *) &com);  
 #else  
     (void) ioctl(fileno(stdout), TCFLSH, (int *) 0);  
 #endif  
 }  
   
     void  
 TerminalSaveState()  TerminalSaveState()
 {  {
     tcgetattr(0, &old_tc);      tcgetattr(0, &old_tc);
Line 828 
Line 779 
      * Something to read from the tty...       * Something to read from the tty...
      */       */
     if (pfd[TELNET_FD_TIN].revents & (POLLIN|POLLHUP)) {      if (pfd[TELNET_FD_TIN].revents & (POLLIN|POLLHUP)) {
         c = TerminalRead(ttyiring.supply, ring_empty_consecutive(&ttyiring));          c = read(tin, ttyiring.supply, ring_empty_consecutive(&ttyiring));
         if (c < 0 && errno == EIO)          if (c < 0 && errno == EIO)
             c = 0;              c = 0;
         if (c < 0 && errno == EWOULDBLOCK) {          if (c < 0 && errno == EWOULDBLOCK) {

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19