support graphics if setup by somebody else.
[unix-history] / usr / src / usr.bin / window / defs.h
CommitLineData
85af59e4 1/*
86845af3 2 * @(#)defs.h 3.4 83/09/01
85af59e4 3 */
fd60eebd
EW
4
5#include "ww.h"
6#include <signal.h>
7#include <sys/time.h>
8#include <sys/resource.h>
9
237f359c
EW
10#define NWINDOW 9
11
fd60eebd 12int nread;
39b49130
EW
13int nreade;
14int nreadz;
15int nreadc;
fd60eebd 16struct timeval starttime;
fd60eebd 17
85af59e4 18 /* things for handling input */
fd60eebd
EW
19char ibuf[512];
20char *ibufp;
21int ibufc;
22#define bgetc() (ibufc ? ibufc--, *ibufp++&0x7f : -1)
23#define bpeekc() (ibufc ? *ibufp&0x7f : -1)
24#define bungetc(c) (ibufp > ibuf ? ibufc++, *--ibufp = (c) : -1)
25
85af59e4
EW
26struct ww *window[NWINDOW]; /* the windows */
27struct ww *selwin; /* the selected window */
28struct ww *cmdwin; /* the command window */
29struct ww *framewin; /* the window for framing */
43c1dd56 30struct ww *boxwin; /* the window for the box */
fd60eebd 31
4cbe417d
EW
32char *shell; /* the shell program */
33char *shellname; /* the shell program name (for argv[0]) */
38e09508 34
4cbe417d
EW
35int nbufline; /* number of lines in the buffer */
36
37 /* flags */
fd60eebd 38char quit;
fa59a057 39char terse;
38e09508 40char debug;
86845af3 41char incmd; /* in command mode */
4cbe417d 42char escapec; /* escape character */
85af59e4
EW
43
44struct ww *getwin();
45struct ww *openwin();
46struct ww *idtowin();
47struct ww *openiwin();
48
49 /* stuff for long commands */
50int argc;
51char *argv[100];
52int lineno; /* line number in the source file */
53char insource; /* we're in a source */