11 |
|
#include <math.h> |
12 |
|
#include <ctype.h> |
13 |
|
#include <time.h> |
14 |
+ |
#include <string.h> |
15 |
+ |
|
16 |
|
#include "tiffio.h" |
17 |
|
#include "color.h" |
18 |
|
#include "resolu.h" |
96 |
|
|
97 |
|
char *progname; |
98 |
|
|
99 |
+ |
static gethfunc headline; |
100 |
|
|
101 |
+ |
|
102 |
|
main(argc, argv) |
103 |
|
int argc; |
104 |
|
char *argv[]; |
212 |
|
(CHK(C_GRY) ? 1 : 3); |
213 |
|
cvts.r.p = (char *)malloc(rsiz*cvts.xmax); |
214 |
|
cvts.t.p = (char *)malloc(tsiz*cvts.xmax); |
215 |
< |
if (cvts.r.p == NULL | cvts.t.p == NULL) |
215 |
> |
if ((cvts.r.p == NULL) | (cvts.t.p == NULL)) |
216 |
|
quiterr("no memory to allocate scanline buffers"); |
217 |
|
} |
218 |
|
|
415 |
|
} |
416 |
|
|
417 |
|
|
418 |
< |
int |
419 |
< |
headline(s) /* process Radiance input header line */ |
420 |
< |
char *s; |
418 |
> |
static int |
419 |
> |
headline( /* process Radiance input header line */ |
420 |
> |
char *s, |
421 |
> |
void *p |
422 |
> |
) |
423 |
|
{ |
424 |
|
static int tmstrlen = 0; |
425 |
|
static int ownstrlen = 0; |
666 |
|
RRGGBB2Color(y) /* read/convert/write RGB16->COLOR scanline */ |
667 |
|
uint32 y; |
668 |
|
{ |
669 |
< |
int dogamma = cvts.gamcor < 0.99 | cvts.gamcor > 1.01; |
669 |
> |
int dogamma = (cvts.gamcor < 0.99) | (cvts.gamcor > 1.01); |
670 |
|
register double d; |
671 |
|
register int x; |
672 |
|
|
813 |
|
GGry2Color(y) /* read/convert/write G16->COLOR scanline */ |
814 |
|
uint32 y; |
815 |
|
{ |
816 |
< |
int dogamma = cvts.gamcor < 0.99 | cvts.gamcor > 1.01; |
816 |
> |
int dogamma = (cvts.gamcor < 0.99) | (cvts.gamcor > 1.01); |
817 |
|
double m; |
818 |
|
register double d; |
819 |
|
register int x; |
843 |
|
Color2GGry(y) /* read/convert/write COLOR->G16 scanline */ |
844 |
|
uint32 y; |
845 |
|
{ |
846 |
< |
int dogamma = cvts.gamcor < 0.99 | cvts.gamcor > 1.01; |
846 |
> |
int dogamma = (cvts.gamcor < 0.99) | (cvts.gamcor > 1.01); |
847 |
|
float m = pow(2.,(double)cvts.bradj); |
848 |
|
register int x; |
849 |
|
|
932 |
|
Color2RRGGBB(y) /* read/convert/write COLOR->RGB16 scanline */ |
933 |
|
uint32 y; |
934 |
|
{ |
935 |
< |
int dogamma = cvts.gamcor < 0.99 | cvts.gamcor > 1.01; |
935 |
> |
int dogamma = (cvts.gamcor < 0.99) | (cvts.gamcor > 1.01); |
936 |
|
float m = pow(2.,(double)cvts.bradj); |
937 |
|
register int x, i; |
938 |
|
|