1 |
< |
/* Copyright (c) 1987 Regents of the University of California */ |
2 |
< |
|
3 |
< |
/* SCCSid "$SunId$ LBL" */ |
4 |
< |
|
1 |
> |
/* RCSid $Id$ */ |
2 |
|
/* |
3 |
|
* driver.h - header file for interactive device drivers. |
7 |
– |
* |
8 |
– |
* 2/2/87 |
4 |
|
*/ |
5 |
|
|
6 |
+ |
#include "copyright.h" |
7 |
+ |
|
8 |
|
struct driver { /* driver functions */ |
9 |
< |
int (*close)(); /* close device */ |
10 |
< |
int (*clear)(); /* clear device */ |
11 |
< |
int (*paintr)(); /* paint rectangle */ |
9 |
> |
void (*close)(); /* close device */ |
10 |
> |
void (*clear)(); /* clear device */ |
11 |
> |
void (*paintr)(); /* paint rectangle */ |
12 |
|
int (*getcur)(); /* get cursor position */ |
13 |
< |
int (*comout)(); /* command line output */ |
14 |
< |
int (*comin)(); /* command line input */ |
15 |
< |
int (*flush)(); /* flush output */ |
13 |
> |
void (*comout)(); /* command line output */ |
14 |
> |
void (*comin)(); /* command line input */ |
15 |
> |
void (*flush)(); /* flush output */ |
16 |
|
double pixaspect; /* pixel aspect ratio */ |
17 |
|
int xsiz, ysiz; /* device size */ |
18 |
|
int inpready; /* input ready on device */ |
19 |
|
}; |
23 |
– |
|
24 |
– |
extern int stderr_v(); /* error vectors */ |
25 |
– |
extern int (*wrnvec)(), (*errvec)(), (*cmdvec)(); |
26 |
– |
|
27 |
– |
/* stream interface */ |
28 |
– |
extern struct driver *comm_init(), *slave_init(); |
20 |
|
/* magic numbers for verification */ |
21 |
|
#define COM_SENDM 0x6f37 |
22 |
|
#define COM_RECVM 0x51da |
52 |
|
* The name string identifies the driver, |
53 |
|
* and the id string identifies the client. |
54 |
|
* A device can be open by at most one client. |
55 |
< |
* Be verbose in error reports; call stderr_v(). |
56 |
< |
* If device has its own error output, set errvec, |
66 |
< |
* cmdvec and wrnvec. |
55 |
> |
* Be verbose in error reports; call eputs(). |
56 |
> |
* If device has its own error output, set erract. |
57 |
|
* } |
58 |
|
* (*dev->close)() |
59 |
|
* { |
114 |
|
* when characters are ready on the input. (Often easiest |
115 |
|
* to check for input during calls to paintr.) |
116 |
|
*/ |
117 |
+ |
|
118 |
+ |
#ifdef NOPROTO |
119 |
+ |
|
120 |
+ |
extern void editline(); |
121 |
+ |
extern void tocombuf(); |
122 |
+ |
extern int fromcombuf(); |
123 |
+ |
extern struct driver *slave_init(); |
124 |
+ |
extern struct driver *comm_init(); |
125 |
+ |
extern int new_ctab(); |
126 |
+ |
extern int get_pixel(); |
127 |
+ |
extern void make_gmap(); |
128 |
+ |
extern void set_cmap(); |
129 |
+ |
extern void map_color(); |
130 |
+ |
|
131 |
+ |
#else |
132 |
+ |
/* defined in editline.c */ |
133 |
+ |
extern void editline(char *buf, int (*c_get)(), void (*s_put)()); |
134 |
+ |
extern void tocombuf(char *b, struct driver *d); |
135 |
+ |
extern int fromcombuf(char *b, struct driver *d); |
136 |
+ |
/* defined in devcomm.c */ |
137 |
+ |
extern struct driver *slave_init(char *dname, char *id); |
138 |
+ |
extern struct driver *comm_init(char *dname, char *id); |
139 |
+ |
/* defined in colortab.c */ |
140 |
+ |
extern int new_ctab(int ncolors); |
141 |
+ |
extern int get_pixel(COLOR col, void (*set_pixel)()); |
142 |
+ |
extern void make_gmap(double gam); |
143 |
+ |
extern void set_cmap(BYTE *rmap, BYTE *gmap, BYTE *bmap); |
144 |
+ |
extern void map_color(BYTE rgb[3], COLOR col); |
145 |
+ |
|
146 |
+ |
#endif |