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