16 |
|
|
17 |
|
#define NCOLS 880 /* for wide carriage */ |
18 |
|
|
19 |
+ |
static int printp(char *fname); |
20 |
+ |
static void plotscan(COLR scan[], int len, int y); |
21 |
+ |
static int bit(COLR clr, int x); |
22 |
|
|
23 |
< |
main(argc, argv) |
24 |
< |
int argc; |
25 |
< |
char *argv[]; |
23 |
> |
|
24 |
> |
int |
25 |
> |
main( |
26 |
> |
int argc, |
27 |
> |
char *argv[] |
28 |
> |
) |
29 |
|
{ |
30 |
|
int i; |
31 |
|
int status = 0; |
41 |
|
} |
42 |
|
|
43 |
|
|
44 |
< |
printp(fname) /* print a picture */ |
45 |
< |
char *fname; |
44 |
> |
static int |
45 |
> |
printp( /* print a picture */ |
46 |
> |
char *fname |
47 |
> |
) |
48 |
|
{ |
49 |
|
FILE *input; |
50 |
|
int xres, yres; |
92 |
|
} |
93 |
|
|
94 |
|
|
95 |
< |
plotscan(scan, len, y) /* plot a scanline */ |
96 |
< |
COLR scan[]; |
97 |
< |
int len; |
98 |
< |
int y; |
95 |
> |
static void |
96 |
> |
plotscan( /* plot a scanline */ |
97 |
> |
COLR scan[], |
98 |
> |
int len, |
99 |
> |
int y |
100 |
> |
) |
101 |
|
{ |
102 |
|
static BYTE pat[NCOLS]; |
103 |
|
int bpos; |
104 |
|
register int i; |
105 |
|
|
106 |
< |
if (bpos = y & 7) { |
106 |
> |
if ((bpos = y & 7)) { |
107 |
|
|
108 |
|
for (i = 0; i < len; i++) |
109 |
|
pat[i] |= bit(scan[i], i) << bpos; |
126 |
|
} |
127 |
|
|
128 |
|
|
129 |
< |
bit(clr, x) /* return bit for color at x */ |
130 |
< |
COLR clr; |
131 |
< |
register int x; |
129 |
> |
static int |
130 |
> |
bit( /* return bit for color at x */ |
131 |
> |
COLR clr, |
132 |
> |
register int x |
133 |
> |
) |
134 |
|
{ |
135 |
|
static int cerr[NCOLS]; |
136 |
|
static int err; |