news/mail/text PostScript prettprinter mp, rel. 2.2, part 1/2

R. P. C. Rodgers M. D.,,,4768910 rodgers at bizet.Berkeley.EDU
Sat Sep 16 10:04:37 AEST 1989


Dear Netlanders,

This is part 1/2 of the latest vesion of mp, a PostScript pretty printer for
news, mail, personal planner notes, and text.

I am posting this on behalf of its principal author, Rich Burridge of Sun
Microsystems (Australia), due to the very long lead times at present with
comp.sources.unix; please direct any further inquiries directly to Rich
at:

   sunaus!sunwa!suntan!richb at Sun.COM 

I hope you enjoy using this very helpful tool.

Cheerio, Rick Rodgers
--------------------------------------------------------------------------------
R. P. C. Rodgers, M.D.         (415)476-8910 (work) 664-0560 (home)
UCSF Laurel Heights Campus     UUCP: ...ucbvax.berkeley.edu!cca.ucsf.edu!rodgers
3333 California St., Suite 102 ARPA: rodgers at maxwell.mmwb.ucsf.edu
San Francisco CA 94118 USA     BITNET: rodgers at ucsfcca
--------------------------------- cut here -------------------------------------
#! /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:
#	Makefile
#	README
#	mailp
#	mp.1
#	mp.pro.filofax.ps
#	mp.pro.ps
#	mp.pro.timeman.ps
# This archive created: Fri Sep 15 10:02:52 1989
# By:	ROOT (Univ. of Calif., San Francisco)
export PATH; PATH=/bin:/usr/bin:$PATH
echo shar: "extracting 'Makefile'" '(2432 characters)'
if test -f 'Makefile'
then
	echo shar: "will not over-write existing file 'Makefile'"
else
sed 's/^	X//' << \SHAR_EOF > 'Makefile'
	X#
	X#  Makefile for mp, the PostScript pretty printer.
	X#
	X#  %Z%%M% %I% %E%
	X#
	X#  Original written in the Icon language by Steve Holden.
	X#
	X#  Converted to C, modified and maintained
	X#  by Rich Burridge - Sun Microsystems Australia.
	X#
	X#  Further modifications to handle news articles and MH mail,
	X#  by Bruno Pillard  - Chorus Systemes, St Quentin en Yvelines, France
	X#
	X#  Addition of digest printing by Dave Glowacki of Public
	X#  Works Computer Services, St Paul, MN.
	X#
	X#  Ordinary text file pretty printing by Rich Burridge.
	X#
	X#  Personal Organiser printing style by Douglas Buchanan,
	X#  Sun Microsystems Europe.
	X#
	X#  Cleaned up message parsing, made more robust my Jeremy Webber,
	X#  Computer Science Department, University of Adelaide
	X#
	X#  Copyright (c) Steve Holden and Rich Burridge.
	X#                All rights reserved.
	X#
	X#  Permission is given to distribute these sources, as long as the
	X#  copyright messages are not removed, and no monies are exchanged.
	X#
	X#  No responsibility is taken for any errors inherent either
	X#  to the comments or the code of this program, but if reported
	X#  to me then an attempt will be made to fix them.
	X#
	X#------------------------------------------------------------------
	X#  It is possible to change the location of the mp prologue file
	X#  with the -p command line option. It can also be defined at compile
	X#  time. If it's not present, then a sensible default value is used.
	X#
	X#
	X#  Location of the prologue file used with mp.
	X#
	XPROLOGUE = -DPROLOGUE=\"$(LIBDIR)\"
	X#---------------------------------------------------------------------
	X
	XBINARIES = mp
	XBINDIR   = /usr/local/bin
	XLIBDIR   = /usr/local/lib
	XMANDIR   = /usr/man/man$(MANSECT)
	XMANSECT  = l
	XCFLAGS   = -O4 $(PROLOGUE)
	XLDFLAGS  =
	XOBJS     = mp.o
	XSRCS     = mp.c
	XOTHERS   = README Makefile mailp mp.1 \
	X	   mp.pro.ps mp.pro.filofax.ps mp.pro.timeman.ps
	X
	Xall:       $(BINARIES)
	X
	Xmp:        $(OBJS)
	X	   cc $(LDFLAGS) -o mp $(OBJS)
	X
	Xinstall:   $(BINARIES)
	X	   install -s -m 751 mp $(BINDIR)
	X	   install -c -m 644 mp.1 $(MANDIR)/mp.$(MANSECT)
	X	   install -c -m 644 mp.pro.ps $(LIBDIR)
	X	   install -c -m 644 mp.pro.filofax.ps $(LIBDIR)
	X	   install -c -m 644 mp.pro.timeman.ps $(LIBDIR)
	X
	Xbackup:;   cp $(SRCS) $(OTHERS) backdir
	X
	Xclean:;    rm -rf mp *.o core
	X
	Xcreate:    SCCS
	X	   -sccs create $(SRCS) $(OTHERS)
	X
	Xlint:;     lint $(SRCS)
	X
	Xshar:;     shar.script $(OTHERS) $(SRCS) > archive
	X
	XSCCS:
	X	   mkdir SCCS
	X	   chmod 755 SCCS
	X
	Xmp.o:      mp.c
SHAR_EOF
if test 2432 -ne "`wc -c < 'Makefile'`"
then
	echo shar: "error transmitting 'Makefile'" '(should have been 2432 characters)'
fi
fi
echo shar: "extracting 'README'" '(2771 characters)'
if test -f 'README'
then
	echo shar: "will not over-write existing file 'README'"
else
sed 's/^	X//' << \SHAR_EOF > 'README'
	X
	XREADME for mp, the PostScript pretty printer.
	X
	XVersion 2.2 June 1989.
	X
	XPermission is given to distribute these sources, as long as the
	Xauthorship messages are not removed, and no monies are exchanged.
	X
	XThe mp program will pretty print various files for you. It can be used
	Xin conjunction with a mail reading utility for producing a pretty print
	Xof your mail items. It can be used with a news reading tool to pretty
	Xprint news articles. Digests can also be printed, and this version can
	Xpretty print ordinary ASCII files as well. Support for personal organiser
	Xprinting was added into the last released version.
	X
	XThe reason for this release is that the message parsing and option code
	Xhas been rewritten by Jeremy Webber, and has dramatically simplified the
	Xuser interface.
	X
	XIt uses a PostScript prologue file which normally resides in
	X/usr/local/lib, but this can be overwritten by use of the -p option.
	X
	XSee the manual pages for more details on these various options.
	X
	XDo a "make" followed by a "make install" which will compile the mp program
	Xand put the files in their default locations. You will probably have to
	Xbe super-user when you do the "make install"
	X
	XAcknowledgements.
	X
	XThe original version of mp was written by Steve Holden in the ICON language,
	Xwhen Steve worked for Sun Microsystems UK. I converted it to the C language
	Xand added a few features. Bruno Pillard of Chorus Systemes, France added
	Xsupport for MH mail and news article printing, plus a shell script (mailp)
	Xwhich tidies up the user interface to mp. Dave Glowacki of Public Works
	XComputer Services, St Paul, MN. added the ability to print digests and
	Xtidied up some of the other options. Rick Rodgers, UCSF School of Pharmacy,
	XSan Francicso revised the initial version of the mp manual page. Doug
	XBuchanan added support for printing in filofax and Time Manager format.
	XMany thanks go to Jerermy Webber, Computer Science Department of the
	XUniversity of Adelaide who rewrote the message parsing and option code and
	Xmade substantial improvements to the programs user friendlyness and
	Xrobustness.
	X
	XThanks go also to Bill Shannon, Roger De Salis, L. Jill Debord, Frederick
	XAvolio, Mark Prior, Stephen Frede, Craig Bishop, Jimmy Aitken, Hugues Leroy,
	XBertrand Decouty, David Fiedler, Scott A. Jordahl, David Boone and Maureen
	XChew for bug reports and/or bug fixes.
	X
	XMy thanks also goes to Glenn Reid from Adobe Systems for the backspacefont.ps
	Xcode used in the prologue files. I'm grateful to all these people, plus
	Xeverybody who has suggested enhancements, and fixed bugs in the previous
	Xversions.
	X
	XI welcome further bug reports and suggestions for improvements.
	X
	X    Rich.
	X
	XRich Burridge,          DOMAIN: richb at sunaus.oz.au
	XPHONE: +61 2 413 2666   UUCP:   {uunet,mcvax,ukc}!munnari!sunaus.oz!richb
SHAR_EOF
if test 2771 -ne "`wc -c < 'README'`"
then
	echo shar: "error transmitting 'README'" '(should have been 2771 characters)'
fi
fi
echo shar: "extracting 'mailp'" '(655 characters)'
if test -f 'mailp'
then
	echo shar: "will not over-write existing file 'mailp'"
else
sed 's/^	X//' << \SHAR_EOF > 'mailp'
	X#! /bin/sh
	X#
	X#  @(#)mailp 1.5 89/06/28
	X#
	X#  mailp, newsp, filep, digestp, filofaxp and timemanp
	X#  shell script de lancement de mp
	X#  (mail/news/file/digest/filofax/time-manager pretty printer)
	X#
	X#  Original: Bruno Pillard - October 1988.
	X#  Modified: Rich Burridge - June 1989.
	X
	XBIN=/usr/local/bin
	X
	Xcase $0 in
	X	*mailp)    PROG=mp       ;; 
	X	*newsp)	   PROG=mp       ;;
	X	*digestp)  PROG="mp -d"	 ;;
	X	*filep)	   PROG="mp -o"  ;;
	X	*filofaxp) PROG="mp -f 	 ;;
	X	*timemanp) PROG="mp -t 	 ;;
	X	*)	echo Unknown pretty printer: $0
	X		exit;;
	Xesac
	X
	Xif    [ $# -eq 0 ]
	Xthen
	X	set - " - "
	Xfi
	Xwhile [ $# -gt 0 ]
	Xdo
	X	/bin/cat $1 | ${BIN}/${PROG} | lpr -h -Plw
	X	shift
	Xdone
SHAR_EOF
if test 655 -ne "`wc -c < 'mailp'`"
then
	echo shar: "error transmitting 'mailp'" '(should have been 655 characters)'
fi
fi
echo shar: "extracting 'mp.1'" '(4038 characters)'
if test -f 'mp.1'
then
	echo shar: "will not over-write existing file 'mp.1'"
else
sed 's/^	X//' << \SHAR_EOF > 'mp.1'
	X.\" @(#)mp.1 1.8 89/06/28
	X.TH MP 1L "28 December 1988"
	X.SH NAME
	Xmp \- Postscript pretty printer
	X.SH SYNOPSIS
	X.B mp
	X[
	X.B \-a
	X]
	X[
	X.B \-d
	X]
	X[
	X.B \-f
	X]
	X[
	X.B \-m
	X]
	X[
	X.B \-o
	X]
	X[
	X.B \-p
	X.I prologue
	X]
	X[
	X.B \-s
	X.I subject
	X]
	X[
	X.B \-t
	X]
	X[
	X.B \-v
	X]
	X[
	X.B \-?
	X]
	X.SH DESCRIPTION
	X.B mp
	Xwill take a mail item, a news article or an ordinary ASCII file on
	Xstandard input and generate a Postscript file on standard output,
	Xwhich is a pretty print of the original. It is also possible to print
	Xout complete mail folders and digests.
	X.LP
	XThe format adopted has textured areas containing banner information
	Xat the top and bottom of every page. It is also possible to supply a
	Xcomplete mail folder to be printed.
	X.LP
	X.B mp
	Xwas originally designed to be used in conjunction with the print
	Xbutton in the
	X.B "mailtool (1)"
	Xprogram, or the
	X.B pipe
	Xcommand from within mail. Add (or alter) the following two line in your
	X.B .mailrc
	Xfile:
	X.in +1.0i
	X.nf
	X\fCset printmail='mp | lpr'
	Xset cmd="mp | lpr &"\fP
	X.fi
	X.in -1.0i
	X.LP
	XSource the
	X.B .mailrc
	Xfile again, and you are ready.
	X.LP
	XA useful alias to use used in conjunction with your
	X.I .cshrc
	Xfile for printing out ordinary text files is:
	X.in +1.0i
	X.nf
	X\fCalias print 'mp -o -s "\\!*" <\\!* | lpr'\fP
	X.fi
	X.in -1.0i
	X.SH OPTIONS
	X.TP
	X.B \-a
	XThe file on standard input is a news article, and should be printed with
	X"Article from
	X.I newsgroup
	X" in the top banner, where
	X.I newsgroup
	Xis the first news group found on the Newsgroups: line.
	X.TP
	X.B \-d
	XThe file on standard input is a digest so print accordingly.
	X.TP
	X.B \-f
	XThe file on standard input is printed specifically was use with Filofax,
	Xa personal organiser.
	X.TP
	X.B \-m
	XThe file on standard input is a mail folder, so print out multiple messages.
	X.TP
	X.B \-o
	XThe file on standard input is an ASCII file so print accordingly.
	X.TP
	X.BI \-p " prologue filename"
	XEmploy
	X.I "prologue filename"
	Xas the Postscript prologue file. This overrides any previously defined
	Xprologue values.
	XThe
	X.I mp
	Xprologue file is determined by first looking for the environment variable
	X.IR MP_PROLOGUE .
	XThis will be the directory where the mp prologue files are to be found.
	XThree different prologue files are used. Normally the prologue file is
	X.I mp.pro.ps
	Xbut if the
	X-I \-f
	Xoption is used, then the prologue file is called
	X-I mp.pro.filofax.ps
	Xand if the
	X-I \-t
	Xoption is used, then the prologue file is
	X-I mp.pro.timeman.ps
	XIf
	X.I MP_PROLOGUE
	Xisn't found, then the default location is used. The default location is
	X.IR /usr/local/lib/mp.pro.ps .
	X.TP
	X.BI \-s " subject"
	XUse
	X.I " subject"
	Xas the new subject for the printout.
	X.TP
	X.B \-t
	XThe file on standard input is printed specifically for use with Time Manager,
	Xa personal organiser.
	X.TP
	X.B \-v
	XPrint the version number of this release of the
	X.B mp
	Xprogram.
	X.TP
	X.B \-?
	XPrint the usage line for this program. Note that the
	X.B ?
	Xcharacter should be escaped if running from
	X.BR csh (1).
	X.SH FILES
	X.TP
	X.B /usr/local/bin/mp
	Xexecutable
	X.TP
	X.B /usr/local/lib/mp.pro.ps
	XPostScript prologue to define required vocabulary for mail printing.
	XEditing this file will allow you to introduce some stylistic variation
	Xin the printing of mail.
	X.TP
	X.B /usr/local/lib/mp.pro.filofax.ps
	XPostscript prologue used to print out files in Filofax format.
	X.TP
	X.B /usr/local/lib/mp.pro.timeman.ps
	XPostScript prologue used to print out files in Time Manager format.
	X.SH "SEE ALSO"
	Xmail(1)
	X.SH AUTHORS
	XOriginal version by Steve Holden.
	X.br
	XConverted to C, modified and maintained by Rich Burridge, Sun Microsystems Australia,
	X.br
	XOriginal modified to handle net news articles and MH mail by Bruno Pillard, Chorus Systemes, France,
	X.br
	XHandling of mail digests added by Dave Glowacki of Public Works Computer Services, St Paul, MN.
	X.br
	XManual page for the initial version revised by Rick Rodgers, UCSF School of Pharmacy, San Francicso.
	X.br
	XSupport for Personal Organiser printing style added by Douglas Buchanan,
	XSun Microsystems Europe.
	X.br
	XSubstantial modifications to header parsing by Jeremy Webber,
	XComputer Science Department, University of Adelaide, Australia.
SHAR_EOF
if test 4038 -ne "`wc -c < 'mp.1'`"
then
	echo shar: "error transmitting 'mp.1'" '(should have been 4038 characters)'
fi
fi
echo shar: "extracting 'mp.pro.filofax.ps'" '(4819 characters)'
if test -f 'mp.pro.filofax.ps'
then
	echo shar: "will not over-write existing file 'mp.pro.filofax.ps'"
else
sed 's/^	X//' << \SHAR_EOF > 'mp.pro.filofax.ps'
	X%!PS-Adobe-1.0
	X%%Creator: Steve Holden
	X%%Modifed: Rich Burridge
	X%%Title: @(#)mp.pro.filofax.ps 1.3 89/05/09
	X%%CreationDate: see above
	X%%PageLength 60
	X%%LineLength 80
	X%%DocumentFonts: Times-Bold Times-Roman Courier
	X%%Pages: (atend)
	X%%EndComments
	X
	X%Title: backspacefont.ps suggested by Glenn Reid (Adobe Systems).
	X
	X/backspacefont {
	X    /Courier findfont dup length dict begin
	X        { %forall
	X            1 index /FID eq { pop pop } { def } ifelse
	X        } forall
	X        currentdict /UniqueID known { %if
	X              /UniqueID UniqueID 16#800000 xor def
	X        } if
	X        CharStrings length 1 add dict begin
	X            CharStrings { def } forall
	X          /backspace { -600 0 setcharwidth } bind def
	X            currentdict
	X      end
	X        /CharStrings exch def
	X        /Encoding Encoding 256 array copy def
	X        Encoding 8 /backspace put
	X        currentdict
	X    end
	X    definefont
	X} bind def
	X 
	X/CourierBack backspacefont
	X 
	X/font1d /Times-Bold findfont 11 scalefont def
	X/font2d /Times-Roman findfont 11 scalefont def
	X/font3d /CourierBack findfont 10 scalefont def
	X/fontHd /Helvetica-BoldOblique findfont 15 scalefont def
	X/fontH2 /Helvetica-BoldOblique findfont 10 scalefont def
	X/fontNd /Times-Bold findfont 12 scalefont def
	X
	X/BoldFont { font1d setfont } def
	X/PrimaryFont { font2d setfont } def
	X/SecondaryFont { font3d setfont } def
	X/fontH { fontHd setfont } def
	X/fontD { fontH2 setfont } def
	X/fontN { fontNd setfont } def
	X
	XSecondaryFont
	X%% stick in all the fudge factors here. May need changing for page sizes,
	X%% laserwriter setups etc?
	X%%
	X/binderspace 100 def
	X/filowidth 484 def
	X/filoheight 972 def
	X/margin 12 def
	X/xleft binderspace 6 add def
	X/yco filoheight 50 sub def			% space at the top
	X/xright filowidth binderspace add 30 sub def	% space at right
	X
	X/endpage
	X{
	X  gsave
	X    fontH
	X    % draw the top for owner
	X    newpath
	X      xleft 10 sub yco moveto
	X      xleft yco 20 sub 10 180 270 arc
	X      xright yco 20 sub 10 270 0 arc
	X      xright yco 10 0 90 arc
	X      xleft yco 10 90 180 arc
	X    closepath
	X    0.90 setgray fill
	X%    newpath
	X%      318 864 15 0 360 arc
	X%      gsave
	X%        1 setgray fill
	X%      grestore
	X%    closepath
	X    0 setgray stroke
	X    xleft yco 16 sub moveto
	X    MailFor show
	X    User show
	X    fontD
	X    TimeNow stringwidth pop neg xright add yco 16 sub moveto TimeNow show
	X    fontN
	X    % dup stringwidth pop 2 div neg 318 add 858 moveto show
	X    fontH
	X    % lower box for subject etc
	X    newpath
	X      xleft 10 sub 60 moveto
	X      xleft 40 10 180 270 arc
	X      xright 40 10 270 0 arc
	X      xright 60 10 0 90 arc
	X      xleft 60 10 90 180 arc
	X    closepath
	X    0.90 setgray fill
	X    % stick the page number just a few points in from the right hand edge
	X    newpath
	X      xright 10 sub 50 15 0 360 arc
	X      gsave
	X        1 setgray fill
	X      grestore
	X    closepath
	X    0 setgray stroke
	X    xleft 44 moveto Subject show
	X    fontN
	X    % position and print the page number
	X    dup stringwidth pop 2 div neg xright 10 sub add 46 moveto show
	X    fontH
	X  grestore
	X  modu 2 eq eof 0 ne or { showpage } if	% do a 'form feed'
	X					% if ready for it
	X  eof 0 eq { newpage } if	% reset parameters for next if not end of file
	X} def
	X
	X/endfile
	X{
	X     /eof 1 def
	X     endpage
	X} def
	X
	X/xo 36 def
	X/yo 0 def
	X/pageno 0 def
	X/modu pageno 3 mod def	% get mod to work out page pos
	X/eof 0 def
	X
	X/weearc			% draws a little arc to show where the holes go
	X{ newpath
	X  xo yo 4 0 360 arc
	X  closepath
	X  fill
	X} def
	X
	X/filopage
	X{ gsave
	X%  24 -118 translate
	X  /xstart filowidth modu mul def
	X  /xstart xstart binderspace add def
	X  /xfin xstart filowidth add def
	X  modu 0 eq {		% first break
	X	/yo 130 def	% show where the holes should be punched
	X	weearc		% except that they will normally be off the edge of
	X	/yo 238 def	% the page
	X	weearc
	X	/yo 346 def
	X	weearc
	X	/yo 639 def
	X	weearc
	X	/yo 742 def
	X	weearc
	X	/yo 850 def
	X	weearc
	X  } if
	X  [1 4] 0 setdash	% use dashed lines for marker
	X  newpath
	X  xstart 0 moveto
	X  xfin 0 lineto
	X  xfin filoheight lineto
	X  stroke
	X  grestore
	X} def
	X
	X/newpage
	X{ 
	X  pageno 0 eq {			% set initial values for landscape drawing
	X        0.5 0.5 scale
	X        90 rotate
	X        -50 0 translate
	X        gsave			% save state for easy restore
	X	/eof 0 def
	X  } {
	X        grestore gsave		% return to preferred original state
	X  } ifelse			% initial setup
	X
	X  /modu pageno 3 mod def	% get mod to work out page pos
	X  0 0 filoheight sub translate	% initial position (-filoheight)
	X  filopage			% draw neccessary page breaks
	X  /times filowidth modu mul def % shift origin as far right as needed
	X  /times times margin add def	% move right by fudge factor 12
	X  times 0 translate
	X  /lct 0 def
	X  /ypos filoheight 110 sub def
	X  xleft ypos moveto
	X  /pageno pageno 1 add def	% add one for the next time
	X} def
	X
	X/showline
	X{
	X  show
	X  /ypos ypos 12 sub def
	X  xleft ypos moveto
	X} def
	X
	Xnewpage			% establish first page parameters
SHAR_EOF
if test 4819 -ne "`wc -c < 'mp.pro.filofax.ps'`"
then
	echo shar: "error transmitting 'mp.pro.filofax.ps'" '(should have been 4819 characters)'
fi
fi
echo shar: "extracting 'mp.pro.ps'" '(2488 characters)'
if test -f 'mp.pro.ps'
then
	echo shar: "will not over-write existing file 'mp.pro.ps'"
else
sed 's/^	X//' << \SHAR_EOF > 'mp.pro.ps'
	X%!PS-Adobe-1.0
	X%%Creator: Steve Holden
	X%%Modifed: Rich Burridge
	X%%Title: @(#)mp.pro.ps 1.4 89/05/09
	X%%CreationDate: see above
	X%%DocumentFonts: Times-Bold Times-Roman Courier
	X%%Pages: (atend)
	X%%PageLength 60
	X%%LineLength 80
	X%%EndComments
	X
	X%Title: backspacefont.ps suggested by Glenn Reid (Adobe Systems).
	X
	X/backspacefont {
	X    /Courier findfont dup length dict begin
	X        { %forall
	X            1 index /FID eq { pop pop } { def } ifelse
	X        } forall
	X        currentdict /UniqueID known { %if
	X              /UniqueID UniqueID 16#800000 xor def
	X        } if
	X        CharStrings length 1 add dict begin
	X            CharStrings { def } forall
	X          /backspace { -600 0 setcharwidth } bind def
	X            currentdict
	X      end
	X        /CharStrings exch def
	X        /Encoding Encoding 256 array copy def
	X        Encoding 8 /backspace put
	X        currentdict
	X    end
	X    definefont
	X} bind def
	X
	X/CourierBack backspacefont
	X
	X/font1d /Times-Bold findfont 10 scalefont def
	X/font2d /Times-Roman findfont 10 scalefont def
	X/font3d /CourierBack findfont 9 scalefont def
	X/fontHd /Helvetica-BoldOblique findfont 14 scalefont def
	X/fontH2 /Helvetica-BoldOblique findfont 10 scalefont def
	X/fontNd /Times-Bold findfont 12 scalefont def
	X
	X/BoldFont { font1d setfont } def
	X/PrimaryFont { font2d setfont } def
	X/SecondaryFont { font3d setfont } def
	X/fontH { fontHd setfont } def
	X/fontD { fontH2 setfont } def
	X/fontN { fontNd setfont } def
	X
	XSecondaryFont
	X
	X/endpage
	X{
	X  gsave
	X    fontH
	X    newpath
	X      90 756 moveto
	X      100 736 10 180 270 arc
	X      536 736 10 270 0 arc
	X      536 756 10 0 90 arc
	X      100 756 10 90 180 arc
	X    closepath
	X    0.75 setgray fill
	X    newpath
	X      318 746 15 0 360 arc
	X      gsave
	X        1 setgray fill
	X      grestore
	X    closepath
	X    0 setgray stroke
	X    100 740 moveto
	X    MailFor show
	X    User show
	X    fontD
	X    TimeNow stringwidth pop neg 536 add 740 moveto TimeNow show
	X    fontN
	X    dup stringwidth pop 2 div neg 318 add 740 moveto show
	X    fontH
	X    newpath
	X      90 60 moveto
	X      100 40 10 180 270 arc
	X      536 40 10 270 0 arc
	X      536 60 10 0 90 arc
	X      100 60 10 90 180 arc
	X    closepath
	X    0.75 setgray fill
	X    0 setgray
	X    100 44 moveto Subject show
	X  grestore
	X  showpage              % display it
	X  newpage               % reset parameters for next
	X} def
	X
	X/newpage
	X{
	X  /lct 0 def
	X  /ypos 700 def
	X  100 ypos moveto
	X} def
	X
	X/showline
	X{
	X  show
	X  /ypos ypos 10 sub def
	X  100 ypos moveto
	X} def
	X
	Xnewpage	                % establish first page parameters
SHAR_EOF
if test 2488 -ne "`wc -c < 'mp.pro.ps'`"
then
	echo shar: "error transmitting 'mp.pro.ps'" '(should have been 2488 characters)'
fi
fi
echo shar: "extracting 'mp.pro.timeman.ps'" '(4820 characters)'
if test -f 'mp.pro.timeman.ps'
then
	echo shar: "will not over-write existing file 'mp.pro.timeman.ps'"
else
sed 's/^	X//' << \SHAR_EOF > 'mp.pro.timeman.ps'
	X%!PS-Adobe-1.0
	X%%Creator: Steve Holden
	X%%Modifed: Rich Burridge
	X%%Title: @(#)mp.pro.timeman.ps 1.3 89/05/09
	X%%CreationDate: see above
	X%%PageLength 60
	X%%LineLength 80
	X%%DocumentFonts: Times-Bold Times-Roman Courier
	X%%Pages: (atend)
	X%%EndComments
	X
	X%Title: backspacefont.ps suggested by Glenn Reid (Adobe Systems).
	X
	X/backspacefont {
	X    /Courier findfont dup length dict begin
	X        { %forall
	X            1 index /FID eq { pop pop } { def } ifelse
	X        } forall
	X        currentdict /UniqueID known { %if
	X              /UniqueID UniqueID 16#800000 xor def
	X        } if
	X        CharStrings length 1 add dict begin
	X            CharStrings { def } forall
	X          /backspace { -600 0 setcharwidth } bind def
	X            currentdict
	X      end
	X        /CharStrings exch def
	X        /Encoding Encoding 256 array copy def
	X        Encoding 8 /backspace put
	X        currentdict
	X    end
	X    definefont
	X} bind def
	X 
	X/CourierBack backspacefont
	X 
	X/font1d /Times-Bold findfont 12 scalefont def
	X/font2d /Times-Roman findfont 12 scalefont def
	X/font3d /CourierBack findfont 11 scalefont def
	X/fontHd /Helvetica-BoldOblique findfont 15 scalefont def
	X/fontH2 /Helvetica-BoldOblique findfont 10 scalefont def
	X/fontNd /Times-Bold findfont 12 scalefont def
	X
	X/BoldFont { font1d setfont } def
	X/PrimaryFont { font2d setfont } def
	X/SecondaryFont { font3d setfont } def
	X/fontH { fontHd setfont } def
	X/fontD { fontH2 setfont } def
	X/fontN { fontNd setfont } def
	X
	XSecondaryFont
	X%% stick in all the fudge factors here. May need changing for page sizes,
	X%% laserwriter setups etc?
	X%%
	X/binderspace 100 def
	X/filowidth 520 def
	X/filoheight 1024 def
	X/margin 12 def
	X/xleft binderspace 6 add def
	X/yco filoheight 50 sub def			% space at the top
	X/xright filowidth binderspace add 30 sub def	% space at right
	X
	X/endpage
	X{
	X  gsave
	X    fontH
	X    % draw the top for owner
	X    newpath
	X      xleft 10 sub yco moveto
	X      xleft yco 20 sub 10 180 270 arc
	X      xright yco 20 sub 10 270 0 arc
	X      xright yco 10 0 90 arc
	X      xleft yco 10 90 180 arc
	X    closepath
	X    0.90 setgray fill
	X%    newpath
	X%      318 864 15 0 360 arc
	X%      gsave
	X%        1 setgray fill
	X%      grestore
	X%    closepath
	X    0 setgray stroke
	X    xleft yco 16 sub moveto
	X    MailFor show
	X    User show
	X    fontD
	X    TimeNow stringwidth pop neg xright add yco 16 sub moveto TimeNow show
	X    fontN
	X    % dup stringwidth pop 2 div neg 318 add 858 moveto show
	X    fontH
	X    % lower box for subject etc
	X    newpath
	X      xleft 10 sub 60 moveto
	X      xleft 40 10 180 270 arc
	X      xright 40 10 270 0 arc
	X      xright 60 10 0 90 arc
	X      xleft 60 10 90 180 arc
	X    closepath
	X    0.90 setgray fill
	X    % stick the page number just a few points in from the right hand edge
	X    newpath
	X      xright 10 sub 50 15 0 360 arc
	X      gsave
	X        1 setgray fill
	X      grestore
	X    closepath
	X    0 setgray stroke
	X    xleft 44 moveto Subject show
	X    fontN
	X    % position and print the page number
	X    dup stringwidth pop 2 div neg xright 10 sub add 46 moveto show
	X    fontH
	X  grestore
	X  modu 2 eq eof 0 ne or { showpage } if	% do a 'form feed'
	X					% if ready for it
	X  eof 0 eq { newpage } if	% reset parameters for next if not end of file
	X} def
	X
	X/endfile
	X{
	X     /eof 1 def
	X     endpage
	X} def
	X
	X/xo 36 def
	X/yo 0 def
	X/pageno 0 def
	X/modu pageno 3 mod def	% get mod to work out page pos
	X/eof 0 def
	X
	X/weearc			% draws a little arc to show where the holes go
	X{ newpath
	X  xo yo 4 0 360 arc
	X  closepath
	X  fill
	X} def
	X
	X/filopage
	X{ gsave
	X%  24 -118 translate
	X  /xstart filowidth modu mul def
	X  /xstart xstart binderspace add def
	X  /xfin xstart filowidth add def
	X  modu 0 eq {		% first break
	X	/yo 130 def	% show where the holes should be punched
	X	weearc		% except that they will normally be off the edge of
	X	/yo 238 def	% the page
	X	weearc
	X	/yo 346 def
	X	weearc
	X	/yo 639 def
	X	weearc
	X	/yo 742 def
	X	weearc
	X	/yo 850 def
	X	weearc
	X  } if
	X  [1 4] 0 setdash	% use dashed lines for marker
	X  newpath
	X  xstart 0 moveto
	X  xfin 0 lineto
	X  xfin filoheight lineto
	X  stroke
	X  grestore
	X} def
	X
	X/newpage
	X{ 
	X  pageno 0 eq {			% set initial values for landscape drawing
	X        0.5 0.5 scale
	X        90 rotate
	X        -50 0 translate
	X        gsave			% save state for easy restore
	X	/eof 0 def
	X  } {
	X        grestore gsave		% return to preferred original state
	X  } ifelse			% initial setup
	X
	X  /modu pageno 3 mod def	% get mod to work out page pos
	X  0 0 filoheight sub translate	% initial position (-filoheight)
	X  filopage			% draw neccessary page breaks
	X  /times filowidth modu mul def % shift origin as far right as needed
	X  /times times margin add def	% move right by fudge factor 12
	X  times 0 translate
	X  /lct 0 def
	X  /ypos filoheight 110 sub def
	X  xleft ypos moveto
	X  /pageno pageno 1 add def	% add one for the next time
	X} def
	X
	X/showline
	X{
	X  show
	X  /ypos ypos 12 sub def
	X  xleft ypos moveto
	X} def
	X
	Xnewpage			% establish first page parameters
SHAR_EOF
if test 4820 -ne "`wc -c < 'mp.pro.timeman.ps'`"
then
	echo shar: "error transmitting 'mp.pro.timeman.ps'" '(should have been 4820 characters)'
fi
fi
exit 0
#	End of shell archive
--------------------------------------------------------------------------------
R. P. C. Rodgers, M.D.                  Telephone:
Statistical Mechanics of Biomolecules   (415)476-8910 (work)
Department of Pharmaceutical Chemistry  (415)664-0560 (home)



More information about the Alt.sources mailing list