which=
case $1 in
-n) which=n; S_FUNCTIONS=$SHOME/ns; export S_FUNCTIONS; shift;;
-o) which=o; S_FUNCTIONS=$SHOME/os; export S_FUNCTIONS; shift;;
esac
S_DICTIONARY=${S_DICTIONARY-$SHOME/s/s.dictionary} export S_DICTIONARY
if test -s local.Sqpe
then
	find $SHOME/cmd/Sqpe -newer local.Sqpe \
		-exec echo "Warning: local S is out of date: you should run S LOAD" \;
	pgm=./local.Sqpe
else

	pgm=$SHOME/cmd/${which}Sqpe;
fi

while true; do
	trap "true" 1 2
	if $pgm
	then if test -s .Restart
		 then true
		 else exit 0
		 fi
	else exit 1
	fi
done
