1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
4 |
– |
|
5 |
– |
/* Copyright (c) 1986 Regents of the University of California */ |
6 |
– |
|
4 |
|
/* |
5 |
|
* glimage.c - program to dump pixel file NeWS window |
6 |
|
* |
11 |
|
|
12 |
|
#include <gl.h> |
13 |
|
|
14 |
+ |
#include <time.h> |
15 |
+ |
|
16 |
|
#include "color.h" |
17 |
|
|
18 |
+ |
#include "resolu.h" |
19 |
|
|
20 |
+ |
|
21 |
|
main(argc, argv) /* print a picture */ |
22 |
|
int argc; |
23 |
|
char *argv[]; |
40 |
|
exit(1); |
41 |
|
} |
42 |
|
/* discard header */ |
43 |
< |
getheader(input, NULL); |
43 |
> |
if (checkheader(input, COLRFMT, NULL) < 0) { |
44 |
> |
fprintf(stderr, "%s: not a Radiance picture\n", fname); |
45 |
> |
exit(1); |
46 |
> |
} |
47 |
|
/* get picture dimensions */ |
48 |
< |
if (fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) { |
48 |
> |
if (fgetresolu(&xres, &yres, input) < 0) { |
49 |
|
fprintf(stderr, "%s: bad picture size\n", fname); |
50 |
|
exit(1); |
51 |
|
} |