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

Diff for /src/usr.bin/telnet/terminal.c between version 1.2 and 1.3

version 1.2, 1996/03/27 19:33:11 version 1.3, 1998/03/12 04:57:45
Line 34 
Line 34 
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   
 #ifndef lint  #include "telnet_locl.h"
 #if 0  
 static char sccsid[] = "@(#)terminal.c  8.2 (Berkeley) 2/16/95";  
 static char rcsid[] = "$NetBSD: terminal.c,v 1.5 1996/02/28 21:04:17 thorpej Exp $";  
 #else  
 static char rcsid[] = "$OpenBSD$";  
 #endif  
 #endif /* not lint */  
   
 #include <arpa/telnet.h>  
 #include <sys/types.h>  
   
 #include "ring.h"  
   
 #include "externs.h"  
 #include "types.h"  
   
 Ring            ttyoring, ttyiring;  Ring            ttyoring, ttyiring;
 unsigned char   ttyobuf[2*BUFSIZ], ttyibuf[BUFSIZ];  unsigned char   ttyobuf[2*BUFSIZ], ttyibuf[BUFSIZ];
   
Line 132 
Line 117 
             TerminalFlushOutput();              TerminalFlushOutput();
             /* we leave 'n' alone! */              /* we leave 'n' alone! */
         } else {          } else {
             n = TerminalWrite(ttyoring.consume, n);              n = TerminalWrite((char *)ttyoring.consume, n);
         }          }
     }      }
     if (n > 0) {      if (n > 0) {
Line 188 
Line 173 
     if (localflow)      if (localflow)
         mode |= MODE_FLOW;          mode |= MODE_FLOW;
   
     if (my_want_state_is_will(TELOPT_BINARY))      if ((eight & 1) || my_want_state_is_will(TELOPT_BINARY))
         mode |= MODE_INBIN;          mode |= MODE_INBIN;
   
       if (eight & 2)
           mode |= MODE_OUT8;
     if (his_want_state_is_will(TELOPT_BINARY))      if (his_want_state_is_will(TELOPT_BINARY))
         mode |= MODE_OUTBIN;          mode |= MODE_OUTBIN;
   
Line 215 
Line 202 
     int force;      int force;
 {  {
     register int newmode;      register int newmode;
   #ifdef ENCRYPTION
       static int enc_passwd = 0;
   #endif
   
     newmode = getconnmode()|(force?MODE_FORCE:0);      newmode = getconnmode()|(force?MODE_FORCE:0);
   
     TerminalNewMode(newmode);      TerminalNewMode(newmode);
   
   #ifdef  ENCRYPTION
       if ((newmode & (MODE_ECHO|MODE_EDIT)) == MODE_EDIT) {
           if (my_want_state_is_will(TELOPT_ENCRYPT)
               && (enc_passwd == 0) && !encrypt_output) {
               encrypt_request_start(0, 0);
               enc_passwd = 1;
           }
       } else {
           if (enc_passwd) {
               encrypt_request_end();
               enc_passwd = 0;
           }
       }
   #endif
   
 }  }
   

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3