9 |
|
|
10 |
|
#include "copyright.h" |
11 |
|
|
12 |
+ |
#include <string.h> |
13 |
+ |
|
14 |
|
#include "platform.h" |
15 |
|
#include "ray.h" |
16 |
|
#include "otypes.h" |
165 |
|
(flen - pos)/AMBVALSIZ); |
166 |
|
error(WARNING, errmsg); |
167 |
|
fseek(ambfp, pos, 0); |
168 |
+ |
#ifndef _WIN32 /* XXX we need a replacement for that one */ |
169 |
|
ftruncate(fileno(ambfp), (off_t)pos); |
170 |
+ |
#endif |
171 |
|
} |
172 |
|
} else if ((ambfp = fopen(ambfile, "w+")) != NULL) { |
173 |
|
initambfile(1); /* else create new file */ |
564 |
|
} |
565 |
|
atp = atfreelist; |
566 |
|
atfreelist = atp->kid; |
567 |
< |
bzero((char *)atp, 8*sizeof(AMBTREE)); |
567 |
> |
memset((char *)atp, '\0', 8*sizeof(AMBTREE)); |
568 |
|
return(atp); |
569 |
|
} |
570 |
|
|