local mode word wasn't getting fixed on reset
authorJay Lepreau <lepreau@ucbvax.Berkeley.EDU>
Mon, 28 Apr 1986 23:24:37 +0000 (15:24 -0800)
committerJay Lepreau <lepreau@ucbvax.Berkeley.EDU>
Mon, 28 Apr 1986 23:24:37 +0000 (15:24 -0800)
SCCS-vsn: usr.bin/tset/tset.c 5.8

usr/src/usr.bin/tset/tset.c

index c02e2c9..cadefed 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)tset.c     5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)tset.c     5.8 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -604,9 +604,6 @@ char        *argv[];
 # ifndef V6
 #  ifdef UCB_NTTY
                struct ltchars ltc;
 # ifndef V6
 #  ifdef UCB_NTTY
                struct ltchars ltc;
-#ifdef TIOCLBIC
-               static int lclear = LMDMBUF|LLITOUT|LPASS8;
-#endif TIOCLBIC
 
                if (ldisc == NTTYDISC)
                {
 
                if (ldisc == NTTYDISC)
                {
@@ -629,9 +626,6 @@ char        *argv[];
                tchar.t_eofc = CHK(tchar.t_eofc, CEOF);
                /* brkc is left alone */
                (void) ioctl(FILEDES, TIOCSETC, (char *)&tchar);
                tchar.t_eofc = CHK(tchar.t_eofc, CEOF);
                /* brkc is left alone */
                (void) ioctl(FILEDES, TIOCSETC, (char *)&tchar);
-#ifdef TIOCLBIC
-               (void) ioctl(FILEDES, TIOCLBIC, (char *)&lclear);
-#endif TIOCLBIC
 #   endif TIOCGETC
                mode.sg_flags &= ~(RAW
 #   ifdef CBREAK
 #   endif TIOCGETC
                mode.sg_flags &= ~(RAW
 #   ifdef CBREAK
@@ -1176,6 +1170,8 @@ ask:
                                }
                        }
                }
                                }
                        }
                }
+               if (IsReset)
+                       lmode &= ~(LMDMBUF|LLITOUT|LPASS8);
                (void) ioctl(FILEDES, TIOCLSET, (char *)&lmode);
 # endif
 
                (void) ioctl(FILEDES, TIOCLSET, (char *)&lmode);
 # endif