1 |
– |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* Skeletal 24-bit image conversion program. Replace "skel" |
6 |
|
* in this file with a more appropriate image type identifier. |
7 |
|
* |
8 |
< |
* The Makefile entry should look something like this: |
8 |
> |
* The Rmakefile entry should look something like this: |
9 |
|
* ra_skel: ra_skel.o |
10 |
|
* cc $(CFLAGS) -o ra_skel ra_skel.o -lrt -lm |
11 |
|
* ra_skel.o: ../common/color.h ../common/resolu.h |
17 |
|
|
18 |
|
#include <stdio.h> |
19 |
|
#include <math.h> |
20 |
< |
#ifdef MSDOS |
21 |
< |
#include <fcntl.h> |
22 |
< |
#endif |
20 |
> |
#include <time.h> |
21 |
> |
|
22 |
> |
#include "platform.h" |
23 |
|
#include "color.h" |
24 |
|
#include "resolu.h" |
25 |
|
|
29 |
– |
extern char *malloc(); |
30 |
– |
|
26 |
|
double gamcor = 2.2; /* gamma correction */ |
27 |
|
|
28 |
|
int bradj = 0; /* brightness adjustment */ |
73 |
|
progname, argv[i+1]); |
74 |
|
exit(1); |
75 |
|
} |
76 |
< |
#ifdef MSDOS |
77 |
< |
setmode(fileno(stdin), O_BINARY); |
83 |
< |
setmode(fileno(stdout), O_BINARY); |
84 |
< |
#endif |
76 |
> |
SET_FILE_BINARY(stdin); |
77 |
> |
SET_FILE_BINARY(stdout); |
78 |
|
setcolrgam(gamcor); /* set up gamma correction */ |
79 |
|
if (reverse) { |
80 |
|
/* get their image resolution */ |
81 |
|
read_skel_head(&xmax, &ymax); |
82 |
|
/* put our header */ |
83 |
+ |
newheader("RADIANCE", stdout); |
84 |
|
printargs(i, argv, stdout); |
85 |
|
fputformat(COLRFMT, stdout); |
86 |
|
putchar('\n'); |
143 |
|
quiterr("error writing Radiance picture"); |
144 |
|
} |
145 |
|
/* free scanline */ |
146 |
< |
free((char *)scanout); |
146 |
> |
free((void *)scanout); |
147 |
|
} |
148 |
|
|
149 |
|
|
172 |
|
quiterr("error writing skel file"); |
173 |
|
} |
174 |
|
/* free scanline */ |
175 |
< |
free((char *)scanin); |
175 |
> |
free((void *)scanin); |
176 |
|
} |