Annotation of 43BSDTahoe/usr.bin/uucp/aculib/dk.c, revision 1.1

1.1     ! root        1: #ifndef lint
        !             2: static char sccsid[] = "@(#)dk.c       4.2 (Berkeley) 2/24/88";
        !             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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.