Commit | Line | Data |
---|---|---|
85af59e4 | 1 | /* |
4cbe417d | 2 | * @(#)defs.h 3.3 83/08/25 |
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 | 12 | int nread; |
39b49130 EW |
13 | int nreade; |
14 | int nreadz; | |
15 | int nreadc; | |
fd60eebd | 16 | struct timeval starttime; |
fd60eebd | 17 | |
85af59e4 | 18 | /* things for handling input */ |
fd60eebd EW |
19 | char ibuf[512]; |
20 | char *ibufp; | |
21 | int 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 |
26 | struct ww *window[NWINDOW]; /* the windows */ |
27 | struct ww *selwin; /* the selected window */ | |
28 | struct ww *cmdwin; /* the command window */ | |
29 | struct ww *framewin; /* the window for framing */ | |
43c1dd56 | 30 | struct ww *boxwin; /* the window for the box */ |
4cbe417d | 31 | struct ww *curwin; /* the current window */ |
fd60eebd | 32 | |
4cbe417d EW |
33 | char *shell; /* the shell program */ |
34 | char *shellname; /* the shell program name (for argv[0]) */ | |
38e09508 | 35 | |
4cbe417d EW |
36 | int nbufline; /* number of lines in the buffer */ |
37 | ||
38 | /* flags */ | |
fd60eebd | 39 | char quit; |
fa59a057 | 40 | char terse; |
38e09508 | 41 | char debug; |
4cbe417d | 42 | char escapec; /* escape character */ |
85af59e4 EW |
43 | |
44 | struct ww *getwin(); | |
45 | struct ww *openwin(); | |
46 | struct ww *idtowin(); | |
47 | struct ww *openiwin(); | |
48 | ||
49 | /* stuff for long commands */ | |
50 | int argc; | |
51 | char *argv[100]; | |
52 | int lineno; /* line number in the source file */ | |
53 | char insource; /* we're in a source */ |