-/* dn11.c 4.8 81/08/24 */
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)dn11.c 5.1 (Berkeley) %G%";
+#endif not lint
-#if DN11
/*
* Routines for dialing up on DN-11
*/
#include "tip.h"
-#include <setjmp.h>
-#include <errno.h>
-
-int dn_abort();
-
-int alarmtr();
+int dn_abort(), alarmtr();
static jmp_buf jmpbuf;
static int child = -1, dn;
dn_dialer(num, acu)
-char *num, *acu;
+ char *num, *acu;
{
extern errno;
char *p, *q, phone[40];
printf("line busy...");
else
printf("acu open error...");
- return(0);
+ return (0);
}
if (setjmp(jmpbuf)) {
kill(child, SIGKILL);
close(dn);
- return(0);
+ return (0);
}
signal(SIGALRM, alarmtr);
timelim = 5 * strlen(num);
alarm(0);
kill(child, SIGKILL);
close(dn);
- return(0);
+ return (0);
}
+ alarm(0);
ioctl(dn, TIOCHPCL, 0);
signal(SIGALRM, SIG_DFL);
while ((nw = wait(<)) != child && nw != -1)
;
- alarm(0);
fflush(stdout);
close(dn);
if (lt != 0) {
close(FD);
- return(0);
+ return (0);
}
- return(1);
+ return (1);
}
alarmtr()
{
+
alarm(0);
longjmp(jmpbuf, 1);
}
*/
dn_disconnect()
{
+
sleep(2);
-#ifdef VMUNIX
if (FD > 0)
ioctl(FD, TIOCCDTR, 0);
-#endif
close(FD);
}
dn_abort()
{
+
sleep(2);
if (child > 0)
kill(child, SIGKILL);
if (dn > 0)
close(dn);
-#ifdef VMUNIX
if (FD > 0)
ioctl(FD, TIOCCDTR, 0);
-#endif
close(FD);
}
-#endif