# 2.11BSD#431 - /usr/src/usr.bin/uucp/aculib/dk.c

##### Functions

    dkopn             X

##### Macros

    DKTRIES           X

       1: #ifndef lint
       2: static char sccsid[] = "@(#)dk.c	4.1 (Berkeley) 1/22/85";
       3: #endif
       4:
       5: #include "../condevs.h"
       6: #ifdef DATAKIT
       7: #include <dk.h>
       8: #define DKTRIES 2
       9: /***
      10:  *	dkopn(flds)	make datakit connection
      11:  *
      12:  *	return codes:
      13:  *		>0 - file number - ok
      14:  *		FAIL - failed
      15:  */
      16: dkopn(flds)
      17: char *flds[];
      18: {
      19:     int dkphone;
      20:     register char *cp;
      21:     register ret, i;
      22:
      23:     if (setjmp(Sjbuf))
      24:         return CF_DIAL;
      25:
      26:     signal(SIGALRM, alarmtr);
      27:     dkphone = 0;
      28:     cp = flds[F_PHONE];
      29:     while(*cp)
      30:         dkphone = 10 * dkphone + (*cp++ - '0');
      31:     DEBUG(4, "dkphone (%d) ", dkphone);
      32:     for (i = 0; i < DKTRIES; i++) {
      33:         getnextfd();
      34:         ret = dkdial(D_SH, dkphone, 0);
      35:         next_fd = -1;
      36:         DEBUG(4, "dkdial (%d)\n", ret);
      37:         if (ret > -1)
      38:             break;
      39:     }
      40:     return ret;
      41: }
      42: #endif

#### Defined functions

dkopn defined in line 16; never used

#### Defined variables

sccsid defined in line 2; never used

#### Defined macros

DKTRIES defined in line 8; used 1 times

- in line 32

Last modified: 1987-02-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1161 |