got rid of pgrp in struct ww_tty
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Sun, 18 Dec 1983 04:39:38 +0000 (20:39 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Sun, 18 Dec 1983 04:39:38 +0000 (20:39 -0800)
SCCS-vsn: usr.bin/window/ww.h 3.22
SCCS-vsn: usr.bin/window/wwtty.c 3.5
SCCS-vsn: usr.bin/window/wwdata.c 3.8

usr/src/usr.bin/window/ww.h
usr/src/usr.bin/window/wwdata.c
usr/src/usr.bin/window/wwtty.c

index 82ec065..ca59ab5 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- *     @(#)ww.h        3.21 83/12/02   
+ *     @(#)ww.h        3.22 83/12/17   
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
@@ -7,6 +7,7 @@
 
 #define NWW    30
 
 
 #define NWW    30
 
+       /* a rectangle */
 struct ww_dim {
        int nr;                 /* number of rows */
        int nc;                 /* number of columns */
 struct ww_dim {
        int nr;                 /* number of rows */
        int nc;                 /* number of columns */
@@ -14,11 +15,13 @@ struct ww_dim {
        int l, r;               /* left, right */
 };
 
        int l, r;               /* left, right */
 };
 
+       /* a coordinate */
 struct ww_pos {
        int r;                  /* row */
        int c;                  /* column */
 };
 
 struct ww_pos {
        int r;                  /* row */
        int c;                  /* column */
 };
 
+       /* the window structure */
 struct ww {
        struct ww *ww_forw;     /* doubly linked list, for overlapping info */
        struct ww *ww_back;
 struct ww {
        struct ww *ww_forw;     /* doubly linked list, for overlapping info */
        struct ww *ww_back;
@@ -56,13 +59,13 @@ struct ww {
        struct ww_pos ww_altpos;/* alternate position */
 };
 
        struct ww_pos ww_altpos;/* alternate position */
 };
 
+       /* state of a tty */
 struct ww_tty {
        struct sgttyb ww_sgttyb;
        struct tchars ww_tchars;
        struct ltchars ww_ltchars;
        int ww_lmode;
        int ww_ldisc;
 struct ww_tty {
        struct sgttyb ww_sgttyb;
        struct tchars ww_tchars;
        struct ltchars ww_ltchars;
        int ww_lmode;
        int ww_ldisc;
-       int ww_pgrp;
 };
 
 union ww_char {
 };
 
 union ww_char {
@@ -93,8 +96,7 @@ union ww_char {
 
        /* ww_state values */
 #define WWS_INITIAL    0       /* just opened */
 
        /* ww_state values */
 #define WWS_INITIAL    0       /* just opened */
-#define WWS_HASPROC    1       /* forked, in parent */
-#define WWS_INCHILD    2       /* forked, in child */
+#define WWS_HASPROC    1       /* has process on pty */
 #define WWS_DEAD       3       /* child died */
 
        /* flags for ww_fmap */
 #define WWS_DEAD       3       /* child died */
 
        /* flags for ww_fmap */
index 7c6ea00..2f6d764 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwdata.c    3.7 83/09/17";
+static char *sccsid = "@(#)wwdata.c    3.8 83/12/17";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
@@ -13,7 +13,7 @@ struct ww_tty wwnewtty = {
        { 0, 0, -1, -1, 0 },
        { -1, -1, -1, -1, -1, -1 },
        { -1, -1, -1, -1, -1, -1 },
        { 0, 0, -1, -1, 0 },
        { -1, -1, -1, -1, -1, -1 },
        { -1, -1, -1, -1, -1, -1 },
-       0, 0, 0
+       0, 0
 };
 
 int tt_h19();
 };
 
 int tt_h19();
index 31134ec..7e5aff6 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)wwtty.c     3.4 83/08/26";
+static char *sccsid = "@(#)wwtty.c     3.5 83/12/17";
 #endif
 
 #include "ww.h"
 #endif
 
 #include "ww.h"
@@ -17,8 +17,6 @@ register struct ww_tty *t;
                goto bad;
        if (ioctl(d, (int)TIOCGETD, (char *)&t->ww_ldisc) < 0)
                goto bad;
                goto bad;
        if (ioctl(d, (int)TIOCGETD, (char *)&t->ww_ldisc) < 0)
                goto bad;
-       if (ioctl(d, (int)TIOCGPGRP, (char *)&t->ww_pgrp) < 0)
-               goto bad;
        return 0;
 bad:
        wwerrno = WWE_SYS;
        return 0;
 bad:
        wwerrno = WWE_SYS;
@@ -38,8 +36,6 @@ register struct ww_tty *t;
                goto bad;
        if (ioctl(d, (int)TIOCSETD, (char *)&t->ww_ldisc) < 0)
                goto bad;
                goto bad;
        if (ioctl(d, (int)TIOCSETD, (char *)&t->ww_ldisc) < 0)
                goto bad;
-       if (ioctl(d, (int)TIOCSPGRP, (char *)&t->ww_pgrp) < 0)
-               goto bad;
        return 0;
 bad:
        wwerrno = WWE_SYS;
        return 0;
 bad:
        wwerrno = WWE_SYS;