Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/bin/rc
2
if (! ~ $DEBUG '') flag x +
3
 
4
if (~ $LPCLASS *sendEOT*) SENDEOT=1
5
if not SENDEOT=0
6
 
7
if (~ $OUTDEV -) OUTDEV=/fd/1
8
if (~ $#* 0) {
9
	if (! ~ $DEBUG '') echo input file is stdin >[1=2]
10
	@{bind -b $LPLIB/process /bin; $LPPROC} > $OUTDEV
11
	if (~ $SENDEOT 1) echo -n `{ascii -t 4} > $OUTDEV
12
}
13
if not {
14
	if (! ~ $DEBUG '') echo input files $* >[1=2]
15
	for (i in $*) {
16
		if (! ~ $DEBUG '') echo processing $i >[1=2]
17
		@{bind -b $LPLIB/process /bin; $LPPROC} < $i  > $OUTDEV
18
		if (~ $SENDEOT 1) echo -n `{ascii -t 4} > $OUTDEV
19
	}
20
}
21
exit ''