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

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

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

[Note that the TODO file has been updated with the bugs I haven't gotten
 around to fixing yet. Maybe someday...]

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.

    *  From Geoff Mulligan <mulligan@wrl.dec.com>
       Added in the ability for mp to recognize mail or digest messages
       which have PostScript as the text of the message and just dump it
       out. As this might not be the preferred option for everybody, this
       will only occur when the -PS command line option is given.
 
    *  From Geoff Mulligan <mulligan@wrl.dec.com>
       Added more saving and restoring of the PostScript state in mp.pro.ps.
 
    *  From Bruno Pillard <bp@chorus.fr>
       Modifications to mailp:

       - changed the way control arguments (added -l) are checked
         in mail, and the tricky "set -- -" to handle the stdin case.

    *  From Larry Virden <lwv27%CAS@pucc.PRINCETON.EDU>
       Modifications to Bruno's mailp:

       - Move the -h out to a variable, so that the user can configure it
         by setting a shell variable.

       - Change the :- to - since some /bin/sh's do not handle :- properly
         (at least Ultrix pre-4.0 does not handle it properly).

       - Change the stdin processing so that if the user provides a -s flag
         on the command line it is used, but if it is not, the default one
         is used.

       - Change the per file processing so that if the user provides a -s
         flag on the command line it is used FOR ALL FILES, but if it is
         not provided, the file name itself is used.
 
    *  From Bill Houle <bhoule@se-sd.SanDiego.NCR.COM>
       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
 
       - Separated out the macro definitions from the compiler flags, and
         combined these together in the CFLAGS definition.
 
       - Used $(CC) instead of calling cc direct.
 
       - Included the Saber-C source loading rule.
 
    *  From Andy Norman <ange@hplb.hpl.hp.com>
       The install command under SysV does not have the same parameter order
       as the BSD one. I've replaced all the install commands in the Makefile
       with their equivalent cp and chmods.
 
    *  From Paul Higgins <phiggins@orion.oac.uci.edu>
       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.

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

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-11, 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.12------CUT HERE------

------- README -------
*** /tmp/da28762	Tue Oct  2 15:53:00 1990
--- README	Tue Oct  2 10:58:38 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 and Sato Toshihiko 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 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

------- mp.pro.ps -------
*** /tmp/da28765	Tue Oct  2 15:53:01 1990
--- mp.pro.ps	Tue Oct  2 10:26:18 1990
***************
*** 83,95 ****
      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
--- 83,117 ----
      0.75 setgray fill
  } def
  
+ /newpage	% page_number newpage --
+ {
+   pop		% pageno
+   /PageSave save def
+   LandscapeMode {setlandscape} if
+   /lct 0 def
+   /ypos topedge 92 sub def
+   /xpos leftedge 50 add def
+   xpos ypos moveto
+   sf
+ } def
+ 
  /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 col_number
***************
*** 125,141 ****
      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
-   /xpos leftedge 50 add def
-   xpos ypos moveto
-   sf
  } def
  
  /setlandscape
--- 147,152 ----

------- mailp -------
*** /tmp/da28768	Tue Oct  2 15:53:01 1990
--- mailp	Tue Oct  2 14:17:06 1990
***************
*** 8,62 ****
  #
  #  Original: Bruno Pillard - October 1988.
  #  Modified: Rich Burridge - June 1989.
  
! BIN=/usr/local/bin
  
- FLAG=''
- case $0 in
- 	*mailp)    PROG="mp"     ;; 
- 	*newsp)	   PROG="mp -a"  ;;
- 	*digestp)  PROG="mp -d"	 ;;
- 	*filep)	   PROG="mp -o"  FLAG='$1' ;;
- 	*filofaxp) PROG="mp -f"	 ;;
- 	*timemanp) PROG="mp -tm" ;;
- 	*timesysp) PROG="mp -ts" ;;
- 	*)	echo Unknown pretty printer: $0
- 		exit;;
- esac
- 
- if	[ "$#" -ge 1 ] ; then
- 	case    "$1" in
- 	-s*)
- 		if [ "$1" = "-s" ] ; then
- 			FLAG="$2"
- 			shift ; shift
- 		else
- 			FLAG="$1"
- 			shift
- 		fi
- 		;;
- 	-F)
- 		PROG="$PROG -F"
- 		;;
- 	* )
- 		;;
- 	esac
- fi
- 
- if    [ $# -eq 0 ]
- then
- 	set --  -
- 	FLAG='"stdin"'
- fi
- 
  #  NOTE: Banner printing is disabled below, by the inclusion of the -h
  #        switch to the lpr command. Most of the information that typically
  #        appears on the banner sheet, is output in the mp banners. If you
  #        wish to enable banner printing, then you should remove the -h switch.
  
  while [ $# -gt 0 ]
  do
! 	/bin/cat $1 | eval ${BIN}/${PROG} -s $FLAG | \
! 		      eval lpr -h -J"$FLAG" -P${PRINTER:-ps}
! 	shift
  done
--- 8,78 ----
  #
  #  Original: Bruno Pillard - October 1988.
  #  Modified: Rich Burridge - June 1989.
+ #  Revisited:  Larry W. Virden - August, September 1990.
+ #  Revisited:  Bruno Pillard - September 1990.
  
! BIN=BINDIR
  
  #  NOTE: Banner printing is disabled below, by the inclusion of the -h
  #        switch to the lpr command. Most of the information that typically
  #        appears on the banner sheet, is output in the mp banners. If you
  #        wish to enable banner printing, then you should remove the -h switch.
  
+ BANNER=
+ FILES=
+ FLAGS=
+ STDIN=
+ 
+ case $0 in
+         *mailp)    PROG="mp"     ;;
+         *newsp)    PROG="mp -a"  ;;
+         *digestp)  PROG="mp -d"  ;;
+         *filep)    PROG="mp -o" STDIN=-sstdin ;;
+         *filofaxp) PROG="mp -f"  ;;
+         *timemanp) PROG="mp -tm" ;;
+         *timesysp) PROG="mp -ts" ;;
+         *)      echo Unknown pretty printer: $0
+                 exit;;
+ esac
+ 
  while [ $# -gt 0 ]
  do
!         case    "$1" in
!         -s*)
!                 if [ "$1" = "-s" ] ; then
!                         FLAGS="$FLAGS -s \"$2\""
!                         shift
!                 else
!                         FLAGS="$FLAGS $1"
!                 fi
!                 STDIN=
!                 ;;
!         -h)
!                 BANNER=-h
!                 ;;
!         -F | -l)
!                 FLAGS="$FLAGS $1"
!                 ;;
!         * )     FILES="$FILES $1"
!                 ;;
!         esac
!         shift
  done
+ 
+ if [ -d /usr/spool/lp ] ; then
+ 	PRINT_CMD="lp -d${LPDEST:-postscript} -t"
+ else
+ 	PRINT_CMD="lpr -P${PRINTER-ps} -J"
+ fi
+ 
+ if [ -z "$FILES" ] ; then
+         eval ${BIN}/${PROG} ${STDIN} ${FLAGS} | \
+ 	eval ${PRINT_CMD}stdin ${BANNER}
+ else
+         for FILE in $FILES ; do
+                 eval ${BIN}/${PROG} ${FLAGS} ${FILE} | \
+ 		eval ${PRINT_CMD}${FILE} ${BANNER}
+         done
+ fi
+ 
+ exit 0

------- header.c -------
*** /tmp/da28771	Tue Oct  2 15:53:02 1990
--- header.c	Tue Oct  2 15:47:43 1990
***************
*** 25,31 ****
  char *hdr ;
  char **dest ;
  {
!   if (EQUAL(hdr))
      {
        *dest = malloc((unsigned) (strlen(nextline) - strlen(hdr) + 1)) ;
        STRCPY(*dest, nextline + strlen(hdr)) ;
--- 25,31 ----
  char *hdr ;
  char **dest ;
  {
!   if (hdr_equal(hdr))
      {
        *dest = malloc((unsigned) (strlen(nextline) - strlen(hdr) + 1)) ;
        STRCPY(*dest, nextline + strlen(hdr)) ;
***************
*** 44,50 ****
  { 
    int i = 0 ;
    
!   if (EQUAL(hdr))
      {
        get_header(hdr, dest) ;
        i++ ;
--- 44,50 ----
  { 
    int i = 0 ;
    
!   if (hdr_equal(hdr))
      {
        get_header(hdr, dest) ;
        i++ ;
***************
*** 61,66 ****
--- 61,87 ----
  }
  
  
+ /*  Compare the first word of the current line (converted to lower-case,
+  *  with the given header definition. Determine if they are equal.
+  */
+ 
+ hdr_equal(val)
+ char val[MAXLINE] ;
+ {
+   char token[MAXLINE], word[MAXLINE] ;
+   char *nptr = nextline ;
+   char *wptr = word ;
+ 
+   STRCPY(token, val) ;
+   if (isupper(token[0])) token[0] = tolower(token[0]) ;
+   while (*nptr && *nptr != ' ')
+     if (isupper(*nptr)) *wptr++ = tolower(*nptr++) ;
+     else                *wptr++ = *nptr++ ;
+   *wptr = '\0' ;
+   return(!strncmp(token, word, strlen(token))) ;
+ }
+ 
+ 
  /*  Parse_headers is a function which reads and parses the message headers,
   *  extracting the bits which are of interest.
   *
***************
*** 95,101 ****
  
    if (!digest)
      {
!       if (!EQUAL(FROM_HDR))         /* UNIX From_ header? */
          {
            colon = index(nextline, ':') ;
            if (colon == NULL)        /* No colon => not a header line */
--- 116,122 ----
  
    if (!digest)
      {
!       if (!hdr_equal(FROM_HDR))         /* UNIX From_ header? */
          {
            colon = index(nextline, ':') ;
            if (colon == NULL)        /* No colon => not a header line */
***************
*** 136,144 ****
            get_mult_hdr(CCHDR,       cc) ;
            if (emptyline(nextline)) break ;
  
!           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) ;
--- 157,165 ----
            get_mult_hdr(CCHDR,       cc) ;
            if (emptyline(nextline)) break ;
  
!           if (doc_type != DO_NEWS && hdr_equal(NEWSGROUPSHDR))
              doc_type = DO_NEWS ;
!           if (doc_type != DO_NEWS && hdr_equal(NEWSGROUPHDR))
              doc_type = DO_NEWS ;
          }
        get_header(FROMHDR, &from) ;
***************
*** 145,151 ****
        get_header(SUBJECTHDR, &subject) ;
        get_header(DATEHDR, &date) ;
  
!       if (!EQUAL(TOHDR) && !EQUAL(CCHDR))
          {
            while (!end_of_file && !end_of_line)
              readline() ;                       /* Skip rest of long lines */
--- 166,172 ----
        get_header(SUBJECTHDR, &subject) ;
        get_header(DATEHDR, &date) ;
  
!       if (!hdr_equal(TOHDR) && !hdr_equal(CCHDR))
          {
            while (!end_of_file && !end_of_line)
              readline() ;                       /* Skip rest of long lines */

------- main.c -------
*** /tmp/da28774	Tue Oct  2 15:53:02 1990
--- main.c	Tue Oct  2 15:35:59 1990
***************
*** 55,64 ****
--- 55,66 ----
  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. */
   
+ char *POSTSCRIPT_MAGIC = "%!" ;            /* First line of PS file. */
  char *FROMHDR       = "From:" ;
  char *FROM_HDR      = "From " ;            /* UNIX From header */
  char *APP_FROMHDR   = "Apparently_from:" ;
***************
*** 174,179 ****
--- 176,183 ----
  
  printfile()    /* Create PostScript to pretty print the current file. */
  {
+   int blankslate ;    /* Nothing set up for printing. */
+   
    readline() ;
    if (end_of_file)
      {
***************
*** 184,217 ****
    if (!text_doc)
      parse_headers(FALSE) ;    /* Parse headers of mail or news article */
    init_setup() ;              /* Set values for remaining globals. */
!  
! /* Print the document */
!  
    startpage() ;               /* Output initial definitions. */
  
    if (doc_type != DO_TEXT) show_headers(FALSE) ;
    while (!end_of_file)
      {
!       if (folder && EQUAL(FROM_HDR))
          {
            linect = plen ;
            reset_headers() ;
            parse_headers(FALSE) ;
            show_headers(FALSE) ;
          }
!       if (digest && (EQUAL(FROMHDR) || EQUAL(DATEHDR) || EQUAL(SUBJECTHDR)))
          {
            linect = plen ;
            parse_headers(TRUE) ;
            show_headers(TRUE) ;
          }
!       textshow(nextline) ;
        readline() ;
      }    
!   if (numcols) endcol() ;
!   endpage() ;
!   endfile() ;
    FCLOSE(fp) ;
  }
  
  
--- 188,263 ----
    if (!text_doc)
      parse_headers(FALSE) ;    /* Parse headers of mail or news article */
    init_setup() ;              /* Set values for remaining globals. */
! 
!   startfile();
    startpage() ;               /* Output initial definitions. */
+   blankslate = 0 ;
  
+ /* Print the document */
+ 
    if (doc_type != DO_TEXT) show_headers(FALSE) ;
    while (!end_of_file)
      {
!       if (blankslate)
          {
+           startfile() ;
+           startpage() ;               /* Output initial definitions. */
+           blankslate = 0 ;
+         }
+ 
+       if (folder && hdr_equal(FROM_HDR))
+         {
            linect = plen ;
            reset_headers() ;
            parse_headers(FALSE) ;
            show_headers(FALSE) ;
          }
!       if (digest && (hdr_equal(FROMHDR) ||
!                      hdr_equal(DATEHDR) || hdr_equal(SUBJECTHDR)))
          {
            linect = plen ;
            parse_headers(TRUE) ;
            show_headers(TRUE) ;
          }
! 
!       if (print_ps && hdr_equal(POSTSCRIPT_MAGIC))
!         {
!           if (numcols) endcol() ;
!           endpage() ;
!           endfile() ;
!           process_postscript() ;
!           blankslate = 1 ;
!         }
!       else textshow(nextline) ;
! 
        readline() ;
      }    
! 
!   if (!blankslate)
!     {
!       if (numcols) endcol() ;
!       endpage() ;
!       endfile() ;
!     }
!   
    FCLOSE(fp) ;
+ }
+ 
+ 
+ process_postscript()
+ {
+   int firstline = 1 ;   /* To allow a newline after the first line. */
+ 
+   startpage() ;
+   while (!hdr_equal(FROMHDR)    && !hdr_equal(DATEHDR) &&
+          !hdr_equal(SUBJECTHDR) && !end_of_file)
+     {
+       PRINTF("%s", nextline) ;
+       if (firstline) FPUTS("\n", stdout) ;
+       firstline = 0 ;
+       if (fgets(nextline, MAXLINE, fp) == NULL) end_of_file = TRUE ;
+     }
+   endpage() ;
  }
  
  

------- misc.c -------
*** /tmp/da28777	Tue Oct  2 15:53:03 1990
--- misc.c	Tue Oct  2 14:51:07 1990
***************
*** 101,107 ****
  {
    int opch ;
  
!   while ((opch = get_opt(argc, argv, "adfFlmop:s:t:v")) != -1)
      switch (opch)
        {
          case 'a' : article = TRUE ;      /* "Article from" format. */
--- 101,107 ----
  {
    int opch ;
  
!   while ((opch = get_opt(argc, argv, "adfFlmop:P:s:t:v")) != -1)
      switch (opch)
        {
          case 'a' : article = TRUE ;      /* "Article from" format. */
***************
*** 119,124 ****
--- 119,127 ----
          case 'm' : folder = TRUE ;       /* Print mail folder. */
                     break ;
          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. */

------- print.c -------
*** /tmp/da28780	Tue Oct  2 15:53:04 1990
--- print.c	Tue Oct  2 14:50:20 1990
***************
*** 195,200 ****
--- 195,206 ----
  }
  
  
+ startfile()
+ {
+   PRINTF("newfile\n") ;
+ }
+ 
+ 
  textshow(s)
  char *s ;
  {

------- CHANGES -------
*** /tmp/da28783	Tue Oct  2 15:53:05 1990
--- CHANGES	Tue Oct  2 15:48:45 1990
***************
*** 388,390 ****
--- 388,451 ----
         install-a4", mp is initially installed. This is then followed by
         the prologue files being edited in situ, and adjusted for A4 sized
         paper. The README file has been updated to mention this.
+ 
+ v2.4 - patchlevel 12. - 2nd October 1990.
+ 
+     *  From Geoff Mulligan <mulligan@wrl.dec.com>
+        Added in the ability for mp to recognize mail or digest messages
+        which have PostScript as the text of the message and just dump it
+        out. As this might not be the preferred option for everybody, this
+        will only occur when the -PS command line option is given.
+ 
+     *  From Geoff Mulligan <mulligan@wrl.dec.com>
+        Added more saving and restoring of the PostScript state in mp.pro.ps.
+ 
+     *  From Bruno Pillard <bp@chorus.fr>
+        Modifications to mailp:
+ 
+        - changed the way control arguments (added -l) are checked
+          in mail, and the tricky "set -- -" to handle the stdin case.
+ 
+     *  From Larry Virden <lwv27%CAS@pucc.PRINCETON.EDU>
+        Modifications to Bruno's mailp:
+ 
+        - Move the -h out to a variable, so that the user can configure it
+          by setting a shell variable.
+ 
+        - Change the :- to - since some /bin/sh's do not handle :- properly
+          (at least Ultrix pre-4.0 does not handle it properly).
+ 
+        - Change the stdin processing so that if the user provides a -s flag
+          on the command line it is used, but if it is not, the default one
+          is used.
+ 
+        - Change the per file processing so that if the user provides a -s
+          flag on the command line it is used FOR ALL FILES, but if it is
+          not provided, the file name itself is used.
+ 
+     *  From Bill Houle <bhoule@se-sd.SanDiego.NCR.COM>
+        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
+ 
+        - Separated out the macro definitions from the compiler flags, and
+          combined these together in the CFLAGS definition.
+ 
+        - Used $(CC) instead of calling cc direct.
+ 
+        - Included the Saber-C source loading rule.
+ 
+     *  From Andy Norman <ange@hplb.hpl.hp.com>
+        The install command under SysV does not have the same parameter order
+        as the BSD one. I've replaced all the install commands in the Makefile
+        with their equivalent cp and chmods.
+ 
+     *  From Paul Higgins <phiggins@orion.oac.uci.edu>
+        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.

------- patchlevel.h -------
*** /tmp/da28786	Tue Oct  2 15:53:06 1990
--- patchlevel.h	Tue Oct  2 10:44:26 1990
***************
*** 14,17 ****
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  11
--- 14,17 ----
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  12

------- extern.h -------
*** /tmp/da28789	Tue Oct  2 15:53:07 1990
--- extern.h	Tue Oct  2 14:50:33 1990
***************
*** 64,69 ****
--- 64,70 ----
  extern bool folder ;         /* Set if we are printing a mail folder. */
  extern bool landscape ;      /* Set if we are printing in landscape mode. */
  extern bool print_orig ;     /* Print originators name rather then Mail for. */
+ extern bool print_ps ;       /* Print PostScript files if set. */
  extern bool text_doc ;       /* Printing normal text (-o) */
  
  extern bool end_of_file ;    /* EOF indicator */

------- mp.man -------
*** /tmp/da28792	Tue Oct  2 15:53:07 1990
--- mp.man	Tue Oct  2 10:57:25 1990
***************
*** 8,13 ****
--- 8,15 ----
  [
  .B \-F
  ] [
+ .B \-PS
+ ] [
  .B \-a
  ] [
  .B \-d
***************
*** 94,99 ****
--- 96,105 ----
  Instead of printing who the mail article is for, the top header will
  contain who the mail article is from. A useful option for people with
  their own personal printer.
+ .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.

------- Makefile.dist -------
*** /tmp/da28795	Tue Oct  2 15:53:08 1990
--- Makefile.dist	Tue Oct  2 15:20:14 1990
***************
*** 67,74 ****
  #---------------------------------------------------------------------
  #  Compilation flags and standard macro definitions.
  #
! CFLAGS   = -g $(GECOSFIELDS) $(GECOSLENGTH) $(NOINDEX) $(PROLOGUE) $(SYSV)
  LDFLAGS  =
  #=================================================================
  
  .KEEPSTATE:
--- 67,78 ----
  #---------------------------------------------------------------------
  #  Compilation flags and standard macro definitions.
  #
! CDEFS	 = $(GECOSFIELDS) $(GECOSLENGTH) $(NOINDEX) $(PROLOGUE) $(SYSV)
! CCOMP	 = -g
! CFLAGS   = $(CCOMP) $(CDEFS)
  LDFLAGS  =
+ 
+ CC	 = cc
  #=================================================================
  
  .KEEPSTATE:
***************
*** 91,97 ****
  all:       $(BINARIES)
  
  mp:        $(OBJS)
! 	   cc $(LDFLAGS) -o mp $(OBJS)
  	   -sed -e s,LIBDIR,$(LIBDIR),g \
  		-e s,BINDIR,$(BINDIR),g mp.man > mp.1
  
--- 95,101 ----
  all:       $(BINARIES)
  
  mp:        $(OBJS)
! 	   $(CC) $(LDFLAGS) -o mp $(OBJS)
  	   -sed -e s,LIBDIR,$(LIBDIR),g \
  		-e s,BINDIR,$(BINDIR),g mp.man > mp.1
  
***************
*** 118,133 ****
  	   @echo
  
  common-install: $(BINARIES)
! 	   -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.ff.ps $(LIBDIR)
! 	   -install -c -m 644 mp.pro.tm.ps $(LIBDIR)
! 	   -install -c -m 644 mp.pro.ts.ps $(LIBDIR)
! 	   -install -c -m 755 mailp $(BINDIR)
  #
  #  NOTE: If you don't want the newsp, filep ... shell scripts installed,
  #        then you should comment out the following seven lines.
  #
--- 122,157 ----
  	   @echo
  
  common-install: $(BINARIES)
! #                                                     mp
! 	   -cp mp $(BINDIR)
! 	   -chmod 751 $(BINDIR)/mp
! 	   -strip $(BINDIR)/mp
! #                                                     mp.1
! 	   -cp mp.1 $(MANDIR)/mp.$(MANSECT)
! 	   -chmod 644 $(MANDIR)/mp.$(MANSECT)
! #                                                     mp.pro.ps
! 	   -cp mp.pro.ps $(LIBDIR)
! 	   -chmod 644 $(LIBDIR)/mp.pro.ps
! #                                                     mp.pro.l.ps
! 	   -cp mp.pro.l.ps $(LIBDIR)
! 	   -chmod 644 $(LIBDIR)/mp.pro.l.ps
! #                                                     mp.pro.alt.ps
! 	   -cp mp.pro.alt.ps $(LIBDIR)
! 	   -chmod 644 $(LIBDIR)/mp.pro.alt.ps
! #                                                     mp.pro.ff.ps
! 	   -cp mp.pro.ff.ps $(LIBDIR)
! 	   -chmod 644 $(LIBDIR)/mp.pro.ff.ps
! #                                                     mp.pro.tm.ps
! 	   -cp mp.pro.tm.ps $(LIBDIR)
! 	   -chmod 644 $(LIBDIR)/mp.pro.tm.ps
! #                                                     mp.pro.ts.ps
! 	   -cp mp.pro.ts.ps $(LIBDIR)
! 	   -chmod 644 $(LIBDIR)/mp.pro.ts.ps
! #                                                     mailp
  #
+ 	   -sed -e s,BINDIR,$(BINDIR),g mailp >$(BINDIR)/mailp
+ 	   -chmod 755 $(BINDIR)/mailp
+ #
  #  NOTE: If you don't want the newsp, filep ... shell scripts installed,
  #        then you should comment out the following seven lines.
  #
***************
*** 144,150 ****
  create:    SCCS
  	   -sccs create $(SRCS) $(OTHERS)
  
! lint:;     lint $(SRCS)
  
  shar:;     shar.script $(SFILES1) > Part1
  	   shar.script $(SFILES2) > Part2
--- 168,177 ----
  create:    SCCS
  	   -sccs create $(SRCS) $(OTHERS)
  
! lint:;     lint $(CDEFS) $(SRCS)
! 
! saber_src:
! 	   #load $(CDEFS) $(SRCS)
  
  shar:;     shar.script $(SFILES1) > Part1
  	   shar.script $(SFILES2) > Part2

------- TODO -------
*** /tmp/da28798	Tue Oct  2 15:53:08 1990
--- TODO	Tue Oct  2 15:50:32 1990
***************
*** 74,76 ****
--- 74,105 ----
          -f 'Subject: %subject%'
  
      of course `f' isn't available but you get the drift.
+ 
+ 11/ From Bruce Barnett <barnett@unclejack.crd.ge.com>
+     I just tried "mp -a" to print an article from comp.sys.mac.hardware
+     The last e fell into the white circle with the page number.
+     Don't know what the best solution is. Perhaps make the font smaller
+     when the text is longer. Perhaps putting the page number in the lower
+     right corner instead of the top.
+ 
+ 12/ From Paul Higgins <phiggins@orion.oac.uci.edu>
+     If there are two "Cc" lines in the message, only one gets printed.
+ 
+ 13/ From Paul Higgins <phiggins@orion.oac.uci.edu>
+     A -T option, analogous to -F, which prints the name from the mail's
+     "To" field in the top header. [This is not straight forward, because
+     there can be multiple To: lines and they can be quite lengthy].
+ 
+ 14/ From Andy Norman <ange@hplb.hpl.hp.com>
+     The time-manager style doesn't appear to quite work for A4. The dotted
+     lines aren't visible on the top and left of the page. It looks like it
+     needs shifting southeast a little bit.
+ 
+ 15/ From Andy Norman <ange@hplb.hpl.hp.com>
+     It would be nice if sed automatically set the page length for the
+     PostScript prologue files from the Makefile.
+ 
+ 16/ From Andy Norman <ange@hplb.hpl.hp.com>
+     The chunk in the Makefile that makes links has a variant of 'echo' that
+     doesn't work on SysV-like systems.  'echo -n "foobar"' looks like
+     'echo "foobar\c" on SysV.

yonkers@ncsc.org (Frank Terhaar-Yonkers) (10/03/90)

In our environment the "newfile" code causes the Apple laserwriter NTX's to barf.
It also caused our Gatorbox (running Gatorprint) to abort and reload.
SunOS 4.0.3, Apple NTX II's.

e.g.:

>lpq
no entries
status: idle
Errors from last print job:
%%[ Error: undefined; OffendingCommand: newfile ]%%
%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%

SunOS 4.0.3, Apple NTX II's.
-- 

 - Frank