1 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
11 |
|
*/ |
12 |
|
|
13 |
|
#include <stdio.h> |
14 |
+ |
#ifdef MSDOS |
15 |
+ |
#include <fcntl.h> |
16 |
+ |
#endif |
17 |
|
|
18 |
|
#include "color.h" |
19 |
|
#include "resolu.h" |
20 |
|
|
21 |
|
|
22 |
< |
#define NCOLS 133 |
22 |
> |
#define NCOLS 133 |
23 |
|
|
24 |
|
|
25 |
|
main(argc, argv) |
37 |
|
fprintf(stderr, "%s: can't open file \"%s\"\n", argv[0], argv[1]); |
38 |
|
exit(1); |
39 |
|
} |
40 |
< |
|
40 |
> |
#ifdef MSDOS |
41 |
> |
setmode(fileno(input), O_BINARY); |
42 |
> |
#endif |
43 |
|
/* get picture dimensions */ |
44 |
|
if (checkheader(input, COLRFMT, NULL) < 0 || |
45 |
|
fgetresolu(&xres, &yres, input) < 0) { |
70 |
|
shade(clr) /* return character for color */ |
71 |
|
COLR clr; |
72 |
|
{ |
73 |
< |
#define NSHADES 13 |
73 |
> |
#define NSHADES 13 |
74 |
|
|
75 |
|
static char shadech[NSHADES+1] = " .,:;+?%&*$@#"; |
76 |
|
|