| 9 |
|
|
| 10 |
|
#include <time.h> |
| 11 |
|
|
| 12 |
– |
#include "standard.h" |
| 12 |
|
#include "platform.h" |
| 13 |
+ |
#include "standard.h" |
| 14 |
|
#include "color.h" |
| 15 |
|
#include "resolu.h" |
| 16 |
|
#include "data.h" |
| 33 |
|
|
| 34 |
|
static DATARRAY *dtab[TABSIZ]; /* data array list */ |
| 35 |
|
|
| 36 |
+ |
static gethfunc headaspect; |
| 37 |
|
|
| 38 |
+ |
|
| 39 |
|
DATARRAY * |
| 40 |
|
getdata(dname) /* get data array dname */ |
| 41 |
|
char *dname; |
| 140 |
|
|
| 141 |
|
|
| 142 |
|
static int |
| 143 |
< |
headaspect(s, iap) /* check string for aspect ratio */ |
| 144 |
< |
char *s; |
| 145 |
< |
double *iap; |
| 143 |
> |
headaspect( /* check string for aspect ratio */ |
| 144 |
> |
char *s, |
| 145 |
> |
void *iap |
| 146 |
> |
) |
| 147 |
|
{ |
| 148 |
|
char fmt[32]; |
| 149 |
|
|
| 150 |
|
if (isaspect(s)) |
| 151 |
< |
*iap *= aspectval(s); |
| 151 |
> |
*(double*)iap *= aspectval(s); |
| 152 |
|
else if (formatval(fmt, s) && !globmatch(PICFMT, fmt)) |
| 153 |
< |
*iap = 0.0; |
| 153 |
> |
*(double*)iap = 0.0; |
| 154 |
|
return(0); |
| 155 |
|
} |
| 156 |
|
|
| 190 |
|
SET_FILE_BINARY(fp); |
| 191 |
|
/* get dimensions */ |
| 192 |
|
inpaspect = 1.0; |
| 193 |
< |
getheader(fp, headaspect, (char *)&inpaspect); |
| 193 |
> |
getheader(fp, headaspect, &inpaspect); |
| 194 |
|
if (inpaspect <= FTINY || !fgetsresolu(&inpres, fp)) |
| 195 |
|
goto readerr; |
| 196 |
|
pp[0].nd = 2; |