#! /bin/csh -f # Last edited on 2001-01-03 23:55:17 by stolfi set usage = "$0 [ -a | -f ] [ -scores ] GRAPH PROG" # displays the ".eps" output files for the "Programmed" # drawing of the given graph. set scores = 0 set mode = "x" while ( ( $#argv >= 1 ) && ( "/$1" =~ /-* ) ) if ( ( $#argv >= 1 ) && ( "/$1" == "/-scores" ) ) then set scores = 1; shift; else if ( ( $#argv >= 1 ) && ( "/$1" == "/-a" ) ) then set mode = "a"; shift else if ( ( $#argv >= 1 ) && ( "/$1" == "/-f" ) ) then set mode = "f"; shift else echo "usage: ${usage}"; exit 1 endif end if ( $#argv != 2 ) then echo "usage = ${usage}"; exit 1 endif if ( $mode == "x" ) then echo "must specify -a or -f"; echo "usage = ${usage}"; exit 1 endif set graph = "$1"; shift; set prog = "$1"; shift; if ( $#argv != 0 ) then echo "usage: ${usage}"; exit 1 endif set odir = "out/${graph}-${prog}-${mode}" cd ${odir} foreach f ( best.eps final.eps [0-9]*.eps ) if ( -r ${f} ) then echo $f printf '--------------------------------\n' cat ${f:r}.his printf '--------------------------------\n' ghostview $f else echo "${f} not found" endif end if ( $scores ) then foreach f ( score-?.eps ) echo $f ghostview $f end endif