From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] Fax problem From: Richard Miller MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: Date: Sat, 2 Jun 2001 14:57:59 +0100 Topicbox-Message-UUID: adef9a64-eac9-11e9-9e20-41e7f4b1d025 If we're going to fix fax, we might as well also handle the general case of faxing multiple files of different type. How about replacing the switch(`{file $infiles(1)}) statement -- which only checks the type of the first file -- with something like this: # convert to g3 g3files=() ntmp=1 for (infile in $infiles) { otmp=$tmp.$ntmp ntmp=`{echo $ntmp+1 | hoc} switch(`{file <$infile}){ case *g3* *fax* g3files=($g3files $infile) case postscript gs -dSAFER '-sDEVICE=dfaxlow' '-sOUTPUTFILE='$otmp.'.%03d' -dNOPAUSE -d QUIET $infile quit.ps g3files=($g3files $otmp.*) case * lp -dstdout $infile > $tmpps gs -dSAFER '-sDEVICE=dfaxlow' '-sOUTPUTFILE='$otmp'.%03d' -dNOPAUSE -dQUIET $tmpps quit.ps g3files=($g3files $otmp.*) } } -- Richard