From 88ff8fc740751bbfca8969409f99525ee8262df0 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Sat, 20 May 1989 01:46:23 -0800 Subject: [PATCH] gtty is in a compatibility library now SCCS-vsn: usr.bin/ex/ex_put.c 7.12 SCCS-vsn: usr.bin/ex/ex_tty.c 7.13 SCCS-vsn: usr.bin/ex/ex3.7recover/ex3.7recover.c 7.11 --- usr/src/usr.bin/ex/ex3.7recover/ex3.7recover.c | 9 ++------- usr/src/usr.bin/ex/ex_put.c | 4 ++-- usr/src/usr.bin/ex/ex_tty.c | 4 ++-- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/usr/src/usr.bin/ex/ex3.7recover/ex3.7recover.c b/usr/src/usr.bin/ex/ex3.7recover/ex3.7recover.c index 5437dd456f..11cd2de1d5 100644 --- a/usr/src/usr.bin/ex/ex3.7recover/ex3.7recover.c +++ b/usr/src/usr.bin/ex/ex3.7recover/ex3.7recover.c @@ -11,7 +11,7 @@ char *copyright = #endif not lint #ifndef lint -static char *sccsid = "@(#)ex3.7recover.c 7.10 (Berkeley) %G%"; +static char *sccsid = "@(#)ex3.7recover.c 7.11 (Berkeley) %G%"; #endif not lint #include /* mjm: BUFSIZ: stdio = 512, VMUNIX = 1024 */ @@ -182,13 +182,8 @@ error(str, inf) { fprintf(stderr, str, inf); -#ifndef USG3TTY - gtty(2, &tty); + (void)ioctl(2, TIOCGETP, &tty); if ((tty.sg_flags & RAW) == 0) -#else - ioctl(2, TCGETA, &tty); - if (tty.c_lflag & ICANON) -#endif fprintf(stderr, "\n"); exit(1); } diff --git a/usr/src/usr.bin/ex/ex_put.c b/usr/src/usr.bin/ex/ex_put.c index 2c4cb9da0a..0d0b11118a 100644 --- a/usr/src/usr.bin/ex/ex_put.c +++ b/usr/src/usr.bin/ex/ex_put.c @@ -5,7 +5,7 @@ */ #ifndef lint -static char *sccsid = "@(#)ex_put.c 7.11 (Berkeley) %G%"; +static char *sccsid = "@(#)ex_put.c 7.12 (Berkeley) %G%"; #endif not lint #include "ex.h" @@ -1113,7 +1113,7 @@ ex_gTTY(i) { #ifndef USG3TTY - ignore(gtty(i, &tty)); + ignore(ioctl(i, TIOCGETP, &tty)); # ifdef TIOCGETC ioctl(i, TIOCGETC, (char *) &ottyc); nttyc = ottyc; diff --git a/usr/src/usr.bin/ex/ex_tty.c b/usr/src/usr.bin/ex/ex_tty.c index 94aea47833..74801ab6d2 100644 --- a/usr/src/usr.bin/ex/ex_tty.c +++ b/usr/src/usr.bin/ex/ex_tty.c @@ -5,7 +5,7 @@ */ #ifndef lint -static char *sccsid = "@(#)ex_tty.c 7.12 (Berkeley) %G%"; +static char *sccsid = "@(#)ex_tty.c 7.13 (Berkeley) %G%"; #endif not lint #include "ex.h" @@ -22,7 +22,7 @@ gettmode() { #ifndef USG3TTY - if (gtty(1, &tty) < 0) + if (ioctl(1, TIOCGETP, &tty) < 0) return; if (ospeed != tty.sg_ospeed) value(SLOWOPEN) = tty.sg_ospeed < B1200; -- 2.20.1