|
|
1.1 root 1: /*
2: * Not working: TYPE=ccitt-g31, TYPE=ccitt-g32, TYPE=ccitt-g4, TYPE=ccir601.
3: * picconf.c has unimplemented TYPEs commented out.
4: */
5: typedef struct PICFILE{
6: int fd;
7: int nchan;
8: int x, y;
9: int width, height;
10: char *type;
11: char *chan;
12: char *cmap;
13: int argc;
14: char **argv;
15: int flags;
16: int line;
17: char *buf;
18: char *ebuf;
19: char *bufp;
20: int (*rd)(), (*wr)(), (*cl)();
21: }PICFILE;
22: #define PIC_NCHAN(p) ((p)->nchan)
23: #define PIC_WIDTH(p) ((p)->width)
24: #define PIC_HEIGHT(p) ((p)->height)
25: #define PIC_XOFFS(p) ((p)->x)
26: #define PIC_YOFFS(p) ((p)->y)
27: #define PIC_RECT(p) Rect((p)->x, (p)->y, (p)->x+(p)->width, (p)->y+(p)->height) /* needs <geometry.h> */
28: #define PIC_SAMEARGS(p) (p)->type, (p)->x, (p)->y, (p)->width, (p)->height, (p)->chan, argv, (p)->cmap
29: #define picread(f, buf) (*(f)->rd)(f, buf)
30: #define picwrite(f, buf) (*(f)->wr)(f, buf)
31: PICFILE *picopen_r();
32: PICFILE *picopen_w();
33: PICFILE *picputprop();
34: char *picgetprop();
35: void picclose(), picpack(), picunpack();
36: /*
37: * Private data
38: */
39: char *PIC_command;
40: char *PIC_error;
41: #define PIC_NOCLOSE 1 /* don't close p->fd on picclose */
42: #define PIC_INPUT 2 /* open for input */
43: struct PIC_conf{
44: char *type;
45: int (*rd)();
46: int (*wr)();
47: int (*cl)();
48: int nchan;
49: }PIC_conf[];
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.