1 |
+ |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
+ |
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
5 |
|
#endif |
6 |
|
|
5 |
– |
/* |
6 |
– |
* Skeletal 24-bit image conversion program. Replace "skel" |
7 |
|
* in this file with a more appropriate image type identifier. |
8 |
|
* |
9 |
|
* The Makefile entry should look something like this: |
17 |
|
*/ |
18 |
|
|
19 |
|
#include <stdio.h> |
20 |
+ |
#ifdef MSDOS |
21 |
+ |
#include <fcntl.h> |
22 |
+ |
#endif |
23 |
|
#include "color.h" |
24 |
|
#include "resolu.h" |
25 |
|
|
26 |
< |
extern double atof(); |
26 |
> |
extern char *malloc(); |
27 |
|
|
28 |
|
double gamma = 2.2; /* gamma correction */ |
29 |
|
|
75 |
|
progname, argv[i+1]); |
76 |
|
exit(1); |
77 |
|
} |
78 |
+ |
#ifdef MSDOS |
79 |
+ |
setmode(fileno(stdin), O_BINARY); |
80 |
+ |
setmode(fileno(stdout), O_BINARY); |
81 |
+ |
#endif |
82 |
|
setcolrgam(gamma); /* set up gamma correction */ |
83 |
|
if (reverse) { |
84 |
|
/* get their image resolution */ |