6 |
|
*/ |
7 |
|
|
8 |
|
#include "copyright.h" |
9 |
+ |
#include "platform.h" |
10 |
|
#include "standard.h" |
11 |
|
#include "cvmesh.h" |
12 |
|
#include "otypes.h" |
58 |
|
error(USER, errmsg); |
59 |
|
break; |
60 |
|
} |
61 |
+ |
|
62 |
+ |
if (i < argc-2) |
63 |
+ |
error(USER, "too many file arguments"); |
64 |
|
/* initialize mesh */ |
65 |
|
cvinit(i==argc-2 ? argv[i+1] : "<stdout>"); |
66 |
|
/* load material input */ |
77 |
|
if (i == argc-2) /* open output file */ |
78 |
|
if (freopen(argv[i+1], "w", stdout) == NULL) |
79 |
|
error(SYSTEM, "cannot open output file"); |
80 |
< |
#ifdef MSDOS |
77 |
< |
setmode(fileno(stdout), O_BINARY); |
78 |
< |
#endif |
80 |
> |
SET_FILE_BINARY(stdout); |
81 |
|
newheader("RADIANCE", stdout); /* new binary file header */ |
82 |
|
printargs(i<argc ? i+1 : argc, argv, stdout); |
83 |
|
fputformat(MESHFMT, stdout); |
99 |
|
|
100 |
|
writemesh(ourmesh, stdout); /* write mesh to output */ |
101 |
|
|
102 |
< |
printmeshstats(ourmesh, stderr); |
102 |
> |
/* printmeshstats(ourmesh, stderr); */ |
103 |
|
|
104 |
|
quit(0); |
105 |
|
} |