8 |
|
#include "copyright.h" |
9 |
|
|
10 |
|
#include "standard.h" |
11 |
< |
|
11 |
> |
#include "platform.h" |
12 |
|
#include "color.h" |
13 |
– |
|
13 |
|
#include "resolu.h" |
15 |
– |
|
14 |
|
#include "data.h" |
15 |
|
|
16 |
|
/* picture memory usage before warning */ |
17 |
|
#ifndef PSIZWARN |
18 |
< |
#ifdef BIGMEM |
21 |
< |
#define PSIZWARN 5000000 |
22 |
< |
#else |
18 |
> |
#ifdef SMLMEM |
19 |
|
#define PSIZWARN 1500000 |
20 |
+ |
#else |
21 |
+ |
#define PSIZWARN 5000000 |
22 |
|
#endif |
23 |
|
#endif |
24 |
|
|
65 |
|
* 0 0 ni p0i p1i .. pni |
66 |
|
*/ |
67 |
|
|
68 |
< |
if ((dfname = getpath(dname, getlibpath(), R_OK)) == NULL) { |
68 |
> |
if ((dfname = getpath(dname, getrlibpath(), R_OK)) == NULL) { |
69 |
|
sprintf(errmsg, "cannot find data file \"%s\"", dname); |
70 |
|
error(USER, errmsg); |
71 |
|
} |
160 |
|
COLR *scanin; |
161 |
|
int sl, ns; |
162 |
|
RESOLU inpres; |
163 |
< |
FLOAT loc[2]; |
163 |
> |
RREAL loc[2]; |
164 |
|
int y; |
165 |
|
register int x, i; |
166 |
|
register DATARRAY *pp; |
169 |
|
if (!strcmp(pname, pp->name)) |
170 |
|
return(pp); /* found! */ |
171 |
|
|
172 |
< |
if ((pfname = getpath(pname, getlibpath(), R_OK)) == NULL) { |
172 |
> |
if ((pfname = getpath(pname, getrlibpath(), R_OK)) == NULL) { |
173 |
|
sprintf(errmsg, "cannot find picture file \"%s\"", pname); |
174 |
|
error(USER, errmsg); |
175 |
|
} |
182 |
|
sprintf(errmsg, "cannot open picture file \"%s\"", pfname); |
183 |
|
error(SYSTEM, errmsg); |
184 |
|
} |
185 |
< |
#ifdef MSDOS |
188 |
< |
setmode(fileno(fp), O_BINARY); |
189 |
< |
#endif |
185 |
> |
SET_FILE_BINARY(fp); |
186 |
|
/* get dimensions */ |
187 |
|
inpaspect = 1.0; |
188 |
|
getheader(fp, headaspect, (char *)&inpaspect); |