home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / misc / volume05 / kermit.hdb < prev    next >
Encoding:
Internet Message Format  |  1991-08-27  |  18.4 KB

  1. From decwrl!labrea!rutgers!ukma!cwjcc!hal!ncoast!allbery Thu Nov 24 00:04:32 PST 1988
  2. Article 732 of comp.sources.misc:
  3. Path: granite!decwrl!labrea!rutgers!ukma!cwjcc!hal!ncoast!allbery
  4. From: eric@snark.UUCP (Eric S. Raymond)
  5. Newsgroups: comp.sources.misc
  6. Subject: v05i055: Kermit patches to enable dial to use HDB database, like cu
  7. Message-ID: <8811200118.AA00922@snark.UUCP>
  8. Date: 22 Nov 88 03:25:44 GMT
  9. Sender: allbery@ncoast.UUCP
  10. Reply-To: eric@snark.UUCP (Eric S. Raymond)
  11. Lines: 603
  12. Approved: allbery@ncoast.UUCP
  13.  
  14. Posting-number: Volume 5, Issue 55
  15. Submitted-by: "Eric S. Raymond" <eric@snark.UUCP>
  16. Archive-name: kermit.hdb
  17.  
  18. [About gets():  anyone who'd use gets() with a *pointer* is begging for a
  19. fingerd botch; at least my patch would make it obvious a lot sooner.  I do
  20. concede that the trailing newline is something of a problem, though.  ++bsa]
  21.  
  22. This article is a patch set for the 4D release of C-Kermit.  The code changes
  23. fix some minor compilation glitches under SVr2 UNIX, but more importantly they
  24. enable the ckermit dial command to accept a system name agument (like cu) and
  25. use the information represented in the Basic Networking Utilities (HoneyDanBer
  26. UUCP) database to set line, speed and modem type for the dial out.
  27.  
  28. For this to work, the software must be compiled with -DSVR2 on. This can be
  29. accomplished via 'make hdbx'. See the patch to ckuker.doc (first in the set)
  30. for details.
  31.  
  32. These patches work, but they're a bit on the crude side (Dialcodes ought to
  33. be supported, and the code could be taught how to interpret the Dialers file).
  34. I hope the Kermit maintainers (wherever they are) will pick these up, polish
  35. them a bit and include them in the next release.
  36.  
  37. If you are a Kermit maintainer, please ACK by email -- it would be nice to know
  38. this posting hasn't just dropped into a void.
  39.  
  40. *** ckuker.doc-old    Sun Nov 20 00:37:52 1988
  41. --- ckuker.doc    Sun Nov 20 00:46:21 1988
  42. ***************
  43. *** 1284,1289 ****
  44. --- 1284,1297 ----
  45.   The device used for dialing out is the one selected in  the  most  recent  "set
  46.   line"  command  (or on a workstation, the default line if no "set line" command
  47.   was given).  The "dial" command calls locks the path (see the section  on  line
  48. + One special convenience feature is available in the dial command under SVR2 and
  49. + later UNIX systems using HoneyDanBer UUCP. If you give dial a system name
  50. + argument that it can find in the Systems file, it will search through the
  51. + Systems and Devices file and set the line, modem type and communication speed
  52. + in accordance with what it finds there. However, dial codes will *not* be
  53. + interpreted. Nor will the HDB modemcap be used; for now, the modem name in the
  54. + Devices file must match one of kermit's internally-supported types.
  55.   
  56.   
  57.   
  58. *** ckuker.mak-old    Thu Nov 17 16:32:09 1988
  59. --- ckuker.mak    Thu Nov 17 18:34:45 1988
  60. ***************
  61. *** 9,14 ****
  62. --- 9,15 ----
  63.   # for Berkeley Unix 2.9 (PDP-11), "make bsd29"
  64.   # for DEC Ultrix 1.1 or 1.2, "make bsd"
  65.   # for AT&T 3Bx systems, "make att3bx"
  66. + # for AT&T System V with HoneyDanBer UUCP, "make hdbx"
  67.   # for AT&T generic System III/System V, "make sys3" or "make sys3nid"
  68.   # for Bell Unix Version 7 (aka 7th Edition), "make v7" (but see below)
  69.   # for Microsoft Xenix (/286, PC/AT, etc), "make xenix"
  70. ***************
  71. *** 138,147 ****
  72.       @echo 'Make what?  You must tell which system to make C-Kermit for.'
  73.   
  74.   wermit: ckcmai.o ckucmd.o ckuusr.o ckuus2.o ckuus3.o ckcpro.o ckcfns.o \
  75. !          ckcfn2.o ckucon.o ckutio.o ckufio.o ckudia.o ckuscr.o
  76.       $(CC2) $(LNKFLAGS) -o wermit ckcmai.o ckutio.o ckufio.o ckcfns.o \
  77.            ckcfn2.o ckcpro.o ckucmd.o ckuus2.o ckuus3.o ckuusr.o \
  78. !          ckucon.o ckudia.o ckuscr.o
  79.   
  80.   ckcmai.o: ckcmai.c ckcker.h ckcdeb.h
  81.   
  82. --- 139,148 ----
  83.       @echo 'Make what?  You must tell which system to make C-Kermit for.'
  84.   
  85.   wermit: ckcmai.o ckucmd.o ckuusr.o ckuus2.o ckuus3.o ckcpro.o ckcfns.o \
  86. !          ckcfn2.o ckucon.o ckutio.o ckufio.o ckudia.o ckuscr.o ckubnu.o
  87.       $(CC2) $(LNKFLAGS) -o wermit ckcmai.o ckutio.o ckufio.o ckcfns.o \
  88.            ckcfn2.o ckcpro.o ckucmd.o ckuus2.o ckuus3.o ckuusr.o \
  89. !          ckucon.o ckudia.o ckuscr.o ckubnu.o
  90.   
  91.   ckcmai.o: ckcmai.c ckcker.h ckcdeb.h
  92.   
  93. ***************
  94. *** 175,181 ****
  95.   
  96.   ckudia.o: ckudia.c ckcker.h ckcdeb.h
  97.   
  98. ! ckuscr.o: ckuscr.c ckcker.h ckcdeb.h
  99.   #
  100.   ###########################################################################
  101.   #
  102. --- 176,184 ----
  103.   
  104.   ckudia.o: ckudia.c ckcker.h ckcdeb.h
  105.   
  106. ! ckuscr.o: ckuscr.c ckucmd.h ckcker.h ckcdeb.h
  107. ! ckubnu.o: ckubnu.c ckcker.h ckcdeb.h
  108.   #
  109.   ###########################################################################
  110.   #
  111. ***************
  112. *** 208,222 ****
  113.       make wermit "CFLAGS = -DUXIII -DDEBUG -DTLOG -i -O" "LNKFLAGS = -i"
  114.   
  115.   
  116.   #Generic ATT System III or System V (no I&D space)
  117.   sys3nid:
  118.       make wermit "CFLAGS = -DUXIII -DDEBUG -DTLOG -O" "LNKFLAGS ="
  119.   
  120.   
  121.   #AT&T 3B-series computers running System V
  122. ! #  Only difference from sys3 is lock file stuff...
  123.   att3bx:
  124. !     make wermit "CFLAGS = -DUXIII -DATT3BX -DDEBUG -DTLOG -i -O" \
  125.           "LNKFLAGS = -i"
  126.   
  127.   
  128. --- 211,230 ----
  129.       make wermit "CFLAGS = -DUXIII -DDEBUG -DTLOG -i -O" "LNKFLAGS = -i"
  130.   
  131.   
  132. + #Generic ATT System V with HoneyDanBer
  133. + hdbx:
  134. +     make "CFLAGS = -DUXIII -DDEBUG -DTLOG -DSVR2 -O" "LNKFLAGS =" wermit
  135.   #Generic ATT System III or System V (no I&D space)
  136.   sys3nid:
  137.       make wermit "CFLAGS = -DUXIII -DDEBUG -DTLOG -O" "LNKFLAGS ="
  138.   
  139.   
  140.   #AT&T 3B-series computers running System V
  141. ! #  Only difference from sys3 is lock file stuff & SVR2 support...
  142.   att3bx:
  143. !     make wermit "CFLAGS = -DUXIII -DATT3BX -DDEBUG -DTLOG -DSVR2 -i -O" \
  144.           "LNKFLAGS = -i"
  145.   
  146.   
  147. ***************
  148. *** 281,283 ****
  149. --- 289,298 ----
  150.   #Mostly Berkeley-like, but with some ATTisms
  151.   c70:
  152.       make wermit "CFLAGS= -DBSD4 -DC70 -DDEBUG -DTLOG"
  153. *** ckcdeb.h-old    Thu Nov 17 11:09:19 1988
  154. --- ckcdeb.h    Thu Nov 17 17:10:27 1988
  155. ***************
  156. *** 102,113 ****
  157.   
  158.   
  159.   /* Some special includes for VAX/VMS */
  160.   #ifdef vax11c
  161.   #include ssdef
  162.   #include stsdef
  163.   #endif
  164.   /* Program return codes for VMS, DECUS C, and Unix */
  165.   
  166.   #ifdef vax11c
  167. --- 102,113 ----
  168.   
  169.   
  170.   /* Some special includes for VAX/VMS */
  171. ! /*
  172.   #ifdef vax11c
  173.   #include ssdef
  174.   #include stsdef
  175.   #endif
  176. ! */
  177.   /* Program return codes for VMS, DECUS C, and Unix */
  178.   
  179.   #ifdef vax11c
  180. *** ckcfn2.c-old    Thu Nov 17 18:00:53 1988
  181. --- ckcfn2.c    Thu Nov 17 18:02:48 1988
  182. ***************
  183. *** 298,304 ****
  184.         if (t == 3) cccount++;        /* Count any control-C's */
  185.   
  186.       if (t == eol) return('Q');
  187. !     *l = unchar(t);            /* Packet length */
  188.       debug(F101," pkt len","",*l);
  189.       if (*l + i + 2 > RBUFL) {     /* Sticks out too far? */
  190.           debug(F101," ** overrun","",i);
  191. --- 298,304 ----
  192.         if (t == 3) cccount++;        /* Count any control-C's */
  193.   
  194.       if (t == eol) return('Q');
  195. !     *l = todigit(t);            /* Packet length */
  196.       debug(F101," pkt len","",*l);
  197.       if (*l + i + 2 > RBUFL) {     /* Sticks out too far? */
  198.           debug(F101," ** overrun","",i);
  199. ***************
  200. *** 310,316 ****
  201.       if ((t = recpkt[i++]) == stchr) continue;
  202.       if (cccount && (t == 3)) { conoll("^C^C exit..."); doexit(0); }
  203.       if (t == eol) return('Q');
  204. !     *n = unchar(t);
  205.       debug(F101,"rpack: n","",*n);
  206.   
  207.   /* cont'd... */
  208. --- 310,316 ----
  209.       if ((t = recpkt[i++]) == stchr) continue;
  210.       if (cccount && (t == 3)) { conoll("^C^C exit..."); doexit(0); }
  211.       if (t == eol) return('Q');
  212. !     *n = todigit(t);
  213.       debug(F101,"rpack: n","",*n);
  214.   
  215.   /* cont'd... */
  216. *** ckcfns.c-old    Thu Nov 17 18:01:08 1988
  217. --- ckcfns.c    Thu Nov 17 18:02:41 1988
  218. ***************
  219. *** 139,145 ****
  220.       while ((a = *buf++) != '\0') {
  221.       if (rptflg) {            /* Repeat processing? */
  222.           if (a == rptq) {        /* Yes, got a repeat prefix? */
  223. !         rpt = unchar(*buf++);    /* Yes, get the repeat count, */
  224.           a = *buf++;        /* and get the prefixed character. */
  225.           }
  226.       }
  227. --- 139,145 ----
  228.       while ((a = *buf++) != '\0') {
  229.       if (rptflg) {            /* Repeat processing? */
  230.           if (a == rptq) {        /* Yes, got a repeat prefix? */
  231. !         rpt = todigit(*buf++);    /* Yes, get the repeat count, */
  232.           a = *buf++;        /* and get the prefixed character. */
  233.           }
  234.       }
  235. ***************
  236. *** 640,660 ****
  237.   
  238.       len = strlen(data);                /* Number of fields */
  239.   
  240. !     x = (len-- > 0) ? unchar(data[0]) : DSPSIZ;            /* Packet size */
  241.       if (spsizf == 0)
  242.       spsiz = (x < 10) ? DSPSIZ : x;
  243.   
  244. !     x = (len-- > 0) ? unchar(data[1]) : DMYTIM;        /* Timeout */
  245.       if (timef == 0)
  246.       timint = (x < 0) ? DMYTIM : x;
  247.   
  248.       npad = 0; padch = '\0';                        /* Padding */
  249.       if (len-- > 0) {
  250. !     npad = unchar(data[2]);
  251.       if (len-- > 0) padch = ctl(data[3]); else padch = 0;
  252.       }
  253.   
  254. !     seol = (len-- > 0) ? unchar(data[4]) : '\r';    /* Terminator  */
  255.       if ((seol < 2) || (seol > 037)) seol = '\r';
  256.   
  257.       ctlq = (len-- > 0) ? data[5] : CTLQ;                /* Control prefix */
  258. --- 640,660 ----
  259.   
  260.       len = strlen(data);                /* Number of fields */
  261.   
  262. !     x = (len-- > 0) ? todigit(data[0]) : DSPSIZ;            /* Packet size */
  263.       if (spsizf == 0)
  264.       spsiz = (x < 10) ? DSPSIZ : x;
  265.   
  266. !     x = (len-- > 0) ? todigit(data[1]) : DMYTIM;        /* Timeout */
  267.       if (timef == 0)
  268.       timint = (x < 0) ? DMYTIM : x;
  269.   
  270.       npad = 0; padch = '\0';                        /* Padding */
  271.       if (len-- > 0) {
  272. !     npad = todigit(data[2]);
  273.       if (len-- > 0) padch = ctl(data[3]); else padch = 0;
  274.       }
  275.   
  276. !     seol = (len-- > 0) ? todigit(data[4]) : '\r';    /* Terminator  */
  277.       if ((seol < 2) || (seol > 037)) seol = '\r';
  278.   
  279.       ctlq = (len-- > 0) ? data[5] : CTLQ;                /* Control prefix */
  280. ***************
  281. *** 905,911 ****
  282.   */
  283.   
  284.   cwd(vdir) char *vdir; {
  285. !     vdir[unchar(*vdir) + 1] = '\0';    /* End with a null */
  286.       if (zchdir(vdir+1)) {
  287.       encstr(vdir+1);
  288.       ack1(data);
  289. --- 905,911 ----
  290.   */
  291.   
  292.   cwd(vdir) char *vdir; {
  293. !     vdir[todigit(*vdir) + 1] = '\0';    /* End with a null */
  294.       if (zchdir(vdir+1)) {
  295.       encstr(vdir+1);
  296.       ack1(data);
  297. *** ckcker.h-old    Thu Nov 17 17:50:01 1988
  298. --- ckcker.h    Thu Nov 17 17:53:16 1988
  299. ***************
  300. *** 84,89 ****
  301.   /* Macros */
  302.   
  303.   #define tochar(ch)  ((ch) + SP )    /* Number to character */
  304. ! #define unchar(ch)  ((ch) - SP )    /* Character to number */
  305.   #define ctl(ch)     ((ch) ^ 64 )    /* Controllify/Uncontrollify */
  306.   #define unpar(ch)   ((ch) & 127)    /* Clear parity bit */
  307. --- 84,89 ----
  308.   /* Macros */
  309.   
  310.   #define tochar(ch)  ((ch) + SP )    /* Number to character */
  311. ! #define todigit(ch)  ((ch) - SP )    /* Character to number */
  312.   #define ctl(ch)     ((ch) ^ 64 )    /* Controllify/Uncontrollify */
  313.   #define unpar(ch)   ((ch) & 127)    /* Clear parity bit */
  314. *** ckcpro.w-old    Sun Nov 20 00:17:08 1988
  315. --- ckcpro.w    Sun Nov 20 00:17:56 1988
  316. ***************
  317. *** 113,119 ****
  318.                else { errpkt("Can't type file"); SERVE; } }
  319.   
  320.   <generic>U { x = *(srvcmd+1);            /* Disk Usage query */
  321. !              x = ((x == '\0') || (x == unchar(0)));
  322.            x = (x ? syscmd(SPACMD,"") : syscmd(SPACM2,srvcmd+2));
  323.                if (x) BEGIN ssinit; else { errpkt("Can't check space"); SERVE; }}
  324.   
  325. --- 113,119 ----
  326.                else { errpkt("Can't type file"); SERVE; } }
  327.   
  328.   <generic>U { x = *(srvcmd+1);            /* Disk Usage query */
  329. !              x = ((x == '\0') || (x == todigit(0)));
  330.            x = (x ? syscmd(SPACMD,"") : syscmd(SPACM2,srvcmd+2));
  331.                if (x) BEGIN ssinit; else { errpkt("Can't check space"); SERVE; }}
  332.   
  333. *** ckubnu.c-old    Sun Nov 20 00:46:58 1988
  334. --- ckubnu.c    Sat Nov 19 23:43:02 1988
  335. ***************
  336. *** 0 ****
  337. --- 1,153 ----
  338. + /*
  339. +  * ckubnu.c -- set call parameters from the SVR2 database files
  340. +  *
  341. +  * A quick hack to make the dial command more convenient on systems with the
  342. +  * HoneyDanBer UUCP database files available, by Eric S. Raymond (eric@snark).
  343. +  * This code is released to the public domain, do with it what ye will.
  344. +  *
  345. +  * Theory: call bnuset() on the argument of a dial command before doing
  346. +  * anything else. If the dial argument matches a system name in the UUCP
  347. +  * database, the code will try to set speed, line, and modem-type properly;
  348. +  * and bnuset() will modify its argument into the telephone number of the
  349. +  * calling system.
  350. +  *
  351. +  * Implementation: mine all the stuff out of the Systems and Devices files,
  352. +  * then write corresponding kermit commands to a disappearing take-file. This
  353. +  * way we get all of kermit's normal command checking and debug options for
  354. +  * free.
  355. +  *
  356. +  * Bugs: we don't interpret dialcodes. Nor do we use the Dialers file, which
  357. +  * would make us independent of the hardwired modem-type cruft in ckudia.c.
  358. +  * Like I said, this is a quick hack.
  359. +  */
  360. + #ifdef SVR2
  361. + #include "ckcdeb.h"
  362. + #include "ckcker.h"
  363. + #include "ckuusr.h"
  364. + #include <stdio.h>
  365. + #include <ctype.h>
  366. + #include <string.h>
  367. + #define SYSTEMS    "/usr/lib/uucp/Systems"
  368. + #define DEVICES    "/usr/lib/uucp/Devices"
  369. + #define WSPC    "\t\n "
  370. + static char *
  371. + findline(key, qual, file)
  372. + /* find a line in the given file beginning with the given word, if any */
  373. + char    *key;
  374. + char    *qual;
  375. + char    *file;
  376. + {
  377. +     char    buf[BUFSIZ], *cp;
  378. +     FILE    *fp;
  379. +     if ((fp = fopen(file, "r")) != (FILE *)NULL)
  380. +         while (fgets(buf, BUFSIZ, fp) != (char *)NULL)
  381. +         {
  382. +         char    *sys;
  383. +         int    foundqual = (qual == (char *)NULL);
  384. +         /* skip comments */
  385. +         if (cp = strchr(buf, '#'))
  386. +             *cp = '\0';
  387. +         /* check that qual is present somewhere on the line */
  388. +         if (!foundqual)
  389. +             for (cp = buf; *cp; cp++)
  390. +             if (*cp == *qual && !strncmp(cp, qual, strlen(qual)))
  391. +             {
  392. +                 foundqual = 1;
  393. +                 break;
  394. +             }
  395. +         /* if it is and the first token matches sys, jackpot! */
  396. +         sys = strtok(buf, "\t ");
  397. +         if (foundqual && (sys != (char *)NULL) && !strcmp(sys, key))
  398. +             return(buf);
  399. +         }
  400. +     return((char *)NULL);
  401. + }
  402. + bnuset(telnbr)
  403. + char *telnbr;
  404. + {
  405. +     char    *sysentry, *device, *cp, speedtok[BUFSIZ], devtok[BUFSIZ];
  406. +     int        nspeed;
  407. +     if (!isdigit(telnbr[0])
  408. +         && (sysentry = findline(telnbr, (char *)NULL, SYSTEMS)))
  409. +     {
  410. +         (void) strtok((char *)NULL, WSPC);    /* skip call time */
  411. +         if (device = strtok((char*)NULL, WSPC))
  412. +         {
  413. +         /* we'll deal with the device type below */
  414. +         (void) strcpy(devtok, device);
  415. +         /* look for the line speed field */
  416. +         if (cp = strtok((char*)NULL, WSPC))
  417. +         {
  418. +             /* set speed from this field */
  419. +             (void) strcpy(speedtok, cp);
  420. +             nspeed = atoi(cp);
  421. +             if (cp = strtok((char*)NULL, WSPC))
  422. +             {
  423. +             /*
  424. +              * Set phone number from this field.
  425. +              * Someday, do Dialcodes processing here.
  426. +              */
  427. +             (void) strcpy(telnbr, cp);
  428. +             /* feed the rest of the line to script, maybe? */
  429. +             }
  430. +         }
  431. +         /* O.K., look for a devtype/speed match in DEVICES */
  432. +         if ((device = findline(devtok,speedtok,DEVICES)) !=(char*)NULL)
  433. +         {
  434. +             /* look for the device field */
  435. +             if (cp = strtok((char*)NULL, WSPC))
  436. +             {
  437. +             extern char cmdbuf[], ttname[];
  438. +             extern int speed, local, mdmtyp;
  439. +             char fullname[BUFSIZ];
  440. +             int    x;
  441. +             /* it's field 2 */
  442. +             (void) sprintf(fullname, "/dev/%s", cp);
  443. +             if (ttopen(fullname,&x,mdmtyp) < 0 ) 
  444. +                 perror("Sorry, can't open line");
  445. +             else
  446. +             {
  447. +                 local = 1;
  448. +                 (void) strcpy(ttname,fullname);
  449. +                 debug(F111,"set line ",ttname,local);
  450. +                 /*
  451. +                  * Since we found a device, set speed too.
  452. +                  * We found it in Devices, so assume it's valid.
  453. +                  */
  454. +                 speed = nspeed;
  455. +             }
  456. +             /* skip field 3, don't know what it's good for */
  457. +             (void) strtok((char *)NULL, WSPC);
  458. +             /* skip field 4, it's just the speed qualifier */
  459. +             (void) strtok((char *)NULL, WSPC);
  460. +             /* now set the modem type from field 5 */
  461. +             if (cp = strtok((char *)NULL, WSPC))
  462. +             {
  463. +                 extern struct keytab mdmtab[];
  464. +                 extern int nmdm;
  465. +                 mdmtyp = lookup(mdmtab,cp,nmdm,&x);
  466. +             }
  467. +             }
  468. +         }
  469. +         }
  470. +     }
  471. + }
  472. + #endif /* SVR2 */
  473. *** ckucmd.h-old    Thu Nov 17 17:54:32 1988
  474. --- ckucmd.h    Thu Nov 17 17:58:38 1988
  475. ***************
  476. *** 9,14 ****
  477. --- 9,20 ----
  478.    copyright notice is retained.
  479.   */
  480.    
  481. + #ifdef SVR2
  482. + typedef void    catch_t;
  483. + #else
  484. + typedef int    catch_t;
  485. + #endif
  486.   /* Special getchars... */
  487.    
  488.   #ifdef vax11c
  489. *** ckudia.c-old    Thu Nov 17 11:33:43 1988
  490. --- ckudia.c    Sat Nov 19 21:50:38 1988
  491. ***************
  492. *** 441,448 ****
  493.   
  494.   static jmp_buf sjbuf;
  495.   
  496. ! static int (*savAlrm)();    /* for saving alarm handler */
  497. ! static int (*savInt)();        /* for saving interrupt handler */
  498.   
  499.   dialtime() {            /* timer interrupt handler */
  500.       longjmp( sjbuf, F_time );
  501. --- 441,448 ----
  502.   
  503.   static jmp_buf sjbuf;
  504.   
  505. ! static catch_t (*savAlrm)();    /* for saving alarm handler */
  506. ! static catch_t (*savInt)();    /* for saving interrupt handler */
  507.   
  508.   dialtime() {            /* timer interrupt handler */
  509.       longjmp( sjbuf, F_time );
  510. ***************
  511. *** 512,517 ****
  512. --- 512,521 ----
  513.       int n, n1;
  514.       char *pc;        /* pointer to a character */
  515.   
  516. + #ifdef SVR2
  517. +     bnuset(telnbr);    /* try to set parameters from the SVR2 files */
  518. + #endif /* SVR2 */
  519.       if (!mdmtyp) {
  520.           printf("Sorry, you must 'set modem' first\n");
  521.           return(-2);
  522. ***************
  523. *** 537,543 ****
  524.   
  525.                       /* interdigit waits for tone dial */
  526.   /* ...dial, cont'd */
  527.   
  528.       waitct = 1*strlen(telnbr) ;    /* compute time to dial worst case */
  529.       waitct += pmdminf->dial_time;    /* dialtone + completion wait times */
  530. --- 541,546 ----
  531. *** ckuscr.c-old    Thu Nov 17 11:09:45 1988
  532. --- ckuscr.c    Thu Nov 17 18:33:38 1988
  533. ***************
  534. *** 32,37 ****
  535. --- 32,38 ----
  536.   #include <signal.h>
  537.   #include <setjmp.h>
  538.   #include "ckcker.h"
  539. + #include "ckucmd.h"
  540.   
  541.   extern int local, speed, flow, seslog, mdmtyp;
  542.   extern char ttname[];
  543. ***************
  544. *** 217,223 ****
  545.   
  546.   login(cmdstr) char *cmdstr; {
  547.   
  548. !     int (*saveAlm)();    /* save incomming alarm function */
  549.       char *e;
  550.   
  551.       s = cmdstr;            /* make global to ckuscr.c */
  552. --- 218,224 ----
  553.   
  554.   login(cmdstr) char *cmdstr; {
  555.   
  556. !     catch_t (*saveAlm)();    /* save incoming alarm function */
  557.       char *e;
  558.   
  559.       s = cmdstr;            /* make global to ckuscr.c */
  560. *** ckuusr.c-old    Thu Nov 17 12:14:47 1988
  561. --- ckuusr.c    Thu Nov 17 20:51:16 1988
  562. ***************
  563. *** 1042,1048 ****
  564.       else {                /* Parent */
  565.    
  566.           int wstat;            /* Kermit must wait for child */
  567. !     int (*istat)(), (*qstat)();
  568.    
  569.       istat = signal(SIGINT,SIG_IGN);    /* Let the fork handle keyboard */
  570.       qstat = signal(SIGQUIT,SIG_IGN); /* interrupts itself... */
  571. --- 1042,1048 ----
  572.       else {                /* Parent */
  573.    
  574.           int wstat;            /* Kermit must wait for child */
  575. !     catch_t (*istat)(), (*qstat)();
  576.    
  577.       istat = signal(SIGINT,SIG_IGN);    /* Let the fork handle keyboard */
  578.       qstat = signal(SIGQUIT,SIG_IGN); /* interrupts itself... */
  579. -- 
  580.       Eric S. Raymond                     (the mad mastermind of TMN-Netnews)
  581.       Email: eric@snark.uu.net                       CompuServe: [72037,2306]
  582.       Post: 22 S. Warren Avenue, Malvern, PA 19355      Phone: (215)-296-5718
  583.  
  584.  
  585.