#! /bin/sh
# Shell file to convert various formats to MIF
# $Id: MifRead,v 1.9 1993/02/17 00:50:24 adl Exp $
#
# Edit as needed to execute other filters; 
# The cases below should match the contents of file fminit/suffixlist 
#
# Inputs are:
# $1 = input file to be filtered (full path, example: /usr/drf/foo.bar )
# $2 = output file from filter   (full path, example: /usr/drf/foo.tmp )
# $3 = input file's path         (           example: /usr/drf         )
# $4 = fminit directory
# $5 = bin directory
# $6 = user interface language
#
# See what the file type is, and run the appropriate program
case $1 in
	*.is1) $5/is1tomif <$1 >$2;;
	*.rm8) $5/rm8tomif <$1 >$2;;
	*.mml|*.framemml) $5/mmltomif -L$6 -I$3 -I~ -I$4 <$1 >$2;;
	*#D13)
		# This is a fake suffix for Maker's use.
		dr=`echo "$1" | sed 's/#D13$//'`
		$5/1.3binarytomif "$dr" "$2"
		;;
	*.m) $5/trofftomif   <$1 >$2;;
	*.man) $5/trofftomif -man <$1 >$2;;
# These are commented out for the convenience of typical users.
# Uncomment and add corresponding entries to fminit/suffixlist
# to have the trofftomif filter run over man file sources.
#	*.1) $5/trofftomif -man <$1 >$2;;
#	*.2) $5/trofftomif -man <$1 >$2;;
#	*.3) $5/trofftomif -man <$1 >$2;;
#	*.4) $5/trofftomif -man <$1 >$2;;
#	*.5) $5/trofftomif -man <$1 >$2;;
#	*.6) $5/trofftomif -man <$1 >$2;;
#	*.7) $5/trofftomif -man <$1 >$2;;
#	*.8) $5/trofftomif -man <$1 >$2;;
	*.me) $5/trofftomif -me <$1 >$2;;
	*.ms) $5/trofftomif -ms <$1 >$2;;
	*.dca) $5/dcatomif   <$1 >$2;;
	*.rft) $5/dcatomif   <$1 >$2;;
	*.iaf) $5/iaftomif   <$1 >$2;;
	*.wp) $5/wptomif   <$1 >$2;;
	*.cgm) $5/cgmtomif   <$1 >$2;;
	*.w3) $5/wordtomif   <$1 >$2;;
	*.w4) $5/wordtomif   <$1 >$2;;
	*.msw) $5/wordtomif   <$1 >$2;;
	*.pct) $5/picttomif   <$1 >$2;;
esac
