8 |
|
#include "copyright.h" |
9 |
|
|
10 |
|
#include "standard.h" |
11 |
– |
|
11 |
|
#include "color.h" |
13 |
– |
|
12 |
|
#include "resolu.h" |
15 |
– |
|
13 |
|
#include "data.h" |
14 |
|
|
15 |
|
/* picture memory usage before warning */ |
16 |
|
#ifndef PSIZWARN |
17 |
< |
#ifdef BIGMEM |
21 |
< |
#define PSIZWARN 5000000 |
22 |
< |
#else |
17 |
> |
#ifdef SMLMEM |
18 |
|
#define PSIZWARN 1500000 |
19 |
+ |
#else |
20 |
+ |
#define PSIZWARN 5000000 |
21 |
|
#endif |
22 |
|
#endif |
23 |
|
|
64 |
|
* 0 0 ni p0i p1i .. pni |
65 |
|
*/ |
66 |
|
|
67 |
< |
if ((dfname = getpath(dname, getlibpath(), R_OK)) == NULL) { |
67 |
> |
if ((dfname = getpath(dname, getrlibpath(), R_OK)) == NULL) { |
68 |
|
sprintf(errmsg, "cannot find data file \"%s\"", dname); |
69 |
|
error(USER, errmsg); |
70 |
|
} |
168 |
|
if (!strcmp(pname, pp->name)) |
169 |
|
return(pp); /* found! */ |
170 |
|
|
171 |
< |
if ((pfname = getpath(pname, getlibpath(), R_OK)) == NULL) { |
171 |
> |
if ((pfname = getpath(pname, getrlibpath(), R_OK)) == NULL) { |
172 |
|
sprintf(errmsg, "cannot find picture file \"%s\"", pname); |
173 |
|
error(USER, errmsg); |
174 |
|
} |
181 |
|
sprintf(errmsg, "cannot open picture file \"%s\"", pfname); |
182 |
|
error(SYSTEM, errmsg); |
183 |
|
} |
184 |
< |
#ifdef MSDOS |
188 |
< |
setmode(fileno(fp), O_BINARY); |
189 |
< |
#endif |
184 |
> |
SET_FILE_BINARY(fp); |
185 |
|
/* get dimensions */ |
186 |
|
inpaspect = 1.0; |
187 |
|
getheader(fp, headaspect, (char *)&inpaspect); |