15 |
|
int (*getcur)(); /* get cursor position */ |
16 |
|
int (*comout)(); /* command line output */ |
17 |
|
int (*comin)(); /* command line input */ |
18 |
+ |
double pixaspect; /* pixel aspect ratio */ |
19 |
|
int xsiz, ysiz; /* device size */ |
20 |
|
int inpready; /* input ready on device */ |
21 |
|
}; |
35 |
|
#define COM_COMIN 4 |
36 |
|
#define NREQUESTS 5 /* number of valid requests */ |
37 |
|
|
38 |
< |
struct device { /* interactive device */ |
38 |
> |
extern struct device { /* interactive device */ |
39 |
|
char *name; /* device name */ |
40 |
|
char *descrip; /* description */ |
41 |
|
struct driver *(*init)(); /* initialize device */ |
42 |
< |
}; |
42 |
> |
} devtable[]; /* supported devices */ |
43 |
|
|
43 |
– |
extern struct device devtable[]; /* supported devices */ |
44 |
– |
|
44 |
|
#define MB1 ('\n') /* mouse button 1 */ |
45 |
|
#define MB2 ('\r') /* mouse button 2 */ |
46 |
|
#define MB3 (' ') /* mouse button 3 */ |
47 |
|
#define ABORT ('C'-'@') /* abort key */ |
48 |
|
|
50 |
– |
#define MAXRES 4000 /* preposterous display resolution */ |
51 |
– |
|
49 |
|
/* |
50 |
|
* struct driver * |
51 |
|
* dname_init(name, id) |
92 |
|
* string ends with '\n', the message is considered complete, |
93 |
|
* and the next call can erase it. |
94 |
|
* } |
95 |
< |
* (*dev->comin)(in) |
96 |
< |
* char *in; |
95 |
> |
* (*dev->comin)(in, prompt) |
96 |
> |
* char *in, *prompt; |
97 |
|
* { |
98 |
< |
* Read an edited input string from the command line. If |
99 |
< |
* an unrecognized control character is entered, terminate |
100 |
< |
* input and return the string with only that character. |
101 |
< |
* The input string should not contain a newline. |
102 |
< |
* Must work in consort with comout. |
98 |
> |
* Print a prompt then read an edited input command line |
99 |
> |
* assuming the in buffer is big enough. Unless prompt is NULL, |
100 |
> |
* the driver may substitute its own rview command. This is |
101 |
> |
* the most reliable way to repaint areas of the screen. |
102 |
> |
* If the user enters an unrecognized control character is entered, |
103 |
> |
* terminate input and return the string with only that character. |
104 |
> |
* The input string should not contain a newline. The routines in |
105 |
> |
* editline.c may be useful. Comin must work in consort with comout. |
106 |
|
* } |
107 |
|
* xsiz, ysiz |
108 |
|
* The maximum allowable x and y dimensions. If any |