23 |
|
extern int (*wrnvec)(), (*errvec)(), (*cmdvec)(); |
24 |
|
|
25 |
|
extern struct driver *comm_init(); /* stream interface */ |
26 |
+ |
/* magic numbers for verification */ |
27 |
+ |
#define COM_SENDM 0x6f37 |
28 |
+ |
#define COM_RECVM 0x51da |
29 |
|
/* stream commands */ |
30 |
|
#define COM_CLEAR 0 |
31 |
|
#define COM_PAINTR 1 |
51 |
|
|
52 |
|
/* |
53 |
|
* struct driver * |
54 |
< |
* dname_init(name) |
55 |
< |
* char *name; |
54 |
> |
* dname_init(name, id) |
55 |
> |
* char *name, *id; |
56 |
|
* { |
57 |
|
* Initialize device and return pointer to driver |
58 |
|
* functions. Returns NULL if an error occurred. |
59 |
< |
* The name string is used to identify the client. |
59 |
> |
* The name string identifies the driver, |
60 |
> |
* and the id string identifies the client. |
61 |
|
* A device can be open by at most one client. |
62 |
|
* Be verbose in error reports; call stderr_v(). |
63 |
< |
* If device has its own error output, set errvec. |
63 |
> |
* If device has its own error output, set errvec, |
64 |
> |
* cmdvec and wrnvec. |
65 |
|
* } |
66 |
|
* (*dev->close)() |
67 |
|
* { |
68 |
< |
* Close the device. Reset errvec to stderr_v. |
68 |
> |
* Close the device. Reset error vectors. |
69 |
|
* } |
70 |
|
* (*dev->clear)(xres, yres) |
71 |
|
* int xres, yres; |
72 |
|
* { |
73 |
< |
* Clear the device for xres by yres output. This call must |
73 |
> |
* Clear the device for xres by yres output. This call will |
74 |
|
* be made prior to any output. |
75 |
|
* } |
76 |
|
* (*dev->paintr)(col, xmin, ymin, xmax, ymax) |
101 |
|
* Read an edited input string from the command line. If |
102 |
|
* an unrecognized control character is entered, terminate |
103 |
|
* input and return the string with only that character. |
104 |
< |
* The input string should not contain a newline ('\n'). |
104 |
> |
* The input string should not contain a newline. |
105 |
|
* Must work in consort with comout. |
106 |
|
* } |
107 |
|
* xsiz, ysiz |
108 |
|
* The maximum allowable x and y dimensions. If any |
109 |
|
* size is allowable, these should be set to MAXRES. |
110 |
|
* inpready |
111 |
< |
* This variable should be positive |
112 |
< |
* when characters are ready on the input. |
111 |
> |
* This variable should be made positive asynchronously |
112 |
> |
* when characters are ready on the input. (Often easiest |
113 |
> |
* to check for input during calls to paintr.) |
114 |
|
*/ |