ACC SHELL
Path : /usr/bin/ |
|
Current File : //usr/bin/shownonascii |
#!/bin/sh
# Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
#
# Permission to use, copy, modify, and distribute this material
# for any purpose and without fee is hereby granted, provided
# that the above copyright notice and this permission notice
# appear in all copies, and that the name of Bellcore not be
# used in advertising or publicity pertaining to this
# material without the specific, prior written permission
# of an authorized representative of Bellcore. BELLCORE
# MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
# OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS",
# WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
# Conversion from C shell to Bourne shell by Z-Code Software Corp.
# Conversion Copyright (c) 1992 Z-Code Software Corp.
# Permission to use, copy, modify, and distribute this material
# for any purpose and without fee is hereby granted, provided
# that the above copyright notice and this permission notice
# appear in all copies, and that the name of Z-Code Software not
# be used in advertising or publicity pertaining to this
# material without the specific, prior written permission
# of an authorized representative of Z-Code. Z-CODE SOFTWARE
# MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
# OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS",
# WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
# Brought into line with metamail 2.7 beta release Csh version
# Dave Shield February 1994
MYFONTDIR=/usr/X11R6/lib/X11/fonts/misc
if [ -n "$METAMAIL_PAGER" ]
then
PAGER="$METAMAIL_PAGER"
fi
CHARSET=$1
shift
if test "$1" = "-e"
then
shift
CMD='"$@"'
RIGHTTERMCMD='"$@"'
else
if [ -n "$PAGER" ] ; then
more="$PAGER"
else
more=more
fi
CMD='$more "$@" /dev/null'
RIGHTTERMCMD='$more "$@"'
fi
if test ! -z "${MM_CHARSET:-}"
then
if test "$MM_CHARSET" = "$CHARSET"
then
eval $RIGHTTERMCMD
exit 0
fi
fi
for f in "${MM_AUXCHARSETS:-}"
do
if test "$f" = "$CHARSET"
then
eval $RIGHTTERMCMD
exit 0
fi
done
if test ! -d "$MYFONTDIR"
then
echo This message contains non-ASCII text, but the $CHARSET font
echo has not yet been installed on this machine. What follows
echo "may be partially unreadable, but the English (ASCII) parts"
echo "should still be readable."
cat "$@"
exit 0
fi
if test -z "${DISPLAY:-}"
then
echo This message contains non-ASCII text, which can only be displayed
echo properly if you are running X11. What follows
echo "may be partially unreadable, but the English (ASCII) parts"
echo "should still be readable."
cat "$@"
exit 0
fi
#
# Do we have a font server?
#
FSGREP=`xset q | grep tcp/localhost:7100`
if test -z "${FSGREP:-}"
then
FPGREP=`xset q | grep $MYFONTDIR`
if test -z "${FPGREP:-}"
then
echo Adding $MYFONTDIR to your font path.
xset +fp "$MYFONTDIR"
else
echo Your font path appears to be correctly set.
fi
else
echo Your font path appears to be correctly set.
fi
echo Running xterm to display text in $CHARSET, please wait...
# Bogus -- need to unsetenv MM_NOTTTY, but can't in Bourne shell. --bobg.
MM_NOTTTY=''
XCHARSET=\*`echo $CHARSET | sed -e s/iso-/iso/`
eval xterm -fn \$XCHARSET -e $CMD
ACC SHELL 2018