henesyinit from p9fce6d0435 years agoHistory
70 lines · 1.8 KB · Text
RawDownload
#!/bin/rc# converts a regular ascii file to PostScriptif (! ~ $DEBUG '') flag x +PATCH='%%Patch from lp'for (i in `{echo $IBIN|awk -F, '{ n=split($0, a, ","); for (i=1;i<=n;i++) print a[i]; }'}) {	switch ($i) {	case -P*;	case man manual manualfeed;		PATCH=$PATCH'statusdict begin /manualfeed true def end'	case simplex;		DUPLEX=0	case [0-9];		PATCH=$PATCH'systemdict /languagelevel known {languagelevel 2 eq} if{  currentpagedevice /InputAttributes get '$i' get  dup null eq  {pop}  {dup length 1 add dict copy   dup /InputAttributes    1 dict dup /Priority['$i'] put    put setpagedevice  } ifelse} {statusdict begin 1 setpapertray end} ifelse'	case 11x17 ledger;		PATCH=$PATCH'statusdict begin '$i'tray end'	case *;		echo illegal option ''''-i $i'''' >[1=2]	}}if (! ~ $#DUPLEX 0) {	if (~ $DUPLEX 1 )		PATCH=$PATCH'statusdict /setduplexmode known {statusdict begin true setduplexmode end} if';	if (~ $DUPLEX 0 )		PATCH=$PATCH'statusdict /setduplexmode known {statusdict begin false setduplexmode end} if';}PATCH=$PATCH'%%EndPatch from lp'if (! ~ $PATCH '' -P*)	PATCH=-P''''$PATCH'''';switch ($LAND) {case -p*;case ''; LAND=-ppcase 1;	LAND=-pl}if (! ~ $COPIES '' -c*) COPIES=-c^$COPIESswitch ($FONT) {case ''; FONT=-f'Courier'case -f*;case *; FONT=-f$FONT}switch ($POINT) {case ''; POINT=-s10case -s*;case *; POINT=-s$POINT}if (! ~ $LINES '' -l*) LINES=-l^$LINES;if (! ~ $MAG '' -m*) MAG=-m^$MAG;if (! ~ $NPAG '' -n*) NPAG=-n^$NPAG;if (! ~ $XOFF '' -x*) XOFF=-x`{echo $XOFF + .4|hoc};if not XOFF=-x.4if (! ~ $YOFF '' -y*) YOFF=-y^$YOFF;eval /$cputype/bin/aux/text2post $FONT $XOFF $YOFF $COPIES $LINES $MAG $NPAG $POINT $LAND $OLIST $PATCH | $LPLIB/process/hpost# eval /$cputype/bin/aux/postprint -EUTF $FONT $XOFF $YOFF $COPIES $LINES $MAG $NPAG $POINT $LAND $OLIST $PATCH | $LPLIB/process/hpostexit

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t