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

richb@sunaus.oz (Rich Burridge) (10/03/90)

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

CONTENTS:

1. What is mp?
2/ Changes made in this patch.
3/ How to install this patch.
4/ How to get previous patches.

----------------

1/ What is mp?

Mp is a Postscript pretty printer for mail,news and ordinary files.
Mp v2.4 was posted to comp.sources.misc about three weeks ago at patchlevel #5.

----------------

2/ Changes made in this patch.

    *  The other PostScript prologue files need to be modified in a similar
       way, to mp.pro.ps (changed in patch #12).
 
    *  The meaning of the -PS switch to mp has been reversed. If you don't
       specify -PS on the command line, and mp finds a PostScript file as
       the body of the message, then it will just dump it out. Specifying
       -PS causes it to be printed as text.

    *  From Larry Virden <lwv27%CAS@pucc.PRINCETON.EDU>
       Further modifications to mailp:

       - If the user had specified a flag of "-sThis is my subject" then it
         wouldn't have printed correctly.

       - If the user tries to print files with tabs or spaces in them there
         would have been problems.

    *  From Larry Virden <lwv27%CAS@pucc.PRINCETON.EDU>
       Specifying "mp -o -F <mailfile" causes mp to dump core.

----------------

3/ How to install this patch.

Apply the patch with Larry Wall's patch program. Copy Makefile.dist to
Makefile and adjust for your site. Then do a "make". If your site uses
US Letter paper size, then do a "make install". If your site uses A4 paper
size, then do a "make install-a4". You will probably have to be super-user
to do this. You might wish to reread the installation section in the README
file to make sure you've adjusted everything in the Makefile that you need to.

----------------

4/ How to get previous patches.

If you need to get patches 6-12, then they can be obtained from the automatic
mail archive server, by sending a message to rb-archive-server@Aus.Sun.COM
containing the line:
 
send mp patchn
 
where n is the patch number you require.
 
The latest complete mp distribution (fully patched) 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.

[NOTE: When unpacking the shars generated by the automatic mail service,
       it is possible you will get error messages for incorrect length.
       Please ignore; hopefully the files should still unpack correctly].

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

------CUT HERE------patch.13------CUT HERE------

------- README -------
*** /tmp/da05022	Wed Oct  3 15:32:21 1990
--- README	Wed Oct  3 14:52:46 1990
***************
*** 160,167 ****
  Amos Shapir, Bruce G Barnett, Pauline van Winsen, James F. Blake, Bruno
  Pillard, Rainer Klute, Ran Ever-Hadani, Lupe Christoph, John Little, Bill
  Houle, Paul Eggert, Larry W. Virden, Peter Collinson, Jim Sanchez, Ian
! Young, Andreas Wettengel, Sato Toshihiko and Geoff Mulligan 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
--- 160,167 ----
  Amos Shapir, Bruce G Barnett, Pauline van Winsen, James F. Blake, Bruno
  Pillard, Rainer Klute, Ran Ever-Hadani, Lupe Christoph, John Little, Bill
  Houle, Paul Eggert, Larry W. Virden, Peter Collinson, Jim Sanchez, Ian
! Young, Andreas Wettengel, Sato Toshihiko, Geoff Mulligan, Andy Norman and
! Paul Higgins 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

------- mailp -------
*** /tmp/da05025	Wed Oct  3 15:32:21 1990
--- mailp	Wed Oct  3 14:55:41 1990
***************
*** 43,49 ****
                          FLAGS="$FLAGS -s \"$2\""
                          shift
                  else
!                         FLAGS="$FLAGS $1"
                  fi
                  STDIN=
                  ;;
--- 43,49 ----
                          FLAGS="$FLAGS -s \"$2\""
                          shift
                  else
!                         FLAGS="$FLAGS \"$1\""
                  fi
                  STDIN=
                  ;;
***************
*** 53,59 ****
          -F | -l)
                  FLAGS="$FLAGS $1"
                  ;;
!         * )     FILES="$FILES $1"
                  ;;
          esac
          shift
--- 53,59 ----
          -F | -l)
                  FLAGS="$FLAGS $1"
                  ;;
!         * )     FILES="$FILES \"$1\""
                  ;;
          esac
          shift

------- mp.pro.ff.ps -------
*** /tmp/da05028	Wed Oct  3 15:32:22 1990
--- mp.pro.ff.ps	Wed Oct  3 15:18:09 1990
***************
*** 68,75 ****
  -50 filoheight neg translate
  
  /newpage		% page_number newpage --
! { pop
! 
    gsave			% save state for easy restore
    margin 0 translate
    /ypos filoheight 110 sub def
--- 68,76 ----
  -50 filoheight neg translate
  
  /newpage		% page_number newpage --
! {
!   pop                   % pageno
!   /PageSave save def
    gsave			% save state for easy restore
    margin 0 translate
    /ypos filoheight 110 sub def
***************
*** 77,88 ****
  } def
  
  /endpage		% page_number endpage --
! { pop 			% get rid of page_number
    showpage
    grestore
  } def
  
! /endfile { } def	% -- endfile --
  
  /endcol			% page_number column_number endcol --
  {
--- 78,99 ----
  } def
  
  /endpage		% page_number endpage --
! {
!   pop 			% get rid of page_number
!   PageSave restore      % restore *always* before showpage
    showpage
    grestore
  } def
  
! /newfile
! {
!   /FileSave save def    % file-level save...
! } def
! 
! /endfile
! {
!   FileSave restore      % ...and restore
! } def
  
  /endcol			% page_number column_number endcol --
  {

------- mp.pro.tm.ps -------
*** /tmp/da05031	Wed Oct  3 15:32:22 1990
--- mp.pro.tm.ps	Wed Oct  3 15:12:54 1990
***************
*** 68,75 ****
  -50 filoheight neg translate
  
  /newpage		% page_number newpage --
! { pop
! 
    gsave			% save state for easy restore
    margin 0 translate
    /ypos filoheight 110 sub def
--- 68,76 ----
  -50 filoheight neg translate
  
  /newpage		% page_number newpage --
! {
!   pop                   % pageno
!   /PageSave save def
    gsave			% save state for easy restore
    margin 0 translate
    /ypos filoheight 110 sub def
***************
*** 77,88 ****
  } def
  
  /endpage		% page_number endpage --
! { pop 			% get rid of page_number
    showpage
    grestore
  } def
  
! /endfile { } def	% -- endfile --
  
  /endcol			% page_number column_number endcol --
  {
--- 78,99 ----
  } def
  
  /endpage		% page_number endpage --
! {
!   pop 			% get rid of page_number
!   PageSave restore      % restore *always* before showpage
    showpage
    grestore
  } def
  
! /newfile
! {
!   /FileSave save def    % file-level save...
! } def
! 
! /endfile
! {
!   FileSave restore      % ...and restore
! } def
  
  /endcol			% page_number column_number endcol --
  {

------- main.c -------
*** /tmp/da05034	Wed Oct  3 15:32:23 1990
--- main.c	Wed Oct  3 15:05:18 1990
***************
*** 55,61 ****
  bool folder   = FALSE ;       /* Set if we are printing a mail folder. */
  bool landscape = FALSE ;      /* Set if we are printing in landscape mode. */
  bool print_orig = FALSE ;     /* Print From rather than To in mail header. */
! bool print_ps = FALSE ;       /* Print PostScript files if set. */
  bool text_doc = FALSE ;       /* Printing normal text (-o) */
   
  /* Header definitions. */
--- 55,61 ----
  bool folder   = FALSE ;       /* Set if we are printing a mail folder. */
  bool landscape = FALSE ;      /* Set if we are printing in landscape mode. */
  bool print_orig = FALSE ;     /* Print From rather than To in mail header. */
! bool print_ps = TRUE ;        /* Print PostScript files if set. */
  bool text_doc = FALSE ;       /* Printing normal text (-o) */
   
  /* Header definitions. */

------- misc.c -------
*** /tmp/da05037	Wed Oct  3 15:32:24 1990
--- misc.c	Wed Oct  3 15:04:59 1990
***************
*** 121,127 ****
          case 'o' : text_doc = TRUE ;     /* Print ordinary text file */
                     break ;
          case 'P' : if (!strcmp(optarg, "S"))    /* Print PostScript files. */
!                      print_ps = TRUE ;
                     break ;
          case 'p' : if (strlen(optarg))
                       STRCPY(proname, optarg) ;  /* New prologue file. */
--- 121,127 ----
          case 'o' : text_doc = TRUE ;     /* Print ordinary text file */
                     break ;
          case 'P' : if (!strcmp(optarg, "S"))    /* Print PostScript files. */
!                      print_ps = FALSE ;
                     break ;
          case 'p' : if (strlen(optarg))
                       STRCPY(proname, optarg) ;  /* New prologue file. */

------- print.c -------
*** /tmp/da05040	Wed Oct  3 15:32:24 1990
--- print.c	Wed Oct  3 15:31:17 1990
***************
*** 118,124 ****
  
    if (article == TRUE)
      message_for = "Article from" ;                    /* MailFor. */
!   else if (print_orig == TRUE)
      message_for = "From" ;
    psdef("MailFor", message_for) ;
  
--- 118,124 ----
  
    if (article == TRUE)
      message_for = "Article from" ;                    /* MailFor. */
!   else if (print_orig == TRUE && from != NULL)
      message_for = "From" ;
    psdef("MailFor", message_for) ;
  
***************
*** 131,137 ****
        STRNCPY(owner, newsgroups, i) ;
        owner[i] = '\0' ;
      }
!   else if (print_orig == TRUE)
      {
        i = strlen(from) ;
        owner = (char *) realloc(owner, (unsigned int) i) ;
--- 131,137 ----
        STRNCPY(owner, newsgroups, i) ;
        owner[i] = '\0' ;
      }
!   else if (print_orig == TRUE && from != NULL)
      {
        i = strlen(from) ;
        owner = (char *) realloc(owner, (unsigned int) i) ;

------- CHANGES -------
*** /tmp/da05043	Wed Oct  3 15:32:25 1990
--- CHANGES	Wed Oct  3 15:27:38 1990
***************
*** 427,434 ****
         Modified the mailp script to work on SysV which usually has no lpr.
  
      *  From Bruce Barnett <barnett@unclejack.crd.ge.com>
!        When you do a "make", occurances of BINDIR in the mailp shell script,
!        are now replaced with the value of $(BINDIR) from the Makefile.
  
      *  From Larry Virden <lwv27%CAS@pucc.PRINCETON.EDU>
         Modifications to Makefile.dist
--- 427,434 ----
         Modified the mailp script to work on SysV which usually has no lpr.
  
      *  From Bruce Barnett <barnett@unclejack.crd.ge.com>
!        When you do a "make install", occurances of BINDIR in the mailp shell
!        script, are now replaced with the value of $(BINDIR) from the Makefile.
  
      *  From Larry Virden <lwv27%CAS@pucc.PRINCETON.EDU>
         Modifications to Makefile.dist
***************
*** 449,451 ****
--- 449,473 ----
         Mp is now case insensitive about mail header lines. The first word
         of the line is now converted to lower-case before doing a comparison.
         The first letter of each header is capitalised when printing.
+ 
+ v2.4 - patchlevel 13. - 3rd October 1990.
+ 
+     *  The other PostScript prologue files need to be modified in a similar
+        way, to mp.pro.ps (changed in patch #12).
+ 
+     *  The meaning of the -PS switch to mp has been reversed. If you don't
+        specify -PS on the command line, and mp finds a PostScript file as
+        the body of the message, then it will just dump it out. Specifying
+        -PS causes it to be printed as text.
+ 
+     *  From Larry Virden <lwv27%CAS@pucc.PRINCETON.EDU>
+        Further modifications to mailp:
+ 
+        - If the user had specified a flag of "-sThis is my subject" then it
+          wouldn't have printed correctly.
+ 
+        - If the user tries to print files with tabs or spaces in them there
+          would have been problems.
+ 
+     *  From Larry Virden <lwv27%CAS@pucc.PRINCETON.EDU>
+        Specifying "mp -o -F <mailfile" causes mp to dump core.

------- patchlevel.h -------
*** /tmp/da05046	Wed Oct  3 15:32:26 1990
--- patchlevel.h	Wed Oct  3 14:46:10 1990
***************
*** 14,17 ****
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  12
--- 14,17 ----
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  13

------- mp.pro.ts.ps -------
*** /tmp/da05049	Wed Oct  3 15:32:26 1990
--- mp.pro.ts.ps	Wed Oct  3 15:16:59 1990
***************
*** 72,79 ****
  -50 tmsysheight neg translate
  
  /newpage		% page_number newpage --
! { pop
! 
    gsave			% save state for easy restore
    margin 0 translate
    /ypos tmsysheight 110 sub def
--- 72,80 ----
  -50 tmsysheight neg translate
  
  /newpage		% page_number newpage --
! {
!   pop                   % pageno
!   /PageSave save def
    gsave			% save state for easy restore
    margin 0 translate
    /ypos tmsysheight 110 sub def
***************
*** 81,92 ****
  } def
  
  /endpage		% page_number endpage --
! { pop 			% get rid of page_number
    showpage
    grestore
  } def
  
! /endfile { } def	% -- endfile --
  
  /endcol			% page_number column_number endcol --
  {
--- 82,103 ----
  } def
  
  /endpage		% page_number endpage --
! {
!   pop 			% get rid of page_number
!   PageSave restore      % restore *always* before showpage
    showpage
    grestore
  } def
  
! /newfile
! {
!   /FileSave save def    % file-level save...
! } def
! 
! /endfile
! {
!   FileSave restore      % ...and restore
! } def
  
  /endcol			% page_number column_number endcol --
  {

------- mp.man -------
*** /tmp/da05052	Wed Oct  3 15:32:27 1990
--- mp.man	Wed Oct  3 15:00:56 1990
***************
*** 99,105 ****
  .TP
  .B \-PS
  If the mail or digest message just has PostScript as the text of the message,
! then this is passed straight through, and not printed as text.
  .TP
  .B \-a
  Format the file as a news article.
--- 99,106 ----
  .TP
  .B \-PS
  If the mail or digest message just has PostScript as the text of the message,
! then this is normally just passed straight through. Specifying this option,
! causes PostScript to be printed as text.
  .TP
  .B \-a
  Format the file as a news article.

------- mp.pro.alt.ps -------
*** /tmp/da05055	Wed Oct  3 15:32:27 1990
--- mp.pro.alt.ps	Wed Oct  3 15:17:57 1990
***************
*** 85,94 ****
  
  /endpage		% page_number endpage --
  {
    showpage		% display it
  } def
  
! /endfile { } def	% nothing needed
  
  /endcol			% page_number col_number endcol --
  {
--- 85,104 ----
  
  /endpage		% page_number endpage --
  {
+   pop                   % unused
+   PageSave restore      % restore *always* before showpage
    showpage		% display it
  } def
  
! /newfile
! {
!   /FileSave save def    % file-level save...
! } def
!  
! /endfile
! {
!   FileSave restore      % ...and restore
! } def
  
  /endcol			% page_number col_number endcol --
  {
***************
*** 122,127 ****
--- 132,138 ----
  /newpage	% page_number newpage --
  {
    pop		% pageno
+   /PageSave save def
    LandscapeMode {setlandscape} if
    /lct 0 def
    /ypos topedge 92 sub def

------- mp.pro.l.ps -------
*** /tmp/da05058	Wed Oct  3 15:32:28 1990
--- mp.pro.l.ps	Wed Oct  3 14:50:55 1990
***************
*** 86,96 ****
  
  /endpage		% page_number endpage --
  {
    showpage              % display it
  } def
  
! /endfile { } def	% nothing needed
  
  /endcol			% page_number col_number endcol --
  {
    pop			% get rid of column number
--- 86,106 ----
  
  /endpage		% page_number endpage --
  {
+   pop                   % unused
+   PageSave restore      % restore *always* before showpage
    showpage              % display it
  } def
  
! /newfile
! {
!   /FileSave save def    % file-level save...
! } def
  
+ /endfile
+ {
+   FileSave restore      % ...and restore
+ } def
+ 
  /endcol			% page_number col_number endcol --
  {
    pop			% get rid of column number
***************
*** 133,138 ****
--- 143,149 ----
  /newpage
  {
    pop
+   /PageSave save def
    LandscapeMode
    {
      612 0 translate