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

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

version 1.1, 1995/10/18 08:46:15 version 1.2, 1996/03/27 19:33:10
Line 1 
Line 1 
   /*      $OpenBSD$       */
   /*      $NetBSD: telnet.c,v 1.7 1996/02/28 21:04:15 thorpej Exp $       */
   
 /*  /*
  * Copyright (c) 1988, 1990, 1993   * Copyright (c) 1988, 1990, 1993
  *      The Regents of the University of California.  All rights reserved.   *      The Regents of the University of California.  All rights reserved.
Line 32 
Line 35 
  */   */
   
 #ifndef lint  #ifndef lint
 /* from: static char sccsid[] = "@(#)telnet.c   8.1 (Berkeley) 6/6/93"; */  #if 0
 static char *rcsid = "$Id$";  static char sccsid[] = "@(#)telnet.c    8.4 (Berkeley) 5/30/95";
   static char rcsid[] = "$NetBSD: telnet.c,v 1.7 1996/02/28 21:04:15 thorpej Exp $";
   #else
   static char rcsid[] = "$OpenBSD$";
   #endif
 #endif /* not lint */  #endif /* not lint */
   
 #include <sys/types.h>  #include <sys/types.h>
Line 58 
Line 65 
 #include "general.h"  #include "general.h"
   
   
 #define strip(x)        ((x)&0x7f)  #define strip(x) ((my_want_state_is_wont(TELOPT_BINARY)) ? ((x)&0x7f) : (x))
   
 static unsigned char    subbuffer[SUBBUFSIZE],  static unsigned char    subbuffer[SUBBUFSIZE],
                         *subpointer, *subend;    /* buffer for sub-options */                          *subpointer, *subend;    /* buffer for sub-options */
Line 179 
Line 186 
     ClearArray(options);      ClearArray(options);
   
     connected = In3270 = ISend = localflow = donebinarytoggle = 0;      connected = In3270 = ISend = localflow = donebinarytoggle = 0;
 #if     defined(AUTHENTICATION)  #if     defined(AUTHENTICATION)
     auth_encrypt_connect(connected);      auth_encrypt_connect(connected);
 #endif  /* defined(AUTHENTICATION)  */  #endif  /* defined(AUTHENTICATION)  */
     restartany = -1;      restartany = -1;
Line 615 
Line 622 
         register char c, *cp, **argvp, *cp2, **argv, **avt;          register char c, *cp, **argvp, *cp2, **argv, **avt;
   
         if (name) {          if (name) {
                 if (strlen(name) > 40) {                  if ((int)strlen(name) > 40) {
                         name = 0;                          name = 0;
                         unknown[0] = name_unknown;                          unknown[0] = name_unknown;
                 } else {                  } else {
Line 681 
Line 688 
                 else if (islower(c))                  else if (islower(c))
                         *cp = toupper(c);                          *cp = toupper(c);
         }          }
   
         /*          /*
          * Check for an old V6 2 character name.  If the second           * Check for an old V6 2 character name.  If the second
          * name points to the beginning of the buffer, and is           * name points to the beginning of the buffer, and is
Line 774 
Line 781 
                                 (setupterm(tname, 1, &err) == 0)) {                                  (setupterm(tname, 1, &err) == 0)) {
                         tnamep = mklist(termbuf, tname);                          tnamep = mklist(termbuf, tname);
                 } else {                  } else {
                         if (tname && (strlen(tname) <= 40)) {                          if (tname && ((int)strlen(tname) <= 40)) {
                                 unknown[0] = tname;                                  unknown[0] = tname;
                                 upcase(tname);                                  upcase(tname);
                         } else                          } else
Line 1749 
Line 1756 
         case TS_IAC:          case TS_IAC:
 process_iac:  process_iac:
             switch (c) {              switch (c) {
   
             case WILL:              case WILL:
                 telrcv_state = TS_WILL;                  telrcv_state = TS_WILL;
                 continue;                  continue;
Line 2135 
Line 2142 
                                         ring_full_consecutive(&ttyiring));                                          ring_full_consecutive(&ttyiring));
             if (c) {              if (c) {
                 returnValue = 1;                  returnValue = 1;
                 ring_consumed(&ttyiring, c);                  ring_consumed(&ttyiring, c);
             }              }
         } else {          } else {
 #   endif /* defined(TN3270) */  #   endif /* defined(TN3270) */
Line 2164 
Line 2171 
 {  {
     sys_telnet_init();      sys_telnet_init();
   
 #if     defined(AUTHENTICATION)  #if     defined(AUTHENTICATION)
     {      {
         static char local_host[256] = { 0 };          static char local_host[256] = { 0 };
   
Line 2342 
Line 2349 
                 next = nextitem(next);                  next = nextitem(next);
             } while (wewant(next) && (nfrontp > next));              } while (wewant(next) && (nfrontp > next));
             length = next-thisitem;              length = next-thisitem;
             memcpy(good, thisitem, length);              memmove(good, thisitem, length);
             good += length;              good += length;
             thisitem = next;              thisitem = next;
         } else {          } else {

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