13 |
|
|
14 |
|
#include <stdio.h> |
15 |
|
|
16 |
+ |
#include <math.h> |
17 |
+ |
|
18 |
|
#include <signal.h> |
19 |
|
|
20 |
|
#include <sys/ioctl.h> |
99 |
|
extern long ftell(); |
100 |
|
long scanpos[NROWS]; |
101 |
|
|
100 |
– |
extern double atof(); |
102 |
|
double exposure = 1.0; |
103 |
|
int wrong_fmt = 0; |
104 |
|
|
146 |
|
if (wrong_fmt) |
147 |
|
quitmsg("input must be a Radiance picture"); |
148 |
|
/* get picture dimensions */ |
149 |
< |
if (fgetresolu(&xmax, &ymax, fin) != (YMAJOR|YDECR)) |
149 |
> |
if (fgetresolu(&xmax, &ymax, fin) < 0) |
150 |
|
quitmsg("bad picture size"); |
151 |
|
if (xmax > NCOLS || ymax > NROWS) |
152 |
|
quitmsg("resolution mismatch"); |
521 |
|
picreadcm(map) /* do gamma correction */ |
522 |
|
colormap map; |
523 |
|
{ |
523 |
– |
extern double pow(); |
524 |
|
register int i, val; |
525 |
|
|
526 |
|
for (i = 0; i < 256; i++) { |