8 |
|
*/ |
9 |
|
|
10 |
|
#include <stdio.h> |
11 |
+ |
#include <string.h> |
12 |
|
|
13 |
|
|
14 |
|
static FILE *outfp; /* output file pointer */ |
15 |
|
static char outfile[128]; /* output file name */ |
16 |
|
|
17 |
|
|
18 |
< |
initscan_(fname, width, height) /* initialize output file */ |
19 |
< |
char *fname; |
20 |
< |
int *width, *height; |
18 |
> |
void |
19 |
> |
initscan_( /* initialize output file */ |
20 |
> |
char *fname, |
21 |
> |
int *width, |
22 |
> |
int *height |
23 |
> |
) |
24 |
|
{ |
21 |
– |
extern char *strcpy(); |
22 |
– |
|
25 |
|
if (fname == NULL || fname[0] == '\0') { |
26 |
|
outfp = stdout; |
27 |
|
strcpy(outfile, "<stdout>"); |
37 |
|
} |
38 |
|
|
39 |
|
|
40 |
< |
writescan_(scan, width) /* output scanline */ |
41 |
< |
float *scan; |
42 |
< |
int *width; |
40 |
> |
void |
41 |
> |
writescan_( /* output scanline */ |
42 |
> |
float *scan, |
43 |
> |
int *width |
44 |
> |
) |
45 |
|
{ |
46 |
|
if (fwritescan(scan, *width, outfp) < 0) { |
47 |
|
perror(outfile); |
50 |
|
} |
51 |
|
|
52 |
|
|
53 |
< |
donescan_() /* clean up */ |
53 |
> |
void |
54 |
> |
donescan_(void) /* clean up */ |
55 |
|
{ |
56 |
|
if (fclose(outfp) < 0) { |
57 |
|
perror(outfile); |