SCCS-vsn: usr.bin/tip/acutab.c 4.3
SCCS-vsn: usr.bin/tip/aculib/df.c 4.2
+ * Dial the DF02-AC or DF03-AC
+#if defined(DF02) || defined(DF03)
#include <setjmp.h>
static jmp_buf Sjbuf;
static timeout();
#include <setjmp.h>
static jmp_buf Sjbuf;
static timeout();
+#if DF02
+df02_dialer(num, acu)
+{
+ return(df_dialer(acu, num, 0));
+}
+#endif
+
+#if DF03
+df03_dialer(num, acu)
+char *num, *acu;
+{
+ return(df_dialer(acu, num, 1));
+}
+#endif
+
+df_dialer(num, acu, df03)
+char *num, *acu;
+int df03;
+ struct sgttyb buf;
+ int speed = 0, c = 0;
+ int st = MST; /* Secondary Transmit flag, for speed select */
ioctl(f, TIOCHPCL, 0); /* make sure it hangs up when done */
if (setjmp(Sjbuf)) {
ioctl(f, TIOCHPCL, 0); /* make sure it hangs up when done */
if (setjmp(Sjbuf)) {
if (boolean(value(VERBOSE)))
printf("\ndialing...");
fflush(stdout);
if (boolean(value(VERBOSE)))
printf("\ndialing...");
fflush(stdout);
+#ifdef TIOCMSET
+ if (df03) {
+ ioctl(f, TIOCGETP, &buf);
+ if (buf.sg_ospeed != B1200) { /* must dial at 1200 baud */
+ speed = buf.sg_ospeed;
+ buf.sg_ospeed = buf.sg_ispeed = B1200;
+ ioctl(f, TIOCSETP, &buf);
+ ioctl(f, TIOCMBIC, &st); /* clear ST for 300 baud */
+ } else
+ ioctl(f, TIOCMBIS, &st); /* set ST for 1200 baud */
+ }
+#endif
signal(SIGALRM, timeout);
alarm(5 * strlen(num) + 10);
ioctl(f, TIOCFLUSH, 0);
write(f, "\001", 1);
signal(SIGALRM, timeout);
alarm(5 * strlen(num) + 10);
ioctl(f, TIOCFLUSH, 0);
write(f, "\001", 1);
- sleep(0); /* this must waste 70 ms. */
write(f, "\002", 1);
write(f, num, strlen(num));
write(f, "\002", 1);
write(f, num, strlen(num));
+#ifdef TIOCMSET
+ if (df03 && speed) {
+ buf.sg_ispeed = buf.sg_ospeed = speed;
+ ioctl(f, TIOCSETP, &buf);
+ }
+#endif
-/* acutab.c 4.2 81/09/17 */
+/* acutab.c 4.3 81/10/09 */
-extern int df_dialer(), df_disconnect(), df_abort(),
+extern int df02_dialer(), df03_dialer(), df_disconnect(), df_abort(),
biz31f_dialer(), biz31_disconnect(), biz31_abort(),
biz31w_dialer(),
biz22f_dialer(), biz22_disconnect(), biz22_abort(),
biz31f_dialer(), biz31_disconnect(), biz31_abort(),
biz31w_dialer(),
biz22f_dialer(), biz22_disconnect(), biz22_abort(),
"biz22w", biz22w_dialer, biz22_disconnect, biz22_abort,
#endif
#if DF02
"biz22w", biz22w_dialer, biz22_disconnect, biz22_abort,
#endif
#if DF02
- "df02", df_dialer, df_disconnect, df_abort,
+ "df02", df02_dialer, df_disconnect, df_abort,
+#endif
+#if DF03
+ "df03", df03_dialer, df_disconnect, df_abort,
#endif
#if DN11
"dn11", dn_dialer, dn_disconnect, dn_abort,
#endif
#if DN11
"dn11", dn_dialer, dn_disconnect, dn_abort,