xref: /plan9-contrib/sys/lib/lp/spooler/ps630 (revision 219b2ee8daee37f4aad58d63f21287faa8e4ffdc)
1#!/bin/rc
2fn sigexit {echo -n '';exit 1}
3# Send output to the printer port on an AT&T 630/730 terminal
4# Process and enqueue files to be printed
5# take arguments as input files
6i=0
7if (~ $#* 0) *=''
8for (j in $*) {
9	i= `{echo $i + 1|hoc}
10
11# check access to the file so that you know that a failure in the
12# processing is a drastic error which will cause an exit from lp.
13
14	if (~ $j '' || test -f $j) {
15		switch ($j) {
16		case ''; @{
17				echo -n ''; sleep 1
18				bind -b $LPLIB/process /bin
19				$LPPROC
20				echo -n ''
21			}
22		case *;	@{
23				echo -n ''; sleep 1
24				bind -b $LPLIB/process /bin
25				$LPPROC
26				echo -n ''
27			} <$j
28		}
29	}
30}
31