[comp.sources.bugs] Official patch #4 for mp v2.0, please apply it.

richb@sunchat.oz (Rich Burridge) (04/28/89)

It makes the following changes:

1/ Bug report from Craig Bishop <craig@charlie.oz.au>
   The From line gets printed twice when the -mh or -elm command line
   options are included.

2/ The manual page has been updated to show that there is a bug with
   the -f (filofax) or the -t (time manager) options are used with a
   LaserWriter1. The manual page has also been fixed to correctly
   display information on the -t option.

3/ Bug report and fix from Bertrand Decouty <decouty%caroline.irisa.fr>
   Mp did not allow for backspaces which are useful for underlining.
   This is now handled. It uses the backspacefont.ps suggested by Glenn
   Reid from Adobe Systems.

4/ Bug report and fix from Bertrand Decouty <decouty%caroline.irisa.fr>
   The number of lines printed on each page, was one too many.

Thanks to the above people for the bug reports, fixes and suggestions.

Feed this file to Larry Walls' patch program, then recompile.

    Rich.

------CUT HERE------CUT HERE------
*** original/README	Mon Apr 10 13:32:54 1989
--- README	Fri Apr 28 15:02:29 1989
***************
*** 35,44 ****
  Buchanan added support for printing in filofax and Time Manager format.
  
  Thanks go also to Bill Shannon, Roger De Salis, L. Jill Debord, Frederick
! Avolio, Mark Prior, Stephen Frede, Craig Bishop, Jimmy Aitken, Hugues Leroy
! and David Fiedler for bug reports and/or bug fixes. I'm grateful to all
! these people, plus everybody who has suggested enhancements, and fixed bugs
! in the previous versions.
  
  I welcome further bug reports and suggestions for improvements.
  
--- 35,46 ----
  Buchanan added support for printing in filofax and Time Manager format.
  
  Thanks go also to Bill Shannon, Roger De Salis, L. Jill Debord, Frederick
! Avolio, Mark Prior, Stephen Frede, Craig Bishop, Jimmy Aitken, Hugues Leroy,
! Bertrand Decouty and David Fiedler for bug reports and/or bug fixes. 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
! everybody who has suggested enhancements, and fixed bugs in the previous
! versions.
  
  I welcome further bug reports and suggestions for improvements.
  
*** original/mp.1	Mon Apr 10 13:32:54 1989
--- mp.1	Fri Apr 28 15:02:31 1989
***************
*** 1,4 ****
! .\" @(#)mp.1 1.4 89/04/10
  .TH MP 1L "28 December 1988"
  .SH NAME
  mp \- Postscript pretty printer
--- 1,4 ----
! .\" @(#)mp.1 1.5 89/04/28
  .TH MP 1L "28 December 1988"
  .SH NAME
  mp \- Postscript pretty printer
***************
*** 171,177 ****
  .I " subject"
  as the new subject for the printout.
  .TP
! .B \t
  The file on standard input is printed specifically for use with Time Manager,
  a personal organiser.
  .TP
--- 171,177 ----
  .I " subject"
  as the new subject for the printout.
  .TP
! .B \-t
  The file on standard input is printed specifically for use with Time Manager,
  a personal organiser.
  .TP
***************
*** 202,207 ****
--- 202,209 ----
  PostScript prologue used to print out files in Time Manager format.
  .SH "SEE ALSO"
  mail(1)
+ .SH BUGS
+ The -f and -t options do not correctly print on a LaserWriter1.
  .SH AUTHORS
  Original version by Steve Holden.
  .br
*** original/mp.c	Mon Apr 10 13:32:54 1989
--- mp.c	Fri Apr 28 15:02:27 1989
***************
*** 1,5 ****
  #ifndef lint
! static char sccsid[] = "@(#)mp.c 1.6 89/04/10" ;
  #endif
  
  /*  Takes a mail file, a news article or an ordinary file
--- 1,5 ----
  #ifndef lint
! static char sccsid[] = "@(#)mp.c 1.7 89/04/28" ;
  #endif
  
  /*  Takes a mail file, a news article or an ordinary file
***************
*** 139,145 ****
    if (ptype == PRINTORD) state = DOTEXT ;
    else state = DOHEADER ;
    startpage() ;
!   while (fgets(nextline, llen+1, stdin) != NULL)
      {
        removednl = 0 ;
        if (nextline[strlen(nextline)-1] == '\n')
--- 139,145 ----
    if (ptype == PRINTORD) state = DOTEXT ;
    else state = DOHEADER ;
    startpage() ;
!   while (fgets(nextline, llen*2+1, stdin) != NULL)
      {
        removednl = 0 ;
        if (nextline[strlen(nextline)-1] == '\n')
***************
*** 221,226 ****
--- 221,229 ----
            case ')'    : PRINTF("\\)") ;
                          n++ ;
                          break ;
+           case '\b'   : PRINTF("%c",s[i]) ;
+                         n-- ;
+                         break ;
            case '\t'   : for (j = 0; j < (8 - (n % 8)); j++)
                          PRINTF(" ") ;
                          n = n + 8 - (n % 8) ;
***************
*** 417,423 ****
                             else mixedshow(nextline) ;
                             maybe_more = 0 ;
                           }
!                        if (EQUAL(mh_elm ? "From" : "From:") ||
                             EQUAL("Date") || EQUAL("Subject"))
                           {
                             mixedshow(nextline) ;
--- 420,426 ----
                             else mixedshow(nextline) ;
                             maybe_more = 0 ;
                           }
!                        if ((!mh_elm && EQUAL("From:")) ||
                             EQUAL("Date") || EQUAL("Subject"))
                           {
                             mixedshow(nextline) ;
***************
*** 535,541 ****
  
  useline()
  {
!   if (++linect > plen)
      {
        endpage() ;
        startpage() ;
--- 538,544 ----
  
  useline()
  {
!   if (++linect >= plen)
      {
        endpage() ;
        startpage() ;
*** original/mp.pro.ps	Mon Apr  3 14:52:31 1989
--- mp.pro.ps	Fri Apr 28 15:02:29 1989
***************
*** 1,16 ****
  %!PS-Adobe-1.0
  %%Creator: Steve Holden
  %%Modifed: Rich Burridge
! %%Title: @(#)mp.pro.ps 1.2 88/12/28
  %%CreationDate: see above
  %%DocumentFonts: Times-Bold Times-Roman Courier
  %%Pages: (atend)
  %%EndComments
  
  /font1d /Times-Bold findfont 10 scalefont def
  /font2d /Times-Roman findfont 10 scalefont def
! /font3d /Courier findfont 9 scalefont def
! /fontHd /Helvetica-BoldOblique findfont 15 scalefont def
  /fontH2 /Helvetica-BoldOblique findfont 10 scalefont def
  /fontNd /Times-Bold findfont 12 scalefont def
  
--- 1,43 ----
  %!PS-Adobe-1.0
  %%Creator: Steve Holden
  %%Modifed: Rich Burridge
! %%Title: @(#)mp.pro.ps 1.3 89/04/28
  %%CreationDate: see above
  %%DocumentFonts: Times-Bold Times-Roman Courier
  %%Pages: (atend)
+ %%PageLength 66
+ %%LineLength 80
  %%EndComments
  
+ %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
+ 
  /font1d /Times-Bold findfont 10 scalefont def
  /font2d /Times-Roman findfont 10 scalefont def
! /font3d /CourierBack findfont 9 scalefont def
! /fontHd /Helvetica-BoldOblique findfont 14 scalefont def
  /fontH2 /Helvetica-BoldOblique findfont 10 scalefont def
  /fontNd /Times-Bold findfont 12 scalefont def
  
*** original/mp.pro.filofax.ps	Mon Apr  3 14:52:31 1989
--- mp.pro.filofax.ps	Fri Apr 28 15:02:32 1989
***************
*** 1,7 ****
  %!PS-Adobe-1.0
  %%Creator: Steve Holden
  %%Modifed: Rich Burridge
! %%Title: @(#)mp.pro.filofax.ps 1.1 89/03/20
  %%CreationDate: see above
  %%PageLength 66
  %%LineLength 80
--- 1,7 ----
  %!PS-Adobe-1.0
  %%Creator: Steve Holden
  %%Modifed: Rich Burridge
! %%Title: @(#)mp.pro.filofax.ps 1.2 89/04/28
  %%CreationDate: see above
  %%PageLength 66
  %%LineLength 80
***************
*** 9,17 ****
  %%Pages: (atend)
  %%EndComments
  
  /font1d /Times-Bold findfont 11 scalefont def
  /font2d /Times-Roman findfont 11 scalefont def
! /font3d /Courier findfont 10 scalefont def
  /fontHd /Helvetica-BoldOblique findfont 15 scalefont def
  /fontH2 /Helvetica-BoldOblique findfont 10 scalefont def
  /fontNd /Times-Bold findfont 12 scalefont def
--- 9,42 ----
  %%Pages: (atend)
  %%EndComments
  
+ %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
+  
  /font1d /Times-Bold findfont 11 scalefont def
  /font2d /Times-Roman findfont 11 scalefont def
! /font3d /CourierBack findfont 10 scalefont def
  /fontHd /Helvetica-BoldOblique findfont 15 scalefont def
  /fontH2 /Helvetica-BoldOblique findfont 10 scalefont def
  /fontNd /Times-Bold findfont 12 scalefont def
*** original/mp.pro.timeman.ps	Mon Apr  3 14:52:31 1989
--- mp.pro.timeman.ps	Fri Apr 28 15:02:31 1989
***************
*** 1,7 ****
  %!PS-Adobe-1.0
  %%Creator: Steve Holden
  %%Modifed: Rich Burridge
! %%Title: @(#)mp.pro.timeman.ps 1.1 89/03/20
  %%CreationDate: see above
  %%PageLength 66
  %%LineLength 80
--- 1,7 ----
  %!PS-Adobe-1.0
  %%Creator: Steve Holden
  %%Modifed: Rich Burridge
! %%Title: @(#)mp.pro.timeman.ps 1.2 89/04/28
  %%CreationDate: see above
  %%PageLength 66
  %%LineLength 80
***************
*** 9,17 ****
  %%Pages: (atend)
  %%EndComments
  
  /font1d /Times-Bold findfont 12 scalefont def
  /font2d /Times-Roman findfont 12 scalefont def
! /font3d /Courier findfont 11 scalefont def
  /fontHd /Helvetica-BoldOblique findfont 15 scalefont def
  /fontH2 /Helvetica-BoldOblique findfont 10 scalefont def
  /fontNd /Times-Bold findfont 12 scalefont def
--- 9,42 ----
  %%Pages: (atend)
  %%EndComments
  
+ %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
+  
  /font1d /Times-Bold findfont 12 scalefont def
  /font2d /Times-Roman findfont 12 scalefont def
! /font3d /CourierBack findfont 11 scalefont def
  /fontHd /Helvetica-BoldOblique findfont 15 scalefont def
  /fontH2 /Helvetica-BoldOblique findfont 10 scalefont def
  /fontNd /Times-Bold findfont 12 scalefont def

david@infopro.UUCP (David Fiedler) (05/03/89)

From article <879@sunchat.oz>, by richb@sunchat.oz (Rich Burridge):
> It makes the following changes:

There's a whole lot of stuff here I've never seen. In fact, here is patch
#4 when I never saw numbers 1,2 and 3. Can anyone mail them to me so patch
#4 will make sense? I have mp v2.0 but not these filofax.ps files, etc. Or
am I missing part of the distribution? Help!

-- 
David Fiedler {ames,attmail,hoptoad,pyramid}!infopro!david
USMail: InfoPro Systems, PO Box 220, Rescue CA 95672 Phone: 916/677-5870
"I can't answer the door, my wife is taking a bath in the sink."-Ralph Kramden