summaryrefslogtreecommitdiff
path: root/usr.bin/tip/aculib/v3451.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 03:12:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 03:12:29 +0000
commit95f41a9ae474619e43de33821c56a85f414715cf (patch)
treeeb3ce58ea6ccdaad669b142ab07eaa87a1e607f9 /usr.bin/tip/aculib/v3451.c
parenta3b7a686b1f0e746c512c93cd1f36367834d8f33 (diff)
from netbsd:
Convert to termios (from Scott Reynolds; PR#1621). 8-bit patches (from Matthieu Herrb; PR#1384).
Diffstat (limited to 'usr.bin/tip/aculib/v3451.c')
-rw-r--r--usr.bin/tip/aculib/v3451.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/tip/aculib/v3451.c b/usr.bin/tip/aculib/v3451.c
index cd4077277c1..da7f23c405e 100644
--- a/usr.bin/tip/aculib/v3451.c
+++ b/usr.bin/tip/aculib/v3451.c
@@ -1,4 +1,4 @@
-/* $NetBSD: v3451.c,v 1.3 1994/12/08 09:31:48 jtc Exp $ */
+/* $NetBSD: v3451.c,v 1.4 1995/10/29 00:49:59 pk Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)v3451.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$NetBSD: v3451.c,v 1.3 1994/12/08 09:31:48 jtc Exp $";
+static char rcsid[] = "$NetBSD: v3451.c,v 1.4 1995/10/29 00:49:59 pk Exp $";
#endif /* not lint */
/*
@@ -55,6 +55,7 @@ v3451_dialer(num, acu)
int ok;
int slow = number(value(BAUDRATE)) < 1200, rw = 2;
char phone[50];
+ struct termios cntrl;
#ifdef ACULOG
char line[80];
#endif
@@ -75,7 +76,9 @@ v3451_dialer(num, acu)
#endif
return (0);
}
- ioctl(FD, TIOCHPCL, 0);
+ tcgetattr(FD, &cntrl);
+ term.c_cflag |= HUPCL;
+ tcsetattr(FD, TCSANOW, &cntrl);
sleep(1);
vawrite("D\r", 2 + slow);
if (!expect("NUMBER?")) {
@@ -121,7 +124,7 @@ v3451_dialer(num, acu)
#endif
return (0);
}
- ioctl(FD, TIOCFLUSH, &rw);
+ tcflush(FD, TCIOFLUSH);
return (1);
}