fake cursor
[unix-history] / usr / src / usr.bin / window / ww.h
index ed8f443..d439f46 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- *     @(#)ww.h        3.4 83/08/16    
+ *     @(#)ww.h        3.9 83/08/19    
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
@@ -24,14 +24,16 @@ struct ww {
        struct ww *ww_back;
        char ww_state;          /* state of window creation */
        char ww_wstate;         /* state for printing charcters */
        struct ww *ww_back;
        char ww_state;          /* state of window creation */
        char ww_wstate;         /* state for printing charcters */
-       int ww_insert :1;       /* insert mode, for printing */
-       int ww_mapnl :1;        /* map \n to \r\n */
-       int ww_haspty :1;       /* has pty */
+       char ww_modes;          /* current printing modes */
+       char ww_insert :1;      /* insert mode, for printing */
+       char ww_mapnl :1;       /* map \n to \r\n */
+       char ww_haspty :1;      /* has pty */
+       char ww_hascursor :1;   /* has fake cursor */
        char ww_index;          /* the index, for wwindex[] */
        char ww_order;          /* the overlapping order */
        struct ww_dim ww_w;     /* window dimemsions */
        char ww_index;          /* the index, for wwindex[] */
        char ww_order;          /* the overlapping order */
        struct ww_dim ww_w;     /* window dimemsions */
-       short ww_nline;         /* size of the buffer */
-       short ww_scroll;        /* where the window is relative to the buffer */
+       int ww_nline;           /* size of the buffer */
+       int ww_scroll;          /* where the window is relative to the buffer */
        struct ww_pos ww_cur;   /* the cursor position, relative to ww_w */
        char **ww_win;          /* the window */
        union ww_char **ww_buf; /* the buffer */
        struct ww_pos ww_cur;   /* the cursor position, relative to ww_w */
        char **ww_win;          /* the window */
        union ww_char **ww_buf; /* the buffer */
@@ -114,6 +116,9 @@ char wwtermcap[1024];               /* place for the termcap */
 char wwkeys[512];              /* termcap fields for the function keys */
 
 int wwnrow, wwncol;            /* the screen size */
 char wwkeys[512];              /* termcap fields for the function keys */
 
 int wwnrow, wwncol;            /* the screen size */
+char wwavailmodes;             /* actually supported modes */
+char wwcursormodes;            /* the modes for the fake cursor */
+char wwwrap;                   /* terminal has auto wrap around */
 int wwdtablesize;              /* result of getdtablesize() call */
 char **wwsmap;                 /* the screen map */
 char **wwfmap;                 /* the frame map */
 int wwdtablesize;              /* result of getdtablesize() call */
 char **wwsmap;                 /* the screen map */
 char **wwfmap;                 /* the frame map */
@@ -135,6 +140,16 @@ int wwnupdate, wwntouched, wwnmiss;
 #define wwcurtowin(w)  wwsetcursor(wwcurrow(w), wwcurcol(w))
 #define wwbell()       putchar(CTRL(g))
 
 #define wwcurtowin(w)  wwsetcursor(wwcurrow(w), wwcurcol(w))
 #define wwbell()       putchar(CTRL(g))
 
+       /* the window virtual terminal */
+#define WWT_TERM       "TERM=window"
+#define WWT_TERMCAP    "WW|window|window package:\
+       :cr=^M:nl=^J:bl=^G:\
+       :al=\\EL:am:le=^H:bs:cd=\\EJ:ce=\\EK:cl=\\EE:cm=\\EY%+ %+ :\
+       :da:db:dc=\\EN:dl=\\EM:do=\\EB:ei=\\EO:ho=\\EH:im=\\E@:mi:\
+       :nd=\\EC:ta=^I:pt:up=\\EA:"
+#define WWT_REV                "se=\\Eq:so=\\Ep:"
+#define WWT_UL         "ue=\\Es:us=\\Er:"
+
        /* our functions */
 struct ww *wwopen();
 struct ww *wwfind();
        /* our functions */
 struct ww *wwopen();
 struct ww *wwfind();