DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T h

⟦beb94f391⟧ TextFile

    Length: 9261 (0x242d)
    Types: TextFile
    Names: »header.c«

Derivation

└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
    └─⟦148e64aa4⟧ »./plot2ps.tar.Z« 
        └─⟦ff7617d1d⟧ 
            └─⟦this⟧ »header.c« 

TextFile

/* The following is a postscript prologue which defines a set of
   macros and constants which are used in rendering graphics on the
   page.

   The header and trailer variables are simple to construct: just
   cut the postscript header and trailer from idraw output and
   append \n\ to each line.  Cut it up into 80 line peices so Sun's
   c complier can handle the length of the tokens. The last string in
   the header should be empty (ie. "") to indicate the end.

   Idraw and this postscirpt prologue were written by John Interrante. */

char *header[6] =
{"\
\n\
%%EndComments\n\
\n\
50 dict begin\n\
\n\
/arrowHeight 8 def\n\
/arrowWidth 4 def\n\
/none null def\n\
/numGraphicParameters 17 def\n\
/stringLimit 65535 def\n\
\n\
/Begin {\n\
save\n\
numGraphicParameters dict begin\n\
} def\n\
\n\
/End {\n\
end\n\
restore\n\
} def\n\
\n\
/SetB {\n\
dup type /nulltype eq {\n\
pop\n\
false /brushRightArrow idef\n\
false /brushLeftArrow idef\n\
true /brushNone idef\n\
} {\n\
/brushDashOffset idef\n\
/brushDashArray idef\n\
0 ne /brushRightArrow idef\n\
0 ne /brushLeftArrow idef\n\
/brushWidth idef\n\
false /brushNone idef\n\
} ifelse\n\
} def\n\
\n\
/SetCFg {\n\
/fgblue idef\n\
/fggreen idef\n\
/fgred idef\n\
} def\n\
\n\
/SetCBg {\n\
/bgblue idef\n\
/bggreen idef\n\
/bgred idef\n\
} def\n\
\n\
/SetF {\n\
/printSize idef\n\
/printFont idef\n\
} def\n\
\n\
/SetP {\n\
dup type /nulltype eq {\n\
pop true /patternNone idef\n\
} {\n\
/patternGrayLevel idef\n\
patternGrayLevel -1 eq {\n\
/patternString idef\n\
} if\n\
false /patternNone idef\n\
} ifelse\n\
} def\n\
\n\
/BSpl {\n\
0 begin\n\
storexyn\n\
newpath\n\
n 1 gt {\n\
0 0 0 0 0 0 1 1 true subspline\n\
n 2 gt {\n\
0 0 0 0 1 1 2 2 false subspline\n\
1 1 n 3 sub {\n\
/i exch def\n\
i 1 sub dup i dup i 1 add dup i 2 add dup false subspline\n\
} for\n\
n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline\n\
} if\n\
n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline\n\
patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if\n\
brushNone not { istroke } if\n\
0 0 1 1 leftarrow\n\
n 2 sub dup n 1 sub dup rightarrow\n\
} if\n\
end\n\
} dup 0 4 dict put def\n\
\n\
/Circ {\n\
newpath\n\
0 360 arc\n\
patternNone not { ifill } if\n\
brushNone not { istroke } if\n\
} def\n\
\n\
/CBSpl {\n\
0 begin\n\
", "\
dup 2 gt {\n\
storexyn\n\
newpath\n\
n 1 sub dup 0 0 1 1 2 2 true subspline\n\
1 1 n 3 sub {\n\
/i exch def\n\
i 1 sub dup i dup i 1 add dup i 2 add dup false subspline\n\
} for\n\
n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline\n\
n 2 sub dup n 1 sub dup 0 0 1 1 false subspline\n\
patternNone not { ifill } if\n\
brushNone not { istroke } if\n\
} {\n\
Poly\n\
} ifelse\n\
end\n\
} dup 0 4 dict put def\n\
\n\
/Elli {\n\
0 begin\n\
newpath\n\
4 2 roll\n\
translate\n\
scale\n\
0 0 1 0 360 arc\n\
patternNone not { ifill } if\n\
brushNone not { istroke } if\n\
end\n\
} dup 0 1 dict put def\n\
\n\
/Line {\n\
0 begin\n\
2 storexyn\n\
newpath\n\
x 0 get y 0 get moveto\n\
x 1 get y 1 get lineto\n\
brushNone not { istroke } if\n\
0 0 1 1 leftarrow\n\
0 0 1 1 rightarrow\n\
end\n\
} dup 0 4 dict put def\n\
\n\
/MLine {\n\
0 begin\n\
storexyn\n\
newpath\n\
n 1 gt {\n\
x 0 get y 0 get moveto\n\
1 1 n 1 sub {\n\
/i exch def\n\
x i get y i get lineto\n\
} for\n\
patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if\n\
brushNone not { istroke } if\n\
0 0 1 1 leftarrow\n\
n 2 sub dup n 1 sub dup rightarrow\n\
} if\n\
end\n\
} dup 0 4 dict put def\n\
\n\
/Poly {\n\
3 1 roll\n\
newpath\n\
moveto\n\
-1 add\n\
{ lineto } repeat\n\
closepath\n\
patternNone not { ifill } if\n\
brushNone not { istroke } if\n\
} def\n\
\n\
/Rect {\n\
0 begin\n\
/t exch def\n\
/r exch def\n\
/b exch def\n\
/l exch def\n\
newpath\n\
l b moveto\n\
l t lineto\n\
r t lineto\n\
r b lineto\n\
closepath\n\
patternNone not { ifill } if\n\
brushNone not { istroke } if\n\
end\n\
} dup 0 4 dict put def\n\
\n\
/Text {\n\
ishow\n\
} def\n\
\n\
/idef {\n\
dup where { pop pop pop } { exch def } ifelse\n\
} def\n\
\n\
/ifill {\n\
0 begin\n\
gsave\n\
patternGrayLevel -1 ne {\n\
", "\
fgred bgred fgred sub patternGrayLevel mul add\n\
fggreen bggreen fggreen sub patternGrayLevel mul add\n\
fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor\n\
eofill\n\
} {\n\
eoclip\n\
originalCTM setmatrix\n\
pathbbox /t exch def /r exch def /b exch def /l exch def\n\
/w r l sub ceiling cvi def\n\
/h t b sub ceiling cvi def\n\
/imageByteWidth w 8 div ceiling cvi def\n\
/imageHeight h def\n\
bgred bggreen bgblue setrgbcolor\n\
eofill\n\
fgred fggreen fgblue setrgbcolor\n\
w 0 gt h 0 gt and {\n\
l b translate w h scale\n\
w h true [w 0 0 h neg 0 h] { patternproc } imagemask\n\
} if\n\
} ifelse\n\
grestore\n\
end\n\
} dup 0 8 dict put def\n\
\n\
/istroke {\n\
gsave\n\
brushDashOffset -1 eq {\n\
[] 0 setdash\n\
1 setgray\n\
} {\n\
brushDashArray brushDashOffset setdash\n\
fgred fggreen fgblue setrgbcolor\n\
} ifelse\n\
brushWidth setlinewidth\n\
originalCTM setmatrix\n\
stroke\n\
grestore\n\
} def\n\
\n\
/ishow {\n\
0 begin\n\
gsave\n\
printFont findfont printSize scalefont setfont\n\
fgred fggreen fgblue setrgbcolor\n\
/vertoffset printSize neg def {\n\
0 vertoffset moveto show\n\
/vertoffset vertoffset printSize sub def\n\
} forall\n\
grestore\n\
end\n\
} dup 0 3 dict put def\n\
\n\
/patternproc {\n\
0 begin\n\
/patternByteLength patternString length def\n\
/patternHeight patternByteLength 8 mul sqrt cvi def\n\
/patternWidth patternHeight def\n\
/patternByteWidth patternWidth 8 idiv def\n\
/imageByteMaxLength imageByteWidth imageHeight mul\n\
stringLimit patternByteWidth sub min def\n\
/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv\n\
patternHeight mul patternHeight max def\n\
/imageHeight imageHeight imageMaxHeight sub store\n\
/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def\n\
", "\
0 1 imageMaxHeight 1 sub {\n\
/y exch def\n\
/patternRow y patternByteWidth mul patternByteLength mod def\n\
/patternRowString patternString patternRow patternByteWidth getinterval def\n\
/imageRow y imageByteWidth mul def\n\
0 patternByteWidth imageByteWidth 1 sub {\n\
/x exch def\n\
imageString imageRow x add patternRowString putinterval\n\
} for\n\
} for\n\
imageString\n\
end\n\
} dup 0 12 dict put def\n\
\n\
/min {\n\
dup 3 2 roll dup 4 3 roll lt { exch } if pop\n\
} def\n\
\n\
/max {\n\
dup 3 2 roll dup 4 3 roll gt { exch } if pop\n\
} def\n\
\n\
/arrowhead {\n\
0 begin\n\
transform originalCTM itransform\n\
/taily exch def\n\
/tailx exch def\n\
transform originalCTM itransform\n\
/tipy exch def\n\
/tipx exch def\n\
/dy tipy taily sub def\n\
/dx tipx tailx sub def\n\
/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def\n\
gsave\n\
originalCTM setmatrix\n\
tipx tipy translate\n\
angle rotate\n\
newpath\n\
0 0 moveto\n\
arrowHeight neg arrowWidth 2 div lineto\n\
arrowHeight neg arrowWidth 2 div neg lineto\n\
closepath\n\
patternNone not {\n\
originalCTM setmatrix\n\
/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul\n\
arrowWidth div def\n\
/padtail brushWidth 2 div def\n\
tipx tipy translate\n\
angle rotate\n\
padtip 0 translate\n\
arrowHeight padtip add padtail add arrowHeight div dup scale\n\
arrowheadpath\n\
ifill\n\
} if\n\
brushNone not {\n\
originalCTM setmatrix\n\
tipx tipy translate\n\
angle rotate\n\
arrowheadpath\n\
istroke\n\
} if\n\
grestore\n\
end\n\
} dup 0 9 dict put def\n\
\n\
/arrowheadpath {\n\
newpath\n\
0 0 moveto\n\
arrowHeight neg arrowWidth 2 div lineto\n\
arrowHeight neg arrowWidth 2 div neg lineto\n\
closepath\n\
} def\n\
\n\
/leftarrow {\n\
0 begin\n\
y exch get /taily exch def\n\
x exch get /tailx exch def\n\
y exch get /tipy exch def\n\
x exch get /tipx exch def\n\
brushLeftArrow { tipx tipy tailx taily arrowhead } if\n\
end\n\
} dup 0 4 dict put def\n\
\n\
/rightarrow {\n\
0 begin\n\
y exch get /tipy exch def\n\
x exch get /tipx exch def\n\
y exch get /taily exch def\n\
x exch get /tailx exch def\n\
brushRightArrow { tipx tipy tailx taily arrowhead } if\n\
end\n\
} dup 0 4 dict put def\n\
\n\
/midpoint {\n\
0 begin\n\
/y1 exch def\n\
/x1 exch def\n\
/y0 exch def\n\
/x0 exch def\n\
", "\
x0 x1 add 2 div\n\
y0 y1 add 2 div\n\
end\n\
} dup 0 4 dict put def\n\
\n\
/thirdpoint {\n\
0 begin\n\
/y1 exch def\n\
/x1 exch def\n\
/y0 exch def\n\
/x0 exch def\n\
x0 2 mul x1 add 3 div\n\
y0 2 mul y1 add 3 div\n\
end\n\
} dup 0 4 dict put def\n\
\n\
/subspline {\n\
0 begin\n\
/movetoNeeded exch def\n\
y exch get /y3 exch def\n\
x exch get /x3 exch def\n\
y exch get /y2 exch def\n\
x exch get /x2 exch def\n\
y exch get /y1 exch def\n\
x exch get /x1 exch def\n\
y exch get /y0 exch def\n\
x exch get /x0 exch def\n\
x1 y1 x2 y2 thirdpoint\n\
/p1y exch def\n\
/p1x exch def\n\
x2 y2 x1 y1 thirdpoint\n\
/p2y exch def\n\
/p2x exch def\n\
x1 y1 x0 y0 thirdpoint\n\
p1x p1y midpoint\n\
/p0y exch def\n\
/p0x exch def\n\
x2 y2 x3 y3 thirdpoint\n\
p2x p2y midpoint\n\
/p3y exch def\n\
/p3x exch def\n\
movetoNeeded { p0x p0y moveto } if\n\
p1x p1y p2x p2y p3x p3y curveto\n\
end\n\
} dup 0 17 dict put def\n\
\n\
/storexyn {\n\
/n exch def\n\
/y n array def\n\
/x n array def\n\
n 1 sub -1 0 {\n\
/i exch def\n\
y i 3 2 roll put\n\
x i 3 2 roll put\n\
} for\n\
} def\n\
\n\
%%EndProlog\n\
",
""};