reorganized tty structuer
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Mon, 6 Dec 1982 13:48:39 +0000 (05:48 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Mon, 6 Dec 1982 13:48:39 +0000 (05:48 -0800)
SCCS-vsn: sys/vax/uba/dh.c 4.54
SCCS-vsn: sys/vax/uba/dmf.c 4.15
SCCS-vsn: sys/vax/uba/dz.c 4.47
SCCS-vsn: sys/vax/uba/ps.c 4.8

usr/src/sys/vax/uba/dh.c
usr/src/sys/vax/uba/dmf.c
usr/src/sys/vax/uba/dz.c
usr/src/sys/vax/uba/ps.c

index 65e9e29..ec70c3d 100644 (file)
@@ -1,4 +1,4 @@
-/*     dh.c    4.53    82/10/17        */
+/*     dh.c    4.54    82/12/05        */
 
 #include "dh.h"
 #if NDH > 0
 
 #include "dh.h"
 #if NDH > 0
@@ -11,6 +11,7 @@
 #include "../h/dir.h"
 #include "../h/user.h"
 #include "../h/proc.h"
 #include "../h/dir.h"
 #include "../h/user.h"
 #include "../h/proc.h"
+#include "../h/ioctl.h"
 #include "../h/tty.h"
 #include "../h/map.h"
 #include "../h/pte.h"
 #include "../h/tty.h"
 #include "../h/map.h"
 #include "../h/pte.h"
@@ -374,7 +375,7 @@ dhrint(dh)
                        if (tp->t_flags&RAW)
                                c = 0;
                        else
                        if (tp->t_flags&RAW)
                                c = 0;
                        else
-                               c = tun.t_intrc;
+                               c = tp->t_intrc;
 #if NBK > 0
                if (tp->t_line == NETLDISC) {
                        c &= 0177;
 #if NBK > 0
                if (tp->t_line == NETLDISC) {
                        c &= 0177;
@@ -458,7 +459,7 @@ dhparam(unit)
        lpar = ((tp->t_ospeed)<<10) | ((tp->t_ispeed)<<6);
        if ((tp->t_ispeed) == B134)
                lpar |= BITS6|PENABLE|HDUPLX;
        lpar = ((tp->t_ospeed)<<10) | ((tp->t_ispeed)<<6);
        if ((tp->t_ispeed) == B134)
                lpar |= BITS6|PENABLE|HDUPLX;
-       else if ((tp->t_flags&RAW) || (tp->t_local&LLITOUT))
+       else if (tp->t_flags & (RAW|LITOUT))
                lpar |= BITS8;
        else
                lpar |= BITS7|PENABLE;
                lpar |= BITS8;
        else
                lpar |= BITS7|PENABLE;
@@ -567,7 +568,7 @@ dhstart(tp)
         */
        if (tp->t_outq.c_cc == 0)
                goto out;
         */
        if (tp->t_outq.c_cc == 0)
                goto out;
-       if (tp->t_flags&RAW || tp->t_local&LLITOUT)
+       if (tp->t_flags & (RAW|LITOUT))
                nch = ndqb(&tp->t_outq, 0);
        else {
                nch = ndqb(&tp->t_outq, 0200);
                nch = ndqb(&tp->t_outq, 0);
        else {
                nch = ndqb(&tp->t_outq, 0200);
@@ -782,8 +783,8 @@ dmintr(dm)
                if (addr->dmcsr&DM_CF) {
                        tp = &dh11[(dm<<4)+(addr->dmcsr&0xf)];
                        wakeup((caddr_t)&tp->t_rawq);
                if (addr->dmcsr&DM_CF) {
                        tp = &dh11[(dm<<4)+(addr->dmcsr&0xf)];
                        wakeup((caddr_t)&tp->t_rawq);
-                       if ((tp->t_state&TS_WOPEN)==0 &&
-                           (tp->t_local&LMDMBUF)) {
+                       if ((tp->t_state&TS_WOPEN) == 0 &&
+                           (tp->t_mode & MDMBUF)) {
                                if (addr->dmlstat & DML_CAR) {
                                        tp->t_state &= ~TS_TTSTOP;
                                        ttstart(tp);
                                if (addr->dmlstat & DML_CAR) {
                                        tp->t_state &= ~TS_TTSTOP;
                                        ttstart(tp);
@@ -793,7 +794,7 @@ dmintr(dm)
                                }
                        } else if ((addr->dmlstat&DML_CAR)==0) {
                                if ((tp->t_state&TS_WOPEN)==0 &&
                                }
                        } else if ((addr->dmlstat&DML_CAR)==0) {
                                if ((tp->t_state&TS_WOPEN)==0 &&
-                                   (tp->t_local&LNOHANG)==0) {
+                                   (tp->t_mode & NOHANG) == 0) {
                                        gsignal(tp->t_pgrp, SIGHUP);
                                        gsignal(tp->t_pgrp, SIGCONT);
                                        addr->dmlstat = 0;
                                        gsignal(tp->t_pgrp, SIGHUP);
                                        gsignal(tp->t_pgrp, SIGCONT);
                                        addr->dmlstat = 0;
index 8c20bcc..63c7283 100644 (file)
@@ -1,4 +1,4 @@
-/*     dmf.c   4.14    82/10/22        */
+/*     dmf.c   4.15    82/12/05        */
 
 #include "dmf.h"
 #if NDMF > 0
 
 #include "dmf.h"
 #if NDMF > 0
@@ -20,6 +20,7 @@
 #include "../h/conf.h"
 #include "../h/dir.h"
 #include "../h/user.h"
 #include "../h/conf.h"
 #include "../h/dir.h"
 #include "../h/user.h"
+#include "../h/ioctl.h"
 #include "../h/tty.h"
 #include "../h/map.h"
 #include "../h/pte.h"
 #include "../h/tty.h"
 #include "../h/map.h"
 #include "../h/pte.h"
@@ -385,7 +386,7 @@ dmfrint(dmf)
                        if (tp->t_flags&RAW)
                                c = 0;
                        else
                        if (tp->t_flags&RAW)
                                c = 0;
                        else
-                               c = tun.t_intrc;
+                               c = tp->t_intrc;
 #if NBK > 0
                if (tp->t_line == NETLDISC) {
                        c &= 0177;
 #if NBK > 0
                if (tp->t_line == NETLDISC) {
                        c &= 0177;
@@ -511,7 +512,7 @@ dmfparam(unit)
        lcr = DMFLCR_ENA;
        if ((tp->t_ispeed) == B134)
                lpar |= BITS6|PENABLE;
        lcr = DMFLCR_ENA;
        if ((tp->t_ispeed) == B134)
                lpar |= BITS6|PENABLE;
-       else if ((tp->t_flags&RAW) || (tp->t_local&LLITOUT))
+       else if (tp->t_flags & (RAW|LITOUT))
                lpar |= BITS8;
        else {
                lpar |= BITS7|PENABLE;
                lpar |= BITS8;
        else {
                lpar |= BITS7|PENABLE;
@@ -625,7 +626,7 @@ dmfstart(tp)
         */
        if (tp->t_outq.c_cc == 0)
                goto out;
         */
        if (tp->t_outq.c_cc == 0)
                goto out;
-       if (tp->t_flags&RAW || tp->t_local&LLITOUT)
+       if (tp->t_flags & (RAW|LITOUT))
                nch = ndqb(&tp->t_outq, 0);
        else {
                nch = ndqb(&tp->t_outq, 0200);
                nch = ndqb(&tp->t_outq, 0);
        else {
                nch = ndqb(&tp->t_outq, 0200);
index 5f7ff84..5b53354 100644 (file)
@@ -1,4 +1,4 @@
-/*     dz.c    4.46    82/10/17        */
+/*     dz.c    4.47    82/12/05        */
 
 #include "dz.h"
 #if NDZ > 0
 
 #include "dz.h"
 #if NDZ > 0
@@ -10,6 +10,7 @@
 #include "bk.h"
 #include "../h/param.h"
 #include "../h/systm.h"
 #include "bk.h"
 #include "../h/param.h"
 #include "../h/systm.h"
+#include "../h/ioctl.h"
 #include "../h/tty.h"
 #include "../h/dir.h"
 #include "../h/user.h"
 #include "../h/tty.h"
 #include "../h/dir.h"
 #include "../h/user.h"
@@ -331,7 +332,7 @@ dzrint(dz)
                        if (tp->t_flags & RAW)
                                c = 0;
                        else
                        if (tp->t_flags & RAW)
                                c = 0;
                        else
-                               c = tun.t_intrc;
+                               c = tp->t_intrc;
                if (c&DZ_DO && overrun == 0) {
                        /* printf("dz%d,%d: silo overflow\n", dz, (c>>8)&7); */
                        overrun = 1;
                if (c&DZ_DO && overrun == 0) {
                        /* printf("dz%d,%d: silo overflow\n", dz, (c>>8)&7); */
                        overrun = 1;
@@ -461,7 +462,7 @@ dzparam(unit)
                return;
        }
        lpr = (dz_speeds[tp->t_ispeed]<<8) | (unit & 07);
                return;
        }
        lpr = (dz_speeds[tp->t_ispeed]<<8) | (unit & 07);
-       if ((tp->t_local&LLITOUT) || (tp->t_flags&RAW))
+       if (tp->t_flags & (RAW|LITOUT))
                lpr |= BITS8;
        else
                lpr |= (BITS7|PENABLE);
                lpr |= BITS8;
        else
                lpr |= (BITS7|PENABLE);
@@ -527,7 +528,7 @@ dzstart(tp)
        }
        if (tp->t_outq.c_cc == 0)
                goto out;
        }
        if (tp->t_outq.c_cc == 0)
                goto out;
-       if ((tp->t_flags&RAW) || (tp->t_local&LLITOUT))
+       if (tp->t_flags & (RAW|LITOUT))
                cc = ndqb(&tp->t_outq, 0);
        else {
                cc = ndqb(&tp->t_outq, 0200);
                cc = ndqb(&tp->t_outq, 0);
        else {
                cc = ndqb(&tp->t_outq, 0200);
@@ -658,7 +659,7 @@ dzscan()
                        }
                } else {
                        if ((tp->t_state&TS_CARR_ON) &&
                        }
                } else {
                        if ((tp->t_state&TS_CARR_ON) &&
-                           (tp->t_local&LNOHANG)==0) {
+                           (tp->t_flags&NOHANG) == 0) {
                                /* carrier lost */
                                if (tp->t_state&TS_ISOPEN) {
                                        gsignal(tp->t_pgrp, SIGHUP);
                                /* carrier lost */
                                if (tp->t_state&TS_ISOPEN) {
                                        gsignal(tp->t_pgrp, SIGHUP);
index 01b52a4..0641f10 100644 (file)
@@ -1,4 +1,4 @@
-/*     ps.c    4.7     82/10/17        */
+/*     ps.c    4.8     82/12/05        */
 
 /*
  * Evans and Sutherland Picture System 2 driver
 
 /*
  * Evans and Sutherland Picture System 2 driver
@@ -16,7 +16,7 @@
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
-#include "../h/tty.h"
+#include "../h/ioctl.h"
 #include "../h/pte.h"
 #include "../h/map.h"
 #include "../h/buf.h"
 #include "../h/pte.h"
 #include "../h/map.h"
 #include "../h/buf.h"