[1584] in testers
olh dumps core
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Sat Jul 27 19:17:26 1991
To: testers@ATHENA.MIT.EDU
Date: Sat, 27 Jul 91 19:17:32 EDT
From: John Carr <jfc@ATHENA.MIT.EDU>
RT 7.3:
/u2/users/jfc > olh
X Toolkit Warning:
Name: menubar
Class: MuMenu
Attempt to add wrong type child to a homogeneous RowColumn widget
Segmentation violation (core dumped)
----------------------------------------------------
Unmatched ".
Exit 1 olh
1.4u 3.3s 0:17 27% 46+37k 85+301io 61pf+0w
/u2/users/jfc > where olh
/usr/athena/bin/olh
Here is a rewritten olh script. Changes:
use /bin/sh
don't get a syntax error when the program exits abnormally
print different error messages for different errors
The script exits with status 1 if the help program could not be found, 2
if it exited with an error.
#!/bin/sh
# This script selects an appropriate version of the On-Line Help
# system to run, depending on the user's display type and machine
# type.
case $DISPLAY in
"")
style=ascii
;;
*)
style=motif
;;
esac
args=
for i in $* ; do
case $i in
-n* | -a* | -t*)
style=ascii
;;
-x* | -m* )
style=motif
;;
*)
args="$args $i"
;;
esac
done
case $style in
motif)
case `/bin/athena/machtype -c` in
MVAX-II | VAXSTAR)
args="${args} -xrm Olh.useViewers:False"
;;
esac
;;
esac
olh_program=/usr/athena/bin/olh_${style}
if [ -f ${olh_program} ]; then
/bin/athena/attach -q -n logos
$olh_program $args $xargs && exit 0
case $style in
motif)
cat 1>&2 << EOF
----------------------------------------------------
Program ${olh_program} exited with an error.
Please type help -tty to use the text version of On-Line Help.
EOF
;;
ascii)
cat 1>&2 << EOF
----------------------------------------------------
Program ${olh_program} exited with an error.
Please call 3-4435 if you need help.
EOF
;;
esac
exit 2
fi
cat 2>&1 << EOF
----------------------------------------------------
Could not find help program "${olh_program}".
To use the text-based version of On-Line Help, type help -tty.
If help -tty fails, call 3-4435 for help.
EOF
exit 1