Subject: Official patch #2 for faces v1.5.

From: richb@stard (Rich Burridge)
Date: Tue, 7 May 1991 10:22:29 +1000

Couple of points before I get onto the patch...

* There are now 44 names on the faces mailing list, plus 3 remote alias
  exploders.

* I will try to get the mailing list archives (by month) onto indiana in
  compressed format before the end of the week. If not then, it will
  definitely be when I get back.

-------

Here's patch #2 for faces v1.5. It tries to incorporate all the unofficial
patches that have been posted to the list or mailed to me, while I've been
away, and adds to the TODO file anything I haven't had a chance to fix.
The list of changes are included at the end of this message. The actual
patch (or a version of faces which is completely patched) is available from
a variety of places (see below).

The patch is in the form of a shar file containing a set of diffs to apply
to the faces source, plus three new files.

The shar file should be copied to the directory where your faces source
files are, and then unpacked. You should use Larry Wall's patch program to
apply the diffs included in this shar.  Assuming the shar file is called
faces.patch2.shar, then you should do the following:

cd faces_src                 # directory where your faces source files are.
sh faces.patch2.shar         # unpack files into faces directory.
patch -p0 <faces.patch2.diffs
make x11                     # Or xview, sunview or news.
make install                 # You might have to be super-user.

-------

If you'd rather not do this, then the latest version of faces (fully patched)
is available from a variety of places:

* I've put a copy in the pub/faces/incoming directory on iuvax.cs.indiana.edu,
  for those of you who have anon ftp capabilities. Steve, could you do your
  bit with this file please, and place a copy in the parent directory?

  I've also put a copy of the uuencoded compressed Patch2 shar file in there.

* For Sun employees around the world, you can get the fully patched latest
  version via anon ftp from stard.aus.

* For Australian sites without ftp capabilities, faces.tar.Z is available
  via fetchfile from sunaus.sun.oz

* And finally both the patch and the fully patched latest version of faces
  are available via the automatic mail archive server. Requests should be
  sent to [email-masked]. To just get patch #2, then the
  message should contain the line:

send faces patch2

  If you want the complete fully patched version of faces v1.5.2, then you
  should send fifteen messages containing the lines:

send faces partn

  where n = 1-15. You can do this is one message, but the archive server
  processes smaller messages faster. UUCP sites out there might like to
  include a path line with each message, something like:

path uunet.uu.net!hostname!user

  note that this is uunet.uu.net and not just uunet. Sun.COM doesn't
  recognise uunet. This is the return path the archive server will use to
  send your requests to. Also UUCP sites should note that you probably have a
  size limit on each message. Yet another good reason to divide these into
  multiple requests.

--------

Three more points...

* Let me know where I've botched up. If I have, I'll post an official
  patchlet near the end of the week.

* I will be leaving Mtn View for England next Saturday. I will then be
  "off-the-air" until about June 5th.

* When I get back, I'd like to divide up faces into three programs:

  - (faces) the actual program that will display a list of face images.

  - (faces daemon) a program that will return a face image given a username
    and a hostname. The faces program should also tell the faces daemon what
    formats it can handle (.xbm, 48x48x1, .ps etc...).

  - a set of filter programs. The new mail, all mail, line printer support,
    remore users, would be separated out into individual filter programs,
    and the appropriate one would talk to the faces program and the faces
    daemon.

  Doing this will allow each indivual program/filter to be worked on
  separately, and improved. This can be divided among the interested faces
  developers out there on this list.

  I also realise that there are quite a few things to be discussed and
  decided here.  Questions such as:

  - how should the faces program talk to the faces daemon ? (nntp, rpc,
    sockets ...)

  - how should the faces program talk to the filter program ? (rpc, pipes ...)

  I hope some of this can be thrashed out while I'm away.

Rich Burridge,          DOMAIN: [email-masked]
Sun Microsystems.       ACSNET: [email-masked]
PHONE: +61 2 911 4212   UUCP:   {uunet,mcvax,ukc}!munnari!sunaus.oz!richb

------

v1.5 - patchlevel 2 - 6th May 1991.

       - From Dick Keene <[email-masked]>

         * I had to comment out line 170 in faces.h to compile for xview.
           It complained of a re-declaration of endpwent().

         * New filter program called filters/vpxtoicon.c. It converts 8 bit
           snapshots from the Sun video pix board to Sun icons. It does a
           scale, and a histogram equalization.  Then you can convert the
           icon to face format with icon2ikon and compface.

           [I've added this to the filters directory, but have not added it
            to the "all" definition in the Makefile as it requires Sun specific
            include files and libraries to compile. If you are on a Sun, and
            you want to build it, then you should do a "make vpxtoicon"].

       - From John Mackin <[email-masked]>
         New portable and correct version of the faces.sendmail script, which
         only uses one invocation of sed.
 
       - From Sjoerd Mullender <[email-masked]>
         I have compiled faces 1.5.1 on some of our systems and I came across
         a few problems.
 
         * Added #include "faces.h" to address.y so that realloc() would be
           declared.
 
         * Removed the declaration of sprintf() from faces.h, because that
           is alreade done in stdio.h, and because the definitions clashed on
           one of our systems.

         * In mon.c, changed the declarations of two chars to ints.  One of
           them is essential, because it is compared to EOF.

         * I changed the declaration of reply in do_prog() in mon.c to char *,
           because it is assigned the result of fgets.

         * Apart from this, I also had to add -Umips and -lsun -lc_s in order
           to compile faces successfully on a Silicon Graphics system.  These
           extra cpp flags and libraries could be put in extra variables in
           the Makefile.dist.

       - From Mark Shand <[email-masked]>
         Adjustments to the TODO file.

         * add bullet-proofing of uncompface().

         * remove TODO for RFC822 parsing (included recently by John Mackin).

       - From Ignatios Souvatzis <[email-masked]>
         Various small changes needed for Convex 8.1.

         * Added a BZERO definition to the Makefile.dist file, for people
           without memset().

         * Changed strchr in main.c and rec.c to index (this should be handled
           by the NOINDEX definition in Makefile.dist)

       - From Steve Kinzler <[email-masked]>

         * When compiling on a DECStation under Ultrix 4.0, I needed to add an
           "#include <ctype.h>" line to mon.c and x11.c (and xview.c probably,
           if I'd used it).

         * A small bug in compface/Makefile.

       - From Steve Kinzler <[email-masked]>

         * I found a couple of bugs in faces v1.5.1's display when it's
           running a -e script and the window is iconified.

         * I've revised faces/scripts to make use of the new ability to
           specify iconified window displays for -e scripts. There are two
           new faces scripts:

           - newscheck.faces
           - newsfrom.faces

       - From Steve Kinzler <[email-masked]>
         Implemented John's suggestion:

         > From John Mackin <[email-masked]>
         > Another performance improvement:
         > Another kludge which could cut down the namei overhead substantially
         > is to chdir() to the top of each facepath element and do the
         > searching of that part of the tree with relative pathnames from
         > there, rather than using absolute pathnames all the way from the
         > root each time.  chdir()'ing is often very bad practice, but in an
         > application that can't possibly become interactive we don't have to
         > be concerned.

         The chdir() is only temporary -- in effect during the search
         subroutine, so relative pathnames for -e script locations and
         facepath elements and such still work as before.  I noted a 25%
         performance increase on a test here.  Your mileage may vary --
         we've got a convoluted path of symlinks to get to /usr/local/faces
         on our system.

       - From Victor A. Riley <[email-masked]>
         Saves the first encounter of a misc./unknown face, then continues
         looking for another face match.  This is useful when you have
         several face databases.  For this to work properly, you should have
         the misc. faces in the sample facedir installed in the same location
         as your local face database, for instance in /usr/local/faces.  If
         you have the logos face database, just move the logos/misc. directory
         up one level in the hierarchy.

         As a future bug fix we can modify the Makefile.dist file so that it
         does this when you do a 'make tables'.

---

From: Alan Skea <[email-masked]>
Date: Tue, 7 May 91 13:41:37 +1000

I have a slight problem getting faces 1.5 going on our Suns which I was
hoping this latest patch would fix but it doesn't.  We are running SunOS
4.0.3c on most of our machines and while we have the utime() library
call, we do not have a <utime.h>.  If I compile with NOUTIME defined
then the utime structure that is declared in faces.h fails because type
time_t is not declared.  If I compile with NOUTIME _not_ defined then
the compiler fails when it gets to the #include <utime.h> in mon.c.
My solution to this is to compile with NOUTIME declared and to alter faces.h
as follows:

*** faces.h.old Wed May  7 10:40:38 1991
--- faces.h     Tue May  7 13:46:42 1991
***************
*** 160,165 ****
--- 160,166 ----
  #endif /*NOINDEX*/

  #ifdef NOUTIME
+ #include <sys/types.h>
  struct utimbuf {      /* Make a utime() definition for systems without it. */
    time_t actime ;
    time_t modtime ;

---

From: Tim Chown <[email-masked]>
Date: Fri, 10 May 91 11:57:18 BST

I have installed faces, and have some suggestions/code which may be
considered for inclusion in the official version.  My comments are
made wrt faces 1.5.1 ...

1. If the mail spool shrinks (ie. the user deletes mail) then the
   window should adjust;  the -MH option doesn't seem to work for
   me in this respect.  Using -MH is a little misleading as I use
   Elm and that can shrink the mail spool file too, so perhaps
   the man page (and option name) should reflect this.
   
   To get the shrinking to work (on a Sun3/SPARC) I needed the
   following changes (I used an extra global boolean, yuk) ...
     main.c    add int mboxshrunk = 0;    to the initial defs
     extern.h  add extern int mboxshrunk;  to the defs.
     mon.c     some brackets were needed on line 359:
	       	(mhflag && (buf.st_size < lastsize) && (buf.st_size != 0)))
	       and change line 361:
		if (buf.st_size < lastsize) {lastsize = 0; mboxshrunk = 1;}
	       and reset the boolean at line 417:
		mboxshrunk = 0;
     x11.c     Use the mboxshrunk boolean (lines 640 & 665) ...
		if (beep_and_raise && raisewindow && newmail && !mboxshrunk)
		if (beep_and_raise && newmail &!mboxshrunk) beep_flash(beeps, flashes)
   Changes would be needed to xview.c, sunview.c, etc akin to x11.c.

2. The remote host monitoring wouldn't work either.   This needed a
   different variable rhostname to be used with -H rather than hostname
   which was getting overwritten (so that localhost was always seen!).
     main.c    add char *rhostname ;
     extern.h  add extern char *rhostname ;
     get.c     Change line 176:
		getparam(&rhostname, argv, "-H needs hostname");
     mon.c     Use the rhostname variable on lines 674,675:
		if (rhostname == NULL) read_str(&rhostname, "localhost") ;
		SPRINTF(command, USERSDEF, rhostname) ;

3. The addition of the option -l window_label is desirable;  the default
   label is "faces" which is a bit nondescript.  Maybe there's a cunning
   way to do this, but the following code allows -l to work (for x11
   at least); a change to the man page would also be needed.
     main.c    Add  char *faceslabel ;
     extern.h  Add  extern char *faceslabel ;
     get.c     Add an extra branch to the command line parsing:
		case 'l' : INC ;
			   getparam(&faceslabel ,argv,"-l needs window label");
			   break;
     main.c    Set up default label (line 228):
		read_str(&faceslabel, "faces");
     x11.c     Use the label ... line 558 ...
		XSetStandardProperties(dpy, frame[F_WINDOW], faceslabel , faceslabel , None,

4. Don't take sounds for mail when first reading in the mail spool
   file.  Just play them for new mail:
     mon.c     Edit line 221:  if ((do_audio) && (!firsttime))

These four changes are simple and I think quite worthwhile.  Any
comments welcome.  The changes for x11.c should be replicable in the
other windows interface programs.  Apologies for not providing them
as true patches :-(

Tim