Fix f_extproc() routine so that it works.
authorDave A. Borman <dab@ucbvax.Berkeley.EDU>
Tue, 21 Feb 1995 05:59:20 +0000 (21:59 -0800)
committerDave A. Borman <dab@ucbvax.Berkeley.EDU>
Tue, 21 Feb 1995 05:59:20 +0000 (21:59 -0800)
SCCS-vsn: bin/stty/key.c 8.4

usr/src/bin/stty/key.c

index b539700..13fb699 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)key.c      8.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)key.c      8.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -164,13 +164,14 @@ f_extproc(ip)
        struct info *ip;
 {
 
        struct info *ip;
 {
 
-       if (ip->set) {
-               int tmp = 1;
+       if (ip->off) {
+               int tmp = 0;
                (void)ioctl(ip->fd, TIOCEXT, &tmp);
        } else {
                (void)ioctl(ip->fd, TIOCEXT, &tmp);
        } else {
-               int tmp = 0;
+               int tmp = 1;
                (void)ioctl(ip->fd, TIOCEXT, &tmp);
        }
                (void)ioctl(ip->fd, TIOCEXT, &tmp);
        }
+       ip->set = 1;
 }
 
 void
 }
 
 void