:   bm# 0000001115
:   typ S
:   ver generic
:   mod generic
:  
#     SCCSID(@(#)mmt.sh	1.1);


:
#
#	@(#) mmt.sh 1.1 84/10/08 
#
#	Copyright (C) Microsoft Corporation, 1983
#
#	This Module contains Proprietary Information of Microsoft
#	Corporation and AT&T, and should be treated as Confidential.
#
###	mmt - typeset documents 
#
#	mmt [ options ] [ files ]
#
#	MODIFICATION HISTORY
#	M000	28 Sep 83	barrys
#	Upgrade to 3.0
#	Removed references to mvt (view graphs and slides).
#	Also removed the options to direct output to the MH STARE
#	facility, and to Versatec printers and Tektronix terminals.
#
#	MMTSID (@(#)mmt.sh	1.9)
u=-cm;

# M000
###if test `basename $0` = "mvt";	then u=-mv;	fi

if test $# = 0 ; then
	echo "Usage: mmt [options] files" 
	exit 1
fi

PATH=/bin:/usr/bin:/usr/lbin;	O="";		o="";	y=""
#			'If C/A/T connected to PDP-11, use O=""; o=""'
#			'If GCOS use O="-g"; o="|gcat -ph"'
while test -n "$1" -a ! -r "$1"
do case $1 in
	-a)		O="-a";		o="" ;;
# M000
###	-Tst|-Ts)	O="-g";		o="|gcat -st" ;;
###	-T4014|-Ttek)	O="-t";		o="|tc";	y="-rX1" ;;
###	-Tvp)	O="-t";	o="|vpr -t";	y="-rX1" ;;
	-e)		e=eqn ;;
	-t)		f=tbl ;;
	-y)		if test "$u" = "-cm";	then u=-mm;	fi ;;
	-)		break ;;
	*)		a="$a $1" ;;
   esac
   shift
done
if test -z "$1";	then echo "$0: no input file";	exit 1;	fi
if test "$O" = "-g";	then x="-f$1";	fi
d="$*"
if test "$d" = "-";	then shift;	x="";	d="";	fi
if test -n "$f";	then f="tbl $*|";	d="";	fi
if test -n "$e"
	then	if test -n "$f"
			then e="eqn|"
			else e="eqn $*|";	d=""
		fi
fi
if test "$u" = "-mm" -o "$u" = "-cm" ;	then y="";	fi
eval $f $e troff $y $O $u $a $d $o $x; exit 0
