[net.sources.bugs] Minor mods to CKermit 4.2

hans@log-hb.UUCP (Hans Albertsson) (04/30/85)

Add 19200 + 38400 as legal speeds ( of doubtful value ), and add
keytable parsing for speeds. Speeds are selected from a small set
of legal values, so keytable driven parsing seems appropriate.

RCS file: RCS/ckusr3.c,v
retrieving revision 1.1
diff -c -r1.1 ckusr3.c
*** /tmp/,RCSt1001845	Tue Apr 23 22:20:20 1985
--- ckusr3.c	Tue Apr 23 22:15:38 1985
***************
*** 118,123
      "off",       0, 0,
      "on",        1, 0
  };
  
  /*  D O P R M  --  Set a parameter.  */
  /*

--- 118,141 -----
      "off",       0, 0,
      "on",        1, 0
  };
+ 
+ /* Speed table */
+ struct keytab speedtab[] = {
+  "0",  0, 0,
+  "110",  110, 0,
+  "150",  150, 0,
+  "300",  300, 0,
+  "600",  600, 0,
+  "1200",  1200, 0,
+  "1800",  1800, 0,
+  "2400",  2400, 0,
+  "4800",  4800, 0,
+  "9600",  9600, 0,
+  "19200",  19200, 0,
+  "38400",  38400, 0
+ };
+ int nspeed = (sizeof(speedtab) / sizeof(struct keytab));
+ 
  
  /*  D O P R M  --  Set a parameter.  */
  /*
***************
*** 261,267
      }	
      lp = line;
      sprintf(lp,"Baud rate for %s",ttname);
!     if ((y = cmnum(line,"",10,&x)) < 0) return(y);
      if (y = (cmcfm()) < 0) return(y);
      y = chkspd(x);
      if (y < 0) 

--- 279,285 -----
      }	
      lp = line;
      sprintf(lp,"Baud rate for %s",ttname);
!     if ((x = cmkey(speedtab,nspeed,"Remote line speed","9600")) < 0) return(x);
      if (y = (cmcfm()) < 0) return(y);
      y = chkspd(x);
      if (y < 0) 
***************
*** 299,304
  	case 2400:
  	case 4800:
  	case 9600:
  	    return(x);
  	default: 
  	    return(-1);

--- 317,324 -----
  	case 2400:
  	case 4800:
  	case 9600:
+ 	case 19200:
+ 	case 38400:
  	    return(x);
  	default: 
  	    return(-1);
------------------------------
RCS file: RCS/ckxunx.c,v
retrieving revision 1.1
diff -c -r1.1 ckxunx.c
*** /tmp/,RCSt1001887	Tue Apr 23 22:22:57 1985
--- ckxunx.c	Tue Apr 23 12:47:10 1985
***************
*** 537,542
  	    case 2400: s = B2400; break;
  	    case 4800: s = B4800; break;
  	    case 9600: s = B9600; break;
  	    default:
  	    	spdok = 0;
  		fprintf(stderr,"Unsupported line speed - %d\n",speed);

--- 537,544 -----
  	    case 2400: s = B2400; break;
  	    case 4800: s = B4800; break;
  	    case 9600: s = B9600; break;
+ 	    case 19200: s = EXTA; break;
+ 	    case 38400: s = EXTB; break;
  	    default:
  	    	spdok = 0;
  		fprintf(stderr,"Unsupported line speed - %d\n",speed);
------------------------------
As I said, minor.
-- 
Hans Albertsson, USENET/uucp: {decvax,philabs}!mcvax!enea!log-hb!hans
Real World:  TeleLOGIC AB, Box 1001, S-14901 Nynashamn,SWEDEN