2 b855148c 2004-05-16 devnull # Generate paper output from the data that a PostScript program normally
3 b855148c 2004-05-16 devnull # sends back to a host computer using file output operators.
6 b855148c 2004-05-16 devnull POSTLIB=/sys/lib/postscript/prologues
7 b855148c 2004-05-16 devnull PROLOGUE=$POSTLIB/hardcopy.ps
10 b855148c 2004-05-16 devnull MODE=portrait
12 b855148c 2004-05-16 devnull NONCONFORMING='%!PS'
13 b855148c 2004-05-16 devnull ENDPROLOG='%%EndProlog'
14 b855148c 2004-05-16 devnull BEGINSETUP='%%BeginSetup'
15 b855148c 2004-05-16 devnull ENDSETUP='%%EndSetup'
16 b855148c 2004-05-16 devnull TRAILER='%%Trailer'
18 b855148c 2004-05-16 devnull SETUP=HardcopySetup
19 b855148c 2004-05-16 devnull DONE='(%stdout)(w) file -1 write'
21 b855148c 2004-05-16 devnull while (! ~ $#* 0 && ~ $1 -*) {
22 b855148c 2004-05-16 devnull switch ($1) {
23 b855148c 2004-05-16 devnull case -c; shift; OPTIONS=$OPTIONS' /#copies '$1' store'
24 b855148c 2004-05-16 devnull case -c*; OPTIONS=$OPTIONS' /#copies `{echo $1 | sed s/-c//}' store'
26 b855148c 2004-05-16 devnull case -f; shift; OPTIONS=$OPTIONS' /font '/$1' def'
27 b855148c 2004-05-16 devnull case -f*; OPTIONS=$OPTIONS' /font '/`{echo $1 | sed s/-f//}' def'
29 b855148c 2004-05-16 devnull case -p; shift; MODE=$1
30 b855148c 2004-05-16 devnull case -p*; MODE=`{echo $1 | sed s/-p//}
32 b855148c 2004-05-16 devnull case -m; shift; OPTIONS=$OPTIONS' /magnification '$1' def'
33 b855148c 2004-05-16 devnull case -m*; OPTIONS=$OPTIONS' /magnification '`{echo $1 | sed s/-m//}' def'
35 b855148c 2004-05-16 devnull case -s; shift; OPTIONS=$OPTIONS' /pointsize '$1' def'
36 b855148c 2004-05-16 devnull case -s*; OPTIONS=$OPTIONS' /pointsize '`{echo $1 | sed s/-s//}' def'
38 b855148c 2004-05-16 devnull case -x; shift; OPTIONS=$OPTIONS' /xoffset '$1' def'
39 b855148c 2004-05-16 devnull case -x*; OPTIONS=$OPTIONS' /xoffset '`{echo $1 | sed s/-x//}' def'
41 b855148c 2004-05-16 devnull case -y; shift; OPTIONS=$OPTIONS' /yoffset '$1' def'
42 b855148c 2004-05-16 devnull case -y*; OPTIONS=$OPTIONS' /yoffset '`{echo $1 | sed s/-y//}' def'
44 b855148c 2004-05-16 devnull case -L; shift; PROLOGUE=$1
45 b855148c 2004-05-16 devnull case -L*; PROLOGUE=`{echo $1 | sed s/-L//}
49 b855148c 2004-05-16 devnull case -*; echo '$0: illegal option $1' >&2; exit 1
54 b855148c 2004-05-16 devnull switch ($MODE) {
55 b855148c 2004-05-16 devnull case l*; OPTIONS=$OPTIONS' /landscape true def'
56 b855148c 2004-05-16 devnull case *; OPTIONS=$OPTIONS' /landscape false def'
59 b855148c 2004-05-16 devnull echo $NONCONFORMING
60 b855148c 2004-05-16 devnull cat $PROLOGUE
61 b855148c 2004-05-16 devnull echo $ENDPROLOG
62 b855148c 2004-05-16 devnull echo $BEGINSETUP
63 b855148c 2004-05-16 devnull echo $OPTIONS
64 b855148c 2004-05-16 devnull echo $SETUP
65 b855148c 2004-05-16 devnull echo $ENDSETUP
69 b855148c 2004-05-16 devnull echo $TRAILER
70 b855148c 2004-05-16 devnull echo $DONE