|
|
1.1 ! root 1: # ! 2: # Generate paper output from the data that a PostScript program normally ! 3: # sends back to a host computer using file output operators. ! 4: # ! 5: ! 6: POSTLIB=/usr/lib/postscript ! 7: PROLOGUE=$POSTLIB/hardcopy.ps ! 8: ! 9: OPTIONS= ! 10: MODE=portrait ! 11: ! 12: NONCONFORMING="%!PS" ! 13: ENDPROLOG="%%EndProlog" ! 14: BEGINSETUP="%%BeginSetup" ! 15: ENDSETUP="%%EndSetup" ! 16: TRAILER="%%Trailer" ! 17: ! 18: SETUP=HardcopySetup ! 19: DONE="(%stdout)(w) file -1 write" ! 20: ! 21: while [ -n "$1" ]; do ! 22: case $1 in ! 23: -c) shift; OPTIONS="$OPTIONS /#copies $1 store";; ! 24: -c*) OPTIONS="$OPTIONS /#copies `echo $1 | sed s/-c//` store";; ! 25: ! 26: -f) shift; OPTIONS="$OPTIONS /font /$1 def";; ! 27: -f*) OPTIONS="$OPTIONS /font /`echo $1 | sed s/-f//` def";; ! 28: ! 29: -p) shift; MODE=$1;; ! 30: -p*) MODE=`echo $1 | sed s/-p//`;; ! 31: ! 32: -m) shift; OPTIONS="$OPTIONS /magnification $1 def";; ! 33: -m*) OPTIONS="$OPTIONS /magnification `echo $1 | sed s/-m//` def";; ! 34: ! 35: -s) shift; OPTIONS="$OPTIONS /pointsize $1 def";; ! 36: -s*) OPTIONS="$OPTIONS /pointsize `echo $1 | sed s/-s//` def";; ! 37: ! 38: -x) shift; OPTIONS="$OPTIONS /xoffset $1 def";; ! 39: -x*) OPTIONS="$OPTIONS /xoffset `echo $1 | sed s/-x//` def";; ! 40: ! 41: -y) shift; OPTIONS="$OPTIONS /yoffset $1 def";; ! 42: -y*) OPTIONS="$OPTIONS /yoffset `echo $1 | sed s/-y//` def";; ! 43: ! 44: -L) shift; PROLOGUE=$1;; ! 45: -L*) PROLOGUE=`echo $1 | sed s/-L//`;; ! 46: ! 47: --) shift; break;; ! 48: ! 49: -*) echo "$0: illegal option $1" >&2; exit 1;; ! 50: ! 51: *) break;; ! 52: esac ! 53: shift ! 54: done ! 55: ! 56: case "$MODE" in ! 57: l*) OPTIONS="$OPTIONS /landscape true def";; ! 58: *) OPTIONS="$OPTIONS /landscape false def";; ! 59: esac ! 60: ! 61: echo $NONCONFORMING ! 62: cat $PROLOGUE ! 63: echo $ENDPROLOG ! 64: echo $BEGINSETUP ! 65: echo $OPTIONS ! 66: echo $SETUP ! 67: echo $ENDSETUP ! 68: ! 69: cat $* ! 70: ! 71: echo $TRAILER ! 72: echo $DONE ! 73:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.