21 |
|
#endif |
22 |
|
#endif |
23 |
|
|
24 |
< |
extern time_t time(); |
25 |
< |
|
24 |
> |
#include <time.h> |
25 |
|
#include <signal.h> |
26 |
|
|
27 |
+ |
#include "platform.h" |
28 |
|
#include "view.h" |
29 |
– |
|
29 |
|
#include "random.h" |
31 |
– |
|
30 |
|
#include "paths.h" |
31 |
|
|
32 |
+ |
|
33 |
|
#define RFTEMPLATE "rfXXXXXX" |
34 |
|
|
35 |
|
#ifndef SIGCONT |
107 |
|
|
108 |
|
static VIEW lastview; /* the previous view input */ |
109 |
|
|
110 |
< |
extern char *mktemp(); |
110 |
> |
extern char *mktemp(); /* XXX should be in stdlib.h or unistd.h */ |
111 |
|
|
112 |
|
void report(); |
113 |
|
|
288 |
|
"cannot open output file \"%s\"", fbuf); |
289 |
|
error(SYSTEM, errmsg); |
290 |
|
} |
291 |
< |
#ifdef MSDOS |
293 |
< |
setmode(fileno(stdout), O_BINARY); |
294 |
< |
#endif |
291 |
> |
SET_FILE_BINARY(stdout); |
292 |
|
dupheader(); |
293 |
|
} |
294 |
|
hres = hresolu; vres = vresolu; pa = pixaspect; |
390 |
|
sprintf(errmsg, "cannot open z-file \"%s\"", zfile); |
391 |
|
error(SYSTEM, errmsg); |
392 |
|
} |
393 |
< |
#ifdef MSDOS |
397 |
< |
setmode(zfd, O_BINARY); |
398 |
< |
#endif |
393 |
> |
SET_FD_BINARY(zfd); |
394 |
|
for (i = 0; i <= psample; i++) { |
395 |
|
zbar[i] = (float *)malloc(hres*sizeof(float)); |
396 |
|
if (zbar[i] == NULL) |
672 |
|
error(WARNING, errmsg); |
673 |
|
goto gotzip; |
674 |
|
} |
675 |
< |
#ifdef MSDOS |
681 |
< |
setmode(fileno(fp), O_BINARY); |
682 |
< |
#endif |
675 |
> |
SET_FILE_BINARY(fp); |
676 |
|
/* discard header */ |
677 |
|
getheader(fp, NULL, NULL); |
678 |
|
/* get picture size */ |