:
#	@(#) lpcan 23.2 91/08/29 
#
#	Copyright (C) 1987-1991 The Santa Cruz Operation, Inc.
#		All Rights Reserved.
#	The information in this file is provided for the exclusive use of
#	the licensees of The Santa Cruz Operation, Inc.  Such users have the
#	right to use, modify, and incorporate this code into other products
#	for purposes authorized by the license agreement provided they include
#	this notice and the associated copyright notice with any such product.
#	The information in this file is provided "AS IS" without warranty.
#
 
OALIB=${OALIB-"/usr/lib/oa"}
PATH=$OALIB/utilbin:$PATH
eval oainit 2>/dev/null || (oash $0; kill $$)
. `findfile shell_strs`

TEMP=/tmp/fm1$$

EscWasHit() { 
	oadeinit
	rm -f $TEMP
	exit 
}

lpstat -o  >$TEMP

wmopen 1 15 60 6 10 
wmtitle "$LPCAN2"
wmmessage -r "$PRESSRET"

 #LPCAN1=No lp jobs
[ -s $TEMP ] || { 
	echo "$LPCAN1"
	wrefresh 1 
	sleep 2
	EscWasHit
}

 #LPCAN2=Cancel an Lp job
pp -f $TEMP
rm -f $TEMP 
[ "$PP_NUM" -eq -1 ] && EscWasHit

set $PP_ITEM
cancel $1 >/dev/null
oadeinit
