[comp.windows.news] cyber.shar.splitac

don@TUMTUM.CS.UMD.EDU (Don Hopkins) (11/23/89)

======== START OF cyber.shar.splitac ========
X    closepath
X  } def
X
X  /SpriteHotX {
X    BubbleRadius
X  } def
X
X  /SpriteHotY {
X    BubbleRadius
X  } def
X
X  /DrawSprite {
X    gsave
X      SpriteCanvas setcanvas
X      clippath 
X      gsave 0 setgray fill grestore
X      BubbleRadius dup dup 3 sub 0 360 arc 
X      1 setgray eofill
X
X%       0 BubbleRadius moveto
X%       BubbleRadius dup add 0 rlineto
X%       BubbleRadius 0 moveto
X%       0 BubbleRadius dup add rlineto
X%       0 setlinewidth
X%       0 setgray stroke
X    grestore
X  } def
X
X  /DrawSpriteMask {
X    gsave
X      SpriteMaskCanvas setcanvas 
X      .5 fillcanvas
X
X      4 {
X	0 0 moveto
X        0 BubbleRadius lineto
X	90 rotate
X      } repeat
X      0 setlinewidth
X      1 setgray stroke
X    grestore
X  } def
X
X  /move {
X    /move super send
X    gsave
X      framebuffer setcanvas
X      TrackCanvas getcanvaslocation
X      OtherCanvas setcanvas
X      2 copy movecanvas
X      EnableCanvas setcanvas movecanvas
X    grestore
X  } def
X
X  /map {
X    /map super send
X    Iconic? not {
X      OtherCanvas /Mapped true put
X      EnableCanvas /Mapped true put
X    } if
X  } def
X
X  /unmap {
X    /unmap super send
X    Iconic? not {
X      ColorCanvas /Mapped false put
X      EnableCanvas /Mapped false put
X    } if
X  } def
X
X  /totop {
X    /totop super send
X    EnableCanvas canvastotop
X    ColorCanvas canvastotop
X  } def
X
X  /tobottom {
X    /tobottom super send
X    EnableCanvas canvastobottom
X    ColorCanvas canvastobottom
X  } def
X
X  /ForkFrameEventMgr {
X      ClientMenu null ne {
X	  FrameInterests /ClientMenuEvent
X	      MenuButton {/showat ClientMenu send}
X	      DownTransition TrackCanvas eventmgrinterest put
X      } if
X      /FrameEventMgr FrameInterests forkeventmgr def
X  } def
X
X  /PaintFocus {
X    /PaintFocus super send
X    gsave
X      EnableCanvas setcanvas
X      KeyFocus? KeyFocusFill 1 ifelse
X      fillcanvas
X    grestore
X  } def
X
X  /destroy {
X    framebuffer setcanvas
X    OverlayCanvas /Retained false put
X    OverlayCanvas /Mapped false put
X    EnableCanvas /Retained false put
X    EnableCanvas /Mapped false put
X    ColorCanvas /Retained false put
X    ColorCanvas /Mapped false put
X    FrameCanvas /Retained false put
X    FrameCanvas /Mapped false put
X    SpriteCanvas /Retained false put
X    SpriteCanvas /Mapped false put
X    SpriteMaskCanvas /Retained false put
X    SpriteMaskCanvas /Mapped false put
X    /destroy super send
X  } def
X
X  /FullColor {
X    gsave
X      EnableCanvas setcanvas 1 fillcanvas
X    grestore
X    DrawSpriteMask
X  } def
X
X  /FullOverlay {
X    gsave
X      EnableCanvas setcanvas 0 fillcanvas
X    grestore
X  } def
X
X  /BlackOverlay {
X    gsave
X      OverlayCanvas setcanvas 0 fillcanvas
X    grestore
X  } def
X
X  /WhiteOverlay {
X    gsave
X      OverlayCanvas setcanvas 1 fillcanvas
X    grestore
X  } def
X
X  /TrackSprite { % event => -
X    gsave begin
X        ClientCanvas setcanvas
X        XLocation YLocation 
X      end
X      UpdateSprite
X    grestore
X  } def  
X
X  /DarkColor {
X    gsave
X      OverlayCanvas setcanvas 0 fillcanvas
X      EnableCanvas setcanvas .5 fillcanvas
X    grestore
X    DrawSpriteMask
X  } def
X
X  mono? { % cg4 and mono
X
X    /KeyFocusFill .85 def
X
X    /CreateClientCanvas {
X      /CreateClientCanvas super send
X      /TrackCanvas ClientCanvas def
X      /OverlayCanvas ClientCanvas def
X      /ColorCanvas fb_color newcanvas def
X      /OtherCanvas ColorCanvas def
X      ColorCanvas /Mapped true put
X      ColorCanvas /Transparent false put
X      ColorCanvas /Retained true put
X
X      /EnableCanvas fb_enable newcanvas def
X      /EnableOverlay EnableCanvas createoverlay def
X      EnableCanvas /Mapped true put
X      EnableCanvas /Transparent false put
X      EnableCanvas /Retained true put
X      /ClientCanvas ColorCanvas def
X
X      /SpriteCanvas OverlayCanvas newcanvas def
X      SpriteCanvas /Transparent false put
X      SpriteCanvas /Retained true put
X      /SpriteMaskCanvas EnableCanvas newcanvas def
X      SpriteMaskCanvas /Transparent false put
X      SpriteMaskCanvas /Retained true put
X
X      % ARRGH! I'm getting damage on the retained opeque FrameCanvas
X      % when mapping transparent children of the transparent ClientCanvas!
X      XNeWS? {
X        OverlayCanvas /Transparent false put
X	OverlayCanvas /Retained true put
X      } if
X    } def
X
X    /KindaColor {
X      gsave
X        EnableCanvas setcanvas .5 fillcanvas
X      grestore
X    } def
X
X    /HiliteCan { % gray can => -
X      dup null eq { pop pop } {
X	gsave
X	  setcanvas clippath
X	  setgray fill
X	grestore
X      } ifelse
X    } def
X
X    /ShimmerCan { % gray can => -
X	gsave
X	  setcanvas clippath
X	  setgray fill
X	grestore
X    } def
X
X    /LoliteCan { % can => -
X      0 exch HiliteCan
X    } def
X
X  } { % else cg4 and not mono
X
X    /KeyFocusFill 1 def
X
X    /CreateClientCanvas { % Monochrome cg4
X      /CreateClientCanvas super send
X      /TrackCanvas ClientCanvas def
X      /ColorCanvas ClientCanvas def
X      /OverlayCanvas fb_overlay newcanvas def
X      /OtherCanvas OverlayCanvas def
X      OverlayCanvas /Mapped true put
X      OverlayCanvas /Transparent false put
X      OverlayCanvas /Retained true put
X      FrameCanvas /Retained true put
X
X      /EnableCanvas fb_enable newcanvas def
X      /EnableOverlay EnableCanvas createoverlay def
X      EnableCanvas /Mapped true put
X      EnableCanvas /Transparent false put
X      EnableCanvas /Retained true put
X      /ClientCanvas ColorCanvas def
X
X      /SpriteCanvas OverlayCanvas newcanvas def
X      SpriteCanvas /Transparent false put
X      SpriteCanvas /Retained true put
X      /SpriteMaskCanvas EnableCanvas newcanvas def
X      SpriteMaskCanvas /Transparent false put
X      SpriteMaskCanvas /Retained true put
X
X      /HiliteCanvas OverlayCanvas newcanvas store
X      HiliteCanvas /Transparent true put
X      HiliteCanvas /Mapped true put
X
X      % ARRGH! I'm getting damage on the retained opeque FrameCanvas
X      % when mapping transparent children of the transparent ClientCanvas!
X      XNeWS? {
X        ColorCanvas /Transparent false put
X	ColorCanvas /Retained true put
X      } if
X    } def
X
X    /KindaColor {
X      FullColor
X    } def
X
X    /HiliteCan { % gray can => -
X	gsave
X	  setcanvas clippath
X	  HiliteCanvas reshapecanvas
X	  HiliteCanvas setcanvas
X	  clippath
X	  setgray fill
X	grestore
X    } def
X
X    /LoliteCan {
X      0 exch HiliteCan
X    } def
X
X    /ShimmerCan { % gray can => -
X	gsave
X	  setcanvas clippath
X	  HiliteCanvas reshapecanvas
X	  HiliteCanvas setcanvas
X	  clippath
X	  setgray fill
X	grestore
X    } def
X
X  } ifelse
X
X} { % else not cg4
X
X  /KeyFocusFill .85 def
X
X  /CreateClientCanvas { % Monochrome cg4
X    /CreateClientCanvas super send
X    /TrackCanvas ClientCanvas def
X    /OverlayCanvas ClientCanvas def
X    /ColorCanvas ClientCanvas def
X    /EnableCanvas ClientCanvas def
X    /EnableOverlay EnableCanvas createoverlay def
X    /OtherCanvas ClientCanvas def
X    FrameCanvas /Retained true put
X% Fucks up damage distribution in X11/NeWS!
X% If the FrameCanvas is retained, and the ClientCanvas is transparent,
X% then creating transparent children of the ClientCanvas causes damage
X% to happen on the FrameCanvas!
X% So we have to make the ClientCanvas retained too (because if we make
X% just the ClientCanvas but not the FrameCanvas retained, damage on the
X% frame causes repainting of the ClientCanvas! Argh!
X    XNeWS? {
X      ClientCanvas /Transparent false put
X      ClientCanvas /Retained true put
X    } if
X  } def
X
X  /destroy {
X    framebuffer setcanvas
X    ClientCanvas /Retained false put
X    ClientCanvas /Mapped false put
X    FrameCanvas /Retained false put
X    FrameCanvas /Mapped false put
X    /destroy super send
X  } def
X
X  /FullColor {
X  } def
X
X  /FullOverlay {
X  } def
X
X  /FullColorCursor { % can event => -
X    pop pop
X  } def  
X
X  /TrackSprite {
X    pop
X  } def
X
X  /HideSprite {
X  } def
X
X  /BlackOverlay {
X  } def
X
X  /WhiteOverlay {
X  } def
X
X  /DarkColor {
X  } def
X
X  /KindaColor {
X  } def
X
X  /HiliteCan { % gray can => -
X    dup null eq { pop pop } {
X      gsave
X	setcanvas
X	pop
X	5 setrasteropcode
X	clippath fill
X      grestore
X    } ifelse
X  } def
X
X  /LoliteCan { % can => -
X    0 exch HiliteCan
X  } def
X
X  /ShimmerCan { % gray can => -
X    2 copy HiliteCan HiliteCan
X  } def
X
X} ifelse % cg4
X
Xclassend def
X
Xend % systemdict
//go.sysin dd *
if [ `wc -c < overlay.ps` != 14187 ]; then
	made=false
	echo error transmitting overlay.ps --
	echo length should be 14187, not `wc -c < overlay.ps`
else
	made=true
fi
if $made; then
	chmod 664 overlay.ps
	echo -n '	'; ls -ld overlay.ps
fi
echo Extracting pointer.ps
sed 's/^X//' <<'//go.sysin dd *' >pointer.ps
X%!
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X% 
X%  @(#)handy.ps
X%
X%  Handy Pointer
X%  Copyright (C) 1989.
X%  By Don Hopkins. (don@brillig.umd.edu)
X%  All rights reserved.
X%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X% 
X%  This program is provided for UNRESTRICTED use provided that this
X%  copyright message is preserved on all copies and derivative works.
X%  This is provided without any warranty. No author or distributor
X%  accepts any responsibility whatsoever to any person or any entity
X%  with respect to any loss or damage caused or alleged to be caused
X%  directly or indirectly by this program. This includes, but is not
X%  limited to, any interruption of service, loss of business, loss of
X%  information, loss of anticipated profits, core dumps, abuses of the
X%  virtual memory system, or any consequential or incidental damages
X%  resulting from the use of this program.
X%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X
Xsystemdict begin
X
Xsystemdict /XNeWS? known not {
X  systemdict /XNeWS? false put
X} if
X
XXNeWS? {
X  /controlpoint {
X    pop lineto
X  } def
X} if
X
X/pointing-hand {
X0 0.0674 moveto
Xopen-pointing-hand
Xclosepath
X} def
X
X/open-pointing-hand {
X0 0.528 .5 controlpoint
X0.008 0.535 .5 controlpoint
X0.0292 0.553 .5 controlpoint
X0.096 0.618 .5 controlpoint
X0.1553 0.694 .5 controlpoint
X0.208 0.753 .5 controlpoint
X0.241 0.7773 .5 controlpoint
X0.264 0.7883 .5 controlpoint
X0.28 0.798 .5 controlpoint
X0.3224 0.824 .5 controlpoint
X0.368 0.8651 .5 controlpoint
X0.3952 0.898 .5 controlpoint
X0.424 0.933 .5 controlpoint
X0.443 0.975 .5 controlpoint
X0.456 1 .5 controlpoint
X0.482 0.9862 .5 controlpoint
X0.496 0.933 .5 controlpoint
X0.499 0.8721 .5 controlpoint
X0.488 0.8202 .5 controlpoint
X0.475 0.78 .5 controlpoint
X0.467 0.753 .5 controlpoint
X0.448 0.708 .5 controlpoint
X0.408 0.673 .5 controlpoint
X0.384 0.663 .5 controlpoint
X0.408 0.652 .5 controlpoint
X0.4212 0.652 .5 controlpoint
X0.448 0.652 .5 controlpoint
X0.465 0.652 .5 controlpoint
X0.4934 0.652 .5 controlpoint
X0.5121 0.652 .5 controlpoint
X0.5334 0.652 .5 controlpoint
X0.5574 0.652 .5 controlpoint
X0.584 0.652 .5 controlpoint
X0.6331 0.653 .5 controlpoint
X0.679 0.6502 .5 controlpoint
X0.744 0.6404 .5 controlpoint
X0.8094 0.635 .5 controlpoint
X0.888 0.618 .5 controlpoint
X0.9064 0.6132 .5 controlpoint
X0.929 0.608 .5 controlpoint
X0.968 0.596 .5 controlpoint
X0.991 0.5731 .5 controlpoint
X1 0.551 .5 controlpoint
X0.9854 0.5021 .5 controlpoint
X0.968 0.4831 .5 controlpoint
X0.926 0.481 .5 controlpoint
X0.88 0.472 .5 controlpoint
X0.853 0.4744 .5 controlpoint
X0.8351 0.476 .5 controlpoint
X0.8162 0.478 .5 controlpoint
X0.76 0.4831 .5 controlpoint
X0.741 0.4823 .5 controlpoint
X0.718 0.4831 .5 controlpoint
X0.696 0.484 .5 controlpoint
X0.68 0.4831 .5 controlpoint
X0.69 0.481 .5 controlpoint
X0.72 0.461 .5 controlpoint
X0.742 0.448 .5 controlpoint
X0.752 0.427 .5 controlpoint
X0.752 0.406 .5 controlpoint
X0.752 0.382 .5 controlpoint
X0.736 0.3483 .5 controlpoint
X0.721 0.334 .5 controlpoint
X0.704 0.326 .5 controlpoint
X0.688 0.326 .5 controlpoint
X0.6964 0.325 .5 controlpoint
X0.72 0.2921 .5 controlpoint
X0.7164 0.255 .5 controlpoint
X0.704 0.2134 .5 controlpoint
X0.6654 0.1972 .5 controlpoint
X0.632 0.191 .5 controlpoint
X0.608 0.191 .5 controlpoint
X0.6152 0.166 .5 controlpoint
X0.624 0.124 .5 controlpoint
X0.6 0.09 .5 controlpoint
X0.568 0.0561 .5 controlpoint
X0.55 0.059 .5 controlpoint
X0.525 0.0582 .5 controlpoint
X0.502 0.057 .5 controlpoint
X0.488 0.0561 .5 controlpoint
X0.4761 0.057 .5 controlpoint
X0.4564 0.0512 .5 controlpoint
X0.416 0.034 .5 controlpoint
X0.349 0.013 .5 controlpoint
X0.288 0 .5 controlpoint
X0.2224 0.007 .5 controlpoint
X0.202 0.008 .5 controlpoint
X0.183 0.009 .5 controlpoint
X0.16 0.0112 .5 controlpoint
X0.1222 0.0291 .5 controlpoint
X0.08 0.045 .5 controlpoint
X0.041 0.0593 .5 controlpoint
X0 0.0674 .5 controlpoint
X} def
X
X/pointing-fingers {
X
X0.408 0.9101 moveto
X0.414 0.9104 .5 controlpoint
X0.432 0.9213 .5 controlpoint
X0.456 0.955 .5 controlpoint
X0.464 0.989 .5 controlpoint
X0.464 1 .5 controlpoint
X
X0.68 0.4831 moveto
X0.657 0.484 .5 controlpoint
X0.638 0.4841 .5 controlpoint
X0.624 0.4831 .5 controlpoint
X0.6054 0.4801 .5 controlpoint
X0.5864 0.4764 .5 controlpoint
X0.5682 0.4732 .5 controlpoint
X0.552 0.472 .5 controlpoint
X0.535 0.477 .5 controlpoint
X0.5144 0.482 .5 controlpoint
X0.4951 0.4844 .5 controlpoint
X0.48 0.4831 .5 controlpoint
X0.456 0.4382 .5 controlpoint
X0.4604 0.409 .5 controlpoint
X0.48 0.382 .5 controlpoint
X0.51 0.37 .5 controlpoint
X0.5281 0.3704 .5 controlpoint
X0.544 0.371 .5 controlpoint
X0.5734 0.3574 .5 controlpoint
X0.6 0.3483 .5 controlpoint
X0.6254 0.341 .5 controlpoint
X0.648 0.337 .5 controlpoint
X0.675 0.3303 .5 controlpoint
X0.688 0.326 .5 controlpoint
X
X0.472 0.472 moveto
X0.48 0.472 .5 controlpoint
X0.4954 0.472 .5 controlpoint
X0.52 0.472 .5 controlpoint
X0.537 0.453 .5 controlpoint
X0.544 0.427 .5 controlpoint
X0.512 0.382 .5 controlpoint
X0.487 0.388 .5 controlpoint
X0.472 0.3932 .5 controlpoint
X
X0.528 0.371 moveto
X0.5164 0.3683 .5 controlpoint
X0.496 0.36 .5 controlpoint
X0.4782 0.358 .5 controlpoint
X0.464 0.3483 .5 controlpoint
X0.452 0.311 .5 controlpoint
X0.464 0.27 .5 controlpoint
X0.483 0.25 .5 controlpoint
X0.512 0.236 .5 controlpoint
X0.5432 0.217 .5 controlpoint
X0.576 0.2022 .5 controlpoint
X0.596 0.195 .5 controlpoint
X0.608 0.191 .5 controlpoint
X
X0.464 0.27 moveto
X0.488 0.27 .5 controlpoint
X0.505 0.2643 .5 controlpoint
X0.52 0.27 .5 controlpoint
X0.536 0.2921 .5 controlpoint
X0.5294 0.314 .5 controlpoint
X0.52 0.337 .5 controlpoint
X0.5062 0.349 .5 controlpoint
X0.488 0.3483 .5 controlpoint
X0.464 0.3483 .5 controlpoint
X
X0.52 0.225 moveto
X0.496 0.236 .5 controlpoint
X0.47 0.2334 .5 controlpoint
X0.448 0.225 .5 controlpoint
X0.432 0.191 .5 controlpoint
X0.442 0.164 .5 controlpoint
X0.464 0.135 .5 controlpoint
X0.48 0.124 .5 controlpoint
X0.496 0.1123 .5 controlpoint
X0.5192 0.1042 .5 controlpoint
X0.544 0.09 .5 controlpoint
X0.552 0.09 .5 controlpoint
X
X0.472 0.225 moveto
X0.488 0.225 .5 controlpoint
X0.512 0.2022 .5 controlpoint
X0.512 0.169 .5 controlpoint
X0.496 0.157 .5 controlpoint
X0.472 0.1573 .5 controlpoint
X0.45 0.162 .5 controlpoint
X0.44 0.169 .5 controlpoint
X
X0.392 0.652 moveto
X0.3811 0.6531 .5 controlpoint
X0.36 0.6404 .5 controlpoint
X0.328 0.5842 .5 controlpoint
X
X} def
X
X/fingertip-y .551 def % finger tip @ (1, fingertip-y)
X
X/pointer-path { % fx fy tx ty size fingers? => -
X  10 dict begin
X    /fingers? exch def  /size exch def
X    /ty exch def  /tx exch def  /fy exch def  /fx exch def
X    /dx tx fx sub def  /dy ty fy sub def
X    /ang
X      dy dx
X      2 copy 0 eq exch 0 eq and { pop pop 0 } { atan } ifelse
X    def
X    /mat matrix currentmatrix def
X    fx fy moveto
X    tx ty translate
X    ang rotate
X    size dup .75 mul scale
X    -1 fingertip-y neg translate %  finger tip to 0,0
X    open-pointing-hand
X    closepath
X    fingers? { pointing-fingers } if
X    mat setmatrix
X  end % localdict
X} def
X
X/get-pointer { % - => FromX FromY ToX ToY
X    fboverlay setcanvas
X    getclick
X    /FromY exch def /FromX exch def
X    FromX FromY
X    { x0 y0 x y 64 false pointer-path stroke }
X    getanimated
X    waitprocess aload pop
X    /ToY exch def /ToX exch def
X    FromX FromY ToX ToY
X} def
X
X/get-pointer-to { % ToX ToY - => ToX ToY Direction Distance
X    fboverlay setcanvas
X    /ToY exch def /ToX exch def
X    ToX ToY
X    { pop pop x y x0 y0 64 false pointer-path stroke }
X    getanimated
X    waitprocess aload pop
X    /FromY exch def /FromX exch def
X    ToX ToY
X    ToY FromY sub ToX FromX sub
X    2 copy
X    2 copy 0 eq exch 0 eq and { pop pop 0 } { atan } ifelse
X    3 1 roll
X    dup mul exch dup mul add sqrt
X} def
X
X/UseOverlay? systemdict /OverlayWindow known def
X
X/PointWindow
XUseOverlay? { OverlayWindow } { DefaultWindow } ifelse
Xdictbegin
X   UseOverlay?  framebuffer /Color get not or {
X     /HandColor .75 .75 .75 rgbcolor def
X     /BackgroundColor 1 1 1 rgbcolor def
X     /FrameBorderColor 0 0 0 rgbcolor def
X     /TextColor 0 0 0 rgbcolor def
X   } {
X     /HandColor ColorDict /Tan get def
X     /BackgroundColor ColorDict /LightSteelBlue get def
X     /FrameBorderColor ColorDict /DarkSlateBlue get def
X     /TextColor ColorDict /Coral get def
X  } ifelse
X  /Strings [(That)] def
X  /Font /Helvetica-Bold findfont 16 scalefont def
X  /LineHeight 20 def
X  /Margin 8 def
X  /Distance 0 def
X  /Angle 0 def
X  /TipX 0 def
X  /TipY 0 def
X  /EndX 0 def
X  /EndY 0 def
X  /X null def
X  /Y null def
X  /Width null def
X  /Height null def
X  /FrameRadius 6 def
X  /BorderTop 4 def
X  /BorderBottom 4 def
X  /BorderLeft 4 def
X  /BorderRight 4 def
X  /Hand? true def
Xdictend
Xclassbegin
X
X  UseOverlay? not {
X    /FullColor {} def
X  } {
X    /FullColor {
X      gsave
X	EnableCanvas setcanvas 0 fillcanvas
X      grestore
X    } def
X    /CreateClientCanvas {
X      /CreateClientCanvas super send
X      ColorCanvas /Retained false put
X      ColorCanvas /Transparent true put
X      framebuffer /Color get {
X        FrameCanvas /Retained false put
X%        FrameCanvas /Transparent true put
X      } if
X    } def
X  } ifelse
X
X  /HandHeight 64 def
X  /HandWidth 80 def
X
X  /setmessage { % str | [str str ...] => -
X    dup type /arraytype ne {
X      [ exch ]
X    } if
X    /Strings exch store
X  } def
X
X  /minsize { % - => w h
X    gsave
X      framebuffer setcanvas
X      Font setfont
X      0 Strings {
X        stringwidth pop max
X      } forall
X      Margin dup add add BorderLeft add BorderRight add
X      Strings length LineHeight mul
X      Margin dup add add BorderTop add BorderBottom add
X    grestore
X  } def
X
X  /reshape { % x y w h => -
X    /FrameHeight exch def  /FrameWidth exch def
X    /FrameY exch def  /FrameX exch def
X    /EndX FrameX FrameWidth 2 div add def
X    /EndY FrameY FrameHeight 2 div add def
X    FrameX FrameY FrameWidth FrameHeight /reshape super send
X    gsave
X      framebuffer setcanvas FrameCanvas getcanvaslocation
X      /dy exch FrameY sub def
X      /dx exch FrameX sub def
X%(X % Y % dx % dy %\n) [FrameX FrameY dx dy] dbgprintf
X    grestore
X  } def
X
X  /slide {
X    /Hand? false def
X    FrameX FrameY FrameWidth FrameHeight reshape
X    /slide super send
X  } def
X
X  /slideconstrained {
X    /Hand? false def
X    FrameX FrameY FrameWidth FrameHeight reshape
X    /slideconstrained super send
X  } def
X
X  /FramePath {
X    FrameRadius 5 1 roll % r x y w h
X    3 -1 roll 1 index add 3 1 roll neg % r x y+h w -h
X    rrectpath % X11/NeWS: This makes inside-out corners! Fix!
X    Hand? {
X      EndX FrameX sub EndY FrameY sub
X      TipX FrameX sub TipY FrameY sub 
X      HandHeight false pointer-path
X      closepath
X    } if
X  } def
X
X  /ClientPath { % - => - ([Re]set client canvas' shape)
X    FrameCanvas setcanvas clippath
X  } def
X
X  /PaintFrame {
X%    ClientCanvas setcanvas
X    UseOverlay? {
X      EnableCanvas setcanvas 0 fillcanvas
X      OverlayCanvas setcanvas
X    } if
X    Hand? {
X      HandColor fillcanvas
X      newpath
X      EndX FrameX sub EndY FrameY sub
X      TipX FrameX sub TipY FrameY sub 
X      HandHeight true pointer-path
X      closepath
X      FrameBorderColor setcolor
X      stroke
X    } if
X    FrameRadius 0 0 FrameWidth FrameHeight rrectpath
X    FrameRadius BorderLeft BorderBottom 
X    FrameWidth BorderLeft sub BorderRight sub
X    FrameHeight BorderBottom sub BorderTop sub rrectpath
X    FrameBorderColor setcolor eofill
X    FrameRadius BorderLeft BorderBottom 
X    FrameWidth BorderLeft sub BorderRight sub
X    FrameHeight BorderBottom sub BorderTop sub rrectpath
X    BackgroundColor setcolor
X    fill
X  } def
X
X  /PaintClient {
X    gsave
X      UseOverlay? {
X        FullOverlay
X        OverlayCanvas setcanvas
X      } if
X      Margin ClientHeight Margin 2 div sub translate
X      TextColor setcolor
X      Font setfont
X      Strings {
X        0 LineHeight neg translate
X	0 0 moveto
X	show
X      } forall
X    grestore
X  } def
X
X  /PaintFocus {} def
X
X  /point { % tipx tipy angle distance => -
X    /Distance exch def
X    /Angle exch def
X    /TipY exch def
X    /TipX exch def
X
X    % Back off a couple points so you can see what I'm pointing at,
X    % and so the cursor is still in the same canvas.
X    /dx Angle cos neg def  /dy Angle sin neg def
X    /TipX TipX dx dup add sub def
X    /TipY TipY dy dup add sub def
X
X    minsize % w h
X    /Height exch def /Width exch def
X
X%    /Distance Height Width max 2 div Distance add def
X    
X%    /EndX TipX Distance Width add dx mul add def
X%    /EndY TipY Distance Height add dy mul add def
X    /EndX TipX Distance dx mul add def
X    /EndY TipY Distance dy mul add def
X
X    /X EndX Width 2 div sub def
X    /Y EndY Height 2 div sub def
X
X    X Y Width Height reshape
X
X  } def
X
X  /PaintLabel {
X  } def
X
X  /move {
X    /Hand? true def
X    FrameWidth FrameHeight reshape
X  } def
X  
Xclassend def
X
X/pointmsg { %  tipx tipy ang dist strings => process
X  { 10 dict begin
X    newprocessgroup
X    /win framebuffer /new PointWindow send def
X    /setmessage win send
X    /point win send
X    /map win send
X  end } fork
X  5 1 roll 5 { pop } repeat
X} def
X
Xend % systemdict
X
X%get-pointer 
X%FromX FromY (From) popmsg pop
X%ToX ToY (To) popmsg pop
X
//go.sysin dd *
if [ `wc -c < pointer.ps` != 12978 ]; then
	made=false
	echo error transmitting pointer.ps --
	echo length should be 12978, not `wc -c < pointer.ps`
else
	made=true
fi
if $made; then
	chmod 664 pointer.ps
	echo -n '	'; ls -ld pointer.ps
fi
echo Extracting mics.ps
sed 's/^X//' <<'//go.sysin dd *' >mics.ps
X%!
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X% 
X% @(#)MiCS.ps
X% Molecules in Cyber Space 
X% Copyright (C) 1989.
X% By Don Hopkins. (don@brillig.umd.edu)
X% All rights reserved.
X% 
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X% 
X% You are free to redistribute this program.  Please leave the comments
X% intact, add your own interpretations, views, hallucinations, navagation 
X% aids, and pass it on to friends!  The author is not responsible for any 
X% time or brain cells wasted with this software.
X% 
X% This is an almost totally rewritten version of the Pseudo Scientific
X% Visualizer (the browser for the other half of your brain).
X% 
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X
X% We've got to have various classes defined...
X
Xsystemdict /PieMenu known not {
X  (NeWS/piemenu.ps) LoadFile not {
X    currentcursorlocation
X    [(Need) (piemenu.ps)] popmsg pop
X    currentprocess killprocess
X  } if
X} if
X
Xsystemdict /PulloutPieMenu known not {
X  (NeWS/pullout.ps) LoadFile not {
X    currentcursorlocation
X    [(Need) (pullout.ps)] popmsg pop
X    currentprocess killprocess
X  } if
X} if
X
Xsystemdict /OverlayWindow known not {
X  (NeWS/overlay.ps) LoadFile not {
X    currentcursorlocation
X    [(Need) (overlay.ps)] popmsg pop
X    currentprocess killprocess
X  } if
X} if
X
Xsystemdict /pointing-hand known not {
X  (NeWS/pointer.ps) LoadFile not {
X    currentcursorlocation
X    [(Need) (pointer.ps)] popmsg pop
X    currentprocess killprocess
X  } if
X} if
X
Xsystemdict /StillDict known not {
X  (NeWS/distill.ps) LoadFile not {
X    currentcursorlocation
X    [(Need) (distill.ps)] popmsg pop
X    currentprocess killprocess
X  } if
X} if
X
Xsystemdict begin
X
Xsystemdict /growabledict known not {
X  /growabledict { 5000 dict } def
X} if
X
X/MoleculeDict 200 dict def
XMoleculeDict begin
X
X  /ColorHueFrob .3 def
X  /ColorSaturationFrob .5 def
X  /ColorBrightnessFrob .3 def
X
X  /ScaleX .065 def
X  /ScaleY {ScaleX} def
X
X  /ShrinkX .55 def
X  /ShrinkY {ShrinkX} def
X
X  /ArraySpread 2.1 def
X  /DictKeySpread 2.1 def
X  /DictValueSpread 2.1 def % translate happens *after* scaling down
X
X  /ProcessMax 10 def
X  /ForkProb .8 def
X
X  /DepthDraw 3 def
X  /DepthTarget 999 def
X
X  /Drain? false def
X
X  /DoLines false def
X
X  /Interesting? true def
X
X  /Selective? true def
X
X
X
X  /_Leaf_ { /DepthDraw MyDepth def } def
X
X  /MagicKeys 50 dict def
X  MagicKeys begin
X    /TopCanvas //_Leaf_ def
X    /BottomCanvas //_Leaf_ def
X    /CanvasAbove //_Leaf_ def
X    /Parent //_Leaf_ def
X    /FrameMenu //_Leaf_ def
X    /IconMenu //_Leaf_ def
X    /ParentDict //_Leaf_ def
X    /ParentDictArray //_Leaf_ def
X  end
X
X  /Types {
X    nulltype  integertype  realtype  booleantype  colortype  marktype
X    operatortype  nametype  stringtype  shapetype  monitortype  
X    graphicsstatetype  cursortype  filetype  arraytype  dicttype
X    fonttype  canvastype  processtype  eventtype
X% X11/NeWS:
X    savetype packedarraytype colormapentrytype environmenttype
X    colormaptype pathtype visualtype vmtype 
X  } def
X
X  /defaulttype {
X    pop
X    gsave
X      _newpath
X      -90 rotate
X      0 setlinecap
X      .1 setlinewidth
X      0 -.8 .2 0 360 arc closepath _fill
X      0 -.5 moveto
X      0 .5 .5 -90 120 arc
X      _stroke
X    grestore
X  } def
X
X  /nulltype {
X    pop
X    gsave
X      _newpath
X      -90 rotate
X      -1 -1 2 .7 rectpath
X      0 -.5 .6 180 0 arcn closepath
X      _fill
X    grestore
X  } def
X
X  /integertype {
X    gsave
X      _newpath
X      abs 1 add ln dup 10000 mul cos 1 add 2 div cvfixed
X      exch dup 1000 mul sin 1 add 2 div cvfixed
X      exch 100 mul 10 add cos 1 add 2 div cvfixed
X      setrgbcolor
X      -.6 -.6 1.2 1.2 rectpath
X      _fill
X    grestore
X  } def
X
X  /realtype {
X    integertype
X  } def
X
X  /booleantype {
X    gsave
X      _newpath
X      .1 setlinewidth
X      0 setlinecap
X      -90 rotate
X      0 0 .9 0 360 arc closepath
X      {
X	0 -.9 moveto
X	0 .9 lineto
X	-45 rotate
X	0 -.9 moveto
X	0 0 lineto
X	.9 0 lineto
X      } {
X        -45 rotate
X	0 -.9 moveto
X	0 .9 lineto
X      } ifelse
X      _stroke
X    grestore
X  } def
X
X  /colortype {
X    gsave
X      _newpath
X      0 0 .9 0 360 arc closepath
X      gsave .1 setlinewidth 0 setgray _stroke grestore
X      setcolor _fill
X    grestore
X  } def
X
X  /marktype {
X    pop
X    gsave
X      _newpath
X      -90 rotate
X      -1 -.3 translate
X      2 2 scale
X      .2 0 moveto % Nick Turner's finger
X      0 .3 lineto
X      .1 .5 lineto
X      .2 .5 lineto
X      .2 .55 lineto
X      .3 .6 lineto
X      .4 .55 lineto
X      .4 .95 lineto
X      .5 1 lineto
X      .6 .95 lineto
X      .6 .55 lineto
X      .7 .6 lineto
X      .8 .55 lineto
X      .8 .5 lineto
X      .9 .55 lineto
X      1 .5 lineto
X      1 .3 lineto
X      .8 0 lineto
X      closepath
X      _fill
X    grestore
X  } def
X
X  /operatortype {
X    pop
X    _newpath
X    -.2 -.2 .4 .4 rectpath
X    0 0 .5 0 360 arc closepath
X    _eofill
X  } def
X
X  /nametype {
X    pop
X    _newpath
X    0 -.5 moveto
X    1 0 lineto
X    0 .5 lineto
X    closepath
X    _eofill
X  } def
X
X  /stringtype {
X    length 1 add
X    _newpath
X    -.5 -.1 % x y
X    3 -1 roll 5 div .5 add .2 % x y w h
X    rectpath
X    _fill
X  } def
X
X  /shapetype {
X    defaulttype
X  } def
X
X  /monitortype {
X    gsave
X      _newpath
X      -.8 -1 1.2 1 rectpath 
X      _fill
X      0 setlinecap
X      .1 setlinewidth
X      .7 1 moveto
X      0
X      exch monitorlocked 1.2 1.6 ifelse
X      .7 0 180 arc closepath
X      _stroke
X    grestore
X  } def
X
X  /graphicsstatetype {
X    pop
X    _newpath
X    -.5 -.5 moveto
X    1 -.4 lineto
X    1 -.2 lineto
X    .8 -.2 lineto
X    1 .4 lineto
X    1 1 lineto
X    .5 .3 lineto
X    -.5 .5 lineto
X    closepath
X    _eofill
X  } def
X
X  /cursortype {
X    defaulttype
X  } def
X
X  /filetype {
X    pop
X    gsave
X      _newpath
X      90 rotate
X      -.9 -.9 1.8 .4 ovalpath
X      -.9 .5 1.8 .4 ovalpath
X      -.9 -.7 moveto
X      -.9 .7 lineto
X      .9 -.7 moveto
X      .9 .7 lineto
X      _stroke
X    grestore
X  } def
X
X  % Compound objects
X
X  /OpenArrays? true def
X
X  /arraytype {
X    gsave
X      _newpath
X      dup length 0 ne DoLines and {
X        .05 setlinewidth
X	360 1 index length div
X	dup -2 div rotate
X	1 index length {
X	  0 0 moveto
X	  ArraySpread 0 lineto
X	  dup rotate
X	  _stroke
X	} repeat
X	pop
X      } if
X      0 0 1 0 360 arc closepath 
X      0 0 .6 0 360 arc closepath
X      _eofill
X    grestore
X    OpenArrays? { compoundtype } if
X  } def
X
X  /compoundtype {
X    20 dict begin gsave
X      make-target
X      /obj exch def
X      MyDepth DepthDraw lt {
X	/pieces /obj load length def
X	pieces 0 ne {
X	  /step 360 pieces div def
X	  step -2 div rotate
X	  /i -1 def
X	  /obj load { % element
X	    pause
X	    BailOut? {pop exit} if
X	    /i i 1 add def
X	    gsave
X	      ArraySpread 0 translate
X	      ShrinkX ShrinkY scale
X	      _begingroup
X	      visualize
X	      _endgroup
X	    grestore
X	    step rotate
X	  } forall
X        } if
X      } if
X    end grestore
X  } def
X
X  /OpenDicts? true def
X
X  /dicttype {
X    gsave
X      _newpath
X      dup length 0 ne DoLines and {
X        .05 setlinewidth
X	360 1 index length div
X	dup -2 div rotate
X	1 index length {
X	  0 0 moveto
X	  DictKeySpread 0 lineto
X	  dup rotate
X	  _stroke
X	} repeat
X	pop
X      } if
X      0 0 1 0 360 arc closepath
X      0 0 .7 0 360 arc closepath
X      0 0 .3 0 360 arc closepath
X      _eofill
X    grestore
X    OpenDicts? { dictoidtype } { pop } ifelse
X  } def
X
X  /dictoidtype {
X    20 dict begin gsave
X      make-target
X      /obj exch def
X      MyDepth DepthDraw lt { 
X	/pieces /obj load length def
X	pieces 0 ne {
X	  /step 360 pieces div def
X	  step -2 div rotate
X	  /obj load { % element
X	    pause
X	    BailOut? {pop pop exit} if
X	    gsave
X	      DictKeySpread 0 translate
X	      ShrinkX ShrinkY scale
X	      _begingroup
X	      1 index visualize
X	      _endgroup
X	      DictValueSpread 0 translate
X	      _begingroup
X 	      exch MagicKeys 1 index known {
X 		10 dict begin
X 		  MagicKeys exch get exec
X 		  visualize
X 		end
X 	      } {
X	        pop visualize
X	      } ifelse
X	      _endgroup
X	    grestore
X	    step rotate
X	  } forall
X        } if
X      } if
X    end grestore
X  } def
X
X  % Bill Meine's Sunlogo:
X  /Uchar {
X     -.1 0 moveto
X     0 0 .1 180 360 arc
X     0 2.9 rlineto
X     .8 0 rlineto
X     0 -2.9 rlineto
X     0 0 .9 0 180 arcn
X     0 2.9 rlineto
X     .8 0 rlineto
X    closepath
X  } def
X  /2Uchar { 
X    Uchar matrix currentmatrix
X    4 4 translate Uchar setmatrix
X  } def
X  /Sunlogo { % xcenter ycenter s = -
X    3 1 roll               	% s xcenter ycenter
X    matrix currentmatrix 4 1 roll % matrix s xcenter ycenter
X    translate        		% matrix s
X    16 dup mul 2 div sqrt div	% s will now represent total height
X    dup scale			% matrix
X    0 3 dup mul 2 mul sqrt neg translate % new starting point from center
X    45 rotate
X    4 { 2Uchar 6 0 translate 90 rotate } repeat
X    setmatrix		% restore original CTM
X  } def
X
X  /fonttype {
X    pop
X    _newpath
X    0 0 2 Sunlogo
X    _fill
X  } def
X
X  /OpenAllCanvases? false def
X
X  /OpenCanvases? {
X    OpenAllCanvases? true {
X      dup /ParentDictArray known
X    } ifelse
X  } def
X
X  /canvastype {
X    gsave
X      _newpath
X      -.8 -.8 translate
X      2 {
X	0 0 moveto
X	1.8 0 rlineto
X	currentpoint
X	-.2 -.2 rlineto
X	moveto
X	-.2 .2 rlineto
X        90 rotate
X      } repeat
X      _stroke
X    grestore
X    OpenCanvases? { dictoidtype } { pop } ifelse
X  } def     
X
X  /OpenProcesses? false def
X
X  /processtype {
X    gsave
X      _newpath
X      90 rotate
X      -1 -1 translate
X      2 1.8 scale
X      0.634 0.83 moveto
X      0.634 0.83 0.5 controlpoint
X      0.6762 0.836 0.5 controlpoint
X      0.7723 0.8271 0.5 controlpoint
X      0.8313 0.819 0.5 controlpoint
X      0.847 0.8101 0.5 controlpoint
X      0.86 0.7903 0.5 controlpoint
X      0.867 0.748 0.5 controlpoint
X      0.8684 0.737 0.5 controlpoint
X      0.8684 0.737 0.5 controlpoint
X      0.882 0.7393 0.5 controlpoint
X      0.894 0.734 0.5 controlpoint
X      0.9021 0.7252 0.5 controlpoint
X      0.916 0.711 0.5 controlpoint
X      0.9173 0.7 0.5 controlpoint
X      0.938 0.683 0.5 controlpoint
X      0.96 0.652 0.5 controlpoint
X      0.978 0.612 0.5 controlpoint
X      0.9831 0.584 0.5 controlpoint
X      0.9831 0.5523 0.5 controlpoint
X      0.973 0.53 0.5 controlpoint
X      0.96 0.5212 0.5 controlpoint
X      0.948 0.5212 0.5 controlpoint
X      0.948 0.5212 0.5 controlpoint
X      0.9443 0.4674 0.5 controlpoint
X      0.933 0.448 0.5 controlpoint
X      0.9123 0.442 0.5 controlpoint
X      0.889 0.4334 0.5 controlpoint
X      0.8583 0.431 0.5 controlpoint
X      0.8532 0.448 0.5 controlpoint
X      0.857 0.462 0.5 controlpoint
X      0.857 0.462 0.5 controlpoint
X      0.84 0.462 0.5 controlpoint
X      0.84 0.462 0.5 controlpoint
X      0.835 0.422 0.5 controlpoint
X      0.828 0.408 0.5 controlpoint
X      0.8043 0.371 0.5 controlpoint
X      0.7723 0.3512 0.5 controlpoint
X      0.7504 0.3512 0.5 controlpoint
X      0.732 0.357 0.5 controlpoint
X      0.712 0.377 0.5 controlpoint
X      0.693 0.4022 0.5 controlpoint
X      0.678 0.439 0.5 controlpoint
X      0.673 0.4674 0.5 controlpoint
X      0.673 0.4674 0.5 controlpoint
X      0.653 0.476 0.5 controlpoint
X      0.653 0.476 0.5 controlpoint
X      0.646 0.442 0.5 controlpoint
X      0.646 0.442 0.5 controlpoint
X      0.5581 0.456 0.5 controlpoint
X      0.422 0.456 0.5 controlpoint
X      0.361 0.4674 0.5 controlpoint
X      0.302 0.456 0.5 controlpoint
X      0.287 0.456 0.5 controlpoint
X      0.2782 0.456 0.5 controlpoint
X      0.2664 0.482 0.5 controlpoint
X      0.245 0.4362 0.5 controlpoint
X      0.216 0.3852 0.5 controlpoint
X      0.167 0.3852 0.5 controlpoint
X      0.135 0.439 0.5 controlpoint
X      0.115 0.4872 0.5 controlpoint
X      0.105 0.5184 0.5 controlpoint
X      0.105 0.578 0.5 controlpoint
X      0.091 0.513 0.5 controlpoint
X      0.0573 0.51 0.5 controlpoint
X      0.039 0.541 0.5 controlpoint
X      0.024 0.561 0.5 controlpoint
X      0.0134 0.5722 0.5 controlpoint
X      0.024 0.6232 0.5 controlpoint
X      0.054 0.68 0.5 controlpoint
X      0.088 0.7252 0.5 controlpoint
X      0.088 0.731 0.5 controlpoint
X      0.054 0.765 0.5 controlpoint
X      0.037 0.771 0.5 controlpoint
X      0.039 0.8271 0.5 controlpoint
X      0.0573 0.839 0.5 controlpoint
X      0.1483 0.8441 0.5 controlpoint
X      0.1483 0.836 0.5 controlpoint
X      0.1483 0.819 0.5 controlpoint
X      0.1483 0.796 0.5 controlpoint
X      0.162 0.7903 0.5 controlpoint
X      0.1652 0.819 0.5 controlpoint
X      0.179 0.839 0.5 controlpoint
X      0.2023 0.85 0.5 controlpoint
X      0.206 0.8271 0.5 controlpoint
X      0.216 0.8243 0.5 controlpoint
X      0.221 0.8441 0.5 controlpoint
X      0.26 0.898 0.5 controlpoint
X      0.2934 0.9121 0.5 controlpoint
X      0.336 0.932 0.5 controlpoint
X      0.4114 0.952 0.5 controlpoint
X      0.4603 0.9603 0.5 controlpoint
X      0.508 0.9603 0.5 controlpoint
X      0.528 0.958 0.5 controlpoint
X      0.543 0.941 0.5 controlpoint
X      0.597 0.881 0.5 controlpoint
X      0.624 0.85 0.5 controlpoint
X      closepath
X      _fill
X    grestore
X    OpenProcesses? { dictoidtype } { pop } ifelse
X  } def
X
X  /OpenAllEvents? true def
X
X  /OpenEvents? {
X    OpenAllEvents? true {
X      dup /ParentDictArray known
X    } ifelse
X  } def
X
X  /eventtype {
X    _newpath
X    -.8 -.8 1.6 1.6 rectpath
X    -.8 .8 moveto
X    0 0 lineto
X    -.8 -.8 lineto
X    _stroke
X    OpenEvents? { dictoidtype } { pop } ifelse
X  } def
X
X  /savetype {
X    defaulttype
X  } def
X
X  /packedarraytype {
X    arraytype
X  } def
X
X  /OpenColorMapEntries? false def
X
X  /colormapentrytype {
X    dup defaulttype
X    OpenColormapEntries? { dictoidtype } { pop } ifelse
X  } def
X
X  /OpenEnvironments? false def
X
X  /environmenttype {
X    dup defaulttype
X    OpenEnvironments? { dictoidtype } { pop } ifelse
X  } def
X
X  /OpenColormaps? false def
X
X  /colormaptype {
X    dup defaulttype
X    OpenColormaps? { dictoidtype } { pop } ifelse
X  } def
X
X  /pathtype {
X    defaulttype
X  } def
X
X  /OpenVisuals? false def
X
X  /visualtype {
X    dup defaulttype
X    OpenVisuals? { dictoidtype } { pop } ifelse
X  } def
X
X  /vmtype {
X    defaulttype
X  } def
X
Xend % MoleculeDict
X
X/PSVisualizerWindow OverlayWindow
Xdictbegin
X  /FrameLabel (The NeWS Pseudo-Scientific Visualizer!) def
X  /IconLabel (PS Visualizer) def
X  /IconImage /eye def
X
X  /MyProcesses null def
X  /MyThing null def
X  /MyTop null def
X
X  /EventMgr null def
X
X  /Canvases null def
X
X  /CheapIcon? false def % quickwin mod
X  /Retained? true def
X
X  /BorderLeft 8 def 
X  /BorderRight 8 def 
X  /BorderTop 8 def 
X  /BorderBottom 8 def
X
X  /FrameFillColor .25 .25 .25 rgbcolor def
X  systemdict /fb_color known { fb_color /Color get } 
X  { framebuffer /Color get } ifelse {
X    /SpaceColor ColorDict /MediumTurquoise get def
X  } {
X    /SpaceColor 0 0 0 rgbcolor def
X  } ifelse
X  /MoleculeColor {random random .3 max sqrt random .3 max sqrt hsbcolor} def
X
X  /HilitedCan null def
X
X  /SpotRadius 28 def
X
X  /ForkPaintClient? true def
X  %/ForkPaintClient? false def
X
X  /HiliteDelay .2 60 div def
X  /LoliteDelay .4 60 div def
X  /DelayedHiliteProc null def
X
X  /DictBase null def
X
Xdictend
Xclassbegin
X
X  /FramePath { ovalpath } def
X
X  /PaintFrame {
X    FrameFillColor fillcanvas 
X  } def
X
X  /PaintFocus { 
X  } def
X
X  /ExitFrame {
X    HideSprite
X    DelayedHiliteProc null ne { 
X      DelayedHiliteProc killprocess
X      /DelayedHiliteProc null def
X    } if
X    /DelayedHiliteProc {
X      LoliteDelay sleep
X      KindaColor
X      /ExitFrame super send
X      /DelayedHiliteProc null def
X    } fork def
X  } def
X
X  /EnterFrame {
X    CurrentEvent TrackSprite
X    DelayedHiliteProc null ne { 
X      DelayedHiliteProc killprocess
X      /DelayedHiliteProc null def
X    } if
X    /DelayedHiliteProc {
X      HiliteDelay sleep
X      InteractionLock {
X	FullColor
X	/EnterFrame super send
X	/DelayedHiliteProc null def
X      } monitor
X    } fork def
X  } def
X
X  /MyDepth {
X    countdictstack DictBase sub
X  } def
X
X  /new {
X    /new super send begin
X      /MyThing exch def
X      /MyTop /MyThing load def
X      /MyProcesses 100 dict def
X      currentdict
X    end
X  } def
X
X  /destroy { % clean up
X    zap-processes
X    /MyThing null store
X    /MyTop null store
X    zap-canvases
X    /destroy super send
X  } def
X
X  /zap-processes {
X    EventMgr type /processtype eq {
X      EventMgr killprocess
X    } if
X    MyProcesses {
X      dup currentprocess ne { killprocess } {
X	% No owch!
X      } ifelse
X      MyProcesses exch undef
X    } forall
X  } def
X
X  /zap-canvases {
X    /HilitedCan null store
X    Canvases null ne {
X      Canvases {
X          /obj undef
X	  Canvases 1 index undef
X% 	  /Interests get
X% 	  % Careful not to zap the global keyboard manager!
X% 	  { dup /Process get dup null eq { pop } {
X% 	      dup currentprocess eq { pop } { killprocess } ifelse
X% 	    } ifelse
X% 	    %{ revokeinterest } errored {pop} if
X% 	    pop
X% 	  } forall
X	  pop
X	} forall
X    } if
X  } def
X
X  /drain {
X    MoleculeDict /Drain? true put
X    fart-around
X    MoleculeDict /Drain? false put
X  } def
X
X  /fart-around {
X    { MyProcesses length 0 eq { exit } if
X      MyProcesses { pop exit } forall % Grab one process
X      waitprocess pop
X    } loop
X  } def
X
X  /PaintClient {
X    gsave
X      FrameCanvas setcanvas
X      damagepath clipcanvas
X      newpath clipcanvas
X      repaint
X    grestore
X  } def
X
X  /repaint {
X    FullColor
X    BlackOverlay
X    ColorCanvas setcanvas 
X    EventMgr null ne {
X      EventMgr killprocess
X      /EventMgr null store
X    } if
X    {
X      clear
X      newprocessgroup
X      drain
X      zap-processes
X      zap-canvases
X      /Canvases growabledict store
X      SpaceColor fillcanvas
X      MoleculeColor setcolor
X      StillDict begin _stillbegin
X	MoleculeDict begin 
X	  /DictBase countdictstack store
X	  clippath pathbbox scale pop pop
X	  .5 .5 translate ScaleX ScaleY scale
X	  { /MyThing load
X	    _begingroup visualize _endgroup
X	    MyProcesses currentprocess undef
X	  } fork MyProcesses exch dup put
X	  fart-around
X	  ColorCanvas setcanvas
X	  EventMgr dup null ne exch currentprocess ne and {
X	    EventMgr killprocess
X	    % this is a futile attempt to get a new event manager process
X	    % corpus, so we don't get any events destined for the old one.
X	    % (see sjs's blankscreen comments)
X	    { clear .1 sleep } fork pop 
X	  } if
X	  [ Canvases { pop
X	      [ /EnterEvent /ExitEvent PointButton AdjustButton MenuButton ]
X	      /target-event null 4 -1 roll eventmgrinterest
X	    } forall
X	    PointButton /point-background null TrackCanvas eventmgrinterest
X	    /MouseDragged /drag-background null TrackCanvas eventmgrinterest
X	  ] forkeventmgr
X	end % MoleculeDict
X      _stillend end % StillDict
X      /EventMgr exch store
X      clear
X    } fork pop
X    newpath clipcanvas
X    .5 60 div sleep fart-around
X  } def
X
X  /activate {
X    map
X  } def
X
X  /reshape {
X    /reshape super send
X  } def
X
X  /hilite-can { % can => -
X    lolite-hilited-can
X    /HilitedCan 1 index def
X    1 exch HiliteCan
X  } def
X
X  /lolite-hilited-can {
X    HilitedCan null ne {
X      HilitedCan LoliteCan
X      /HilitedCan null def
X    } if
X  } def
X
X  /shimmer-hilited-can {
X    HilitedCan ShimmerCan
X  } def
X
X  /drag-background { % event => -
X   DelayedHiliteProc null eq {
X       CurrentEvent TrackSprite
X       HilitedCan null ne {
X         random shimmer-hilited-can
X       } if
X   } if
X   pop
X  } def
X
X  /point-background { % - => event
X   {
X    gsave
X      CurrentEvent /Action get /DownTransition eq {
X        DarkColor
X        Canvases { % can dict
X	  begin
X	    Interesting? {
X	      random
X	      dup .4 lt { pause } if
X	      2 div .5 add exch HiliteCan
X	    } { pop } ifelse
X	  end
X	} forall
X      } {
X%         FullColor
X      } ifelse
X    grestore
X   } fork pop pause pause
X   pop
X  } def
X
X  /smart-name where { pop } { % see if smart-name from cyber is defined
X    % otherwise just be dumb
X    /smart-name { % obj => name
X      dup type (% %) sprintf
X    } def
X  } ifelse
X
X  /quicksort where { pop } { % see if quicksort is defined (cyber or xnews)
X    % otherwise just be out of sorts
X    /quicksort { % array compare => array
X      pop
X    } def
X  } ifelse
X
X  /target-event-names 10 dict def
X  target-event-names begin
X    PointButton {
X      CurrentEvent /Action get /DownTransition eq {
X	Canvases
X%	CurrentEvent /Canvas get get /obj get
X	CurrentEvent /Interest get /Canvas get get /obj get
X	select-object
X      } {
X	Canvases
X%	CurrentEvent /Canvas get get /obj get
X	CurrentEvent /Interest get /Canvas get get /obj get
X	dup length 20 le {
X          [ exch
X	    dup smart-name (%:) sprintf exch
X	    dup type dup /arraytype eq exch /packedarraytype eq or {
X	      0 exch { 
X                smart-name 1 index (  %: %) sprintf exch 1 add
X	      } forall
X	      pop
X	    } {
X	      [ exch
X	        { smart-name exch (  %: %) sprintf } forall
X	      ] /gt load quicksort
X	      aload pop
X	    } ifelse
X	  ]
X	} {
X	  smart-name
X	} ifelse
X	gsave
X	  DarkColor
X	  framebuffer setcanvas
X	  currentcursorlocation
X	  get-pointer-to
X	  5 -1 roll
X	  pointmsg pop
X	grestore
X      } ifelse
X    } def
X
X    AdjustButton {
X      CurrentEvent /Action get /DownTransition eq {
X	Canvases
X	CurrentEvent /Interest get /Canvas get get /obj get
X	/MyThing exch store
X	{ repaint } fork pop
X      } {
X      } ifelse
X    } def
X
X    MenuButton {
X      CurrentEvent /Action get /UpTransition eq {
X        Canvases
X	CurrentEvent /Interest get /Canvas get get /obj get
X	KindaColor % Make overlay visible for /reshapefromuser
X	CurrentEvent recallevent
X	start_visualizer
X      } {
X      } ifelse
X    } def
X
X    /EnterEvent {
X      CurrentEvent /Interest get /Canvas get
X      dup hilite-can
X      CurrentEvent /KeyState get length 0 ne {
X        Canvases 1 index get /obj get select-object
X      } if
X%      canvastotop
X      pop
X      pause
X    } def
X
X    /ExitEvent {
X      CurrentEvent /Interest get /Canvas get 
X      HilitedCan null eq { pop } {
X	HilitedCan
X        lolite-hilited-can
X	pause
X        canvastobottom
X      } ifelse
X    } def
X
X  end
X
X  /target-event { % event => -
X    gsave
X      target-event-names CurrentEvent /Name get get exec
X    grestore
X    pop
X  } def
X
X  /maxint .5 minim div 1 sub def
X
XXNeWS? {
X  /cvfixed {} def
X} {
X  /cvfixed {
X    1024 mul floor maxint min cvi -10 bitshift
X  } def
X} ifelse
X
X  /wrap {
X    dup floor sub cvfixed
X  } def
X
X  % This is useful for finding core leaks ... (Really!)
X  /context-string { % => (string)
X    ()
X    currentprocess /DictionaryStack get 
X    dup length 2 sub 2 exch getinterval
X    { dup /obj known {
X	begin i /obj load 3 -1 roll (%/%:%) sprintf end
X      } {pop} ifelse
X    } forall
X    1 index exch (%	=	%) sprintf
X  } def
X
X  /make-target {
X    MyDepth DepthTarget le {
X      Canvases dup length exch maxlength 10 sub ge {
X        Canvases dup maxlength 1.5 mul floor exch extend pop
X      } if
X      /can TrackCanvas newcanvas def
X      0 0 1 0 360 arc can reshapecanvas
X      can /Retained false put
X      can /Transparent true put
X      can /Mapped true put
X      Canvases can currentdict put
X    } if
X  } def
X
X  /BailOut? {
X    MyDepth DepthDraw gt
X    Drain? or
X  } def
X
X  /visualize { % obj => -
X    pause
X    BailOut? { pop } {
X      { gsave
X	  currenthsbcolor
X	  3 -1 roll random ColorHueFrob mul sub wrap
X	  3 -1 roll random ColorSaturationFrob mul sub wrap
X	  .3 max
X	  sqrt % Crank up the saturation!
X	  3 -1 roll random ColorBrightnessFrob mul sub wrap
X	  .3 max
X	  sqrt % Crank up the brightness!
X	  sethsbcolor
X	  dup type cvx exec
X	grestore
X      } 
X      MyProcesses length ProcessMax lt
X      random ForkProb lt and not { exec } { 
X	{ exec
X          MyProcesses currentprocess 
X	  undef
X        } fork
X	MyProcesses exch dup put
X	pop pop
X      } ifelse
X    } ifelse
X  } def
X
X
X% Menu definitions
X
X  /ColorFrobMenu [
X    [(0.0) (0.02) (0.05)
X     (0.1) (0.2) (0.3) (0.4) (0.5) (0.6) (0.7) (0.8) (0.9) (1.0) (99)]
X  ] [
X    (HueFrob) { MoleculeDict /ColorHueFrob getmenuarg cvr put }
X    (BrightnessFrob) { MoleculeDict /ColorBrightnessFrob getmenuarg cvr put }
X    (SaturationFrob) { MoleculeDict /ColorSaturationFrob getmenuarg cvr put }
X  ] /new PulloutPieMenu send def
X
X  /ThingMenu [
X    (Top) {
X      {/MyThing /MyTop load store } ThisWindow send }
X    (SendContexts) {
X      ThisWindow /MyThing currentprocess /SendContexts get put }
X    (Object) {
X      ThisWindow /MyThing Object put }
X    (rootmenu) {
X      ThisWindow /MyThing rootmenu put }
X    (DefaultMenu) {
X      ThisWindow /MyThing DefaultMenu put }
X    (userdict) {
X      ThisWindow /MyThing userdict put }
X    (PrimarySelection) {
X      ThisWindow /MyThing /PrimarySelection getselection put }
X    (self) {
X      ThisWindow /MyThing self put }
X    (PSVisualizerWindow) {
X      ThisWindow /MyThing PSVisualizerWindow put }
X    (MoleculeDict) {
X      ThisWindow /MyThing MoleculeDict put }
X  ] /new PieMenu send def
X
X  /FlagsMenu [
X    (Lines On) {MoleculeDict /DoLines true put}
X    (Distill On) {StillDict /_out? true put}
X    (Lines Off) {MoleculeDict /DoLines false put}
X    (Distill Off) {StillDict /_out? false put}
X  ] /new PieMenu send def
X
X  /ClientMenu [
X    [(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
X     (11) (12) (13) (14) (15) (16) (17) (18) (19) (20)]
X    []
X    [(0) (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (9999)]
X    []
X    []
X    []
X    [(0) (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (9999)]
X    []
X  ] [
X    (MaxProcs) 
X      { MoleculeDict /ProcessMax getmenuarg cvi put }
X    (Flags...) FlagsMenu
X    (DrawDepth)
X      { MoleculeDict /DepthDraw getmenuarg cvi put }
X    (ColorFrob...) ColorFrobMenu
X(---) {}
X    (Thing...) ThingMenu
X    (TargetDepth)
X      { MoleculeDict /DepthTarget getmenuarg cvi put }
X    (visualize) { /repaint ThisWindow send }
X  ] /new PulloutPieMenu send def
X
X  % Hurray for you -- you're reading the source code!
X  % To find core leaks, visualize objects in your application's userdict, 
X  % and look for the infinite regression of circular references.
X  % (warning: magic dicts in systemdict get "unregistered" errors!)
X
Xclassend def
X
X/select-object { % obj => -
X  20 dict begin
X    /SelectionType /object def
X    /ContentsPostScript 1 index def
X    /ContentsAscii exch (%) sprintf def
X    /SelectionObjSize 1 def
X    /SelectionResponder null def
X    /Canvas currentcanvas def % XXX?
X    /SelectionHolder currentprocess def % XXX?
X    currentdict
X  end
X  /PrimarySelection setselection
X} ?def
X
X/start_visualizer { % thing =>
X  { 
X    InteractionLock {
X      framebuffer setcanvas
X      newprocessgroup
X      framebuffer /new PSVisualizerWindow send
X      fboverlay setcanvas
X      currentcursorlocation
X      { 2 copy lineto 16 0 rmoveto 16 0 360 arc stroke }
X      getanimated
X      waitprocess aload pop % centerx centery
X      2 copy
X      { newpath % x y
X        y0 sub dup mul exch x0 sub dup mul add sqrt % r
X	16 max
X	x0 y0 3 -1 roll 0 360 arc
X      } getanimated
X      waitprocess aload pop % centerx centery edgex edgey
X      10 dict begin
X	/ey exch def /ex exch def /cy exch def /cx exch def
X	/r cx ex sub dup mul cy ey sub dup mul add sqrt 16 max def
X	cx r sub cy r sub r dup add dup % x y w h
X      end
X      /reshape 5 index send
X      /SpaceColor where {
X	pop
X	gsave
X	  SpaceColor setcolor
X          currenthsbcolor
X	  3 -1 roll random ColorHueFrob mul add wrap
X	  3 1 roll hsbcolor
X	  1 index exch % win win color
X	  /SpaceColor exch put % win
X	grestore
X      } if
X    } monitor
X    /activate exch send
X  } fork pop pop
X} def
X
Xend % systemdict
X
X% visualize command line args, if any.
X{ clear
X  { ($1 $2 $3 $4 $5 $6 $7 $8 $9) cvx exec } errored not {
X    count 0 ne {
X      start_visualizer
X    } if
X  } if
X} fork pop
//go.sysin dd *
if [ `wc -c < mics.ps` != 27330 ]; then
	made=false
	echo error transmitting mics.ps --
	echo length should be 27330, not `wc -c < mics.ps`
else
	made=true
fi
if $made; then
	chmod 664 mics.ps
	echo -n '	'; ls -ld mics.ps
fi
echo Extracting cyber.ps
sed 's/^X//' <<'//go.sysin dd *' >cyber.ps
X#!/usr/NeWS/bin/psh
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X%
X% Cyber Space Deck
X% Copyright (C) 1989.
X% By Don Hopkins. (don@brillig.umd.edu)
X% All rights reserved.
X%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X%
X%  This program is provided for UNRESTRICTED use provided that this
X%  copyright message is preserved on all copies and derivative works.
X%  This is provided without any warranty. No author or distributor
X%  accepts any responsibility whatsoever to any person or any entity
X%  with respect to any loss or damage caused or alleged to be caused
X%  directly or indirectly by this program. This includes, but is not
X%  limited to, any interruption of service, loss of business, loss of
X%  information, loss of anticipated profits, core dumps, abuses of the
X%  virtual memory system, or any consequential or incidental damages
X%  resulting from the use of this program.
X%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X%
X% WARNING WARNING! DANGER! DANGER WILL ROBINSON! DANGER!
X% This is *gross* code. I mean UUUUUGLY! (And it used to be
X% even more contorted, if you can believe that.) 
X%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X% This version works with NeWS 1.1, X11/NeWS beta 2, and X11/NeWS pre-fcs
X
Xsystemdict /XNeWS? known not {
X  systemdict /XNeWS? false put
X} if
X
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X% Load necessary stuff
X
X% I want to know the name of the directory in which to look for all the 
X% files I'm going to want to suck in. Here are three ways for you to tell
X% me, any of which you can select and paste into a terminal emulator.
X% You can put the directory name in the systemdict variable /CyberDir:
X%   echo "/CyberDir (`pwd`) def" | psh ; psh cyber.ps
X% Or set the environmment variable CYBERDIR:
X%   echo "(CYBERDIR) (`pwd`) putenv" | psh ; psh cyber.ps
X% Or pass it in as an argument to psh (NeWS 1.1):
X%   psh cyber.ps `pwd`
X
Xsystemdict begin
X
X/CyberDir where { 
X  pop
X  /CyberDir CyberDir (/) append def
X} {
X  { (CYBERDIR) getenv } errored {
X    pop 
X    % Warning:
X    %   X11/NeWS psh does not support the undocumented $1 $2 $3 feature.
X    ($1/) dup 0 get 36 eq {
X      pop
X      /CyberDir () def
X    } {
X      /CyberDir exch (/) append def
X    } ifelse
X  } {
X    /CyberDir exch (/) append def
X  } ifelse
X} ifelse
X
Xend % systemdict
X
Xsystemdict /DontSetDefaultMenu true put
X
X[
X  /Item			(liteitem.ps)
X  /dbgstart		(debug.ps)
X  /TextCanvas		(textcan.ps)
X  /PieMenu		(piemenu.ps)
X  /PulloutPieMenu	(pullout.ps)
X  /OverlayWindow	(overlay.ps)
X  /pointing-hand	(pointer.ps)
X  /StillDict		(distill.ps)
X  /start_visualizer	(mics.ps)
X] {
X  dup type /nametype eq {
X    systemdict exch known not
X  } {
X    exch {
X      (Loading ) print dup print (\n) print flush
X      pause pause pause
X      CyberDir 1 index append 
X      LoadFile {
X	pop
X      } {
X        dup LoadFile {
X	  pop
X	} {
X	  dup (NeWS/) exch append 
X	  LoadFile {
X	    pop
X	  } {
X	    (Can't find the file ") print print ("!\n) print
X	  } ifelse
X	} ifelse
X      } ifelse
X    } {
X      pop
X    } ifelse
X  } ifelse
X} forall
X
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X% Brute force debugging hacks
X% Ignore this stuff. It was written when I was very frustrated.
X
X
X(% ifdef PISSEDOFF
Xsystemdict begin
X  /s 32 string def
X  false setautobind
Xsystemdict /logfile known not {
X  /logfile (log.out) (w) file def
X  %/logfile ($1) (w) file def
X  %/logfile (/j/don/foo) (w) file def
X  /def { 
X    2 copy exch
X    logfile (def: ) writestring
X    logfile exch //s cvs writestring
X    logfile ( = ) writestring
X    logfile exch //s cvs writestring
X    logfile (\n) writestring
X    logfile flushfile
X    //def
X  } def
X  /store {
X    2 copy exch
X    logfile (store: ) writestring
X    logfile exch //s cvs writestring
X    logfile ( = ) writestring
X    logfile exch //s cvs writestring
X    logfile (\n) writestring
X    logfile flushfile
X    //store
X  } def
X  /put {
X    3 copy exch 3 -1 roll
X    logfile (put: ) writestring
X    logfile exch //s cvs writestring
X    logfile ( ) writestring
X    logfile exch //s cvs writestring
X    logfile ( = ) writestring
X    logfile exch //s cvs writestring
X    logfile (\n) writestring
X    logfile flushfile
X    //put
X  } def
X  /get {
X    2 copy exch
X    logfile (get: ) writestring
X    logfile exch //s cvs writestring
X    logfile ( ) writestring
X    logfile exch //s cvs writestring
X    logfile ( = ) writestring
X    //get
X    logfile 1 index //s cvs writestring
X    logfile (\n) writestring
X    logfile flushfile
X  } def
X  /send {
X    logfile (send: ) writestring
X    logfile 2 index //s cvs writestring
X    logfile ( ) writestring
X    logfile 1 index /ClassName exch //send //s cvs writestring
X    logfile (\n) writestring
X    logfile flushfile
X    //send
X  } def
X} if
Xsystemdict /s undef
Xend % systemdict
X) % endif PISSEDOFF
X%cvx exec
Xpop
X
X% For use when mildly irritated:
X
X% XXX: Uncomment to find mismatched parens:
X%/def {1 index = //def} def
X
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X% And now for something completely different
X
Xstatusdict begin
X  0 setjobtimeout
Xend
X
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X% X11/NeWS Compatibility
X
X% This is nasty evil vile implementation dependant hackery. 
X
XXNeWS? {
X
Xsystemdict begin
X
X% not defined in X11/NeWS beta 2
X  /PutInEventMgrInterest { % interest key value => -
X      3 -1 roll dup /ClientData get % key val int CD
X      dup null ne { exch pop } { % key val int null
X	pop dup /ClientData 20 dict put
X	/ClientData get
X      } ifelse
X      3 1 roll put
X  } def
X
X% not defined in X11/NeWS beta 2
X  /GetFromCurrentEvent { % key => value
X      CurrentEvent /Interest get /ClientData get exch get
X  } def
X
X% not defined in X11/NeWS beta 2
X  /removefocusinterest {
X    pop
X  } def
X
X% not defined in X11/NeWS beta 2 class.ps
X  Object /InstanceVarDict { InstanceVars } put
X
X% not defined in X11/NeWS beta 2
X  /overlayerase {} def % beta2
X
X% not defined in X11/NeWS beta 2
X  /overlaydraw {} def % beta2
X
X% Make it so the debugger /printf's in MessageItem context don't hose us!
X  MessageItem /printf undef
X
X% The rest of this crud is for beta 2 bugs that were fixed in pre-fcs.
Xversion (1.0) eq { % beta 2 (not pre-fcs)
X
X% Fixes fatal debugger bug:
X  /executive { % - => - (Execute current file)
X      countdictstack 1 eq {200 dict begin} if % make sure there is a userdict
X      currentprocess /ErrorDetailLevel 1 put
X      /execfile currentfile dup null eq {pop (%stdin) (r) file} if def
X
X      (Welcome to %NeWS Version %\n) [XNeWS?{(X11/)} {()} ifelse version] printf
X      {   % restart loop for errors.
X% Removed references to execfile (screws up debugger).
X%	{ execfile cvx exec } stopped pop
X%	execfile status not { quit } if	% quit if file closed
X	  { currentprocess /Stdout get cvx exec } stopped pop
X	  currentprocess /Stdout get status not { quit } if % quit if file closed
X	  ExecutiveErrorHandler
X      } loop
X  } def
X
X% Another patch for the debugger bug just in case:
X  /execfile { currentprocess /Stdout get } def
X
X% Keep killprocess "errors" from being caught by the debugger.
X% (assuming debug.ps is already loaded.)
X
X%  DbgErrorDict /killprocess undef
X
X  { % send to LiteMenu:
X
X% Beta 2 bug, litemenu.ps, class LiteMenu
X    /&ShowThingDict 20 dict dup begin
X	/fonttype {setfont dup truetype exec} def
X	/colortype {setcolor dup truetype exec} def
X	/integertype {rmoveto dup truetype exec} def
X	/realtype {rmoveto dup truetype exec} def
X	/stringtype {0 currentfont fontdescent rmoveto show} def	
X	/nametype {iconfont setfont IconString show} def
X	/arraytype {
X	    dup xcheck {/paint exch exec} {aload pop dup truetype exec} ifelse
X	} def
X	/packedarraytype /arraytype load def
X	/dicttype {/paint exch send} def
X    end def
X    /&ThingSizeDict 20 dict dup begin
X	/fonttype {setfont dup truetype exec} def
X	/colortype {setcolor dup truetype exec} def
X	/integertype {pop pop dup truetype exec} def
X	/realtype {pop pop dup truetype exec} def
X
X	/stringtype {stringwidth pop currentfont fontheight} def
X	/nametype {iconfont setfont IconString stringbbox 4 2 roll pop pop} def
X	/arraytype {
X	    dup xcheck {/size exch exec} {aload pop dup truetype exec} ifelse
X	} def
X	/packedarraytype /arraytype load def
X	/dicttype {/size exch send} def
X    end def
X
X% Beta 2 bug, litemenu.ps, class LiteMenu
X(% This is a string so //&ThingSizeDict is scanned at the right time.
X    /ThingSize { % thing => width height
X    //&ThingSizeDict begin
X    gsave
X	dup truetype exec
X    grestore
X    end
X    } def
X) cvx exec
X
X% Beta 2 bug, litemenu.ps, class LiteMenu
X(% This is a string so //&ShowThingDict is scanned at the right time.
X    /ShowThing { % thing x y => -
X    //&ShowThingDict begin
X    gsave
X	moveto dup truetype exec
X    grestore
X    end
X    } def
X) cvx exec
======== END OF cyber.shar.splitac ========