[comp.sources.bugs] Official patch #5 for faces v1.1

richb@sunaus.oz (Rich Burridge) (08/10/88)

This is official patch #5 for faces v1.1, please apply it.
 
It makes the following alterations:

1. I believe I found part, if not all of the memory leakage
   problem; famous last words. This was with the help of an
   amazing memory leakage tracer program from Mark Brader
   <msb@sq.com@munnari.oz>. In the add_face routine the icon
   being loaded in was never destroyed. Many thanks Mark!!

2. Small change to the printer monitoring code in mon.c to output
   "job" or "jobs" depending on the number of jobs in the queue.
   Thanks to Hans Zuidam <mcvax!nlgvax!hans@munnari.oz> for this
   change.

3. Addition of 'W' to the valid getopt options to allow the SunView
   window parameters to work. Thanks to Hans Zuidam
   <mcvax!nlgvax!hans@munnari.oz> for this fix.

Use Larry Walls' patch program to apply these changes.

I still have various suggestions to go through, and hopefully will
knock out a "final" patch next week.

    Rich.

------CUT HERE------CUT HERE------CUT HERE------
*** original/get.c	Thu Aug  4 12:16:25 1988
--- get.c	Wed Aug 10 10:11:19 1988
***************
*** 76,82 ****
    extern int optind ;
    extern char *optarg ;
    int c ;
!   char *optlist = "P:af:h:i:ns:tv" ;
  
    while ((c = getopt(argc, argv, optlist)) != EOF)
      switch (c)
--- 76,82 ----
    extern int optind ;
    extern char *optarg ;
    int c ;
!   char *optlist = "P:af:h:i:ns:tvW" ;
  
    while ((c = getopt(argc, argv, optlist)) != EOF)
      switch (c)
***************
*** 84,89 ****
--- 84,90 ----
          case 'P' : mtype = MONPRINTER ;       /* Monitor printer queue. */
                     STRCPY(printer, optarg) ;
                     break ;
+         case 'W' : break ;
          case 'a' : mtype = MONALL ;           /* Monitor the whole of the spoolfile. */
                     break ;
          case 'f' : STRCPY(facedir, optarg) ;  /* Different directory for face icons. */
*** original/mon.c	Thu Aug  4 12:16:56 1988
--- mon.c	Tue Aug  9 18:06:10 1988
***************
*** 193,199 ****
                if (!stat(this->iconname,&buf))
                  add_face(ICON, ORDINARY, this->iconname) ;
                else add_face(ICON, NOFACE, "") ;
!               SPRINTF(nextline, "%1d jobs", noicons) ;
                text(ICON, BOTTOMRIGHT, nextline) ;   /* Number of jobs. */
              }
            ADJUST ;    /* Adjust column and row. */
--- 193,199 ----
                if (!stat(this->iconname,&buf))
                  add_face(ICON, ORDINARY, this->iconname) ;
                else add_face(ICON, NOFACE, "") ;
!               SPRINTF(nextline, "%1d %s", noicons, (noicons == 1 ? "job" : "jobs")) ;
                text(ICON, BOTTOMRIGHT, nextline) ;   /* Number of jobs. */
              }
            ADJUST ;    /* Adjust column and row. */
*** original/patchlevel.h	Thu Aug  4 12:16:56 1988
--- patchlevel.h	Tue Aug  9 18:08:59 1988
***************
*** 16,19 ****
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  4
--- 16,19 ----
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  5
No differences encountered
*** original/sunview.c	Thu Aug  4 12:16:56 1988
--- sunview.c	Wed Aug 10 15:51:34 1988
***************
*** 127,132 ****
--- 127,133 ----
                                                    PIX_SRC, face_pr, 0, 0) ;
                         }
      }
+   PR_DESTROY(face_pr) ;
  }