--- a/lib/scripts/isa-xterm Fri Feb 14 15:16:21 1997 +0100
+++ b/lib/scripts/isa-xterm Fri Feb 14 15:29:20 1997 +0100
@@ -4,9 +4,29 @@
#
# Isabelle within an xterm.
+# FIXME startup prefix (ISABELLE_COMMAND_LINE !?)
## diagnostics
+PRG=$(basename $0)
+
+function usage()
+{
+ echo
+ echo "Usage: $PRG [OPTIONS] [--] [CMDLINE]"
+ echo
+ echo " Options are:"
+ echo " -g GEOM main window geometry (default 80x60)"
+ echo " -s BOOL symbolic font output? (default true)"
+#FIXME
+# echo " -r BOOL actually run isabelle? (default true)"
+ echo
+ echo " Starts Isabelle within an xterm window. CMDLINE is passed"
+ echo " directly to the isabelle session."
+ echo
+ exit 1
+}
+
function fail()
{
echo "$1" >&2
@@ -14,26 +34,81 @@
}
+## process command line
+
+# options
+
+MAINGEOM="80x60"
+SYMBOLS="true"
+RUN="true"
+
+while getopts "g:r:s:" OPT
+do
+ case "$OPT" in
+ g)
+ MAINGEOM="$OPTARG"
+ ;;
+ r)
+ RUN="$OPTARG"
+ ;;
+ s)
+ SYMBOLS="$OPTARG"
+ ;;
+ \?)
+ usage
+ ;;
+ esac
+done
+
+shift $(($OPTIND - 1))
+
+
## main
-if [ -z "$ISABELLE_SYMBOLS" -o "$ISABELLE_SYMBOLS" = false ]; then
- exec xterm -T Isabelle -n Isabelle $ISABELLE_INTERFACE_OPTIONS \
- -e $ISABELLE "$@"
+if [ -z "$RUN" -o "$RUN" = false ]; then
+ RUN=""
+else
+ RUN=true
+fi
+
+if [ -z "$SYMBOLS" -o "$SYMBOLS" = false ]; then
+ if [ -z "$RUN" ]; then
+ exec xterm -T Isabelle -n Isabelle -geometry "$MAINGEOM"
+ else
+ exec xterm -T Isabelle -n Isabelle -geometry "$MAINGEOM" -e $ISABELLE "$@"
+ fi
else
$ISATOOL installfonts
- exec xterm -T Isabelle -n Isabelle $ISABELLE_INTERFACE_OPTIONS -fn isacr14 \
- -xrm "*fontMenu.Label: Isabelle fonts" \
- -xrm "*fontMenu*font1*Label: Large" \
- -xrm "*VT100*font1: isacb24" \
- -xrm "*fontMenu*font2*Label:" \
- -xrm "*VT100*font2:" \
- -xrm "*fontMenu*font3*Label:" \
- -xrm "*VT100*font3:" \
- -xrm "*fontMenu*font4*Label:" \
- -xrm "*VT100*font4:" \
- -xrm "*fontMenu*font5*Label:" \
- -xrm "*VT100*font5:" \
- -xrm "*fontMenu*font6*Label:" \
- -xrm "*VT100*font6:" \
- -e $ISABELLE -e 'print_mode:=["symbols"];' "$@"
+ if [ -z "$RUN" ]; then
+ exec xterm -T Isabelle -n Isabelle -geometry "$MAINGEOM" -fn isacr14 \
+ -xrm "*fontMenu.Label: Isabelle fonts" \
+ -xrm "*fontMenu*font1*Label: Large" \
+ -xrm "*VT100*font1: isacb24" \
+ -xrm "*fontMenu*font2*Label:" \
+ -xrm "*VT100*font2:" \
+ -xrm "*fontMenu*font3*Label:" \
+ -xrm "*VT100*font3:" \
+ -xrm "*fontMenu*font4*Label:" \
+ -xrm "*VT100*font4:" \
+ -xrm "*fontMenu*font5*Label:" \
+ -xrm "*VT100*font5:" \
+ -xrm "*fontMenu*font6*Label:" \
+ -xrm "*VT100*font6:"
+ else
+ exec xterm -T Isabelle -n Isabelle -geometry "$MAINGEOM" -fn isacr14 \
+ -xrm "*fontMenu.Label: Isabelle fonts" \
+ -xrm "*fontMenu*font1*Label: Large" \
+ -xrm "*VT100*font1: isacb24" \
+ -xrm "*fontMenu*font2*Label:" \
+ -xrm "*VT100*font2:" \
+ -xrm "*fontMenu*font3*Label:" \
+ -xrm "*VT100*font3:" \
+ -xrm "*fontMenu*font4*Label:" \
+ -xrm "*VT100*font4:" \
+ -xrm "*fontMenu*font5*Label:" \
+ -xrm "*VT100*font5:" \
+ -xrm "*fontMenu*font6*Label:" \
+ -xrm "*VT100*font6:" \
+ -e $ISABELLE -e 'print_mode:=["symbols"];' "$@"
+ fi
fi