v14i091: Official patch #7 for mp v2.4.

Rich Burridge rburridge at Sun.COM
Sun Sep 16 11:03:59 AEST 1990


Posting-number: Volume 14, Issue 91
Submitted-by: rburridge at Sun.COM (Rich Burridge)
Archive-name: mp-2.4.5/patch02

[Brandon, could you post this to comp.sources.misc please? I've already
 posted a copy to comp.sources.bugs. Thanks].

Mp is a Postscript pretty printer for mail,news and ordinary files.

This is official patch #7 for mp v2.4.

** Mp v2.4 was posted to comp.sources.misc last week at patchlevel #5. **

It makes the following changes:

    *  From Johan Vromans <jv at mh.nl>
       Completely revised how mp now does it's processing. See the new
       section in the README file entitled "How mp works" for more details.
       Introduces a new prologue file mp.pro.l.ps for handling the standard
       printing in landscape mode with 2 columns. Changes to most other
       files. The MANIFEST and FILES files have been updated.

    *  From James F. Blake <jim at doctor.chem.yale.edu>
       From Rainer Klute <klute at unido.informatik.uni-dortmund.de>
       Mp crashed with a segmentation violation if the mail message has no
       subject line.

    *  From Bruno Pillard <bp at chorus.fr>
       Added the printing of the username below the date when printing
       news articles.

       Fixed two typos in the mailp shell script, and added the installation
       of mailp to the Makefile.dist file. Support for the PRINTER variable
       has also been added to mailp.

    *  From Ran Ever-Hadani <nsc!taux01.nsc.com!crehta at Sun.COM>
       When mp -a is invoked from within the nn news reader, the "Article
       from" header was displayed incorrectly.

    *  From Lupe Christoph <lupe at alanya.Germany.Sun.COM>
       The -f (filofax) and -t (Time Manager) options didn't print
       correctly on a PostScript print which has page reversal set. Johan
       Vromans work on the restructuring of the PostScript and the way
       prologues are handled, has fixed this.
       
    *  From John Little <gaijin at ale.Japan.Sun.COM>
       The NAME environment variable (if set) should be processed the same
       way as the GECOS passwd field. See the GECOSFIELDS and GECOSLENGTH
       definitions in Makefile.dist for more details.

TO INSTALL:
-----------

A shar file is included below which contains patch #7 and the new prologue
file, mp.pro.l.ps. Unpack these (in the mp source directory) using sh.

Apply the patch with Larry Wall's patch program. Copy Makefile.dist to
Makefile and adjust for your site. Then do a "make". Check the paper size
in each of the prologue files that you use is correct for your site (US
Letter or A4), then do a "make install".

If you need to get patch #6 then it can be obtained from the automatic
mail archive server, by sending a message to rb-archive-server at Aus.Sun.COM
containing the line:

send mp patch6

If this is all getting too confusing for you, then the latest complete mp
distribution can be obtained from the same address, by sending a message
containing the lines:

send mp part1
send mp part2

If the mail is likely to go back through any sites that impose a size limit,
then I suggest you divide the above request up into two separate mail
messages.

You can also include a path line in these requests to indicate the mail
path that the archive server should use to send the files to you. Such a
path line could be:

path uunet.uu.net!hostname!user

Note that this is uunet.uu.net and not just uunet. Sun.COM doesn't recognise
just uunet.

Rich Burridge,          DOMAIN: richb at Aus.Sun.COM
Sun Microsystems.       ACSNET: richb at sunaus.sun.oz
PHONE: +61 2 413 2666   UUCP:   {uunet,mcvax,ukc}!munnari!sunaus.oz!richb

------CUT HERE------patch.7 + mp.pro.l.ps------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 to create the files:
#	patch.7
#	mp.pro.l.ps
# This archive created: Fri Sep  7 14:19:11 EST 1990
#
#
export PATH; PATH=/bin:$PATH
#
if [ -f patch.7 ]
then
echo shar: will not over-write existing file patch.7
else
echo shar: extracting 'patch.7',    47191 characters
cat > patch.7 <<'Funky_Stuff'

------- README -------
*** /tmp/da08326	Fri Sep  7 14:17:27 1990
--- README	Fri Sep  7 13:41:52 1990
***************
*** 11,17 ****
  
  1. What is mp?
  2. Getting started.
! 3. Acknowledgements.
  --------------------------------------------------------------------------
  
  
--- 11,18 ----
  
  1. What is mp?
  2. Getting started.
! 3. How mp works.
! 4. Acknowledgements.
  --------------------------------------------------------------------------
  
  
***************
*** 54,66 ****
  
  See the Makefile for a detailed description of each of these definitions.
  
! Once you are happy with these settings, then you should do a "make" followed
! by a "make install" which will compile the mp program and put the files in
  their default locations. You will probably have to be super-user when you do
! the "make install"
  
  
! 3. Acknowledgements.
  --------------------
  
  The original version of mp was written by Steve Holden in the ICON language,
--- 55,123 ----
  
  See the Makefile for a detailed description of each of these definitions.
  
! Once you are happy with these settings, then you should do a "make", which
! will compile the mp program.
! 
! You should then check each of the PostScript prologue files (these have an
! extension of .ps) and set the paper size correctly for your site. The paper
! size is defaulted to US Letter size, so this will work successfully on A4
! sized paper but not use all of the paper.
! 
! This should be followed by a "make install" which will put the files in
  their default locations. You will probably have to be super-user when you do
! the "make install".
  
  
! 3. How mp works.
! ----------------
! 
! When mp processes a file, it first reads the designated prologue and
! extracts data from the following lines:
! 
!    %%PageLength nn    - the number of lines per page
!    %%LineLength nn    - the number of chars on a line
!    %%NumCols nn               - the number of columns per page
! 
! Then it reads the input files and reshapes them into PostScript using the
! following structuring conventions:
! 
!       %%Page: ? 1
!       (1) newpage     <- physical page #1
!       ...data...
!       (1) 1 endcol    <- logical page #1, 1st col on this page
!       ...data...
!       (2) 2 endcol    <- logical page #2, 2nd col on this page
!       ...data...
!       (3) 3 endcol    <- logical page #3, 3rd col on this page
!       (1) endpage     <- physical page #1
!       %%Page: ? 2
!       (2) newpage     <- physical page #2
!       ...data...
!       (4) 1 endcol    <- logical page #4, 1st col on this page
!       ...data...
!       (5) 2 endcol    <- logical page #5, 2nd col on this page
!       (3) endpage     <- physical page #2
!       endfile         <- end of first or only input file
!       %%Page....      <
!       ....            <- 2nd input file, if any
!       endfile         <
!       ...             <- more, if any
!       %%Trailer
!       %%Pages: nn
!       %%EOF
! 
! Prologue files need to supply the above procedures, which may be empty.
! 
! The following prologues are supplied with mp:
! 
!       mp.pro.ps               standard prologue
!       mp.pro.alt.ps           alternative prologue, page nos. bottom right
!       mp.pro.l.ps             standard prologue, landscape, 2 columns
!       mp.pro.filofax.ps       filofax prologue
!       mp.pro.timeman.ps       time manager prologue
! 
! 
! 4. Acknowledgements.
  --------------------
  
  The original version of mp was written by Steve Holden in the ICON language,
***************
*** 77,83 ****
  made substantial improvements to the programs user friendliness and
  robustness. Sam Manogharan added support for printing multiple files
  specified on the command line, and subject line filename print for ordinary
! files. The landscape mode was written by Michael Tuchiarone.
  
  Thanks go also to Bill Shannon, Roger De Salis, L. Jill Debord, Frederick
  Avolio, Mark Prior, Stephen Frede, Craig Bishop, Jimmy Aitken, Hugues Leroy,
--- 134,142 ----
  made substantial improvements to the programs user friendliness and
  robustness. Sam Manogharan added support for printing multiple files
  specified on the command line, and subject line filename print for ordinary
! files. The landscape mode was written by Michael Tuchiarone. The revising
! and tidying up of the PostScript structuring and the way that the prologue
! files are handled was done by Johan Vromans.
  
  Thanks go also to Bill Shannon, Roger De Salis, L. Jill Debord, Frederick
  Avolio, Mark Prior, Stephen Frede, Craig Bishop, Jimmy Aitken, Hugues Leroy,
***************
*** 84,91 ****
  Bertrand Decouty, David Fiedler, Scott A. Jordahl, David Boone, Steve Cliffe,
  Maureen Chew, Brian Kohn, Walter Underwood, Mike Khaw, Rick Gunderson, Johan
  Vromans, Brachet, Pierre Mareschal, Roger Riggs, Larry Tsui, Mike Bundschuh,
! Amos Shapir, Bruce G Barnett and Pauline van Winsen for bug reports and/or
! bug fixes plus enhancements.
  
  My thanks also goes to Glenn Reid from Adobe Systems for the backspacefont.ps
  code used in the prologue files. I'm grateful to all these people, plus
--- 143,151 ----
  Bertrand Decouty, David Fiedler, Scott A. Jordahl, David Boone, Steve Cliffe,
  Maureen Chew, Brian Kohn, Walter Underwood, Mike Khaw, Rick Gunderson, Johan
  Vromans, Brachet, Pierre Mareschal, Roger Riggs, Larry Tsui, Mike Bundschuh,
! Amos Shapir, Bruce G Barnett, Pauline van Winsen, James F. Blake, Bruno
! Pillard, Rainer Klute, Ran Ever-Hadani, Lupe Christoph and John Little for
! bug reports and/or bug fixes plus enhancements.
  
  My thanks also goes to Glenn Reid from Adobe Systems for the backspacefont.ps
  code used in the prologue files. I'm grateful to all these people, plus

------- mp.pro.ps -------
*** /tmp/da08329	Fri Sep  7 14:17:27 1990
--- mp.pro.ps	Fri Sep  7 10:10:12 1990
***************
*** 20,25 ****
--- 20,26 ----
  %
  /fullwidth 8.5 inch def
  /fullheight 11 inch def
+ 
  /leftedge 0 def
  /rightedge fullwidth def
  /bottomedge 0 def
***************
*** 82,89 ****
      0.75 setgray fill
  } def
  
! /endpage	% page_number endpage --
  {
    gsave
      fontH
      leftedge 50 add topedge 56 sub	% bottom lt corner
--- 83,98 ----
      0.75 setgray fill
  } def
  
! /endpage		% page_number endpage --
  {
+   showpage              % display it
+ } def
+ 
+ /endfile { } def	% nothing needed
+ 
+ /endcol			% page_number col_number endcol --
+ {
+   pop			% get rid of col_number
    gsave
      fontH
      leftedge 50 add topedge 56 sub	% bottom lt corner
***************
*** 115,126 ****
      0 setgray
      leftedge 50 add bottomedge 54 add moveto Subject show
    grestore
-   showpage              % display it
-   newpage               % reset parameters for next
  } def
  
! /newpage
  {
    LandscapeMode {setlandscape} if
    /lct 0 def
    /ypos topedge 92 sub def
--- 124,134 ----
      0 setgray
      leftedge 50 add bottomedge 54 add moveto Subject show
    grestore
  } def
  
! /newpage	% page_number newpage --
  {
+   pop		% pageno
    LandscapeMode {setlandscape} if
    /lct 0 def
    /ypos topedge 92 sub def
***************
*** 141,157 ****
    /LandscapeMode true def
    /rightedge fullheight def
    /topedge fullwidth def
-   newpage
  } def
  
- /endcol
- {
-   /lct 0 def
-   /ypos topedge 92 sub def
-   /xpos rightedge leftedge sub 2 div def
-   xpos ypos moveto
- } def
- 
  /showline
  {
    show
--- 149,156 ----
***************
*** 158,162 ****
    /ypos ypos FontSize sub def
    xpos ypos moveto
  } def
- 
- newpage	                % establish first page parameters
--- 157,159 ----

------- mailp -------
*** /tmp/da08332	Fri Sep  7 14:17:28 1990
--- mailp	Fri Sep  7 12:38:53 1990
***************
*** 13,23 ****
  
  case $0 in
  	*mailp)    PROG=mp       ;; 
! 	*newsp)	   PROG=mp       ;;
  	*digestp)  PROG="mp -d"	 ;;
  	*filep)	   PROG="mp -o"  ;;
! 	*filofaxp) PROG="mp -f 	 ;;
! 	*timemanp) PROG="mp -t 	 ;;
  	*)	echo Unknown pretty printer: $0
  		exit;;
  esac
--- 13,23 ----
  
  case $0 in
  	*mailp)    PROG=mp       ;; 
! 	*newsp)	   PROG="mp -a"  ;;
  	*digestp)  PROG="mp -d"	 ;;
  	*filep)	   PROG="mp -o"  ;;
! 	*filofaxp) PROG="mp -f"	 ;;
! 	*timemanp) PROG="mp -t"	 ;;
  	*)	echo Unknown pretty printer: $0
  		exit;;
  esac
***************
*** 28,33 ****
  fi
  while [ $# -gt 0 ]
  do
! 	/bin/cat $1 | ${BIN}/${PROG} | lpr -h -Plw
  	shift
  done
--- 28,33 ----
  fi
  while [ $# -gt 0 ]
  do
! 	/bin/cat $1 | ${BIN}/${PROG} | lpr -h -P${PRINTER:-ps}
  	shift
  done

------- mp.pro.timeman.ps -------
*** /tmp/da08335	Fri Sep  7 14:17:28 1990
--- mp.pro.timeman.ps	Fri Sep  7 09:50:58 1990
***************
*** 5,10 ****
--- 5,11 ----
  %%CreationDate: see above
  %%PageLength 60
  %%LineLength 80
+ %%NumCols 3
  %%DocumentFonts: Times-Bold Times-Roman Courier
  %%Pages: (atend)
  %%EndComments
***************
*** 34,40 ****
   
  /CourierBack backspacefont
   
! /FontSize 12 def
  /font1d /Times-Bold            findfont def
  /font2d /Times-Roman           findfont def
  /font3d /CourierBack           findfont def
--- 35,41 ----
   
  /CourierBack backspacefont
   
! /FontSize 11 def
  /font1d /Times-Bold            findfont def
  /font2d /Times-Roman           findfont def
  /font3d /CourierBack           findfont def
***************
*** 44,54 ****
  
  /BoldFont      { font1d FontSize scalefont setfont } def
  /pf            { font2d FontSize scalefont setfont } def
! /sf            { font3d 11       scalefont setfont } def
  /fontH         { fontHd setfont } def
  /fontD         { fontH2 setfont } def
  /fontN         { fontNd setfont } def
  
  sf
  %% stick in all the fudge factors here. May need changing for page sizes,
  %% laserwriter setups etc?
--- 45,56 ----
  
  /BoldFont      { font1d FontSize scalefont setfont } def
  /pf            { font2d FontSize scalefont setfont } def
! /sf            { font3d 10       scalefont setfont } def
  /fontH         { fontHd setfont } def
  /fontD         { fontH2 setfont } def
  /fontN         { fontNd setfont } def
  
+ 
  sf
  %% stick in all the fudge factors here. May need changing for page sizes,
  %% laserwriter setups etc?
***************
*** 57,68 ****
  /filowidth 520 def
  /filoheight 1024 def
  /margin 12 def
- /xleft binderspace 6 add def
  /yco filoheight 50 sub def			% space at the top
  /xright filowidth binderspace add 30 sub def	% space at right
  
! /endpage
  {
    gsave
      fontH
      % draw the top for owner
--- 59,92 ----
  /filowidth 520 def
  /filoheight 1024 def
  /margin 12 def
  /yco filoheight 50 sub def			% space at the top
  /xright filowidth binderspace add 30 sub def	% space at right
+ /xleft binderspace 6 add def
  
! 0.5 0.5 scale
! 90 rotate
! -50 filoheight neg translate
! 
! /newpage		% page_number newpage --
! { pop
! 
!   gsave			% save state for easy restore
!   margin 0 translate
!   /ypos filoheight 110 sub def
!   xleft ypos moveto
! } def
! 
! /endpage		% page_number endpage --
! { pop 			% get rid of page_number
!   showpage
!   grestore
! } def
! 
! /endfile { } def	% -- endfile --
! 
! /endcol			% page_number column_number endcol --
  {
+   /thiscol exch def	% column_number
    gsave
      fontH
      % draw the top for owner
***************
*** 106,127 ****
      dup stringwidth pop 2 div neg xright 10 sub add 46 moveto show
      fontH
    grestore
!   modu 2 eq eof 0 ne or { showpage } if	% do a 'form feed'
! 					% if ready for it
!   eof 0 eq { newpage } if	% reset parameters for next if not end of file
  } def
  
- /endfile
- {
-      /eof 1 def
-      endpage
- } def
- 
  /xo 36 def
  /yo 0 def
  /pageno 0 def
- /modu pageno 3 mod def	% get mod to work out page pos
- /eof 0 def
  
  /weearc			% draws a little arc to show where the holes go
  { newpath
--- 130,145 ----
      dup stringwidth pop 2 div neg xright 10 sub add 46 moveto show
      fontH
    grestore
!   filopage			% draw neccessary page breaks
!   grestore gsave		% back to default
!   filowidth thiscol mul margin add 0 translate
!   /ypos filoheight 110 sub def
!   xleft ypos moveto
  } def
  
  /xo 36 def
  /yo 0 def
  /pageno 0 def
  
  /weearc			% draws a little arc to show where the holes go
  { newpath
***************
*** 132,142 ****
  
  /filopage
  { gsave
! %  24 -118 translate
!   /xstart filowidth modu mul def
!   /xstart xstart binderspace add def
    /xfin xstart filowidth add def
!   modu 0 eq {		% first break
  	/yo 130 def	% show where the holes should be punched
  	weearc		% except that they will normally be off the edge of
  	/yo 238 def	% the page
--- 150,158 ----
  
  /filopage
  { gsave
!   /xstart binderspace margin sub def
    /xfin xstart filowidth add def
!   thiscol 0 eq {		% first break
  	/yo 130 def	% show where the holes should be punched
  	weearc		% except that they will normally be off the edge of
  	/yo 238 def	% the page
***************
*** 159,188 ****
    grestore
  } def
  
- /newpage
- { 
-   pageno 0 eq {			% set initial values for landscape drawing
-         0.5 0.5 scale
-         90 rotate
-         -50 0 translate
-         gsave			% save state for easy restore
- 	/eof 0 def
-   } {
-         grestore gsave		% return to preferred original state
-   } ifelse			% initial setup
- 
-   /modu pageno 3 mod def	% get mod to work out page pos
-   0 0 filoheight sub translate	% initial position (-filoheight)
-   filopage			% draw neccessary page breaks
-   /times filowidth modu mul def % shift origin as far right as needed
-   /times times margin add def	% move right by fudge factor 12
-   times 0 translate
-   /lct 0 def
-   /ypos filoheight 110 sub def
-   xleft ypos moveto
-   /pageno pageno 1 add def	% add one for the next time
- } def
- 
  /showline
  {
    show
--- 175,180 ----
***************
*** 189,193 ****
    /ypos ypos 12 sub def
    xleft ypos moveto
  } def
- 
- newpage			% establish first page parameters
--- 181,183 ----

------- mp.pro.filofax.ps -------
*** /tmp/da08338	Fri Sep  7 14:17:29 1990
--- mp.pro.filofax.ps	Fri Sep  7 09:50:56 1990
***************
*** 5,10 ****
--- 5,11 ----
  %%CreationDate: see above
  %%PageLength 60
  %%LineLength 80
+ %%NumCols 3
  %%DocumentFonts: Times-Bold Times-Roman Courier
  %%Pages: (atend)
  %%EndComments
***************
*** 58,69 ****
  /filowidth 484 def
  /filoheight 972 def
  /margin 12 def
- /xleft binderspace 6 add def
  /yco filoheight 50 sub def			% space at the top
  /xright filowidth binderspace add 30 sub def	% space at right
  
! /endpage
  {
    gsave
      fontH
      % draw the top for owner
--- 59,92 ----
  /filowidth 484 def
  /filoheight 972 def
  /margin 12 def
  /yco filoheight 50 sub def			% space at the top
  /xright filowidth binderspace add 30 sub def	% space at right
+ /xleft binderspace 6 add def
  
! 0.5 0.5 scale
! 90 rotate
! -50 filoheight neg translate
! 
! /newpage		% page_number newpage --
! { pop
! 
!   gsave			% save state for easy restore
!   margin 0 translate
!   /ypos filoheight 110 sub def
!   xleft ypos moveto
! } def
! 
! /endpage		% page_number endpage --
! { pop 			% get rid of page_number
!   showpage
!   grestore
! } def
! 
! /endfile { } def	% -- endfile --
! 
! /endcol			% page_number column_number endcol --
  {
+   /thiscol exch def	% column_number
    gsave
      fontH
      % draw the top for owner
***************
*** 107,128 ****
      dup stringwidth pop 2 div neg xright 10 sub add 46 moveto show
      fontH
    grestore
!   modu 2 eq eof 0 ne or { showpage } if	% do a 'form feed'
! 					% if ready for it
!   eof 0 eq { newpage } if	% reset parameters for next if not end of file
  } def
  
- /endfile
- {
-      /eof 1 def
-      endpage
- } def
- 
  /xo 36 def
  /yo 0 def
  /pageno 0 def
- /modu pageno 3 mod def	% get mod to work out page pos
- /eof 0 def
  
  /weearc			% draws a little arc to show where the holes go
  { newpath
--- 130,145 ----
      dup stringwidth pop 2 div neg xright 10 sub add 46 moveto show
      fontH
    grestore
!   filopage			% draw neccessary page breaks
!   grestore gsave		% back to default
!   filowidth thiscol mul margin add 0 translate
!   /ypos filoheight 110 sub def
!   xleft ypos moveto
  } def
  
  /xo 36 def
  /yo 0 def
  /pageno 0 def
  
  /weearc			% draws a little arc to show where the holes go
  { newpath
***************
*** 133,143 ****
  
  /filopage
  { gsave
! %  24 -118 translate
!   /xstart filowidth modu mul def
!   /xstart xstart binderspace add def
    /xfin xstart filowidth add def
!   modu 0 eq {		% first break
  	/yo 130 def	% show where the holes should be punched
  	weearc		% except that they will normally be off the edge of
  	/yo 238 def	% the page
--- 150,158 ----
  
  /filopage
  { gsave
!   /xstart binderspace margin sub def
    /xfin xstart filowidth add def
!   thiscol 0 eq {		% first break
  	/yo 130 def	% show where the holes should be punched
  	weearc		% except that they will normally be off the edge of
  	/yo 238 def	% the page
***************
*** 160,189 ****
    grestore
  } def
  
- /newpage
- { 
-   pageno 0 eq {			% set initial values for landscape drawing
-         0.5 0.5 scale
-         90 rotate
-         -50 0 translate
-         gsave			% save state for easy restore
- 	/eof 0 def
-   } {
-         grestore gsave		% return to preferred original state
-   } ifelse			% initial setup
- 
-   /modu pageno 3 mod def	% get mod to work out page pos
-   0 0 filoheight sub translate	% initial position (-filoheight)
-   filopage			% draw neccessary page breaks
-   /times filowidth modu mul def % shift origin as far right as needed
-   /times times margin add def	% move right by fudge factor 12
-   times 0 translate
-   /lct 0 def
-   /ypos filoheight 110 sub def
-   xleft ypos moveto
-   /pageno pageno 1 add def	% add one for the next time
- } def
- 
  /showline
  {
    show
--- 175,180 ----
***************
*** 190,194 ****
    /ypos ypos 12 sub def
    xleft ypos moveto
  } def
- 
- newpage			% establish first page parameters
--- 181,183 ----

------- header.c -------
*** /tmp/da08341	Fri Sep  7 14:17:30 1990
--- header.c	Fri Sep  7 13:29:36 1990
***************
*** 127,132 ****
--- 127,133 ----
            get_header(APP_FROMHDR,   &apparently_from) ;
            get_header(APP_TOHDR,     &apparently_to) ;
            get_header(NEWSGROUPSHDR, &newsgroups) ;
+           get_header(NEWSGROUPHDR,  &newsgroups) ;
            get_header(REPLYHDR,      &reply_to) ;
  
            get_mult_hdr(TOHDR,       to) ;
***************
*** 137,142 ****
--- 138,145 ----
  
            if (doc_type != DO_NEWS && EQUAL(NEWSGROUPSHDR))
              doc_type = DO_NEWS ;
+           if (doc_type != DO_NEWS && EQUAL(NEWSGROUPHDR))
+             doc_type = DO_NEWS ;
          }
        get_header(FROMHDR, &from) ;
        get_header(SUBJECTHDR, &subject) ;
***************
*** 201,207 ****
        if (cc[0])           show_mult_hdr(CCHDR,     cc) ;
        if (reply_to)        mixedshow(REPLYHDR,      reply_to) ;
        if (newsgroups)      mixedshow(NEWSGROUPSHDR, newsgroups) ;
!       if (subject[0])      mixedshow(SUBJECTHDR,    subject) ;
        if (date)            mixedshow(DATEHDR,       date) ;
      }
  }
--- 204,210 ----
        if (cc[0])           show_mult_hdr(CCHDR,     cc) ;
        if (reply_to)        mixedshow(REPLYHDR,      reply_to) ;
        if (newsgroups)      mixedshow(NEWSGROUPSHDR, newsgroups) ;
!       if (subject)         mixedshow(SUBJECTHDR,    subject) ;
        if (date)            mixedshow(DATEHDR,       date) ;
      }
  }

------- main.c -------
*** /tmp/da08344	Fri Sep  7 14:17:30 1990
--- main.c	Fri Sep  7 13:27:04 1990
***************
*** 30,35 ****
--- 30,38 ----
   *
   *  Landscape mode added by Michael Tuciarone.
   *
+  *  Revision of the PostScript structuring and the way that the prologue
+  *  files are handled by Johan Vromans
+  *
   *----------------------------------------------------------------------
   *
   *  Copyright (c) Steve Holden and Rich Burridge.
***************
*** 49,58 ****
   
  bool article  = FALSE ;       /* Set for news in "Article from " format. */
  bool digest   = FALSE ;       /* Are we are printing a mail digest (-d) */
- bool filofax  = FALSE ;       /* Set if we are printing a filofax file. */
  bool folder   = FALSE ;       /* Set if we are printing a mail folder. */
  bool text_doc = FALSE ;       /* Printing normal text (-o) */
- bool timeman  = FALSE ;       /* Set if we are printing a Time Manager file. */
   
  /* Header definitions. */
   
--- 52,60 ----
   
  bool article  = FALSE ;       /* Set for news in "Article from " format. */
  bool digest   = FALSE ;       /* Are we are printing a mail digest (-d) */
  bool folder   = FALSE ;       /* Set if we are printing a mail folder. */
+ bool landscape = FALSE ;      /* Set if we are printing in landscape mode. */
  bool text_doc = FALSE ;       /* Printing normal text (-o) */
   
  /* Header definitions. */
   
***************
*** 65,70 ****
--- 67,73 ----
  char *SUBJECTHDR    = "Subject:" ;
  char *DATEHDR       = "Date:" ;
  char *NEWSGROUPSHDR = "Newsgroups:" ;
+ char *NEWSGROUPHDR  = "Newsgroup:" ;
  char *REPLYHDR      = "Reply_to:" ;
  
  /* Header lines. */
***************
*** 91,96 ****
--- 94,100 ----
  char *progname    = NULL ;        /* Name of this program. */
  char *prologue    = PROLOGUE ;    /* Name of PostScript prologue file. */
  char proname[MAXPATHLEN] ;        /* Full pathname of the prologue file. */
+ char *whoami      = NULL ;        /* Login name of user. */
  
  /* Other globals. */
  
***************
*** 98,106 ****
  
  int colct = 0;              /* Column count on current page. */
  int cmdfiles = 0 ;          /* Set if file to print given on command line. */
- int landscape = 0;          /* Set if in landscape (wide) mode. */
  int linect = 0 ;            /* Line count on current page. */
  int llen = LINELENGTH ;     /* Number of characters per line. */
  int optind ;                /* Optional command line argument indicator. */
  int pageno = 1 ;            /* Page number within message. */
  int plen = PAGELENGTH ;     /* Number of lines per page. */
--- 102,110 ----
  
  int colct = 0;              /* Column count on current page. */
  int cmdfiles = 0 ;          /* Set if file to print given on command line. */
  int linect = 0 ;            /* Line count on current page. */
  int llen = LINELENGTH ;     /* Number of characters per line. */
+ int numcols = 1 ;           /* Number of columns per page */
  int optind ;                /* Optional command line argument indicator. */
  int pageno = 1 ;            /* Page number within message. */
  int plen = PAGELENGTH ;     /* Number of lines per page. */
***************
*** 137,144 ****
  
    show_prologue(proname) ;    /* Send prologue file to output. */
  
-   if (landscape) PRINTF("\nLandscape\n") ;
- 
    FPUTS("%%EndProlog\n", stdout) ;
  
    if (argc - optind != 0) cmdfiles = 1 ;
--- 141,146 ----
***************
*** 205,212 ****
        textshow(nextline) ;
        readline() ;
      }    
!   if (filofax || timeman) endfile() ;
!   else endpage() ;
    FCLOSE(fp) ;
  }
  
--- 207,215 ----
        textshow(nextline) ;
        readline() ;
      }    
!   if (numcols) endcol() ;
!   endpage() ;
!   endfile() ;
    FCLOSE(fp) ;
  }
  

------- misc.c -------
*** /tmp/da08347	Fri Sep  7 14:17:31 1990
--- misc.c	Fri Sep  7 14:12:47 1990
***************
*** 20,35 ****
  void
  do_date()        /* Output Postscript definition for the date and time. */
  {
    long clock ;           /* Used by the localtime function call. */
    struct tm *tm ;        /* Used by the localtime and asctime calls. */
  
    if (date == NULL)
      {
        clock = time((time_t *) 0) ;
        tm = localtime(&clock) ;
!       psdef("TimeNow", asctime(tm)) ;
      }
!   else psdef("TimeNow", date) ;
  }
  
  
--- 20,48 ----
  void
  do_date()        /* Output Postscript definition for the date and time. */
  {
+   char *ptr ;            /* Pointer to current time or date string. */
+   int len ;
    long clock ;           /* Used by the localtime function call. */
    struct tm *tm ;        /* Used by the localtime and asctime calls. */
+   char *timenow ;        /* Used to set TimeNow field with users name. */
  
    if (date == NULL)
      {
        clock = time((time_t *) 0) ;
        tm = localtime(&clock) ;
!       ptr = asctime(tm) ;
!       ptr[24] = '\0' ;
      }
!   else ptr = date ;
! 
!   if (article != TRUE) psdef("TimeNow", ptr) ;
!   else
!     {
!       len = strlen(ptr) ;
!       timenow = malloc((unsigned) (len + 6 + strlen(whoami) + 1)) ;
!       SPRINTF(timenow, "%s  - (%s)", ptr, whoami) ;
!       psdef("TimeNow", timenow) ;
!     }
  }
  
  
***************
*** 95,104 ****
                     break ;
          case 'd' : digest = TRUE ;       /* Print digest. */
                     break ;
!         case 'f' : filofax = TRUE ;      /* Print filofax file. */
                     SPRINTF(proname, "%s/mp.pro.filofax.ps", prologue) ;
                     break ;
!         case 'l' : landscape = TRUE ;    /* Print in landscape mode. */
                     break ;
          case 'm' : folder = TRUE ;       /* Print mail folder. */
                     break ;
--- 108,118 ----
                     break ;
          case 'd' : digest = TRUE ;       /* Print digest. */
                     break ;
!         case 'f' :                       /* Filofax output. */
                     SPRINTF(proname, "%s/mp.pro.filofax.ps", prologue) ;
                     break ;
!         case 'l' : landscape = TRUE ;    /* Landscape printing. */
!                    SPRINTF(proname, "%s/mp.pro.l.ps", prologue) ;
                     break ;
          case 'm' : folder = TRUE ;       /* Print mail folder. */
                     break ;
***************
*** 110,116 ****
          case 's' : if (strlen(optarg))
                       gsubject = optarg ;        /* New subject line. */
                     break ;
!         case 't' : timeman = TRUE ;     /* Print Time Manager file. */
                     SPRINTF(proname, "%s/mp.pro.timeman.ps", prologue) ;
                     break ;
          case 'v' : FPRINTF(stderr,
--- 124,130 ----
          case 's' : if (strlen(optarg))
                       gsubject = optarg ;        /* New subject line. */
                     break ;
!         case 't' :                              /* Time Manager output. */
                     SPRINTF(proname, "%s/mp.pro.timeman.ps", prologue) ;
                     break ;
          case 'v' : FPRINTF(stderr,
***************
*** 123,131 ****
  void
  init_setup()            /* Set default values for various options. */
  {
!   char *c, *ptr ;
    int amp_cnt = 0 ;     /* Number of ampersands in gecos field. */
!   int i, j, n, spaces ;
    int namefields ;      /* Number of "words" from passwd gecos. */
    int namelength ;      /* Maximum number of characters from passwd gecos. */
    struct passwd *pp ;
--- 137,145 ----
  void
  init_setup()            /* Set default values for various options. */
  {
!   char *c ;
    int amp_cnt = 0 ;     /* Number of ampersands in gecos field. */
!   int i ;
    int namefields ;      /* Number of "words" from passwd gecos. */
    int namelength ;      /* Maximum number of characters from passwd gecos. */
    struct passwd *pp ;
***************
*** 151,161 ****
      }
    owner = malloc((unsigned) (strlen(c) + 1)) ;
    STRCPY(owner, c) ;
   
  /*  Have a look for the users gecos (normally real name), so that its a bit
   *  more recognisable. If this field is too long, then we need to truncate
   *  sensibly. We also need to check a few things. If we've extracted
!  *  three "words" or have found a comma, then exit. If an ampersand is
   *  found, this is expanded to the users name in capitals.
   */    
       
--- 165,177 ----
      }
    owner = malloc((unsigned) (strlen(c) + 1)) ;
    STRCPY(owner, c) ;
+   whoami = malloc((unsigned) (strlen(c) + 1)) ;   /* Save User login name */
+   STRCPY(whoami, c) ;
   
  /*  Have a look for the users gecos (normally real name), so that its a bit
   *  more recognisable. If this field is too long, then we need to truncate
   *  sensibly. We also need to check a few things. If we've extracted
!  *  namefields "words" or have found a comma, then exit. If an ampersand is
   *  found, this is expanded to the users name in capitals.
   */    
       
***************
*** 168,198 ****
        owner = malloc((unsigned) (strlen(pp->pw_gecos) +
                                   amp_cnt * strlen(c) + 1)) ;
  
!       n = spaces = 0 ;
!       ptr = pp->pw_gecos ;
!       for (i = 0; i < strlen(pp->pw_gecos); i++)
!         {
!                if (*ptr == ',') break ;
!           else if (*ptr == '&')
!             {
!               if (islower(c[0])) owner[n++] = toupper(c[0]) ;   
!               for (j = 1; j < strlen(c); j++)                 
!                 owner[n++] = c[j] ;
!               *ptr++ ;
!             }
!           else if (*ptr == ' ')
!             {
!               if (++spaces == namefields) break ;
!               else owner[n++] = *ptr++ ;
!             }
!           else owner[n++] = *ptr++ ;
!           if (n >= namelength) break ;
!         }
!       if (n > namelength) n = namelength ;
!       owner[n] = '\0' ;
      }
-   if ((nameptr = getenv("NAME")) != NULL)
-     STRCPY(owner, nameptr) ;
  
    if (text_doc) doc_type = DO_TEXT ;
    switch (doc_type)
--- 184,194 ----
        owner = malloc((unsigned) (strlen(pp->pw_gecos) +
                                   amp_cnt * strlen(c) + 1)) ;
  
!       if ((nameptr = getenv("NAME")) != NULL)
!         process_name_field(c, nameptr, namefields, namelength) ;
!       else
!         process_name_field(c, pp->pw_gecos, namefields, namelength) ;
      }
  
    if (text_doc) doc_type = DO_TEXT ;
    switch (doc_type)
***************
*** 205,210 ****
--- 201,239 ----
        case DO_NEWS : message_for = digest ? "News digest for " : "News for " ;
                       break ;
      }
+ }
+ 
+ 
+ /* Extract user name from $NAME or passwd GECOS. */
+ 
+ process_name_field(c, ptr, fields, length)
+ char *c, *ptr ;
+ int fields, length ;
+ {
+   int i, j, n, spaces, slen ;
+ 
+   n = spaces = 0 ;
+   slen = strlen(ptr) ;
+   for (i = 0; i < slen; i++)
+     {
+            if (*ptr == ',') break ;
+       else if (*ptr == '&')
+         {
+           if (islower(c[0])) owner[n++] = toupper(c[0]) ;
+           for (j = 1; j < strlen(c); j++)
+             owner[n++] = c[j] ;
+           *ptr++ ;
+         } 
+       else if (*ptr == ' ')
+         {
+           if (++spaces == fields) break ;
+           else owner[n++] = *ptr++ ;
+         } 
+       else owner[n++] = *ptr++ ;
+       if (n >= length) break ;
+     } 
+   if (n > length) n = length ;
+   owner[n] = '\0' ;
  }
  
  

------- print.c -------
*** /tmp/da08350	Fri Sep  7 14:17:32 1990
--- print.c	Fri Sep  7 12:27:21 1990
***************
*** 31,37 ****
  endcol()
  {
    linect = 0 ;
!   PRINTF("endcol\n") ;
  }
  
  
--- 31,39 ----
  endcol()
  {
    linect = 0 ;
!   PRINTF("(%d) %d endcol\n", pageno, ++colct) ;
!   if (landscape == TRUE && colct != numcols) return ;
!   pageno++ ;
  }
  
  
***************
*** 38,44 ****
  endfile()
  {
    linect = 0 ;
!   PRINTF("(%1d) endfile\n", pageno) ;
  }
  
  
--- 40,46 ----
  endfile()
  {
    linect = 0 ;
!   PRINTF("endfile\n") ;
  }
  
  
***************
*** 51,57 ****
  endpage()
  {
    linect = 0 ;
!   PRINTF("(%1d) endpage\n", pageno++) ;
  }
  
  
--- 53,59 ----
  endpage()
  {
    linect = 0 ;
!   PRINTF("(%1d) endpage\n", tpn) ;
  }
  
  
***************
*** 158,167 ****
  /* Check for new line or page length. */
   
        SSCANF(buf, "%s %d", tmpstr, &t2) ;
!       if (strcmp(tmpstr, "%%PageLength") == 0)
          plen = t2 ;               /* Change the page length. */
        else if (strcmp(tmpstr, "%%LineLength") == 0)
          llen = t2 ;               /* Change the line length. */
      }
    FCLOSE(pf) ;
  }
--- 160,171 ----
  /* Check for new line or page length. */
   
        SSCANF(buf, "%s %d", tmpstr, &t2) ;
!            if (strcmp(tmpstr, "%%PageLength") == 0)
          plen = t2 ;               /* Change the page length. */
        else if (strcmp(tmpstr, "%%LineLength") == 0)
          llen = t2 ;               /* Change the line length. */
+       else if (strcmp(tmpstr, "%%NumCols")    == 0)
+         numcols = t2 ;            /* Change the number of columns. */
      }
    FCLOSE(pf) ;
  }
***************
*** 176,181 ****
--- 180,186 ----
  startpage()
  {
    PRINTF("%%%%Page: ? %1d\n", ++tpn) ;
+   PRINTF("(%1d) newpage\n", tpn) ;
    set_defs() ;
  }
  
***************
*** 195,206 ****
  {
    if (++linect > plen || end_of_page == TRUE)
      {
!       if (landscape && colct == 0)
!         {
!           colct++ ;
!           endcol() ;
!           return ;
!         }
        colct = 0 ;
        endpage() ;
        linect = 0 ;
--- 200,207 ----
  {
    if (++linect > plen || end_of_page == TRUE)
      {
!       endcol() ;
!       if (colct < numcols) return ;
        colct = 0 ;
        endpage() ;
        linect = 0 ;

------- CHANGES -------
*** /tmp/da08353	Fri Sep  7 14:17:32 1990
--- CHANGES	Fri Sep  7 13:43:34 1990
***************
*** 180,182 ****
--- 180,219 ----
  
         I've also left it defaulted at the US Letter size, so it should still
         continue to work for A4 sites, but not use all of the paper.
+ 
+ v2.4 - patchlevel 7. - 7th September 1990.
+ 
+     *  From Johan Vromans <jv at mh.nl>
+        Completely revised how mp now does it's processing. See the new
+        section in the README file entitled "How mp works" for more details.
+        Introduces a new prologue file mp.pro.l.ps for handling the standard
+        printing in landscape mode with 2 columns. Changes to most other
+        files. The MANIFEST and FILES files have been updated.
+ 
+     *  From James F. Blake <jim at doctor.chem.yale.edu>
+        From Rainer Klute <klute at unido.informatik.uni-dortmund.de>
+        Mp crashed with a segmentation violation if the mail message has no
+        subject line.
+ 
+     *  From Bruno Pillard <bp at chorus.fr>
+        Added the printing of the username below the date when printing
+        news articles.
+ 
+        Fixed two typos in the mailp shell script, and added the installation
+        of mailp to the Makefile.dist file. Support for the PRINTER variable
+        has also been added to mailp.
+ 
+     *  From Ran Ever-Hadani <nsc!taux01.nsc.com!crehta at Sun.COM>
+        When mp -a is invoked from within the nn news reader, the "Article
+        from" header was displayed incorrectly.
+ 
+     *  From Lupe Christoph <lupe at alanya.Germany.Sun.COM>
+        The -f (filofax) and -t (Time Manager) options didn't print
+        correctly on a PostScript print which has page reversal set. Johan
+        Vromans work on the restructuring of the PostScript and the way
+        prologues are handled, has fixed this.
+ 
+     *  From John Little <gaijin at ale.Japan.Sun.COM>
+        The NAME environment variable (if set) should be processed the same
+        way as the GECOS passwd field. See the GECOSFIELDS and GECOSLENGTH
+        definitions in Makefile.dist for more details.

------- patchlevel.h -------
*** /tmp/da08356	Fri Sep  7 14:17:33 1990
--- patchlevel.h	Fri Sep  7 09:52:59 1990
***************
*** 14,17 ****
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  6
--- 14,17 ----
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  7

------- extern.h -------
*** /tmp/da08359	Fri Sep  7 14:17:34 1990
--- extern.h	Fri Sep  7 13:27:38 1990
***************
*** 21,26 ****
--- 21,27 ----
  extern char *FROMHDR ;
  extern char *FROM_HDR ;          /* UNIX From header */
  extern char *NEWSGROUPSHDR ;
+ extern char *NEWSGROUPHDR ;
  extern char *REPLYHDR ;
  extern char *SUBJECTHDR ;
  extern char *TOHDR ;
***************
*** 46,57 ****
  extern char *progname ;      /* Name of this program. */
  extern char *prologue ;      /* Name of PostScript prologue file. */
  extern char proname[] ;      /* Full pathname of the prologue file. */
  
  extern int colct ;           /* Column count on current page. */
  extern int cmdfiles ;        /* Set if file to print given on command line. */
- extern int landscape ;       /* Set if in landscape (wide) mode. */
  extern int linect ;          /* Line count on current page. */
  extern int llen ;            /* Number of characters per line. */
  extern int optind ;          /* Optional command line argument indicator. */
  extern int pageno ;          /* Page number within message. */
  extern int plen ;            /* Number of lines per page. */
--- 47,59 ----
  extern char *progname ;      /* Name of this program. */
  extern char *prologue ;      /* Name of PostScript prologue file. */
  extern char proname[] ;      /* Full pathname of the prologue file. */
+ extern char *whoami ;        /* Login name of user. */
  
  extern int colct ;           /* Column count on current page. */
  extern int cmdfiles ;        /* Set if file to print given on command line. */
  extern int linect ;          /* Line count on current page. */
  extern int llen ;            /* Number of characters per line. */
+ extern int numcols ;         /* Number of columns per page */
  extern int optind ;          /* Optional command line argument indicator. */
  extern int pageno ;          /* Page number within message. */
  extern int plen ;            /* Number of lines per page. */
***************
*** 59,68 ****
  
  extern bool article ;        /* Set for news in "Article from " format. */
  extern bool digest ;         /* Are we are printing a mail digest (-d) */
- extern bool filofax ;        /* Set if we are printing a filofax file. */
  extern bool folder ;         /* Set if we are printing a mail folder. */
  extern bool text_doc ;       /* Printing normal text (-o) */
- extern bool timeman ;        /* Set if we are printing a Time Manager file. */
  
  extern bool end_of_file ;    /* EOF indicator */
  extern bool end_of_line ;    /* Is a newline removed from this line */
--- 61,69 ----
  
  extern bool article ;        /* Set for news in "Article from " format. */
  extern bool digest ;         /* Are we are printing a mail digest (-d) */
  extern bool folder ;         /* Set if we are printing a mail folder. */
+ extern bool landscape ;      /* Set if we are printing in landscape mode. */
  extern bool text_doc ;       /* Printing normal text (-o) */
  
  extern bool end_of_file ;    /* EOF indicator */
  extern bool end_of_line ;    /* Is a newline removed from this line */

------- Makefile.dist -------
*** /tmp/da08362	Fri Sep  7 14:17:34 1990
--- Makefile.dist	Fri Sep  7 13:14:47 1990
***************
*** 55,61 ****
--- 55,65 ----
  LIBDIR   = /usr/local/lib
  MANDIR   = /usr/man/man$(MANSECT)
  MANSECT  = l
+ #---------------------------------------------------------------------
+ #  Alternate names for the mailp frontend
  #
+ MAILPNAMES = newsp digestp filep filofaxp timemanp
+ #---------------------------------------------------------------------
  #  Compilation flags and standard macro definitions.
  #
  CFLAGS   = -g $(GECOSFIELDS) $(GECOSLENGTH) $(NOINDEX) $(PROLOGUE)
***************
*** 72,83 ****
  HDRS     = extern.h mp.h patchlevel.h
  OTHERS   = README Makefile.dist mailp mp.1 \
  	   MANIFEST FILES CHANGES TODO \
! 	   mp.el mp.pro.ps mp.pro.alt.ps mp.pro.filofax.ps \
! 	   mp.pro.timeman.ps Data
  
  SFILES1  = $(SRCS) $(HDRS) README MANIFEST FILES CHANGES TODO
! SFILES2  = Makefile.dist mailp mp.1 mp.el Data \
! 	   mp.pro.ps mp.pro.alt.ps mp.pro.filofax.ps mp.pro.timeman.ps
  
  all:       $(BINARIES)
  
--- 76,87 ----
  HDRS     = extern.h mp.h patchlevel.h
  OTHERS   = README Makefile.dist mailp mp.1 \
  	   MANIFEST FILES CHANGES TODO \
! 	   mp.el mp.pro.ps mp.pro.alt.ps mp.pro.l.ps \
! 	   mp.pro.filofax.ps mp.pro.timeman.ps Data
  
  SFILES1  = $(SRCS) $(HDRS) README MANIFEST FILES CHANGES TODO
! SFILES2  = Makefile.dist mailp mp.1 mp.el Data mp.pro.ps mp.pro.l.ps \
! 	   mp.pro.alt.ps mp.pro.filofax.ps mp.pro.timeman.ps
  
  all:       $(BINARIES)
  
***************
*** 93,103 ****
  	   @echo "adjust the definitions of fullwidth and fullheight, at the"
  	   @echo "start of the mp.pro.ps file, then reinstall."
  	   @echo
! 	   install -s -m 751 mp $(BINDIR)
! 	   install -c -m 644 mp.1 $(MANDIR)/mp.$(MANSECT)
! 	   install -c -m 644 mp.pro.ps $(LIBDIR)
! 	   install -c -m 644 mp.pro.filofax.ps $(LIBDIR)
! 	   install -c -m 644 mp.pro.timeman.ps $(LIBDIR)
  
  clean:;    rm -rf mp *.o core
  
--- 97,117 ----
  	   @echo "adjust the definitions of fullwidth and fullheight, at the"
  	   @echo "start of the mp.pro.ps file, then reinstall."
  	   @echo
! 	   -install -s -m 751 mp $(BINDIR)
! 	   -install -c -m 644 mp.1 $(MANDIR)/mp.$(MANSECT)
! 	   -install -c -m 644 mp.pro.ps $(LIBDIR)
! 	   -install -c -m 644 mp.pro.l.ps $(LIBDIR)
! 	   -install -c -m 644 mp.pro.alt.ps $(LIBDIR)
! 	   -install -c -m 644 mp.pro.filofax.ps $(LIBDIR)
! 	   -install -c -m 644 mp.pro.timeman.ps $(LIBDIR)
! 	   -install -c -m 755 mailp $(BINDIR)
! 	   @echo Making mailp links
! 	   - at for name in $(MAILPNAMES); do \
! 		echo -n $$name " "; \
! 		rm -f $(BINDIR)/$$name; \
! 		ln $(BINDIR)/mailp $(BINDIR)/$$name; \
! 	   done
! 	   @echo
  
  clean:;    rm -rf mp *.o core
  

------- TODO -------
*** /tmp/da08365	Fri Sep  7 14:17:35 1990
--- TODO	Fri Sep  7 12:35:35 1990
***************
*** 28,36 ****
     suspicions are aroused in that the default operand stack size mentioned by
     Adobe in their red book is 500.
  
! 5/ From Larry W. Virden <lwv27%cas.BITNET at CUNYVM.CUNY.Edu>
!    Instead of having the lpr going to -Plw in the shell script, have it
!    go to -P$(PRINTER:lw} ... so folks who use the PRINTER variable get it.
  
  6/ From Lupe Christoph <lupe at alanya.Germany.Sun.COM>
     There are so many personal organisers all over the world that you need a
--- 28,42 ----
     suspicions are aroused in that the default operand stack size mentioned by
     Adobe in their red book is 500.
  
! 5/ From Michael Kerstetter <msk at betelgeuse.boeing.com>
!    Needs the inclusion of command line options to turn off the top and
!    bottom banners. In the context of 'mp', if banners were being used,
!    I envision the top and bottom banners just being reversed, if banners
!    were off, I'd envision just the page number appearing at the bottom
!    of the page.  Finally, a lot of the printing I do is just quick, few
!    frills printing of ASCII files, and to support that I would find it
!    convenient to be able to define left, right, top, and bottom margins
!    in the 'mp' command line.
  
  6/ From Lupe Christoph <lupe at alanya.Germany.Sun.COM>
     There are so many personal organisers all over the world that you need a
***************
*** 42,66 ****
     substitutes a few variables. Or you can use short PostScript fragments,
     one for each personal organisers.
  
! 7/ From Lupe Christoph <lupe at alanya.Germany.Sun.COM>
!    The Time Manager and Filofax prologue files don't work correctly with
!    printers that are setup for page reversal. The solution (which I've
!    yet to implement), comes from Johan Vromans:
! 
!    "The problem is caused by the fact that you insert a "%Page: ? nn"
!     before each *LOGICAL* page. It should be inserted only before *PHYSICAL*
!     pages.  For filofax and timemanager (3 cols/page) that means that you
!     need something like:
! 
!         %% Preamble
!         %%Page: ? 1
!         ..page1..
!         endpage
!         ..page2..
!         endpage
!         ..page3..
!         endpage
!         %%Page: ? 2
!         ..page4..
!         endpage
!         ..."
--- 48,53 ----
     substitutes a few variables. Or you can use short PostScript fragments,
     one for each personal organisers.
  
! 7/ From Johan Vromans <jv at mh.nl>
!    A command line option to have page numbers reset to 1 when printing a
!    new element of a mailfolder or digest.

------- MANIFEST -------
*** /tmp/da08368	Fri Sep  7 14:17:35 1990
--- MANIFEST	Fri Sep  7 09:58:43 1990
***************
*** 21,26 ****
--- 21,27 ----
  TODO                                   |    1
  mp.el                                  |    2
  mp.pro.ps                              |    2
+ mp.pro.l.ps                            |    2
  mp.pro.alt.ps                          |    2
  mp.pro.filofax.ps                      |    2
  mp.pro.timeman.ps                      |    2

------- FILES -------
*** /tmp/da08371	Fri Sep  7 14:17:36 1990
--- FILES	Fri Sep  7 10:01:50 1990
***************
*** 22,28 ****
--- 22,30 ----
  CHANGES             - change history. Will be updated with each new patch.
  TODO                - bugs and suggested enhancements. Volunteers?
  mp.el               - emacs code to print with mp.
+ 
  mp.pro.ps           - standard mp prologue file.
+ mp.pro.l.ps         - standard mp prologue file for landscape (2 columns).
  mp.pro.alt.ps       - alternative mp prologue file.
  mp.pro.filofax.ps   - mp Filofax prologue file.
  mp.pro.timeman.ps   - mp Time Manager prologue file.

------- mp.pro.alt.ps -------
*** /tmp/da08374	Fri Sep  7 14:17:36 1990
--- mp.pro.alt.ps	Fri Sep  7 11:28:39 1990
***************
*** 20,25 ****
--- 20,26 ----
  %
  /fullwidth 8.5 inch def
  /fullheight 11 inch def
+ 
  /leftedge 0 def
  /rightedge fullwidth def
  /bottomedge 0 def
***************
*** 82,89 ****
      0.75 setgray fill
  } def
  
! /endpage	% page_number endpage --
  {
    gsave
      fontH
      leftedge 50 add topedge 56 sub	% bottom lt corner
--- 83,98 ----
      0.75 setgray fill
  } def
  
! /endpage		% page_number endpage --
  {
+   showpage		% display it
+ } def
+ 
+ /endfile { } def	% nothing needed
+ 
+ /endcol			% page_number col_number endcol --
+ {
+   pop			% get rid of col_number
    gsave
      fontH
      leftedge 50 add topedge 56 sub	% bottom lt corner
***************
*** 108,119 ****
         exch 2 div rightedge 54 sub exch sub	% x-centered
         exch moveto show
    grestore
-   showpage              % display it
-   newpage               % reset parameters for next
  } def
  
! /newpage
  {
    LandscapeMode {setlandscape} if
    /lct 0 def
    /ypos topedge 92 sub def
--- 117,127 ----
         exch 2 div rightedge 54 sub exch sub	% x-centered
         exch moveto show
    grestore
  } def
  
! /newpage	% page_number newpage --
  {
+   pop		% pageno
    LandscapeMode {setlandscape} if
    /lct 0 def
    /ypos topedge 92 sub def
***************
*** 134,150 ****
    /LandscapeMode true def
    /rightedge fullheight def
    /topedge fullwidth def
-   newpage
  } def
  
- /endcol
- {
-   /lct 0 def
-   /ypos topedge 92 sub def
-   /xpos rightedge leftedge sub 2 div def
-   xpos ypos moveto
- } def
- 
  /showline
  {
    show
--- 142,149 ----
***************
*** 151,155 ****
    /ypos ypos FontSize sub def
    xpos ypos moveto
  } def
- 
- newpage	                % establish first page parameters
--- 150,152 ----
Funky_Stuff
len=`wc -c < patch.7`
if [ $len !=    47191 ] ; then
echo error: patch.7 was $len bytes long, should have been    47191
fi
fi # end of overwriting check
if [ -f mp.pro.l.ps ]
then
echo shar: will not over-write existing file mp.pro.l.ps
else
echo shar: extracting 'mp.pro.l.ps',     3909 characters
cat > mp.pro.l.ps <<'Funky_Stuff'
%!PS-Adobe-1.0
%%Creator: Steve Holden
%%Modified: Rich Burridge
%%Title: @(#)mp.pro.l.ps 1.2 90/09/07
%%CreationDate: see above
%%PageLength 60
%%LineLength 80
%%NumCols 2
%%DocumentFonts: Times-Bold Times-Roman Courier
%%Pages: (atend)
%%EndComments

/inch { 72 mul } def
%
%  IMPORTANT NOTE: The following two variables should be set correctly.
%                  Reasonable values for fullwidth and fullheight are
%                  8.5/11 inch for US Letter, and 8.5/11.4 inch for A4.
%                  Since sites usually have one single format of paper,
%                  mp should be installed with either the USLetter or A4
%                  values.
%
/fullwidth 8.5 inch def
/fullheight 11 inch def

/leftedge 0 def
/rightedge fullheight def
/bottomedge 0 def
/topedge fullwidth def
/LandscapeMode true def

%Title: backspacefont.ps suggested by Glenn Reid (Adobe Systems).

/backspacefont {
    /Courier findfont dup length dict begin
        { %forall
            1 index /FID eq { pop pop } { def } ifelse
        } forall
        currentdict /UniqueID known { %if
              /UniqueID UniqueID 16#800000 xor def
        } if
        CharStrings length 1 add dict begin
            CharStrings { def } forall
          /backspace { -600 0 setcharwidth } bind def
            currentdict
      end
        /CharStrings exch def
        /Encoding Encoding 256 array copy def
        Encoding 8 /backspace put
        currentdict
    end
    definefont
} bind def

/CourierBack backspacefont

/FontSize 9 def
/font1d /Times-Bold            findfont def
/font2d /Times-Roman           findfont def
/font3d /CourierBack           findfont def
/fontHd /Helvetica-BoldOblique findfont 14 scalefont def
/fontH2 /Helvetica-BoldOblique findfont 10 scalefont def
/fontNd /Times-Bold            findfont 12 scalefont def

/BoldFont      { font1d FontSize scalefont setfont } def
/pf            { font2d FontSize scalefont setfont } def
/sf            { font3d FontSize scalefont setfont } def
/fontH         { fontHd setfont } def
/fontD         { fontH2 setfont } def
/fontN         { fontNd setfont } def

/graybox	% x1 y1 x2 y2 graybox --
{
    newpath
      4 -1 roll 2 copy			% y2 x1
      10 sub exch moveto
      4 -1 roll 2 copy			% x1 y1
      10 180 270 arc
      4 -1 roll 1 copy 3 -1 roll	% x2 y1
      10 270 0 arc
      3 -1 roll 1 copy 3 1 roll		% x1 y2 x2 y2
      10 0 90 arc
      10 90 180 arc
    closepath
    0.75 setgray fill
} def

/endpage		% page_number endpage --
{
  showpage              % display it
} def

/endfile { } def	% nothing needed

/endcol			% page_number col_number endcol --
{
  pop			% get rid of column number
  gsave
    fontH
    leftedge 50 add topedge 56 sub	% bottom lt corner
    rightedge 50 sub topedge 36 sub	% top rt corner
    graybox
    newpath
      rightedge leftedge sub 2 div topedge 46 sub 15 0 360 arc
      gsave
        1 setgray fill
      grestore
    closepath
    0 setgray stroke
    leftedge 50 add topedge 52 sub moveto
    MailFor show
    User show
    fontD
    rightedge 50 sub TimeNow stringwidth pop sub
    topedge 52 sub moveto TimeNow show
    % center the page number
    fontN
    dup stringwidth
       topedge 52 sub exch sub				% y-centered
       exch 2 div rightedge leftedge sub 2 div exch sub	% x-centered
       exch moveto show
    fontH
    leftedge 50 add bottomedge 50 add	% bottom lt corner
    rightedge 50 sub bottomedge 70 add	% top rt corner
    graybox
    0 setgray
    leftedge 50 add bottomedge 54 add moveto Subject show
  grestore
  /ypos topedge 92 sub def
  /xpos rightedge leftedge sub 2 div def
  xpos ypos moveto
} def

/newpage
{
  pop
  LandscapeMode
  {
    612 0 translate
    90 rotate
    /FontSize 7 def
  } if
  /lct 0 def
  /ypos topedge 92 sub def
  /xpos leftedge 50 add def
  xpos ypos moveto
  sf
} def

/showline
{
  show
  /ypos ypos FontSize sub def
  xpos ypos moveto
} def
Funky_Stuff
len=`wc -c < mp.pro.l.ps`
if [ $len !=     3909 ] ; then
echo error: mp.pro.l.ps was $len bytes long, should have been     3909
fi
fi # end of overwriting check



More information about the Comp.sources.misc mailing list