| 6 |
|
*/ |
| 7 |
|
|
| 8 |
|
#include <stdio.h> |
| 9 |
+ |
#include <string.h> |
| 10 |
+ |
|
| 11 |
|
#include "platform.h" |
| 12 |
|
#include "color.h" |
| 13 |
|
#include "resolu.h" |
| 19 |
|
|
| 20 |
|
char *progname; |
| 21 |
|
|
| 22 |
< |
void quiterr(const char *); |
| 23 |
< |
void rad2bmp(FILE *rfp, BMPWriter *bwr, int inv, int gry); |
| 24 |
< |
void bmp2rad(BMPReader *brd, FILE *rfp, int inv); |
| 22 |
> |
static void quiterr(const char *); |
| 23 |
> |
static void rad2bmp(FILE *rfp, BMPWriter *bwr, int inv, int gry); |
| 24 |
> |
static void bmp2rad(BMPReader *brd, FILE *rfp, int inv); |
| 25 |
|
|
| 26 |
|
|
| 27 |
|
int |
| 138 |
|
quiterr("cannot initialize BMP header"); |
| 139 |
|
/* set up output direction */ |
| 140 |
|
hdr->yIsDown = (rs.rt & YDECR) && |
| 141 |
< |
(outfile == NULL | hdr->compr == BI_RLE8); |
| 141 |
> |
((outfile == NULL) | (hdr->compr == BI_RLE8)); |
| 142 |
|
/* open BMP output */ |
| 143 |
|
if (outfile != NULL) |
| 144 |
|
wtr = BMPopenOutputFile(outfile, hdr); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
/* print message and exit */ |
| 166 |
< |
void |
| 166 |
> |
static void |
| 167 |
|
quiterr(const char *err) |
| 168 |
|
{ |
| 169 |
|
if (err != NULL) { |
| 174 |
|
} |
| 175 |
|
|
| 176 |
|
/* convert Radiance picture to BMP */ |
| 177 |
< |
void |
| 177 |
> |
static void |
| 178 |
|
rad2bmp(FILE *rfp, BMPWriter *bwr, int inv, int gry) |
| 179 |
|
{ |
| 180 |
|
COLR *scanin; |
| 220 |
|
} |
| 221 |
|
|
| 222 |
|
/* convert BMP file to Radiance */ |
| 223 |
< |
void |
| 223 |
> |
static void |
| 224 |
|
bmp2rad(BMPReader *brd, FILE *rfp, int inv) |
| 225 |
|
{ |
| 226 |
|
COLR *scanout; |