--- ray/src/util/fieldcomb.csh 2005/09/05 16:13:08 2.5 +++ ray/src/util/fieldcomb.csh 2005/09/06 15:34:46 2.6 @@ -1,5 +1,5 @@ #!/bin/csh -f -# RCSid $Id: fieldcomb.csh,v 2.5 2005/09/05 16:13:08 greg Exp $ +# RCSid $Id: fieldcomb.csh,v 2.6 2005/09/06 15:34:46 greg Exp $ # # Combine alternate lines in full frames for field rendering # @@ -34,10 +34,14 @@ while ($#argv > 1) endsw shift argv end -if ($#argv < 2 || ($?outfile && $#argv > 2)) then +if ($#argv < 2) then echo "Usage: $0 [-e|-o][-r] [-f combined.pic] field1.pic field2.pic .." exit 1 endif +if ($?outfile && $#argv > 2) then + echo "Cannot use -f option with more than two input files" + exit 1 +endif set f1=$argv[1]:q set ext=$f1:e set basenm="`echo $f1:q | sed 's/[0-9]*\.'$ext'//'`" @@ -61,7 +65,9 @@ while ($curfi < $#fields) set fid=$curfr endif set outf="${basenm}C$fid.$ext" - if ($?outfile) set outf=$outfile:q + if ($?outfile) then + set outf=$outfile:q + endif pcomb -e 'ro=ri(fld); go=gi(fld); bo=bi(fld)' \ -e 'yd=yres-1-y; odd=.5*yd-floor(.5*yd)-.25' \ -e "fld=if(odd,2-$odd_first,1+$odd_first)" \