From uucp@Pa.dec.com Sun Mar 29 13:39:09 1992
Received: from uucp-gw-1.pa.dec.com by gauss.math.purdue.edu (4.1/1.13jrs)
	id AA26961; Sun, 29 Mar 92 13:39:02 EST
Received: by uucp-gw-1.pa.dec.com; id AA12408; Sun, 29 Mar 92 10:25:06 -0800
Received: by adobe.com (4.1/SMI-4.1)id AA12279; Sun, 29 Mar 92 10:22:30 PST
Date: Sun, 29 Mar 92 10:22:30 PST
Message-Id: <9203291822.AA12279@adobe.com>
From: Adobe PostScript File Server <ps-file-server@adobe.com>
Subject: here is "Programs/greenbook.shar  ..."
Reply-To: ps-file-server@adobe.com
In-Reply-To: Request from wilker@hopf2.math.purdue.edu (clarence wilkerson) dated Sun Mar 29 10:22:11 PST 1992
To: wilker@gauss.math.purdue.edu
Status: R

(c) 1987, 1988, 1989, 1990, 1991 Adobe Systems Incorporated.  
All rights reserved.

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	listing10-1
#	listing10-2
#	listing10-3
#	listing10-4
#	listing11-1
#	listing12-1
#	listing12-2
#	listing13-1
#	listing13-2
#	listing14-1
#	listing14-2
#	listing14-3
#	listing14-4
#	listing15-1
#	listing15-2
#	listing2-1
#	listing2-2
#	listing2-3
#	listing2-4
#	listing3-1
#	listing3-2
#	listing3-3
#	listing3-4
#	listing3-5
#	listing4-1
#	listing4-2
#	listing4-3
#	listing4-4
#	listing5-1
#	listing6-1
#	listing6-2
#	listing6-3
#	listing7-1
#	listing7-2
#	listing7-3
#	listing7-4
#	listing7-5
#	listing8-1
#	listing8-2
#	listing9-1
#	listing9-2
#	listing9-3
#	listing9-4
#	listing9-5
# This archive created: Fri Jun  3 19:38:55 1988
export PATH; PATH=/bin:$PATH
if test -f 'listing10-1'
then
	echo shar: will not over-write existing file "'listing10-1'"
else
cat << \SHAR_EOF > 'listing10-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 10-1, on page 160.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:17 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%BoundingBox: 0 0 1224 792
%
% <width\> <height\> <llX\> <llY\> <thick\> box
 /box { %def
	gsave
		setlinewidth moveto
		dup 0 exch rlineto
		exch 0 rlineto
		0 exch neg rlineto
		closepath stroke
	grestore
 } bind def
%%EndProlog
 1152 720 36 36 3 box
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing10-2'
then
	echo shar: will not over-write existing file "'listing10-2'"
else
cat << \SHAR_EOF > 'listing10-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 10-2, on page 161.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:21 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%BoundingBox: 0 0 1224 792
%%DocumentPaperSizes: Ledger
%%EndComments
% <width\> <height\> <llX\> <llY\> <thick\> box
 /box { %def
  gsave
	setlinewidth moveto
	dup 0 exch rlineto
	exch 0 rlineto
	0 exch neg rlineto
	closepath stroke
  grestore
 } bind def
%%EndProlog
%%BeginSetup
%%BeginPaperSize: Ledger
 statusdict begin
/ledgertray where { %ifelse
	pop ledgertray
 }{ %else
	90 rotate 0 -612 translate
	792 1224 div dup scale
	% scale down for proofing on letter paper
 } ifelse
 end
%%EndPaperSize
%%EndSetup
%%Page: 1 1
 1152 720 36 36 3 box
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing10-3'
then
	echo shar: will not over-write existing file "'listing10-3'"
else
cat << \SHAR_EOF > 'listing10-3'
%!PS-Adobe-2.0
%%Title: Green Book Listing 10-3, on page 163.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:25 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0 Query
%%Title: sample query job
%%?BeginFontQuery: Palatino-Roman
 /Palatino-Roman
 dup FontDirectory exch known { %ifelse
	1  % yes
 }{
	0  % no
 } ifelse == flush pop
%%?EndFontQuery
%%?BeginVMStatus
 vmstatus exch sub == flush pop
%%?EndVMStatus
%%EOF
SHAR_EOF
fi # end of overwriting check
if test -f 'listing10-4'
then
	echo shar: will not over-write existing file "'listing10-4'"
else
cat << \SHAR_EOF > 'listing10-4'
%!PS-Adobe-2.0
%%Title: Green Book Listing 10-4, on page 163.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:29 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%EndComments
%%EndProlog
%%BeginSetup
%%BeginPaperSize: Ledger
 statusdict /ledgertray known { %if
	statusdict begin
		ledgertray
 	end
 }{ %else
	(Ledger not found. Scaling...\n) print
	792 1224 div dup scale
 } ifelse
%%EndPaperSize
%%EndSetup
%%Page: 1 1
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing11-1'
then
	echo shar: will not over-write existing file "'listing11-1'"
else
cat << \SHAR_EOF > 'listing11-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 11-1, on page 170.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:33 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: include.ps
%%EndComments
%%BeginProcSet: include.ps 1.0 0
 /beginexecute { %def
	/level0 save def
	/showpage { } def
	/jobname exch def
 } bind def
 /endexecute { %def
	level0 restore
 } bind def
%%EndProcSet
%%EndProlog
% including "Illustration.ps"
 (Illustration.ps) beginexecute
 0 0 translate   % if needed
 1 1 scale          % if needed
%%BeginDocument: Illustration.ps
 %!PS-Adobe-2.0
 %%Title: Illustration.ps
 jobname = flush
 %%Trailer
%%EndDocument
 endexecute
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing12-1'
then
	echo shar: will not over-write existing file "'listing12-1'"
else
cat << \SHAR_EOF > 'listing12-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 12-1, on page 179.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:37 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%DocumentFonts: Courier Times-Roman
%%+ StoneSerif
%%+ StoneSerif-SemiboldItalic
%%+ Optima
%%DocumentNeededFonts: Optima
%%+ StoneSerif
%%EndComments
%%EndProlog
%%Page: 1 1
 save
%%IncludeFont: Optima
 restore
%%Page: 2 2
 save
%%IncludeFont: Optima
%%IncludeFont: StoneSerif
 restore
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing12-2'
then
	echo shar: will not over-write existing file "'listing12-2'"
else
cat << \SHAR_EOF > 'listing12-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 12-2, on page 181.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:42 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0 ExitServer
%%EndComments
 /$timestamp where { %if
	pop
	(time is: ) print  	$timestamp = flush
	stop  % stop the current job
 } if
%%BeginExitServer: 0
 serverdict begin 0 exitserver	
%%EndExitServer
 /$timestamp (Tue Oct 27 17:53:43 PST 1987) def
%%Trailer
%%EOF
SHAR_EOF
fi # end of overwriting check
if test -f 'listing13-1'
then
	echo shar: will not over-write existing file "'listing13-1'"
else
cat << \SHAR_EOF > 'listing13-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 13-1, on page 193.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:45 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: currentfile example
 /buff 128 string def
 /F { findfont exch scalefont setfont } def
%%EndProlog
 12 /Helvetica F
 10 10 moveto
 currentfile buff readline
 This line is actually data
 pop show
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing13-2'
then
	echo shar: will not over-write existing file "'listing13-2'"
else
cat << \SHAR_EOF > 'listing13-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 13-2, on page 194.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:51 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: writetodisk.ps
%%EndComments
 /buff 128 string def
 /fd (fonts/Logo-Font) (w) file def
 { %loop
	currentfile buff readstring { %ifelse
		fd exch writestring
	}{ %else
		dup length 0 gt { %ifelse
			fd exch writestring
		}{ %else
			pop
		} ifelse
		fd closefile
		exit
	} ifelse
} bind
% file should follow the "loop" token....
loop
%%BeginFont: Logo-Font 1.0 0
 12 dict begin  % leave one empty slot for FID
	/FontName /Logo-Font def
	/FontMatrix [ 1 0 0 1 0 0 ] def
	/FontType 3 def
	/FontBBox [ -5 -12 85 50 ] def
	/BuildChar { %def
		exch begin
			70 0 -5 -12 85 50 setcachedevice
			Encoding exch get load exec
		end
	} bind def
	/Encoding 256 array %def
		dup 0 1 255 { /.notdef put dup } for pop
		dup 71 /logo put  % "G" character
	def
	 /logo { %def
		% draw at current point
		20 0 moveto
		gsave
			/Times-Roman findfont
			48 scalefont setfont
			(G) show -13.5 -14.5 rmoveto (R) show
		grestore
		-4 -8 rmoveto
		/Helvetica findfont 11 scalefont setfont
		(glenn) show 22 3 rmoveto (reid) show
	 } bind def
 currentdict end
 dup /FontName get exch definefont pop
%%EndFont: Logo-Font
SHAR_EOF
fi # end of overwriting check
if test -f 'listing14-1'
then
	echo shar: will not over-write existing file "'listing14-1'"
else
cat << \SHAR_EOF > 'listing14-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 14-1, on page 200.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:55 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: stopped-example
%%EndComments
/STROKE { %def
	currentflat
	{ %loop
		{ flattenpath } stopped { %ifelse
			currentflat 1 add setflat
			("limitcheck" on "flattenpath": ) print
			(trying again with flatness of ) print
			currentflat (       ) cvs = flush
		}{ %else
			exit
		} ifelse
	} bind loop
	stroke
	setflat % restore original flatness
 } bind def
%%EndProlog
%%Page: 1 1
% build a complicated path:
 0 1 30 { %for
	12 exch 2 mul translate
	20 0 moveto 0 0 20 0 360 arc
 } for
 STROKE
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing14-2'
then
	echo shar: will not over-write existing file "'listing14-2'"
else
cat << \SHAR_EOF > 'listing14-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 14-2, on page 201.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:52:00 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: userexec.ps
%%For: error handling
%%EndComments
 /buff 512 string def
 /p /print load def
 /bp { buff cvs print } bind def
 /jobdef { %def
	errordict begin /jobname exch def end
 } bind def
 /userexec { %def
	stopped { %ifelse
		$error /newerror get { %if
			$error begin
				(%%[Error: ) print
				/errorname load bp
				(; OffendingCommand: ) p
				/command load bp
				(; JobName: ) p
				errordict /jobname known { %ifelse
					errordict /jobname get
				}{
					(stdin)
				} ifelse
				bp
				(]%%\n) print flush
			end
			{ %loop
				currentfile buff readline { %ifelse
					(%ENDuserexec) eq { exit } if
				}{ %else
					/UnexpectedEOF  % report error
					errordict /rangecheck get exec
				} ifelse
			} loop
		} if  % if newerror is true
	}{ %else
     % end of file must have been reached.  Is this an
     % error? Sometimes it means the improper use of
     % "currentfile readstring" and/or "image."
	} ifelse
	$error /newerror false put
 } bind def
%%EndProlog
 (ORIGjob) jobdef
% execute some included job directly in-line:
/svobj save def
(USERjob) jobdef
currentfile cvx userexec
%%BeginDocument: included.ps
  %!PS
  %%Title: included.ps
  %%For: triggering an error
    /var1 10 def
    /var2 20 def
  %%EndProlog
  %%Page: 1 1
    var1 var2
    triggererror
    more program statements
    which should be ignored
    showpage
  %%Trailer
%%EndDocument
  % should never get this far:
  (USERjob completed.\n) print flush
  stop
%ENDuserexec

% here is where ORIGjob picks up again
 svobj restore  % will restore ORIGjob name, too
 (Continuing with ) print
 errordict /jobname get print (\n) print flush
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing14-3'
then
	echo shar: will not over-write existing file "'listing14-3'"
else
cat << \SHAR_EOF > 'listing14-3'
%!PS-Adobe-2.0
%%Title: Green Book Listing 14-3, on page 204.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:52:04 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%EndComments
errordict begin
	/*limitcheck /limitcheck load def
	/limitcheck { %def
		(Free VM: ) print
		vmstatus exch sub
		== flush pop
		*limitcheck
	} bind def
end %errordict
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing14-4'
then
	echo shar: will not over-write existing file "'listing14-4'"
else
cat << \SHAR_EOF > 'listing14-4'
%!PS-Adobe-2.0
%%Title: Green Book Listing 14-4, on page 205.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:52:08 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: errstack.ps
%%EndComments
%%EndProlog
%%BeginSetup
/orighandleerror
    errordict /handleerror get
def
errordict begin
    /handleerror { %def
		orighandleerror
		errordict begin $error begin
			(STACK:) = flush
			currentdict /ostack known {
				ostack aload pop
				pstack flush clear
		    } if
		end end
    } bind def
end
%%EndSetup
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing15-1'
then
	echo shar: will not over-write existing file "'listing15-1'"
else
cat << \SHAR_EOF > 'listing15-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 15-1, on page 213.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:52:12 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: pathtrace.ps
%%EndComments
 /debug 10 dict def
 debug begin
	/str 128 string def
	/*moveto /moveto load def
	/*lineto /lineto load def

	/moveto { %def
		(moveto: ) print
		exch dup str cvs print % X-val
		( ) print exch dup ==    % Y-val
		flush
		*moveto					% execute real moveto
	} bind def
	/lineto { %def
		(lineto: ) print
		exch dup str cvs print % X-val
		( ) print exch dup ==    % Y-val
		flush
		*lineto					% execute real lineto
	} bind def
 end
%%EndProlog
 debug begin
	100 100 translate
	100 100 moveto
	200 200 lineto
	stroke
	showpage
 end
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing15-2'
then
	echo shar: will not over-write existing file "'listing15-2'"
else
cat << \SHAR_EOF > 'listing15-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 15-2, on page 216.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:52:16 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%EndComments
 /msg { %def
	print (\n) print flush
 } bind def
%%EndProlog
%%Page: 1 1
 (Got past the prologue.) msg
%%Trailer
 (made it to the trailer) msg
SHAR_EOF
fi # end of overwriting check
if test -f 'listing2-1'
then
	echo shar: will not over-write existing file "'listing2-1'"
else
cat << \SHAR_EOF > 'listing2-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 2-1, on page 16.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:49:32 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: stack example
 /procGOOD { %def
	findfont exch scalefont setfont
 } bind def
 /procOK { %def
	exch findfont exch scalefont setfont
 } bind def
 /procBAD { %def
	/ptsize exch def
	/fontname exch def
	fontname findfont ptsize scalefont
	setfont
 } bind def
%%EndProlog
 12 /StoneSerif  procGOOD
 /StoneSerif 12  procOK
 /StoneSerif 12  procBAD
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing2-2'
then
	echo shar: will not over-write existing file "'listing2-2'"
else
cat << \SHAR_EOF > 'listing2-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 2-2, on page 28.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:49:36 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
/F { %def
	findfont exch scalefont setfont
} bind def
%%EndProlog
24 /Helvetica F
288 72 moveto
(Green Book) show
showpage
SHAR_EOF
fi # end of overwriting check
if test -f 'listing2-3'
then
	echo shar: will not over-write existing file "'listing2-3'"
else
cat << \SHAR_EOF > 'listing2-3'
%!PS-Adobe-2.0
%%Title: Green Book Listing 2-3, on page 30.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:49:39 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: collapseproc.ps
%%EndComments
 /EXEC { /exec load } bind def
 /mainproc [  %def
	{ gsave 400 36 moveto } EXEC
	{ /Times-Italic findfont 24 } EXEC
	{ scalefont setfont (from Listing 2-3) } EXEC
	{ show grestore } EXEC
 ] cvx bind def
%%EndProlog
 mainproc
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing2-4'
then
	echo shar: will not over-write existing file "'listing2-4'"
else
cat << \SHAR_EOF > 'listing2-4'
%!PS-Adobe-2.0
%%Title: Green Book Listing 2-4, on page 31.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:49:42 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: addproc.ps
%%EndComments
 /F { findfont exch scalefont setfont } bind def
 /S { moveto show } bind def
 /addprocs {  %def
	dup length 2 add array cvx
	dup 3 -1 roll 2 exch putinterval
	dup 0 4 -1 roll put
	dup 1 /exec load put
 } bind def
%%EndProlog
 gsave
	currenttransfer { 1 exch sub } addprocs
	settransfer
	36 /Helvetica-Oblique F
	1 setgray  % normally white...
	(Black) 36 670 S    % but the inverse transfer
	(Words) 36 634 S  % function yields black
 grestore
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing3-1'
then
	echo shar: will not over-write existing file "'listing3-1'"
else
cat << \SHAR_EOF > 'listing3-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 3-1, on page 41.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:49:45 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: pathconstruct.ps
%%EndComments
 /F { findfont exch scalefont setfont } bind def
%%EndProlog
 gsave
	400 300 moveto
	100 0 rlineto   % horizontal line
	2 setlinewidth
	4 4 scale
	0 100 rlineto   % vertical line
	1 setlinewidth
	 gsave    % make the picture more interesting...
		14 /Times-Roman F (A) show
		2 -12 rmoveto -20 rotate (A) show
	 grestore
	 stroke
 grestore
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing3-2'
then
	echo shar: will not over-write existing file "'listing3-2'"
else
cat << \SHAR_EOF > 'listing3-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 3-2, on page 45.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:49:48 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: rectangle.ps
%%EndComments
% "R" takes the following arguments:
% lineweight linegray fillgray
% width height LLx LLy
 /R { %def
	gsave
		moveto
		1 index 0 rlineto
		0 exch rlineto
		neg 0 rlineto
		closepath
		gsave setgray fill grestore
		setgray setlinewidth stroke
	grestore
 } bind def
%%EndProlog
 3 .5 .9 200 300 100 100 R
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing3-3'
then
	echo shar: will not over-write existing file "'listing3-3'"
else
cat << \SHAR_EOF > 'listing3-3'
%!PS-Adobe-2.0
%%Title: Green Book Listing 3-3, on page 46.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:49:52 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: circle.ps
%%EndComments
% "C" takes the following arguments:
% linewidth linegray fillgray
% X Y r ang1 ang2
 /C { %def
	gsave
		newpath 0 360 arc
		gsave setgray fill grestore
		setgray setlinewidth stroke
	grestore
 } bind def
%%EndProlog
 3 .5 .9 300 500 200 C
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing3-4'
then
	echo shar: will not over-write existing file "'listing3-4'"
else
cat << \SHAR_EOF > 'listing3-4'
%!PS-Adobe-2.0
%%Title: Green Book Listing 3-4, on page 47.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:49:56 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: arrowhead.ps
%%EndComments
%%BeginProcSet: arrows 1.0 0
% "arrowhead" takes these arguments:
% lineweight prevX prevY
 /arrowhead { %def
	gsave
		currentpoint
		4 2 roll exch 4 -1 roll exch
		sub 3 1 roll sub
		exch atan rotate dup scale
		-1 2 rlineto
		7 -2 rlineto
		-7 -2 rlineto
		closepath fill
	grestore
	newpath
 } bind def
 /l^ { %def    % lineto-arrow
	currentlinewidth currentpoint 5 3 roll
	lineto
	currentpoint stroke moveto
	arrowhead
 } bind def
 /rl^ { %def    % rlineto-arrow
	currentlinewidth currentpoint 5 3 roll
	rlineto
	currentpoint stroke moveto
	arrowhead
 } bind def
 /arc^ { %def    % arc-arrow
	5 copy arc
	currentpoint stroke moveto           % stroke arc
  % getting the correct orientation for the arrowhead
  % is tricky. This procedure uses the arguments to
  % "arc" to determine the tangent of the curve at the
  % endpoint, and it orients the arrowhead along that
  % tangent line.  It leaves an X-Y point that is just
  % behind the arrowhead along the tangent.
  % newX = X + radius * cos(endAngle-1)
  % newY = Y + radius * sin(endAngle-1)
	exch pop 1 sub   % endAngle - 1 degree
	dup cos 2 index mul 4 index add     % arrowX
	exch sin 2 index mul 3 index add    % arrowY
	currentlinewidth 2 add 3 1 roll      % thickness
	arrowhead pop pop pop                  % draw -\>
 } bind def
%%EndProcSet: arrows 1.0 0
%%EndProlog
%%Page: 1 1
 % line sample:
 200 600 moveto
 0 10 360 {
	currentlinewidth .1 add setlinewidth
	gsave
	dup cos 100 mul
	exch sin 100 mul
	rl^
	grestore
 } bind for
 newpath
 % curve sample:
 /radius 10 def .1 setlinewidth
 0 30 360 {
	/radius radius 10 add def
	280 230 radius 0 5 -1 roll arc^
 } bind for
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing3-5'
then
	echo shar: will not over-write existing file "'listing3-5'"
else
cat << \SHAR_EOF > 'listing3-5'
%!PS-Adobe-2.0
%%Title: Green Book Listing 3-5, on page 50.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:49:59 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: text examples
%%EndComments
 /F { findfont exch scalefont setfont } bind def
 /S1 { moveto show } bind def

 /S21 { moveto gsave show grestore } bind def
 /S22 { %def
	0 exch rmoveto gsave show grestore
 } bind def
%%EndProlog

% method 1:
 10 /Times-Roman F
 (method 1:) 72 512 S1
 (Viva Nuestra Senora de Guadelupe!)  72 500 S1
 (Viva la Independencia!) 72 488 S1

% method 2:
 10 /Times-Roman F
 (method 2:) 72 412 S21
 ( There was a young lady named Bright,) -12 S22
 ( Whose speed was far faster than light;) -12 S22
 (    She set out one day) -12 S22
 (    In a relative way) -12 S22
 ( And returned home the previous night.) -12 S22
 (              -Arthur Buller) -12 S22
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing4-1'
then
	echo shar: will not over-write existing file "'listing4-1'"
else
cat << \SHAR_EOF > 'listing4-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 4-1, on page 59.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:03 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: emulate1
/buff 128 string def
/emulate1 { %def
	{ %loop
		currentfile buff readstring
		exch show not { exit } if
	} loop
	showpage
} bind def
%%EndProlog
72 750 moveto
/Courier findfont 10 scalefont setfont
emulate1
So spake the Fiend, and with necessity,
The tyrants plea, excused his devilish deeds. -Milton
SHAR_EOF
fi # end of overwriting check
if test -f 'listing4-2'
then
	echo shar: will not over-write existing file "'listing4-2'"
else
cat << \SHAR_EOF > 'listing4-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 4-2, on page 60.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:06 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: simple line printer emulator
 /buff 5000 string def
 /leftmargin 72 def  /topmargin 72 def
 /bottom 72 def  /top 792 topmargin sub def
 /ptsize 10 def /lead 10 def
 /EOLchar (\n) def  % line feed
 /F { findfont exch scalefont setfont } bind def
 /newline { %def
	currentpoint exch pop lead sub
	dup bottom lt { %if
		showpage
		pop top
	} if
	leftmargin exch moveto
 } bind def
 /emulate { %def
	{ %loop
		currentfile buff readstring exch
		EOLchar
		{ %loop (innermost)
			search { %ifelse
				show newline
			}{ %else
				show exit
			} ifelse
		} loop
		not { %if readstring found EOF
			exit
		} if
	} loop
	showpage
	leftmargin top moveto
 } bind def
%%EndProlog
%%BeginSetup
 ptsize /Courier F
 leftmargin top moveto
%%EndSetup
emulate
I wasted time, and now doth time waste me;
For now hath time made me his numbering clock;
My thoughts are minutes.
        - William Shakespeare
SHAR_EOF
fi # end of overwriting check
if test -f 'listing4-3'
then
	echo shar: will not over-write existing file "'listing4-3'"
else
cat << \SHAR_EOF > 'listing4-3'
%!PS-Adobe-2.0
%%Title: Green Book Listing 4-3, on page 64.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:10 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: justify.ps
%%Creator: Glenn Reid
%%EndComments
%%BeginProcSet: general 1.0 0
 /FS { findfont exch scalefont } bind def
%%EndProcSet: general 1.0 0

%%BeginProcSet: justify 1.0 0
 /spacecount { %def
	0 exch
	(\040) { %loop   (space)
		search { %ifelse
			pop 3 -1 roll 1 add 3 1 roll
		}{ pop exit } ifelse
	} loop
 } bind def
 /justify { %def   % mark (text) <font\> (text) <font\>
	/spaces 0 def
	/currentwidth 0 def
	/currlength 0 def
	counttomark /num exch def
	2 2 num { %for  % roll through stack and count
		-2 roll setfont
		dup spacecount spaces add
		/spaces exch def
		dup stringwidth pop currentwidth add
		/currentwidth exch def
		dup length currlength add
		/currlength exch def
		currentfont
	} for
	currlength 1 le { setfont show } { %ifelse
		/adjust %def
			columnwidth currentwidth sub
			spaces 0 eq { %ifelse
				currlength 1 sub
			}{ %else
				spaces
			} ifelse div
		def
		num 2 idiv %repeat
			spaces 0 eq { %ifelse
				{ %repeat
					setfont adjust 0 3 -1 roll ashow
				}
			}{ %else
				{ %repeat
					setfont adjust 0 32 4 -1 roll
					widthshow
				}
			} ifelse
		repeat
	} ifelse
 } bind def
%%EndProcSet: justify 1.0 0

%%BeginProcSet: linemulator 1.1 0
 /buff 1000 string def   % longest line for "readline\xD3 

 % for recognizing escape sequences to change fonts
 % and enter/leave "justify" mode:
 /ESC (^) def  % escape character
 /justON (Y) 0 get def  % ESC-Y
 /justOFF (N) 0 get def  % ESC-N
 /QUIT (Q) 0 get def         % ESC-Q
 /zero (0) 0 get def       % for subtracting ASCII offset
 /newline { %def
	currentpoint exch pop lead sub
	dup bottom lt { %if
		showpage pop top
	} if
	leftmargin exch moveto
 } bind def
 /linetoolong { %def
	newline (%%[Error: line too long.]%%) show
	showpage
 } bind def
 /printline { %def
	JUST { %ifelse
		counttomark 2 ge { justify } if
	}{
		counttomark 1 ge { show } if
	} ifelse
	newline
 } bind def
 /emulate { %def
 % read currentfile one line at a time.  Search for
 % ESC sequences. If not found, just "show" with
 % current font and move on.  If justification is
 % turned on, then LEAVE all the strings and the
 % correct font dictionaries on the stack, and call
 % "justify" at the end of the line:
	/fmax fonts length def
	/top 792 topmargin sub def
	/JUST justification def
	leftmargin top moveto
	/sv save def
	{ %loop
		mark currentfile buff { readline } stopped {
			linetoolong stop
		} if
		not /done exch def % use the boolean later
		{ %loop			% handle escape sequences
			ESC search { %ifelse
				JUST { %ifelse
					exch pop exch currentfont exch
				} {
					show pop
				} ifelse
				dup length 0 eq {
					pop ESC JUST { %ifelse
						exch currentfont exch
					} if
					printline exit
				} if
				dup 0 get  % escape argument
				true exch % look for ESC-fontchange?
				dup justON eq   {
					/JUST true def exch pop
					false exch
				} if
				dup justOFF eq  {
					/JUST false def exch pop
					false exch
				} if
				dup QUIT eq { /done true def exit } if
				exch { %ifelse
					zero sub % subtract ASCII offset
					dup dup fmax le
					exch 0 ge and { %ifelse
						fonts exch get setfont
						dup length 1 sub
						1 exch getinterval
					}{ %else
						pop ESC JUST { %ifelse
							exch currentfont exch
						}{
							show
						} ifelse
					} ifelse
				}{ %else
					pop
					dup length 1 sub
					1 exch getinterval
				} ifelse
			}{ %else
				JUST { %ifelse
					dup length 0 ne { %ifelse
						currentfont printline
					}{ pop printline } ifelse
				}{ %else
					dup length 0 ne { %ifelse
						printline
					}{ %else
						pop newline
					} ifelse
				} ifelse exit
			} ifelse
		} loop
		cleartomark
		done { exit } if
		currentpoint
		/JUST JUST
			sv restore /sv save def
		def moveto
	} loop
	showpage
	sv restore
 } bind def
%%EndProcSet: linemulator 1.1 0
%%EndProlog
%%BeginSetup
 /columnwidth 432 def
 /justification false def
 /leftmargin 108 def
 /topmargin 72 def
 /bottom 72 def
 /lead 14 def
 /fonts [ %def
	12 /Times-Roman FS  % ESC-0
	12 /Times-Bold FS      % ESC-1
	12 /Times-Italic FS    % ESC-2
	12 /Times-BoldItalic FS % ESC-3
 ] def
 fonts 0 get setfont
%%EndSetup
emulate
(turn on justification after this line)^Y
Here is ^1bold^0, here is ^2italic^0, and here is ^3BoldItalic^0.
^NNo other justification is necessary.^Q
SHAR_EOF
fi # end of overwriting check
if test -f 'listing4-4'
then
	echo shar: will not over-write existing file "'listing4-4'"
else
cat << \SHAR_EOF > 'listing4-4'
%!PS-Adobe-2.0
%%Title: Green Book Listing 4-4, on page 74.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:14 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: example of what not to do
 /SH { %def
	dup stringwidth pop
	currentpoint 3 1 roll
	add 300 gt { %if
		72 exch 48 sub dup 36 lt { %if
			showpage
			pop 700
		} if
		moveto
	}{ %else
		pop
	} ifelse
	show
 } bind def
%%EndProlog
 72 700 moveto
 /Times-Roman findfont 48 scalefont setfont
 (As ) SH (usual, ) SH (it ) SH (is ) SH
 (best ) SH (to ) SH (make ) SH (the ) SH
 (decisions ) SH (on ) SH (the ) SH
 (host ) SH (computer ) SH (if ) SH
 (possible.) SH
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing5-1'
then
	echo shar: will not over-write existing file "'listing5-1'"
else
cat << \SHAR_EOF > 'listing5-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 5-1, on page 84.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:17 PDT 1988
%%EndComments
% --- cut here ---
%! example of how not to draw an arc:
 /origmtx matrix def
 /drawarc { %def
	/EndAngle exch def
	/StartAngle exch def
	/URy exch def
	/URx exch def
	/LLy exch def
	/LLx exch def
	gsave
		LLx URx add 2 div
		LLy URy add 2 div translate
		newpath
		URx LLx sub
		URy LLy sub
		origmtx currentmatrix
			3 1 roll scale
			newpath
			0 0 0.5 StartAngle EndAngle arc
		setmatrix stroke
	grestore
 } bind def
% end of prologue

 100 100 300 300 0 90 drawarc
 35 10 translate
 % as opposed to this:
 300 200 100 0 90 arc stroke
 showpage
SHAR_EOF
fi # end of overwriting check
if test -f 'listing6-1'
then
	echo shar: will not over-write existing file "'listing6-1'"
else
cat << \SHAR_EOF > 'listing6-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 6-1, on page 89.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:21 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: example
%%Pages: 1
%%BeginProcSet: TextProcs 1.0 0
 /F {
	findfont exch scalefont setfont
 } bind def
%%EndProcSet
%%EndProlog
%%Page: one 1
 12 /Optima-Oblique F
 100 100 moveto
 (Fairly Oblique) show
 showpage
%%Trailer

SHAR_EOF
fi # end of overwriting check
if test -f 'listing6-2'
then
	echo shar: will not over-write existing file "'listing6-2'"
else
cat << \SHAR_EOF > 'listing6-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 6-2, on page 95.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:24 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: graphic independence
%%EndComments
 /circle { %def
	0 360 arc fill
 } bind def
 /square { %def
	moveto
	1 index 0 rlineto
	0 exch rlineto
	neg 0 rlineto
	closepath fill
 } bind def
%%EndProlog
 0.5 setgray
 72 100 200 circle
 200 300 100 100 square
 0 setgray
 200 300 300 300 square
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing6-3'
then
	echo shar: will not over-write existing file "'listing6-3'"
else
cat << \SHAR_EOF > 'listing6-3'
%!PS-Adobe-2.0
%%Title: Green Book Listing 6-3, on page 96.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:28 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: graphic dependence
%%EndComments
 /circle { %def
	gsave
		arc setgray fill
	grestore
 } bind def
 /square { %def
	gsave
		moveto
		1 index 0 rlineto
		0 exch rlineto
		neg 0 rlineto
		closepath setgray fill
	grestore
 } bind def
%%EndProlog
 0.5   72 100 200 0 360 circle
 0.5   200 300 100 100 square
 0      200 300 300 300 square
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing7-1'
then
	echo shar: will not over-write existing file "'listing7-1'"
else
cat << \SHAR_EOF > 'listing7-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 7-1, on page 104.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:31 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: margin procedures
%%BeginProcSet: text-procs 1.0 0
% moveto-show
 /SH { %def
	moveto show
 } bind def
% rightshow
 /RS { %def
	moveto
	dup stringwidth neg exch neg exch
	rmoveto show
 } bind def
%centershow
 /CS { %def
	moveto dup stringwidth
	2 div neg exch 2 div neg exch
	rmoveto show
 } bind def
%%EndProcSet: text-procs 1.0 0
%%EndProlog
 /Times-Roman findfont 14 scalefont setfont
 (Centered about + current point) 306 140 CS
 (+Flush Left at current point) 72 120 SH
 (Flush Right at current point+) 560 120 RS
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing7-2'
then
	echo shar: will not over-write existing file "'listing7-2'"
else
cat << \SHAR_EOF > 'listing7-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 7-2, on page 105.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:35 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: widthshow example
 /F {
	findfont exch scalefont setfont
 } bind def
 /W /widthshow load def
%%EndProlog
%%BeginSetup
 /sp 32 def  % ASCII space
%%EndSetup
 36 745 moveto
 24 /Times-Italic F
 6 0 sp (PostScript Language Program Design) W
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing7-3'
then
	echo shar: will not over-write existing file "'listing7-3'"
else
cat << \SHAR_EOF > 'listing7-3'
%!PS-Adobe-2.0
%%Title: Green Book Listing 7-3, on page 107.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:39 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: mixed-font text setting
 /FS { %def
	findfont exch scalefont
 } bind def
 /SF { %def
	Fonts exch get setfont
 } bind def
 /MS {    %multiple "show"
	counttomark 2 idiv { %repeat
		0 moveto show
	} repeat pop
	mark
 } bind def
 /LINE { %def
	gsave
	translate
	mark                    	% mark is for MS procedure
 } bind def
 /S { %def
	moveto show
 } bind def
 /END { %def
	pop grestore
 } bind def
%%EndProlog
%%BeginSetup
 /Fonts [ %def
	12 /Times-Roman FS
	12 /Times-Bold FS
	12 /Times-Italic FS
 ] def
%%EndSetup
%%BeginObject: text_block
 0 SF
 save						% text block ground state
% first line of text
 72 312 LINE					% first line start
  (Here is a line with ) 0
  (words and ) 140.315
  (words.) 238.991
  MS
  2 SF
  (two ) 192.971
  (italic ) 112.644
  MS
  1 SF
  (bold ) 213.311
  (two ) 90.984
  MS
  END
% lines 2, 3, and 4 in the text:
 (You shall see them on a beautiful quarto) 72 288 S
 (page, where a neat rivulet of text shall) 72 276 S
 (meander through a meadow of margin.) 72 264 S
% credit for quotation:
 160 240 LINE
  2 SF
  (Richard Brinsley Sheridan) 0
  MS
 END
 restore					% to ground state
%%EndObject
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing7-4'
then
	echo shar: will not over-write existing file "'listing7-4'"
else
cat << \SHAR_EOF > 'listing7-4'
%!PS-Adobe-2.0
%%Title: Green Book Listing 7-4, on page 112.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:43 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: text-procs.ps
%%Creator: Glenn Reid, Adobe Systems
%%EndComments
%%BeginProcSet: general 1.0 0
 /F { findfont exch scalefont setfont } bind def
 /Fdef { findfont exch scalefont def } bind def
 /M /moveto load def
%%EndProcSet: general 1.0 0

%%BeginProcSet: text-procs 1.0 0
% mark (text) fontdict  (text) fontdict ... stackshow
 /stackshow { %def
    % reverse stack order first:
	2 2 counttomark 2 sub { -2 roll } for
	counttomark 2 idiv { %repeat
		setfont show
	} repeat pop
 } bind def
% mark (Txt) font rX rY ... kernstackshow
 /kernstackshow { %def
	4 4 counttomark 2 sub { -4 roll } for
	counttomark 4 idiv { %repeat
		rmoveto setfont show
	} repeat pop
 } bind def

% "kernshow" is like "stackshow" except that it does
% not use a font dictionary for each string.  It
% should be used when the kerned text is all set in
% the same font.

% mark (text) rX rY (text) rX rY .... kernshow
 /kernshow { %def
	3 3 counttomark 2 sub { -3 roll } for
	counttomark 3 idiv { %repeat
		rmoveto show
	} repeat pop
 } bind def

 /MM { moveto mark } bind def
%%EndProcSet: text-procs 1.0 0
%%EndProlog
%%BeginSetup
 /F1 50 /StoneSerif Fdef
 /F2 50 /StoneSerif-Semibold Fdef
 /F3 50 /StoneSerif-Italic Fdef
%%EndSetup
%%Page: 1 1
  F1 setfont
  36 430 MM
    (S) 0 0 (W) -4 0 (EPT A)
    -4 0 (W) -8.0 0 (A) -9.25 0 (Y) -6.75 0
  kernshow
  36 380 MM
    (S) F1 0 0 (W) F1 -4 0 (EPT ) F1 -4 0
    (A) F3 -4 0 (W) F3 -8.0 0
    (A) F3 -9.25 0 (Y) F3 -6.75 0
  kernstackshow

 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing7-5'
then
	echo shar: will not over-write existing file "'listing7-5'"
else
cat << \SHAR_EOF > 'listing7-5'
%!PS-Adobe-2.0
%%Title: Green Book Listing 7-5, on page page.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:46 PDT 1988
%%EndComments
% --- cut here ---
% (wide) found on page 115
%!PS-Adobe-2.0
%%Title: reencode.ps
%%EndComments
 /F { %def
	findfont exch scalefont setfont
 } bind def
%%BeginProcSet: reencode 1.0 0
% This file defines a procedure called "R" which
% reencodes a font.  It expects three objects on the
% stack:
%
%    [ array ]  /NewName  /OldName
%
% The array should contain pairs of
%    <number\> <name\>,
% like "32 /space", each of which defines a slot in the
% encoding and the name to put in that slot.  Only
% those names that are needed to over-ride the
% existing ones should be specified.  An encoding
% value (number) may be specified followed by more
% than one name, like  "128 /name1 /name2".
% In this case, the names will be sequentially stored
% in the encoding starting at the initial number
% given (128).
 /RE { %def
	findfont begin
	currentdict dup length dict begin
		{ %forall
			1 index /FID ne {def} {pop pop} ifelse
		} forall
		/FontName exch def dup length 0 ne { %if
			/Encoding Encoding 256 array copy def
			0 exch { %forall
				dup type /nametype eq { %ifelse
					Encoding 2 index 2 index put
					pop 1 add
				}{ %else
					exch pop
				} ifelse
			} forall
		} if pop
	currentdict dup end end
	/FontName get exch definefont pop
 } bind def
%%EndProcSet: reencode 1.0 0
%%EndProlog
%%BeginSetup
/stdencoding [ 39/quotesingle 96/grave
  128/Adieresis/Aring/Ccedilla/Eacute/Ntilde
  /Odieresis/Udieresis/aacute/agrave/acircumflex
% (wide) found on page 116
  /adieresis/atilde/aring/ccedilla/eacute/egrave/ecircumflex
  /edieresis/iacute/igrave/icircumflex/idieresis/ntilde/oacute
  /ograve/ocircumflex/odieresis/otilde/uacute/ugrave
  /ucircumflex/udieresis/dagger/.notdef/cent/sterling/section
  /bullet/paragraph/germandbls/registered/copyright
  /trademark/acute/dieresis/.notdef/AE/Oslash/.notdef
  /.notdef/.notdef/.notdef/yen/.notdef/.notdef/.notdef/.notdef
  /.notdef/.notdef/ordfeminine/ordmasculine/.notdef/ae/oslash
  /questiondown/exclamdown/logicalnot/.notdef/florin
  /.notdef/.notdef/guillemotleft/guillemotright/ellipsis/.notdef
  /Agrave/Atilde/Otilde/OE/oe/endash/emdash/quotedblleft
  /quotedblright/quoteleft/quoteright/.notdef/.notdef
  /ydieresis/Ydieresis/fraction/currency/guilsinglleft
  /guilsinglright/fi/fl/daggerdbl/periodcentered
  /quotesinglbase/quotedblbase/perthousand/Acircumflex
  /Ecircumflex/Aacute/Edieresis/Egrave/Iacute/Icircumflex
  /Idieresis/Igrave/Oacute/Ocircumflex/.notdef/Ograve
  /Uacute/Ucircumflex/Ugrave/dotlessi/circumflex/tilde
  /macron/breve/dotaccent/ring/cedilla/hungarumlaut
  /ogonek/caron
 ] def
stdencoding /_StoneSerif /StoneSerif RE
stdencoding /_StoneSerif-Italic /StoneSerif-Italic RE
%%EndSetup
 90 /_StoneSerif-Italic F
 50 220 moveto (fig. \336ve) show
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing8-1'
then
	echo shar: will not over-write existing file "'listing8-1'"
else
cat << \SHAR_EOF > 'listing8-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 8-1, on page 130.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:50 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%EndComments
 /DataString 256 string def
 /IM { %def
	gsave translate scale image grestore
 } bind def
%%EndProlog
 0 1 255 { DataString exch dup put } bind for
 1 256 8 [1 0 0 256 0 0] { DataString }
 72 72  144 36 IM
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing8-2'
then
	echo shar: will not over-write existing file "'listing8-2'"
else
cat << \SHAR_EOF > 'listing8-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 8-2, on page 133.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:54 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%EndComments
 /F { findfont exch scalefont setfont } bind def
 /setF { %def
	currentscreen
	4 -2 roll pop    % remove existing frequency
	3 1 roll setscreen
 } bind def
%%EndProlog
 gsave
	20 setF
	 .4 setgray
	 250 90 moveto
	 300 /StoneSerif-Italic F
	 (&) show
 grestore
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing9-1'
then
	echo shar: will not over-write existing file "'listing9-1'"
else
cat << \SHAR_EOF > 'listing9-1'
%!PS-Adobe-2.0
%%Title: Green Book Listing 9-1, on page 138.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:50:57 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: patternfill.ps
%%EndComments
%%BeginProcSet: patternfill 1.0 0

% width height matrix proc key cache
% definepattern -\> font
/definepattern { %def
	7 dict begin
		/FontDict 9 dict def
		FontDict begin
			/cache exch def
			/key exch def
			/proc exch cvx def
			/mtx exch matrix invertmatrix def
			/height exch def
			/width exch def
			/ctm matrix currentmatrix def
			/ptm matrix identmatrix def
			/str
			(12345678901234567890123456789012)
			def
		end
		/FontBBox [ %def
			0 0 FontDict /width get
			FontDict /height get
		] def
		/FontMatrix FontDict /mtx get def
		/Encoding StandardEncoding def
		/FontType 3 def
		/BuildChar { %def
			pop begin
			FontDict begin
				width 0 cache { %ifelse
					0 0 width height setcachedevice
				}{ %else
					setcharwidth
				} ifelse
				0 0 moveto width 0 lineto
				width height lineto 0 height lineto
				closepath clip newpath
				gsave proc grestore
			end end
		} def
		FontDict /key get currentdict definefont
	end
} bind def
% dict patternpath -
% dict matrix patternpath -
/patternpath { %def
	dup type /dicttype eq { %ifelse
		begin FontDict /ctm get setmatrix
	}{ %else
		exch begin FontDict /ctm get setmatrix
		concat
	} ifelse
	currentdict setfont
	FontDict begin
		FontMatrix concat
		width 0 dtransform
		round width div exch round width div exch
		0 height dtransform
		round height div exch
		round height div exch
		0 0 transform round exch round exch
		ptm astore setmatrix
		
		pathbbox
		height div ceiling height mul 4 1 roll
		width div ceiling width mul 4 1 roll
		height div floor height mul 4 1 roll
		width div floor width mul 4 1 roll
		
		2 index sub height div ceiling cvi exch
		3 index sub width div ceiling cvi exch
		4 2 roll moveto
		
		FontMatrix ptm invertmatrix pop
		{ %repeat
			gsave
				ptm concat
				dup str length idiv { %repeat
					str show
				} repeat
				dup str length mod str exch
				0 exch getinterval show
			grestore
			0 height rmoveto
		} repeat
		pop
	end end
} bind def

% dict patternfill -
% dict matrix patternfill -
/patternfill { %def
	gsave
		clip patternpath
	grestore
	newpath
} bind def

% dict patterneofill -
% dict matrix patterneofill -
/patterneofill { %def
	gsave
		eoclip patternpath
	grestore
	newpath
} bind def

% dict patternstroke -
% dict matrix patternstroke -
/patternstroke { %def
	gsave
		strokepath clip patternpath
	grestore
	newpath
} bind def

% dict ax ay string patternashow -
% dict matrix ax ay string patternashow -
/patternashow { %def
	(0) exch { %forall
		2 copy 0 exch put pop dup
		false charpath 
		currentpoint
		5 index type /dicttype eq { %ifelse
			5 index patternfill
		}{ %else
			6 index 6 index patternfill
		} ifelse
		moveto
		3 copy pop rmoveto
	} forall
	pop pop pop
	dup type /dicttype ne { pop } if pop
} bind def

% dict string patternshow -
% dict matrix string patternshow -
/patternshow { %def
	0 exch 0 exch patternashow
} bind def

/opaquepatternfill { %def
	gsave
	1 setgray
	fill
	grestore
	patternfill
} bind def

/square { %def
	gsave
		moveto
		dup 0 rlineto
		dup 0 exch rlineto
		neg 0 rlineto
		closepath
		findfont  % a pattern font
		patternfill
	grestore
 } bind def
%%EndProcSet
%%EndProlog

%%BeginSetup
15 15 [300 72 div 0 0 300 72 div 0 0]
{ %definepattern
	2 setlinecap
	7.5 0 moveto 15 7.5 lineto
	0 7.5 moveto 7.5 15 lineto
	2 setlinewidth stroke
} bind
/RIGHTdiagonal true definepattern pop

15 15 [300 72 div 0 0 300 72 div 0 0]
{ %definepattern
	2 setlinecap
	7.5 0 moveto 0 7.5 lineto
	15 7.5 moveto 7.5 15 lineto
	2 setlinewidth stroke
} bind
/LEFTdiagonal true definepattern pop
30 30 [300 72 div 0 0 300 72 div 0 0]
{ %definepattern
	2 2 scale
	2 setlinecap
	7.5 0 moveto 15 7.5 lineto
	0 7.5 moveto 7.5 15 lineto
	7.5 0 moveto 0 7.5 lineto
	15 7.5 moveto 7.5 15 lineto
	0.5 setlinewidth stroke
} bind
/crosshatch true definepattern pop

%%EndSetup
%%Page: 1 1
 /RIGHTdiagonal 72 460 100 square
 /LEFTdiagonal 72 480 120 square
 /crosshatch 72 500 140 square
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing9-2'
then
	echo shar: will not over-write existing file "'listing9-2'"
else
cat << \SHAR_EOF > 'listing9-2'
%!PS-Adobe-2.0
%%Title: Green Book Listing 9-2, on page 144.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:02 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-1.0
%%Title: logo procedure
%%EndComments
 /logo { %def
		% draw at current point
	gsave
		/Times-Roman findfont
		48 scalefont setfont
		(G) show -13.5 -14.5 rmoveto (R) show
	grestore
	-4 -8 rmoveto
	/Helvetica findfont 11 scalefont setfont
	(glenn) show 22 3 rmoveto (reid) show
 } bind def
%%EndProlog
 gsave
	100 100 moveto logo
 grestore
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing9-3'
then
	echo shar: will not over-write existing file "'listing9-3'"
else
cat << \SHAR_EOF > 'listing9-3'
%!PS-Adobe-2.0
%%Title: Green Book Listing 9-3, on page 145.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:06 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: logo font example
%%EndComments
 /F { findfont exch scalefont setfont } bind def
%%EndProlog
%%BeginSetup
%%BeginFont: Logo-Font 1.0 0
 12 dict begin  % leave one empty slot for FID
	/FontName /Logo-Font def
	/FontMatrix [ 1 0 0 1 0 0 ] def
	/FontType 3 def
	/FontBBox [ -5 -12 85 50 ] def
	/BuildChar { %def
		exch begin
			70 0 -5 -12 85 50 setcachedevice
			Encoding exch get load exec
		end
	} bind def
	/Encoding 256 array %def
		dup 0 1 255 { /.notdef put dup } for pop
		dup 71 /logo put  % "G" character
	def
	 /logo { %def
		% draw at current point
		20 0 moveto
		gsave
			/Times-Roman findfont
			48 scalefont setfont
			(G) show -13.5 -14.5 rmoveto (R) show
		grestore
		-4 -8 rmoveto
		/Helvetica findfont 11 scalefont setfont
		(glenn) show 22 3 rmoveto (reid) show
	 } bind def
 currentdict end
 dup /FontName get exch definefont pop
%%EndFont: Logo-Font
%%EndSetup
%%Page: 1 1
  gsave
	100 100 moveto
	1.5 /Logo-Font F (G) show
 grestore
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing9-4'
then
	echo shar: will not over-write existing file "'listing9-4'"
else
cat << \SHAR_EOF > 'listing9-4'
%!PS-Adobe-2.0
%%Title: Green Book Listing 9-4, on page 148.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:10 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: line thickness example
%%EndComments
 /M { %def
	transform
	round exch round exch
	itransform
	moveto
 } bind def
 /L { %def
	transform
	round exch round exch
	itransform
	lineto
 } bind def
%%EndProlog
 gsave
	.1 setlinewidth
	 10 10 800 { %for
		pop 0 10 translate
		550 0 M  612 0 L
		stroke
	 } bind for
 grestore
 showpage
%%Trailer
SHAR_EOF
fi # end of overwriting check
if test -f 'listing9-5'
then
	echo shar: will not over-write existing file "'listing9-5'"
else
cat << \SHAR_EOF > 'listing9-5'
%!PS-Adobe-2.0
%%Title: Green Book Listing 9-5, on page 153.
%%Creator: "extract" program
%%CreationDate: Mon May  9 09:51:13 PDT 1988
%%EndComments
% --- cut here ---
%!PS-Adobe-2.0
%%Title: separation.ps
 /separations 24 dict def
 separations begin
	/cmykprocs [ %def
	    % cyan
		{ pop pop pop 1 exch sub setgray }
	    % magenta
		{ pop pop exch pop 1 exch sub setgray }
	    % yellow
		{ pop 3 1 roll pop pop 1 exch sub setgray }
	    % black
		{ 4 1 roll pop pop pop 1 exch sub setgray }
	] def
	/screenangles [ %def
		105  % cyan
		75    % magenta
		0      % yellow
		45    % black
	] def
 end  % separations
 % setupcolor takes 0, 1, 2, or 3 as its argument,
 % for cyan, magenta, yellow, and black.
 /CYAN 0 def             /MAGENTA 1 def
 /YELLOW 2 def         /BLACK 3 def
 /setupcolor { %def
	userdict begin
		dup separations /cmykprocs get exch get
		/setcmykcolor exch def
		separations /screenangles get exch get
		currentscreen
			exch pop 3 -1 roll exch
		setscreen
		/setscreen { pop pop pop } def
	end
 } bind def
%%EndProlog
%%BeginSetup
 CYAN setupcolor
%%EndSetup
%%BeginDocument: originalfile.ps
	% entire file is placed here.
%%EndDocument
%%Trailer
SHAR_EOF
fi # end of overwriting check
#	End of shell archive
exit 0


