gtty is in a compatibility library now
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 20 May 1989 09:46:23 +0000 (01:46 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 20 May 1989 09:46:23 +0000 (01:46 -0800)
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
usr/src/usr.bin/ex/ex_put.c
usr/src/usr.bin/ex/ex_tty.c

index 5437dd4..11cd2de 100644 (file)
@@ -11,7 +11,7 @@ char *copyright =
 #endif not lint
 
 #ifndef lint
 #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 <stdio.h>     /* mjm: BUFSIZ: stdio = 512, VMUNIX = 1024 */
 #endif not lint
 
 #include <stdio.h>     /* mjm: BUFSIZ: stdio = 512, VMUNIX = 1024 */
@@ -182,13 +182,8 @@ error(str, inf)
 {
 
        fprintf(stderr, str, inf);
 {
 
        fprintf(stderr, str, inf);
-#ifndef USG3TTY
-       gtty(2, &tty);
+       (void)ioctl(2, TIOCGETP, &tty);
        if ((tty.sg_flags & RAW) == 0)
        if ((tty.sg_flags & RAW) == 0)
-#else
-       ioctl(2, TCGETA, &tty);
-       if (tty.c_lflag & ICANON)
-#endif
                fprintf(stderr, "\n");
        exit(1);
 }
                fprintf(stderr, "\n");
        exit(1);
 }
index 2c4cb9d..0d0b111 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #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"
 #endif not lint
 
 #include "ex.h"
@@ -1113,7 +1113,7 @@ ex_gTTY(i)
 {
 
 #ifndef USG3TTY
 {
 
 #ifndef USG3TTY
-       ignore(gtty(i, &tty));
+       ignore(ioctl(i, TIOCGETP, &tty));
 # ifdef TIOCGETC
        ioctl(i, TIOCGETC, (char *) &ottyc);
        nttyc = ottyc;
 # ifdef TIOCGETC
        ioctl(i, TIOCGETC, (char *) &ottyc);
        nttyc = ottyc;
index 94aea47..74801ab 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #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"
 #endif not lint
 
 #include "ex.h"
@@ -22,7 +22,7 @@ gettmode()
 {
 
 #ifndef USG3TTY
 {
 
 #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;
                return;
        if (ospeed != tty.sg_ospeed)
                value(SLOWOPEN) = tty.sg_ospeed < B1200;