:
#	Print nroff'ed pages using psf filters
#
#	The "-r 3" option in pnf below removes 3 blank lines between
#	pages (to allow correct printing in the imageable area of the
#	postscript printer).  Different printers may require different
#	number of lines to remove.  (see pnf.1)

#	If double sided printing is desired, use the "-d" option
#	in psf below.

case $# in
0)	echo "Usage:  $0 [nroff options] doc.nroff ..."
	echo "  e.g.  $0 -ms document.ms"
	exit 0 ;;
esac

for i in $*
do
    case $i in
    -*)      OPTIONS=`echo $OPTIONS $i`
	     shift;;
	     
    [1-z]*)  if test -f $i
    	     then
   		  nroff $OPTIONS $i | pnf -i -r 3 | psf -2 | lp ;
    	     else
    	     	  echo "$0: file $i does not exist."
    	     fi
    	     ;;
    esac
done
exit 0
