#       Copyright (c) 1987 AT&T   
#       All Rights Reserved       

#       THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T   
#       The copyright notice above does not evidence any     
#       actual or intended publication of such source code.  

# @(#)dmdmemory.sh	1.1.1.3	(6/2/87)

USAGE="Usage: dmdmemory [-c]\n"
cval=""

#
# Layers environment
#
if ismpx -
then

#
# SVR2: use getopt(1)
# SVR3: use getopts(1)
#

#   if [ # getopts exists ]
#   then
#	while getopts c c
#	do
#		case $c in
#		c) cval="-c";;
#		\?) echo $USAGE; exit 2;;
#		esac
#	done
#		 
#   else

	set -- `getopt c $*`
	if [ $? != 0 ]
	then
		echo $USAGE
		exit 2
   	fi
   
   	while [ true ]
	do
		case "$1" in
		-c) cval=$1; shift;;
		--) shift; break;;
		esac
   	done

#   fi

    dmdld $DMD/lib/dmdmemory.m ${cval}

#
# Non-layers environment: not supported
#

else
   echo "dmdmemory only runs under layers"
   exit 1
fi
