+struct ww_tty wwoldtty; /* the old (saved) terminal settings */
+struct ww_tty wwnewtty; /* the new (current) terminal settings */
+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 */
+
+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 */
+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 */
+int wwbaud; /* wwbaudmap[wwoldtty.ww_sgttyb.sg_ospeed] */
+int wwcursorrow, wwcursorcol; /* where we want the cursor to be */
+
+ /* statistics */
+int wwnwrite, wwnwritec;
+int wwnupdate, wwntouched, wwnmiss;
+
+ /* quicky macros */
+#define wwcurrow(w) ((w)->ww_cur.r + (w)->ww_w.t)
+#define wwcurcol(w) ((w)->ww_cur.c + (w)->ww_w.l)
+#define wwsetcursor(r,c) (wwcursorrow = (r), wwcursorcol = (c))
+#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 */