9 |
|
my $windoz = ($^O eq "MSWin32" or $^O eq "MSWin64"); |
10 |
|
use File::Temp qw/ :mktemp /; |
11 |
|
sub userror { |
12 |
< |
print STDERR "Usage: genBSDF [-n Nproc][-c Nsamp][-W][-t{3|4} Nlog2][-r \"ropts\"][-f \"x=string;y=string\"][-dim xmin xmax ymin ymax zmin zmax][{+|-}C][{+|-}f][{+|-}b][{+|-}mgf][{+|-}geom units] [input ..]\n"; |
12 |
> |
print STDERR "Usage: genBSDF [-n Nproc][-c Nsamp][-W][-t{3|4} Nlog2][-r \"ropts\"][-s \"x=string;y=string\"][-dim xmin xmax ymin ymax zmin zmax][{+|-}C][{+|-}f][{+|-}b][{+|-}mgf][{+|-}geom units] [input ..]\n"; |
13 |
|
exit 1; |
14 |
|
} |
15 |
|
my ($td,$radscn,$mgfscn,$octree,$fsender,$bsender,$receivers,$facedat,$behinddat,$rmtmp); |
222 |
|
do_matrix_bsdf(); |
223 |
|
} |
224 |
|
# Output XML |
225 |
– |
my $old_fh = select(STDOUT); |
226 |
– |
$| = 1; |
227 |
– |
select($old_fh); |
228 |
– |
print "<!-- Created by: genBSDF @savedARGV -->\n"; |
225 |
|
# print STDERR "Running: $wrapper\n"; |
226 |
< |
system $wrapper; |
226 |
> |
system "$wrapper -C 'Created by: genBSDF @savedARGV'"; |
227 |
|
die "Could not wrap BSDF data\n" if ( $? ); |
228 |
|
# Clean up temporary files and exit |
229 |
|
exec $rmtmp; |
460 |
|
$cmd .= " $src | rcollate -ho -oc 145"; |
461 |
|
# print STDERR "Running: $cmd\n"; |
462 |
|
system "$cmd > $dest"; |
463 |
< |
die "Failure running rttree_reduce" if ( $? ); |
463 |
> |
die "Failure running rmtxop" if ( $? ); |
464 |
|
if ( "$spec" ne "$curspec" ) { |
465 |
|
$wrapper .= " -s $spec"; |
466 |
|
$curspec = $spec; |