changes from mips!dce, most compatibility stuff
[unix-history] / usr / src / usr.bin / window / ww.h
index a7c8f61..0e9ad54 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * @(#)ww.h    3.37 %G%        
+ * @(#)ww.h    3.42 %G%        
  */
 
 /*
  */
 
 /*
@@ -77,6 +77,7 @@ struct ww {
        char ww_id;             /* the user window id */
        char ww_center;         /* center the label */
        char ww_hasframe;       /* frame it */
        char ww_id;             /* the user window id */
        char ww_center;         /* center the label */
        char ww_hasframe;       /* frame it */
+       char ww_keepopen;       /* keep it open after the process dies */
        char *ww_label;         /* the user supplied label */
        struct ww_dim ww_alt;   /* alternate position and size */
 };
        char *ww_label;         /* the user supplied label */
        struct ww_dim ww_alt;   /* alternate position and size */
 };
@@ -94,7 +95,7 @@ struct ww_tty {
 union ww_char {
        short c_w;              /* as a word */
        struct {
 union ww_char {
        short c_w;              /* as a word */
        struct {
-#ifndef mc68000
+#if defined(vax)
                char C_c;       /* the character part */
                char C_m;       /* the mode part */
 #else
                char C_c;       /* the character part */
                char C_m;       /* the mode part */
 #else
@@ -170,7 +171,6 @@ struct ww_tty wwwintty;             /* the terminal settings for windows */
 char *wwterm;                  /* the terminal name */
 char wwtermcap[1024];          /* place for the termcap */
 char wwkeys[512];              /* termcap fields for the function keys */
 char *wwterm;                  /* the terminal name */
 char wwtermcap[1024];          /* place for the termcap */
 char wwkeys[512];              /* termcap fields for the function keys */
-char wwwintermcap[1024];       /* termcap for windows */
 
        /* generally useful variables */
 int wwnrow, wwncol;            /* the screen size */
 
        /* generally useful variables */
 int wwnrow, wwncol;            /* the screen size */
@@ -182,7 +182,7 @@ char **wwsmap;                      /* the screen map */
 union ww_char **wwos;          /* the old (current) screen */
 union ww_char **wwns;          /* the new (desired) screen */
 char *wwtouched;               /* wwns changed flags */
 union ww_char **wwos;          /* the old (current) screen */
 union ww_char **wwns;          /* the new (desired) screen */
 char *wwtouched;               /* wwns changed flags */
-int wwbaudmap[];               /* maps stty() baud rate code into number */
+extern int wwbaudmap[];                /* maps stty() baud rate code into number */
 int wwbaud;                    /* wwbaudmap[wwoldtty.ww_sgttyb.sg_ospeed] */
 int wwcursorrow, wwcursorcol;  /* where we want the cursor to be */
 int wwerrno;                   /* error number */
 int wwbaud;                    /* wwbaudmap[wwoldtty.ww_sgttyb.sg_ospeed] */
 int wwcursorrow, wwcursorcol;  /* where we want the cursor to be */
 int wwerrno;                   /* error number */
@@ -206,8 +206,6 @@ int wwnselect, wwnselecte, wwnselectz;
        /* things for handling input */
 int wwrint();          /* interrupt handler */
 struct ww *wwcurwin;   /* window to copy input into */
        /* things for handling input */
 int wwrint();          /* interrupt handler */
 struct ww *wwcurwin;   /* window to copy input into */
-char wwsetjmp;         /* want a longjmp() from wwrint() */
-jmp_buf wwjmpbuf;      /* jmpbuf for above */
 char *wwib;            /* input (keyboard) buffer */
 char *wwibe;           /* wwib + sizeof buffer */
 char *wwibp;           /* current read position in buffer */
 char *wwib;            /* input (keyboard) buffer */
 char *wwibe;           /* wwib + sizeof buffer */
 char *wwibp;           /* current read position in buffer */
@@ -215,7 +213,14 @@ char *wwibq;               /* current write position in buffer */
 #define wwgetc()       (wwibp < wwibq ? *wwibp++ & 0x7f : -1)
 #define wwpeekc()      (wwibp < wwibq ? *wwibp & 0x7f : -1)
 #define wwungetc(c)    (wwibp > wwib ? *--wwibp = (c) : -1)
 #define wwgetc()       (wwibp < wwibq ? *wwibp++ & 0x7f : -1)
 #define wwpeekc()      (wwibp < wwibq ? *wwibp & 0x7f : -1)
 #define wwungetc(c)    (wwibp > wwib ? *--wwibp = (c) : -1)
-#define wwinterrupt()  (wwibp < wwibq)
+
+       /* things for short circuiting wwiomux() */
+char wwintr;           /* interrupting */
+char wwsetjmp;         /* want a longjmp() from wwrint() and wwchild() */
+jmp_buf wwjmpbuf;      /* jmpbuf for above */
+#define wwinterrupt()  wwintr
+#define wwsetintr()    (wwintr = 1, wwsetjmp ? longjmp(wwjmpbuf, 1) : 0)
+#define wwclrintr()    (wwintr = 0)
 
        /* the window virtual terminal */
 #define WWT_TERM       "TERM=window"
 
        /* the window virtual terminal */
 #define WWT_TERM       "TERM=window"