#!/bin/sh5
# %W%   (ULTRIX) %G%
#
#
#
# dolpq
#
# This procedure is to provide an 'lpq' command for the DECwindows
# environment. It would normally reside as /usr/lib/X11/ue/dolpq with 
# world execute. An entry must be made in UE 'Files' menu using the 
# 'Customize' function. The 'Append file to command' option MUST have 
# been selected in order for the mini-window to appear.
#
# The following 3 lines will appear in the .ue_profile if the customisation 
# has been done correctly.
# N.B. It is the "True" which causes the dialogue box to appear.
# 
#
#   item "Show Print Jobs" = {
#      DoShellCommand("dolpq","True");
#    }
#
#
#	Doug Rickard
#	Cambridge Research Laboratory
#	Digital Equipment Corp.
#
#	19-Jan-1989

CMD=lpq
ECHO=/bin/echo
FUNCTION="Show Print Jobs"
DOING_FILES=0
QUIET=0

set -f
while test $# -gt 0
do
  arg=$1
  case $DOING_FILES in
    0)
      case $arg in
        -uefiles)
          DOING_FILES=1
          ;;
        *)
          CMD="$CMD $arg"
      esac
      ;;
    1)
      FILES="$FILES $arg"
  esac
  shift
done

$ECHO \"$FUNCTION\" Printer: \"$PRINTER\" >& 2

read PRINTER

case $PRINTER in
  ?*) exec $CMD -P $PRINTER 2>&1
esac
