#!/bin/csh
#
# visera.csh  Feb. 19, 1996, Arden House
# 

if ($#argv != 6) then
    echo "Usage: $0 Pgm WindowSize FrameTolerance NormalizeAC CtlFile ERAext"
    exit
endif

set tkdir = `basename $5 .era`
if (! -e $tkdir) mkdir $tkdir

limit coredumpsize 0

set logfile = $tkdir.log
rm $logfile

#echo $1 $2 $3 $4 $5 $6

set PGM = $1

foreach file (`cat $5`)
#	echo $file
	set basefile = `basename $file $6`
#	echo $basefile
	set basefile = `basename $basefile .` 
#	echo $basefile
	rm $tkdir/$basefile.tk
	$PGM $file $2 $3 $4 $tkdir 1000 >>& $logfile
	cat printeraP.tk $tkdir/$basefile.tk > foo.tk
	chmod u+x foo.tk
	./foo.tk
end












