7 |
|
* 8/15/85 |
8 |
|
*/ |
9 |
|
|
10 |
< |
#include <stdio.h> |
11 |
< |
#ifdef MSDOS |
12 |
< |
#include <fcntl.h> |
13 |
< |
#endif |
14 |
< |
#include <time.h> |
15 |
< |
|
10 |
> |
#include "rtio.h" |
11 |
> |
#include "platform.h" |
12 |
|
#include "color.h" |
13 |
|
#include "resolu.h" |
14 |
|
|
15 |
|
|
16 |
|
#define NCOLS 133 |
17 |
|
|
18 |
+ |
static int shade(COLR clr); |
19 |
|
|
20 |
< |
main(argc, argv) |
21 |
< |
int argc; |
22 |
< |
char **argv; |
20 |
> |
|
21 |
> |
int |
22 |
> |
main(int argc, char **argv) |
23 |
|
{ |
24 |
|
FILE *input; |
25 |
|
int xres, yres; |
32 |
|
fprintf(stderr, "%s: can't open file \"%s\"\n", argv[0], argv[1]); |
33 |
|
exit(1); |
34 |
|
} |
35 |
< |
#ifdef MSDOS |
39 |
< |
setmode(fileno(input), O_BINARY); |
40 |
< |
#endif |
35 |
> |
SET_FILE_BINARY(input); |
36 |
|
/* get picture dimensions */ |
37 |
|
if (checkheader(input, COLRFMT, NULL) < 0 || |
38 |
|
fgetresolu(&xres, &yres, input) < 0) { |
59 |
|
} |
60 |
|
|
61 |
|
|
62 |
< |
int |
63 |
< |
shade(clr) /* return character for color */ |
64 |
< |
COLR clr; |
62 |
> |
static int |
63 |
> |
shade( /* return character for color */ |
64 |
> |
COLR clr |
65 |
> |
) |
66 |
|
{ |
67 |
|
#define NSHADES 13 |
68 |
|
|