#!/bin/csh -f
# Usage: lprdc fileroot
# Fileroot is the part of the file name preceding ".dvi".  If you give
# a filename containing ".", the part from the last "." on is replaced
# with ".dvi" to find the .dvi file.  So you get the same behavior from
# "xdc foo" or "xdc foo.dvi" or even "xdc foo.zqfmgb".

umask 66

set inputbase = $1:r
set tempbase = \#temp.$$

echo "Enter key:"
set key = $<

crypt $key <$inputbase.dvi >$tempbase.dvi
lprd $tempbase.dvi
rm -f $tempbase.dvi
