9 |
|
|
10 |
|
#include "copyright.h" |
11 |
|
|
12 |
< |
#include "ray.h" |
12 |
> |
#include <ctype.h> |
13 |
> |
#include <string.h> |
14 |
|
|
15 |
+ |
#include "platform.h" |
16 |
+ |
#include "ray.h" |
17 |
|
#include "otypes.h" |
15 |
– |
|
18 |
|
#include "rpaint.h" |
19 |
|
|
18 |
– |
#include <ctype.h> |
19 |
– |
|
20 |
|
extern int psample; /* pixel sample size */ |
21 |
|
extern double maxdiff; /* max. sample difference */ |
22 |
|
|
464 |
|
(*dev->comout)(buf); |
465 |
|
(*dev->comin)(buf, NULL); |
466 |
|
if (buf[0] == '\0' || |
467 |
< |
index("yY+1tTnN-0fF", buf[0]) == NULL) |
467 |
> |
strchr("yY+1tTnN-0fF", buf[0]) == NULL) |
468 |
|
return(0); |
469 |
|
} |
470 |
< |
ptr->i = index("yY+1tT", buf[0]) != NULL; |
470 |
> |
ptr->i = strchr("yY+1tT", buf[0]) != NULL; |
471 |
|
return(1); |
472 |
|
case 'C': /* color */ |
473 |
|
if (sscanf(str, "%lf %lf %lf", &d0, &d1, &d2) != 3) { |
754 |
|
error(COMMAND, errmsg); |
755 |
|
return; |
756 |
|
} |
757 |
< |
#ifdef MSDOS |
758 |
< |
setmode(fileno(fp), O_BINARY); |
759 |
< |
#endif |
757 |
> |
SET_FILE_BINARY(fp); |
758 |
|
(*dev->comout)("writing \""); |
759 |
|
(*dev->comout)(fname); |
760 |
|
(*dev->comout)("\"...\n"); |