1 # generates the case statement in invoke_pf.F
2 # Usage: generate_invoke.csh n
4 # where n is the number of cases to generate.
8 /bin/rm -f /tmp/foo1.$$
14 echo "," >> /tmp/foo1.$$
21 sed "$ii,${n}s/.*,/&A($i),/" /tmp/foo1.$$ > /tmp/foo2.$$
22 /bin/mv /tmp/foo2.$$ /tmp/foo1.$$
26 cat -n /tmp/foo1.$$ | \
27 sed -e 's/^/case/' -e 's/ / : /' -e 's/,/(*f)(/' -e 's/,$/); break ;/' \
30 echo 'case 0 : (*f)() ; break ;'
36 /bin/rm -f /tmp/foo[12].$$