| 11 |
|
#include <time.h> |
| 12 |
|
|
| 13 |
|
#include "platform.h" |
| 14 |
< |
#include "rtprocess.h" |
| 14 |
> |
#include "paths.h" |
| 15 |
|
#include "standard.h" |
| 16 |
|
#include "octree.h" |
| 17 |
|
#include "object.h" |
| 18 |
|
#include "otypes.h" |
| 19 |
|
#include "resolu.h" |
| 20 |
|
|
| 21 |
– |
#ifdef getc_unlocked /* avoid horrendous overhead of flockfile */ |
| 22 |
– |
#undef getc |
| 23 |
– |
#define getc getc_unlocked |
| 24 |
– |
#endif |
| 25 |
– |
|
| 21 |
|
static double ogetflt(void); |
| 22 |
|
static long ogetint(int); |
| 23 |
|
static char *ogetstr(char *); |
| 63 |
|
error(SYSTEM, errmsg); |
| 64 |
|
} |
| 65 |
|
} |
| 66 |
+ |
#ifdef getc_unlocked /* avoid stupid semaphores */ |
| 67 |
+ |
flockfile(infp); |
| 68 |
+ |
#endif |
| 69 |
|
SET_FILE_BINARY(infp); |
| 70 |
|
/* get header */ |
| 71 |
|
if (checkheader(infp, OCTFMT, load&IO_INFO ? stdout : (FILE *)NULL) < 0) |
| 121 |
|
/* close the input */ |
| 122 |
|
if (infn[0] == '!') |
| 123 |
|
pclose(infp); |
| 124 |
< |
else |
| 124 |
> |
else if (infp != stdin) |
| 125 |
|
fclose(infp); |
| 126 |
+ |
#ifdef getc_unlocked |
| 127 |
+ |
else |
| 128 |
+ |
funlockfile(infp); |
| 129 |
+ |
#endif |
| 130 |
|
return(nf); |
| 131 |
|
} |
| 132 |
|
|
| 227 |
|
return(0); |
| 228 |
|
} |
| 229 |
|
objset(set, ot); |
| 230 |
< |
for (i = set[0]; i-- > 0; ) |
| 230 |
> |
for (i = set[0]; i > 0; i-- ) |
| 231 |
|
if (ismodifier(objptr(set[i])->otype)) |
| 232 |
|
return(1); |
| 233 |
|
return(0); |