#!/bin/sh
# This script was created by make-mred-launcher

if [ "$PLTHOME" = '' ] ; then
  PLTHOME=/usr/local/drscheme
  export PLTHOME
fi

SYS=`${PLTHOME}/bin/archsys`

# Find X flags and shift them to the front
findxend()
{
 oneargflag=''
 case "$1" in
  -display)
     oneargflag="$1"
     xa="$2"
   ;;
  -geometry)
     oneargflag="$1"
     xb="$2"
   ;;
  -bg | -background)
     oneargflag="$1"
     xc="$2"
   ;;
  -fg | -foregound)
     oneargflag="$1"
     xd="$2"
   ;;
  -font)
     oneargflag="$1"
     xe="$2"
   ;;
  -name)
     oneargflag="$1"
     xf="$2"
   ;;
  -selectionTimeout)
     oneargflag="$1"
     xg="$2"
   ;;
  -title)
     oneargflag="$1"
     xh="$2"
   ;;
  -xnllanguage)
     oneargflag="$1"
     xi="$2"
   ;;
  -xrm)
     oneargflag="$1"
     xj="$2"
   ;;
  -iconic)
    xk=yes
  ;;
  -rv | -reverse)
    xl=yes
  ;;
  +rv)
    xm=yes
  ;;
  -synchronous)
    xn=yes
  ;;
  *)
    exec ${PLTHOME}/.bin/${SYS}/mred  ${xa+"-display"} ${xa+"$xa"} ${xb+"-geometry"} ${xb+"$xb"} ${xc+"-bg"} ${xc+"$xc"} ${xd+"-fg"} ${xd+"$xd"} ${xe+"-font"} ${xe+"$xe"} ${xf+"-name"} ${xf+"$xf"} ${xg+"-selectionTimeout"} ${xg+"$xg"} ${xh+"-title"} ${xh+"$xh"} ${xi+"-xnllanguage"} ${xi+"$xi"} ${xj+"-xrm"} ${xj+"$xj"} ${xk+"-iconic"} ${xl+"-rv"} ${xm+"+rv"} ${xn+"-synchronous"} '-mqvL' 'drscheme.ss' 'drscheme' '--'  ${1+"$@"}
  ;;
 esac
 shift
 if [ "$oneargflag" != '' ] ; then
   if [ "${1+n}" != 'n' ] ; then echo $0: missing argument for standard X flag $oneargflag ; exit 1 ; fi
   shift
 fi
 findxend ${1+"$@"}
}
findxend ${1+"$@"}
