#!/bin/sh
set -x
case $# in
1)	/usr/local/lib/clean/fcl_compiler $1.fcl
	/usr/local/lib/clean/cocl -sl $1.icl -o $1.abc
	egrep -v "^[ 	]*.((depend[ 	]*)|(implab|impdesc)[ 	]*[a-zA-Z0-9_]*%%)" < $1.abc |
		sed -e 's/^[ 	]*|||//' |
		sed -e 's/^\([ 	]*.comp[ 	]*[0-9]*[ 	]*[01][01][01][01][01][01][01][01]\)0/\11/' > $1.tmp
	rm -f $1.icl $1.abc $1ins.abc $1ins.dcl $1.s
	mv $1.tmp $1.abc ;;
*)	echo Usage: `basename $0` '<file>' '(<file>.fcl should exist)'
esac
