Official patch #10 for faces v1.4 (Part 2 of 2).

Rich Burridge richb at sunaus.oz
Mon Jan 7 19:00:49 AEST 1991


[See the instructions in part1, on how to apply this patch - Rich.]

------CUT HERE------patch.10.part2------CUT HERE------

------- main.c -------
*** /tmp/da09632	Mon Jan  7 18:56:08 1991
--- main.c	Fri Jan  4 09:22:39 1991
***************
*** 27,34 ****
--- 27,38 ----
  #ifndef mips
  #include <netdb.h>
  #else
+ #ifdef SYSTYPE_BSD43
+ #include <netdb.h>
+ #else
  #include <bsd/netdb.h>
  #endif
+ #endif
  #include <ctype.h>
  
  #ifdef DNSLOOKUP
***************
*** 402,408 ****
  /* Grovel through the machine/community association list. */
  
    for (temp = machines; temp != NULL; temp = temp->next)
!     if (strcmp(temp->machine, community) == 0)
        {
          STRCPY(community, temp->community) ;
          IF_DEBUG( FPRINTF(stderr,
--- 406,412 ----
  /* Grovel through the machine/community association list. */
  
    for (temp = machines; temp != NULL; temp = temp->next)
!     if (soft_match(temp->machine, community) == 0)
        {
          STRCPY(community, temp->community) ;
          IF_DEBUG( FPRINTF(stderr,
***************
*** 592,595 ****
--- 596,611 ----
            }
      }
    FCLOSE(fd) ;
+ }
+ 
+ 
+ soft_match(d_ptr, c_ptr)
+ register char *c_ptr, *d_ptr ;
+ {
+   if (*d_ptr == '*')
+     {
+       d_ptr++ ;
+       c_ptr = c_ptr + strlen(c_ptr) - strlen(d_ptr) ;
+     }
+   return(!EQUAL(c_ptr, d_ptr)) ;
  }

------- mon.c -------
*** /tmp/da09635	Mon Jan  7 18:56:09 1991
--- mon.c	Mon Jan  7 18:40:58 1991
***************
*** 25,32 ****
--- 25,36 ----
  #ifndef mips
  #include <sys/time.h>
  #else
+ #ifdef SYSTYPE_BSD43
+ #include <sys/time.h>
+ #else
  #include <bsd/sys/time.h>
  #endif
+ #endif
  #include <sys/file.h>
  #include "faces.h"
  #include "extern.h"
***************
*** 143,148 ****
--- 147,153 ----
                             {
                               repl_image(DISP_NAME,  CUROFF, width, height) ;
                               repl_image(DISP_OTHER, CUROFF, width, height) ;
+                              add_face(DISP_ICON, NOMAIL, "") ;
                               toclear = 1 ;
                               do_check() ;
                             }
***************
*** 157,165 ****
--- 162,173 ----
  do_mail(mtype)              /* Monitor a mail file for new or all mail. */
  enum mon_type mtype ;
  {        
+   int eoh ;                 /* Set true, if end of mail header detected. */
    FILE *fp ;                /* File descriptor for users mail spool file. */
    time_t ubuf[2] ;          /* For reseting the access time on spoolfile. */
  
+   static time_t lastmtime ; /* Only look at mailfile when it's changed. */
+ 
    column = row = 0 ;        /* Start in top left corner of pixrect. */
    newmail = 0 ;             /* Assume no new mail. */
    noicons = 0 ;
***************
*** 173,178 ****
--- 181,194 ----
        else make_display() ;     /* Output icons and tidyup chain of records. */
        return ;
      }
+ 
+ /*  See if there is any work to do. If the file hasn't changed, then no need
+  *  to do anythingf but exit.
+  */
+ 
+   if (buf.st_mtime == lastmtime) return ;
+   lastmtime = buf.st_mtime ;
+ 
    if (buf.st_size > lastsize ||
        mhflag && buf.st_size < lastsize && buf.st_size != 0)
      {
***************
*** 200,215 ****
      }
    if (mtype == MONNEW) FSEEK(fp, lastsize, 0) ;
    lastsize = buf.st_size ;
    while (fgets(line, MAXLINE, fp) != NULL)
      {
        if (EQUAL(line, "From "))
          {
            if (froms_found) process_info() ;  /* Process previous mail. */
            process_from() ;                   /* Save new from details. */
          }
!       else if (EQUAL(line, "From:"))   process_from() ;
!       else if (EQUAL(line, "X-Face:")) process_face() ;
!       else if (doing_xface)            process_face() ;
      }
    FCLOSE(fp) ;
  
--- 216,234 ----
      }
    if (mtype == MONNEW) FSEEK(fp, lastsize, 0) ;
    lastsize = buf.st_size ;
+   eoh = FALSE ;
    while (fgets(line, MAXLINE, fp) != NULL)
      {
        if (EQUAL(line, "From "))
          {
            if (froms_found) process_info() ;  /* Process previous mail. */
+           eoh = FALSE ;
            process_from() ;                   /* Save new from details. */
          }
!       else if (*line == '\n')                          eoh = TRUE ;
!       else if (EQUAL(line, "From:")   && eoh == FALSE) process_from() ;
!       else if (EQUAL(line, "X-Face:") && eoh == FALSE) process_face() ;
!       else if (doing_xface            && eoh == FALSE) process_face() ;
      }
    FCLOSE(fp) ;
  
***************
*** 596,601 ****
--- 615,621 ----
  {
    char *host, *user ;
    char temp[MAXLINE], ts[9] ;
+   char from_address[MAXLINE] ;
  
    if (EQUAL(line, "From "))
      {
***************
*** 604,613 ****
        STRCPY(face_ts, ts) ;
        froms_found = 1 ;
      }
!   else
      {
        if (fromc_found) return ;    /* Only process first From: line. */
        fromc_found = 1 ;
      }
  
    if (parsefrom(line, &user, &host))
--- 624,658 ----
        STRCPY(face_ts, ts) ;
        froms_found = 1 ;
      }
!   else if (EQUAL(line, "From:"))
      {
        if (fromc_found) return ;    /* Only process first From: line. */
        fromc_found = 1 ;
+ 
+ /*  An ugly hack: if an alias of a special form (comm/full-address) exists,
+  *  then skip the "From:" lookup. This allows stuff from mailing lists to be
+  *  recognized as such, instead of the individual senders. In people.tab,
+  *  include a line like:
+  *
+  *  someplace/foolist at someplace=mailinglist
+  */
+ 
+       STRCPY(from_address, face_user) ;
+       if (*face_host != '\0')
+         {
+           STRCAT(from_address, "@") ;
+           STRCAT(from_address, face_host) ;
+         }
+       h_to_c(face_host, community) ;
+       a_to_u(community, from_address, realcomm, temp) ;
+       if (strcmp(from_address, realname) != 0)
+         {
+ 
+ /*  Had an entry for the full name, that means don't try to do further
+  *  interpretation of the From:
+  */
+           return ;
+         }
      }
  
    if (parsefrom(line, &user, &host))

------- patchlevel.h -------
*** /tmp/da09638	Mon Jan  7 18:56:10 1991
--- patchlevel.h	Tue Jan  1 11:40:45 1991
***************
*** 14,17 ****
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  9
--- 14,17 ----
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  10

------- README -------
*** /tmp/da09641	Mon Jan  7 18:56:10 1991
--- README	Fri Jan  4 09:44:38 1991
***************
*** 201,237 ****
  5. How to include your compressed face image with mail.
  -------------------------------------------------------
  
! Faces is capable of recognising the compressed face image anywhere in the
! mail message (header or body), but the best place to put it is in the mail
! header (out of the way).
  
  It is suggested that each user store the compressed image (generated by
! compface) in a file called .face in their home directory. For example, my
  .face file contains:
  
  *7O.<19S{MCsaxxe=iCc*y5!i:>e,K40m^btp"<`~gNx5>o?eJMzUng=j]%KybY
  \/VaZ/3a4pD%#rGu7D<M$.TDpaDN8#8eJC&^^&Mr]@~}Pa,*F-ePrMg5.}e,,bu
  qROdT{Vzn{!ouXy.&*#V#Q&Zf7a8lX2Kb}"$UT^VhnsJ?){wFU5r+,duO>4 at L
  
- Note that there is no initial "X-Face:" and leading spaces have been
- removed from each line.
- 
  To automatically include this into a header into an Elm mail message, just
  add the following line to your .elm/elmheaders file:
  
      X-Face: `cat $HOME/.face`
  
- Included with this faces distribution, is an unofficial patch to mush v7.1.2
- to allow for X-Face support. The Mush mail program will look for the
- existence of a .face file (in the above format) in the users home directory,
- and generate a similar header.
  
- For users of other mailers, it is suggested that the X-Face: line[s] be
- added to your .signature file. Note that in this case, the initial line
- should have "X-Face: " prepended, and second and subsequent lines should
- start with at least one whitespace character.
- 
- 
  6. Automatically updating the faces database.
  ---------------------------------------------
  
--- 201,255 ----
  5. How to include your compressed face image with mail.
  -------------------------------------------------------
  
! As of patch #10 to v1.4, faces is capable of recognising the compressed face
! image only in the mail message header. Previous to this, it was also
! recognised in the body of the message. The latter case causes problems when
! a mail message includes other messages with X-Face: lines.
  
+ The following method works for Berkeley Mail (aka /usr/ucb/mail), Open
+ Windows mailtool and mush. It probably works for others too. Note that the
+ special patch to the mush mail source is no longer needed. It fact, if you
+ are using a version of mush which has this patch applied, you should un-apply
+ it before making the changes listed below, otherwise you will have two sets
+ of X-Face lines in your mail headers. The file mush.xface.patch can be
+ removed from this faces distribution.
+ 
  It is suggested that each user store the compressed image (generated by
! compface) in a file called .face in their home directory. The first line
! should have the X-Face: prepended; second and subsequent lines should have
! a preceding tab, and there should be a trailing blank line. For example, my
  .face file contains:
  
+ ------CUT HERE------START------CUT HERE------
+ X-Face: *7O.<19S{MCsaxxe=iCc*y5!i:>e,K40m^btp"<`~gNx5>o?eJMzUng=j]%KybY
+ 	\/VaZ/3a4pD%#rGu7D<M$.TDpaDN8#8eJC&^^&Mr]@~}Pa,*F-ePrMg5.}e,,bu
+ 	qROdT{Vzn{!ouXy.&*#V#Q&Zf7a8lX2Kb}"$UT^VhnsJ?){wFU5r+,duO>4 at L
+ 
+ ------CUT HERE-------END-------CUT HERE------
+ 
+ Each user should add the line:
+ 
+ set sendmail=/usr/local/bin/faces.sendmail
+ 
+ to their ~/.mailrc file, where /usr/local/bin is equivalent to the BINDIR
+ definition in the Makefile. This small shell script will be installed when
+ you do a "make install".
+ 
+ A similar method exists with the Elm mailer. The user's compressed face
+ image should be setup in a ~/.face file, but without the initial "X-Face:",
+ and leading spaces removed from each line. There is also no trailing blank
+ line. Here's an example:
+ 
  *7O.<19S{MCsaxxe=iCc*y5!i:>e,K40m^btp"<`~gNx5>o?eJMzUng=j]%KybY
  \/VaZ/3a4pD%#rGu7D<M$.TDpaDN8#8eJC&^^&Mr]@~}Pa,*F-ePrMg5.}e,,bu
  qROdT{Vzn{!ouXy.&*#V#Q&Zf7a8lX2Kb}"$UT^VhnsJ?){wFU5r+,duO>4 at L
  
  To automatically include this into a header into an Elm mail message, just
  add the following line to your .elm/elmheaders file:
  
      X-Face: `cat $HOME/.face`
  
  
  6. Automatically updating the faces database.
  ---------------------------------------------
  
***************
*** 264,269 ****
--- 282,290 ----
  
  James Ashton for the mail header face compression / uncompression code.
  
+ John Mackin for the faces.sendmail shell script, which is used to automatically
+ put the compressed X-Face: image lines in your mail headers.
+ 
  Pat Lashley for fixing up the NeWS version; modifying it to use cps, and
  improving the quality of the NeWS code. Pat also added the ability to use
  the Sun NIS, to look for hosts not found in the machines.tab file.
***************
*** 276,282 ****
  Hal Stern for the face_update shell script.
  
  Dan Heller and Bart Schaefer for suggesting what should be in the unofficial
! patch to mush v7.1.2 to support X-Face lines.
  
  Guy Harris for the basis of the previous manual page.
  
--- 297,304 ----
  Hal Stern for the face_update shell script.
  
  Dan Heller and Bart Schaefer for suggesting what should be in the unofficial
! patch to mush v7.1.2 to support X-Face lines. Note that this is no longer
! needed.
  
  Guy Harris for the basis of the previous manual page.
  
***************
*** 311,318 ****
  Lashley, Dave Glowacki, Chris Steinbroner, Steven M. Miller, Bob Posert,
  Hugues Leroy, Graham Dumpleton, Michael Schmidt, Robert Adams, Rod Whitby,
  Greg Rose, Mike Khaw, Ian Darwin, Ken Wood, Lindsay F. Marshall, Bruno
! Pillard and Johan Vromans for various bug reports, fixes and suggestions
! for improvement.
  
  
  ----------------------------------------------------------------------------
--- 333,340 ----
  Lashley, Dave Glowacki, Chris Steinbroner, Steven M. Miller, Bob Posert,
  Hugues Leroy, Graham Dumpleton, Michael Schmidt, Robert Adams, Rod Whitby,
  Greg Rose, Mike Khaw, Ian Darwin, Ken Wood, Lindsay F. Marshall, Bruno
! Pillard, Johan Vromans, Chris Mackerell, Howard Pelling and Alan Skea for
! various bug reports, fixes and suggestions for improvement.
  
  
  ----------------------------------------------------------------------------
***************
*** 321,324 ****
  and comments.
  
  Rich Burridge,          DOMAIN: richb at Aus.Sun.COM
! PHONE: +61 2 413 2666   ACSnet: richb at sunaus.sun.oz.au
--- 343,346 ----
  and comments.
  
  Rich Burridge,          DOMAIN: richb at Aus.Sun.COM
! PHONE: +61 2 413 2666   ACSnet: richb at sunaus.sun.oz

------- faces.1 -------
*** /tmp/da09644	Mon Jan  7 18:56:11 1991
--- faces.1	Fri Jan  4 08:48:17 1991
***************
*** 1,6 ****
  .\" %Z%%M% %I% %E%
  .\" tbl faces.1 | nroff -man
! .TH FACES 1 "26 June 1990"
  .SH NAME
  faces \- visual mail, user and print face server.
  .SH SYNOPSIS
--- 1,6 ----
  .\" %Z%%M% %I% %E%
  .\" tbl faces.1 | nroff -man
! .TH FACES 1 "4 January 1991"
  .SH NAME
  faces \- visual mail, user and print face server.
  .SH SYNOPSIS
***************
*** 490,495 ****
--- 490,557 ----
  .B "NOMAIL, NOPAPER, NOPRINT "
  and
  .B "NOUSERS."
+ .SH XFACE SUPPORT
+ .I Faces
+ is capable of recognising a compressed face image in the mail message header.
+ It uses special X-Face: lines to do this. It is very simple to add your
+ compressed face image to a mail header.
+ .LP
+ The following method works for Berkeley Mail (aka /usr/ucb/mail), Open
+ Windows mailtool and mush. It probably works for others too.
+ .LP
+ It is suggested that each user store the compressed image (generated by
+ .I compface
+ ) in a file called
+ .I .face
+ in their home directory. See the compface manual page for more information
+ on how to generate the compressed face image. The first line should have the
+ X-Face: prepended; second and subsequent lines should have a preceding tab,
+ and there should be a trailing blank line. Here is a typical
+ .I .face file:
+ .LP
+ .sp 0.5
+ .nf
+ X-Face: *7O.<19S{MCsaxxe=iCc*y5!i:>e,K40m^btp"<`~gNx5>o?eJMzUng=j]%KybY
+ 	\/VaZ/3a4pD%#rGu7D<M$.TDpaDN8#8eJC&^^&Mr]@~}Pa,*F-ePrMg5.}e,,bu
+ 	qROdT{Vzn{!ouXy.&*#V#Q&Zf7a8lX2Kb}"$UT^VhnsJ?){wFU5r+,duO>4 at L
+ .sp 1.5
+ .fi
+ Each user should add the line:
+ .LP
+ .sp 0.5 
+ .nf
+ set sendmail=/usr/local/bin/faces.sendmail
+ .sp 1.5
+ .fi 
+ to their
+ .I ~/.mailrc
+ file, where
+ .I /usr/local/bin
+ is the directory where your
+ .I faces
+ binaries were installed.
+ .LP 
+ A similar method exists with the Elm mailer. The user's compressed face
+ image should be setup in a
+ .I ~/.face
+ file, but without the initial "X-Face:", and leading spaces removed from
+ each line. There is also no trailing blank line. Here's an example:
+ .LP
+ .sp 0.5
+ .nf
+ *7O.<19S{MCsaxxe=iCc*y5!i:>e,K40m^btp"<`~gNx5>o?eJMzUng=j]%KybY
+ \/VaZ/3a4pD%#rGu7D<M$.TDpaDN8#8eJC&^^&Mr]@~}Pa,*F-ePrMg5.}e,,bu
+ qROdT{Vzn{!ouXy.&*#V#Q&Zf7a8lX2Kb}"$UT^VhnsJ?){wFU5r+,duO>4 at L
+ .sp 1.5
+ .fi 
+ To automatically include this into a header into an Elm mail message, just
+ add the following line to your .elm/elmheaders file:
+ .LP
+ .sp 0.5
+ .nf 
+ X-Face: `cat $HOME/.face`
+ .sp 1.5
+ .fi
  .SH "SEE ALSO"
  mail(1), elm(1), mush(1), aliases(7).
  .SH FILES

------- Makefile -------
*** /tmp/da09647	Mon Jan  7 18:56:12 1991
--- Makefile	Fri Jan  4 09:45:43 1991
***************
*** 247,253 ****
  HDRS		= extern.h faces.h patchlevel.h
  IMAGES		= noface.icon nomail.icon noprint.icon nopaper.icon \
  		  nousers.icon
! OTHERS		= CHANGES README TODO MANIFEST FILES \
  		  faces.1 face_update.1 faces_cps.cps Makefile face_update
  
  SFILES1		= mon.c main.c rec.c
--- 247,253 ----
  HDRS		= extern.h faces.h patchlevel.h
  IMAGES		= noface.icon nomail.icon noprint.icon nopaper.icon \
  		  nousers.icon
! OTHERS		= CHANGES README TODO MANIFEST FILES faces.man.text \
  		  faces.1 face_update.1 faces_cps.cps Makefile face_update
  
  SFILES1		= mon.c main.c rec.c
***************
*** 255,262 ****
  SFILES3		= xview.c x11.c $(HDRS)
  SFILES4		= CHANGES README TODO MANIFEST FILES Makefile
  SFILES5		= faces.1 face_update.1 faces_cps.cps face_update \
! 		  mush.xface.patch $(IMAGES)
! SFILES6		= $(FACES) $(FILTERS)
  SFILES7		= $(COMPFACE)
  
  NEWSLIBS	= $(NEWSLIBDIR) -lcps
--- 255,262 ----
  SFILES3		= xview.c x11.c $(HDRS)
  SFILES4		= CHANGES README TODO MANIFEST FILES Makefile
  SFILES5		= faces.1 face_update.1 faces_cps.cps face_update \
! 		  faces.sendmail $(IMAGES)
! SFILES6		= faces.man.text $(FACES) $(FILTERS)
  SFILES7		= $(COMPFACE)
  
  NEWSLIBS	= $(NEWSLIBDIR) -lcps
***************
*** 326,335 ****
  		(cd filters; $(MAKE) $(MAKEOPTS) install)
  		install -s -m 751 faces $(BINDIR)
  		install -c -m 755 face_update $(BINDIR)
  		install -c -m 644 faces.1 \
  				$(MANDIR)/man$(MANSECT)/faces.$(MANSECT)
  		install -c -m 644 face_update.1 \
! 				$(MANDIR)/man$(MANSECT)face_update.$(MANSECT)
  
  clean:
  		(cd compface; $(MAKE) $(MAKEOPTS) clean)
--- 326,336 ----
  		(cd filters; $(MAKE) $(MAKEOPTS) install)
  		install -s -m 751 faces $(BINDIR)
  		install -c -m 755 face_update $(BINDIR)
+ 		install -c -m 755 faces.sendmail $(BINDIR)
  		install -c -m 644 faces.1 \
  				$(MANDIR)/man$(MANSECT)/faces.$(MANSECT)
  		install -c -m 644 face_update.1 \
! 				$(MANDIR)/man$(MANSECT)/face_update.$(MANSECT)
  
  clean:
  		(cd compface; $(MAKE) $(MAKEOPTS) clean)

------- MANIFEST -------
*** /tmp/da09650	Mon Jan  7 18:56:12 1991
--- MANIFEST	Fri Jan  4 09:47:28 1991
***************
*** 10,17 ****
  TODO                                   |    4
  Makefile                               |    4
  faces.1                                |    5
  face_update.1                          |    5
- mush.xface.patch                       |    5
  face_update                            |    4
  main.c                                 |    1
  get.c                                  |    2
--- 10,18 ----
  TODO                                   |    4
  Makefile                               |    4
  faces.1                                |    5
+ faces.man.text                         |    5
+ faces.sendmail                         |    5
  face_update.1                          |    5
  face_update                            |    4
  main.c                                 |    1
  get.c                                  |    2

------- x11.c -------
*** /tmp/da09653	Mon Jan  7 18:56:13 1991
--- x11.c	Fri Jan  4 09:03:04 1991
***************
*** 21,28 ****
--- 21,33 ----
  #include <sys/types.h>
  #include <sys/time.h>
  #else
+ #ifdef SYSTYPE_BSD43
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #else
  #include <bsd/sys/types.h>
  #include <bsd/sys/time.h>
+ #endif
  #endif
  #include "faces.h"
  #include "extern.h"

------- TODO -------
*** /tmp/da09656	Mon Jan  7 18:56:14 1991
--- TODO	Mon Jan  7 18:46:17 1991
***************
*** 1,14 ****
! 1/ From Lindsay F. Marshall <Lindsay.Marshall%newcastle.ac.uk at munnari.oz>
     The domain name munging (i..e a.b.c -> b.c -> c) doesnt
     seem to work at all, and of course its the wrong way round
     for the uk anyway.
  
! 2/ From Ian Donaldson <rcodi at melomys.co.rmit.oz>
     Is it possible to have the faces cleared automatically once the
     mail has been read?  I'm clearing by clicking on the window at
     the moment.
  
! 3/ From Pat Lashley <patl at Sun.COM>
     Have you given any thought to how to support multiple windowing systems at
     execution time?  I am currently using the sun386i version of architecture
     independant /vol trees to make locally installed programs available
--- 1,14 ----
! *  From Lindsay F. Marshall <Lindsay.Marshall%newcastle.ac.uk at munnari.oz>
     The domain name munging (i..e a.b.c -> b.c -> c) doesnt
     seem to work at all, and of course its the wrong way round
     for the uk anyway.
  
! *  From Ian Donaldson <rcodi at melomys.co.rmit.oz>
     Is it possible to have the faces cleared automatically once the
     mail has been read?  I'm clearing by clicking on the window at
     the moment.
  
! *  From Pat Lashley <patl at Sun.COM>
     Have you given any thought to how to support multiple windowing systems at
     execution time?  I am currently using the sun386i version of architecture
     independant /vol trees to make locally installed programs available
***************
*** 19,34 ****
     windowing system is in use, and envoke the appropriate binary. The difficulty
     is in how to determine which system is in use.
  
! 4/ From: Chris Orgill, cho%cs.aber.ac.uk at uunet.uu.net
     How about allowing the Sunview version to use arbitrary size Sun icons ?
  
! 5/ From Lindsay F. Marshall <Lindsay.Marshall%newcastle.ac.uk at munnari.oz>
     There is a byte-order assumption somewhere that screws up
     any X bitmaps read in from a file - why dont you use the
     procedure provided by the system rather than writing your
     own?? That copes with the problems correctly.
  
! 6/ The NeWS version needs to be finished.
     Remaining problems are:
  
      (a) There are two warnings on compiling news.c, due to FILE operations
--- 19,34 ----
     windowing system is in use, and envoke the appropriate binary. The difficulty
     is in how to determine which system is in use.
  
! *  From: Chris Orgill, cho%cs.aber.ac.uk at uunet.uu.net
     How about allowing the Sunview version to use arbitrary size Sun icons ?
  
! *  From Lindsay F. Marshall <Lindsay.Marshall%newcastle.ac.uk at munnari.oz>
     There is a byte-order assumption somewhere that screws up
     any X bitmaps read in from a file - why dont you use the
     procedure provided by the system rather than writing your
     own?? That copes with the problems correctly.
  
! *  The NeWS version needs to be finished.
     Remaining problems are:
  
      (a) There are two warnings on compiling news.c, due to FILE operations
***************
*** 37,64 ****
      (b) The new input functionality (click left/middle mouse, raise window,
          Del, ^L and q) has to be added in.
  
! 7/ With the XView version, add a Properties pinup window which would
     allow you to change the various monitoring options on the fly.
  
! 8/ Add in audio capabilities.
  
! 9/ From Pat Lashley <patl at Sun.COM>
     There is no reason that FaceSaver images couldn't be parsed by faces and
     sent to NeWS with the appropriate transformation matrix to squeeze it down
     to icon size.  Let the NeWS PostScript interpreter do the bit
     compression/dithering.
  
! 10/ If an X-Face is found inside a piece of mail that has been forwarded
!     inside another mail item, and the -U option is set, then it is possible
!     to update the wrong face in the faces database. The only clean solution
!     to this, is if faces only recognises X-Face lines in the mail header.
! 
!     From Pat Lashley <patl at Sun.COM>
!     The problem with finding an X-Face: entry in an included message can be
!     resolved by a flag which would restrict X-Face: recognition to the header
!     or the first non-blank line of the body.
! 
! 11/ From Pat Lashley <patl at Sun.COM>
      An entry of the form `+domainname=community' in the machines.tab file to
      indicate that if a hostname is found without domain specifier, and it
      doesn't match any other machines.tab entry, and YP (oops, NIS) access to
--- 37,54 ----
      (b) The new input functionality (click left/middle mouse, raise window,
          Del, ^L and q) has to be added in.
  
! *  With the XView version, add a Properties pinup window which would
     allow you to change the various monitoring options on the fly.
  
! *  Add in audio capabilities.
  
! *  From Pat Lashley <patl at Sun.COM>
     There is no reason that FaceSaver images couldn't be parsed by faces and
     sent to NeWS with the appropriate transformation matrix to squeeze it down
     to icon size.  Let the NeWS PostScript interpreter do the bit
     compression/dithering.
  
! *   From Pat Lashley <patl at Sun.COM>
      An entry of the form `+domainname=community' in the machines.tab file to
      indicate that if a hostname is found without domain specifier, and it
      doesn't match any other machines.tab entry, and YP (oops, NIS) access to
***************
*** 67,99 ****
      indicates that the current NIS domain should be used.  This should
      probably be enabled by a compile-time option for those who don't run NIS.
  
! 12/ From Pat Lashley <patl at Sun.COM>
      An option to display unknown users individually with the username,
      instead of clustered under a single `unknown' user.  Really hot would be
      some way to specify this on a per-community basis...
  
! 13/ From Pat Lashley <patl at Sun.COM>
      Multiple face directory hierarchies. I.e:
      `-f $HOME/facedir -f /import/group/facedir -f /import/global/facedir ...'
      The order of specification would indicate the search order.
  
! 14/ From Pat Lashley <patl at Sun.COM>
      Accept SIGHUP as an indication that various internal databases should be
      updated from the files (i.e. machines.tab), and that the display should be
      immediatly updated to reflect current state instead of waiting for the
      polling period to end.
  
! 15/ From Pat Lashley <patl at Sun.COM>
      Accept SIGALRM as an indication that the current polling period should be
      immediatly terminated, and the display updated.
  
! 16/ From Pat Lashley <patl at Sun.COM>
      More internal comments and a general design document.
  
! 17/ Provide a template of what each of the independent graphics routine do,
      to aid porting to new graphics environments.
  
! 18/ From John Mackin <john at cs.su.oz.au>
      If the mailbox is empty, or contains just one mail item, faces -a starts
      out 10 icon-widths long (with the right-hand part being white instead of
      background grey), then shrinks to one icon-width as soon as a mail item
--- 57,89 ----
      indicates that the current NIS domain should be used.  This should
      probably be enabled by a compile-time option for those who don't run NIS.
  
! *   From Pat Lashley <patl at Sun.COM>
      An option to display unknown users individually with the username,
      instead of clustered under a single `unknown' user.  Really hot would be
      some way to specify this on a per-community basis...
  
! *   From Pat Lashley <patl at Sun.COM>
      Multiple face directory hierarchies. I.e:
      `-f $HOME/facedir -f /import/group/facedir -f /import/global/facedir ...'
      The order of specification would indicate the search order.
  
! *   From Pat Lashley <patl at Sun.COM>
      Accept SIGHUP as an indication that various internal databases should be
      updated from the files (i.e. machines.tab), and that the display should be
      immediatly updated to reflect current state instead of waiting for the
      polling period to end.
  
! *   From Pat Lashley <patl at Sun.COM>
      Accept SIGALRM as an indication that the current polling period should be
      immediatly terminated, and the display updated.
  
! *   From Pat Lashley <patl at Sun.COM>
      More internal comments and a general design document.
  
! *   Provide a template of what each of the independent graphics routine do,
      to aid porting to new graphics environments.
  
! *   From John Mackin <john at cs.su.oz.au>
      If the mailbox is empty, or contains just one mail item, faces -a starts
      out 10 icon-widths long (with the right-hand part being white instead of
      background grey), then shrinks to one icon-width as soon as a mail item
***************
*** 105,115 ****
      window, and shrinks the window back to one row/-c widths when it is
      cleared.
  
! 19/ From Pat Lashley <patl at Sun.COM>
      Change window header to show what is being monitored (mail, lp1, users,
      etc.)
  
! 20/ From Pat Lashley <patl at Sun.COM>
      A mixed-mode version which would use xview for the basic windowing and
      property sheets; but use NeWS for the rendering. It is, of course,
      dependant upon having the X/NeWS server, but there may be some way to
--- 95,105 ----
      window, and shrinks the window back to one row/-c widths when it is
      cleared.
  
! *   From Pat Lashley <patl at Sun.COM>
      Change window header to show what is being monitored (mail, lp1, users,
      etc.)
  
! *   From Pat Lashley <patl at Sun.COM>
      A mixed-mode version which would use xview for the basic windowing and
      property sheets; but use NeWS for the rendering. It is, of course,
      dependant upon having the X/NeWS server, but there may be some way to
***************
*** 116,150 ****
      determine at run-time whether the NeWS operations are available, or
      whether to stick to XView/X11 mechanisms.
  
! 21/ From Kee Hinckley <nazgul at alphalpha.com>
      Any possibility of changing that header to an RFC1154 (I think that's
      the number) conformant form?  Namely an encoding field in the
      header (presumbably with a new name for the faces format, or using
      one of the existing ones (G3Fax uuencode would probably be good)).
  
! 22/ Get the SunView, XView and NeWS drivers to use the -bg and -fg color
      options.
  
! 23/ From Ken Wood <kwood at adl.austek.oz.au>
      Do you have any plans to get xfaces to read geometry etc from the
      database ?
  
! 24/ When the -w and/or -h options are used with the SunView version, the
      size of the icon created is incorrect.
  
! 25/ From John Mackin <john at cs.su.oz.au>
      The usage message claims you can use "-bg background_color". This isn't
      in the manual page, and it also doesn't work at all (under X11). The
      argument appears to be completely ignored
  
! 26/ From John Mackin <john at cs.su.oz.au>
      The "-b icon_file" option doesn't work. It still comes up with the
      default background.
  
! 27/ From John Mackin <john at cs.su.oz.au>
!     The manual entry makes no mention of X-Face: lines.  
! 
! 28/ From John Mackin <john at cs.su.oz.au>
      It should be made more explicit in the manual page that in the
      previous version of faces, a -f option _added_ the directory to
      the face search path, so that if you did -f you got those faces
--- 106,137 ----
      determine at run-time whether the NeWS operations are available, or
      whether to stick to XView/X11 mechanisms.
  
! *   From Kee Hinckley <nazgul at alphalpha.com>
      Any possibility of changing that header to an RFC1154 (I think that's
      the number) conformant form?  Namely an encoding field in the
      header (presumbably with a new name for the faces format, or using
      one of the existing ones (G3Fax uuencode would probably be good)).
  
! *   Get the SunView, XView and NeWS drivers to use the -bg and -fg color
      options.
  
! *   From Ken Wood <kwood at adl.austek.oz.au>
      Do you have any plans to get xfaces to read geometry etc from the
      database ?
  
! *   When the -w and/or -h options are used with the SunView version, the
      size of the icon created is incorrect.
  
! *   From John Mackin <john at cs.su.oz.au>
      The usage message claims you can use "-bg background_color". This isn't
      in the manual page, and it also doesn't work at all (under X11). The
      argument appears to be completely ignored
  
! *   From John Mackin <john at cs.su.oz.au>
      The "-b icon_file" option doesn't work. It still comes up with the
      default background.
  
! *   From John Mackin <john at cs.su.oz.au>
      It should be made more explicit in the manual page that in the
      previous version of faces, a -f option _added_ the directory to
      the face search path, so that if you did -f you got those faces
***************
*** 152,158 ****
      _supersedes_ the system faces and you must include a trailing
      colon to have them searched.
  
! 29/ From John Mackin <john at cs.su.oz.au>
      A comment on the domain lookup algorithm. According to the manual page:
   
             $DIR/machine.dom.ain/uid/iconname
--- 139,145 ----
      _supersedes_ the system faces and you must include a trailing
      colon to have them searched.
  
! *   From John Mackin <john at cs.su.oz.au>
      A comment on the domain lookup algorithm. According to the manual page:
   
             $DIR/machine.dom.ain/uid/iconname
***************
*** 181,192 ****
      The idea is that at each level, if the next component exists and is
      a directory, you descend into it and look there.
  
! 30/ From John Mackin <john at cs.su.oz.au>
!     The code in mon.c recognises From: lines in the body of the mail.
!     This is an error. From: lines should only be recognised before
!     the first blank line.  
!  
! 31/ From John Mackin <john at cs.su.oz.au>
      You test if the beginning of the line is identically equal to
      "X-Face:" or "From:". This is contrary to RFC822, which specifies
  
--- 168,174 ----
      The idea is that at each level, if the next component exists and is
      a directory, you descend into it and look there.
  
! *   From John Mackin <john at cs.su.oz.au>
      You test if the beginning of the line is identically equal to
      "X-Face:" or "From:". This is contrary to RFC822, which specifies
  
***************
*** 196,210 ****
            the field-name and the colon (so "FRoM  : Foo Bar <foo at bar>"
            should work).  
   
! 32/ From John Mackin <john at cs.su.oz.au>
      The RFC822 address parsing in parsefrom.c appears, on quick
      inspection, to be grossly inadequate.  (It certainly doesn't
      handle comments in addresses, for one thing.)
  
! 33/ From Alan Skea <skea at prl.dec.com>
      If you are running faces with the -a option, and mail arrived from
      x at y with an X-Face: line then another article arrives from x at y with
      a different X-Face: line, then the second face is not shown; just
      the count of the first face get's incremented.
  
! 34/ Optimise.
--- 178,196 ----
            the field-name and the colon (so "FRoM  : Foo Bar <foo at bar>"
            should work).  
   
! *   From John Mackin <john at cs.su.oz.au>
      The RFC822 address parsing in parsefrom.c appears, on quick
      inspection, to be grossly inadequate.  (It certainly doesn't
      handle comments in addresses, for one thing.)
  
!     Here's an example that fails:
! 
!     From: user at host.dom.ain (A (Nested) Comment)
! 
! *   From Alan Skea <skea at prl.dec.com>
      If you are running faces with the -a option, and mail arrived from
      x at y with an X-Face: line then another article arrives from x at y with
      a different X-Face: line, then the second face is not shown; just
      the count of the first face get's incremented.
  
! *   Optimise.

------- CHANGES -------
*** /tmp/da09659	Mon Jan  7 18:56:14 1991
--- CHANGES	Mon Jan  7 18:52:58 1991
***************
*** 532,534 ****
--- 532,625 ----
           - The RFC822 address parsing in parsefrom.c appears, on quick
             inspection, to be grossly inadequate.  (It certainly doesn't
             handle comments in addresses, for one thing.)
+ 
+ v1.4 - patchlevel 10 - 7th January 1991.
+ 
+          - Faces now only looks for X-Face: lines in the mail header, now
+            that there is a simple method for everybody to get their X-Face:
+            lines into the mail header (see below). This fixes up the following
+            problems (which have been removed from the TODO file):
+ 
+            If an X-Face is found inside a piece of mail that has been
+            forwarded inside another mail item, and the -U option is set, then
+            it is possible to update the wrong face in the faces database. The
+            only clean solution to this, is if faces only recognises X-Face
+            lines in the mail header.
+ 
+            From Pat Lashley <patl at Sun.COM>
+            The problem with finding an X-Face: entry in an included message
+            can be resolved by a flag which would restrict X-Face: recognition
+            to the header or the first non-blank line of the body.
+ 
+          - From John Mackin <john at cs.su.oz.au>
+            The code in mon.c recognises From: lines in the body of the mail.
+            This is an error. From: lines should only be recognised before
+            the first blank line.
+ 
+          - From John Mackin <john at cs.su.oz.au>
+            A small shell script called faces.sendmail has been written, which
+            will automatically add X-Face: compressed image lines to a mail
+            header. This is used in conjunction with the set sendmail entry in
+            a user's ~/.mailrc file. See the README file and the faces manual
+            pages for more details. This method is known to work with Berkeley
+            Mail, Open Windows mailtool and mush. It should work with other
+            mailers too. The special patch to mush is no longer needed; in
+            fact if it has been applied, it should be un-applyed otherwise you
+            will get two sets of X-Face: lines in your mail headers. The
+            mush.xface.patch file can be removed from the faces distribution.
+            FILES, MANIFEST, Makefile, README and faces.1 have been updated.
+ 
+          - From John Mackin <john at cs.su.oz.au>
+            The manual entry makes no mention of X-Face: lines.
+ 
+          - From Mike Khaw <khaw at parcplace.com>
+            The "install" target for the Makefile is missing a "/" between
+            $(MANSECT) and face_update; i.e., the last line should be
+ 
+                 $(MANDIR)/man$(MANSECT)/face_update.$(MANSECT)
+ 
+          - From Chris Mackerell <chris at bcl.co.nz>
+            Changes to faces to get it compile in the BSD4.3 environment of
+            Mips RISCos 4.5 (beta).
+ 
+          - From brew%qa at tplrd.tpl.oz.au
+            There is a problem parsing the address from which mail comes
+            if the address looks like
+ 
+ 	   From: person at machine
+ 
+            ie: no "(comment)" after it.  You parse this so that the machine
+            name has a trailing '\n'.
+ 
+            Although I sometimes get mail like this, perhaps this is not correct
+            RFC822 syntax.
+ 
+          - From Chris Maltby <chris at softway.sw.oz.au>
+            It the user had cleared the faces window by hitting the Del key,
+            the icon wasn't being reset to the "no mail" icon.
+ 
+          - From Howard Pelling <Howard.Pelling at UK.Sun.COM>
+            Modifications to allow faces to recognise partial domains in the
+            machine.tab file. Eg. mail from bristol.ac.uk and edinburgh.ac.uk
+            will come from the same community.
+ 
+          - From Graham Dumpleton <grahamd at otc.otca.oz>
+            From Alan Skea <skea at vast.eecs.unsw.oz>
+            If the From: line just had a username (no hostname), then the
+            trailing newline was not being removed (in parsefrom.c).
+ 
+          - A plain text version of the faces manual pages is now included with
+            the faces distribution. It's called faces.man.text.
+ 
+          - From Gregory Dudek  <dudek at daeron.McRCIM.McGill.EDU>
+            In process_info() in mon.c, don't do anything if the mailbox hasn't
+            changed since the last look.
+ 
+          - From Gregory Dudek  <dudek at daeron.McRCIM.McGill.EDU>
+            In process_from() in mon.c, I've added an UGLY hack so that mailing
+            lists could be recognized as such, rather than causing zillions of
+            different unknown's to appear. It expects an ugly ugly magic trick
+            in people.tab. The mailing list must appear as
+            listplace/list at listplace  eg.
+ 
+            ics.UCI.EDU/fa.think-c-outbound-request at ics.UCI.EDU

------- FILES -------
*** /tmp/da09662	Mon Jan  7 18:56:15 1991
--- FILES	Fri Jan  4 09:48:04 1991
***************
*** 10,18 ****
  TODO            - suggested enhancements. Volunteers anyone?
  Makefile        - used to build faces on Unix systems.
  faces.1         - the faces manual page (tbl + troff/nroff -man format).
  face_update     - shell script to automatically update the faces database.
  face_update.1   - the face_update manual page (troff/nroff -man format)
- mush.xface.patch - unofficial patch to mush v7.1.2 to support X-Face lines.
  
  main.c          - STANDARD SOURCE FILES: includes declarations and main().
  get.c           - routines to get information, objects, icons etc..
--- 10,19 ----
  TODO            - suggested enhancements. Volunteers anyone?
  Makefile        - used to build faces on Unix systems.
  faces.1         - the faces manual page (tbl + troff/nroff -man format).
+ faces.man.text  - plain text version of the faces manual pages.
+ faces.sendmail  - shell script to add X-Face: lines to a mail header.
  face_update     - shell script to automatically update the faces database.
  face_update.1   - the face_update manual page (troff/nroff -man format)
  
  main.c          - STANDARD SOURCE FILES: includes declarations and main().
  get.c           - routines to get information, objects, icons etc..

------- parsefrom.c -------
*** /tmp/da09665	Mon Jan  7 18:56:16 1991
--- parsefrom.c	Fri Jan  4 09:26:57 1991
***************
*** 44,50 ****
  			/* RFC822 - two formats
  			 * From: comment <address>
  			 * From: address (comment)
! 			 */
  			if ((p = index(user, '<')) != NULL) {
  				user = ++p;
  				if ((p = index(user, '>')) != NULL)
--- 44,53 ----
  			/* RFC822 - two formats
  			 * From: comment <address>
  			 * From: address (comment)
! 			 *
!                          * Will also handle:
!                          * From: address
!                          */
  			if ((p = index(user, '<')) != NULL) {
  				user = ++p;
  				if ((p = index(user, '>')) != NULL)
***************
*** 52,58 ****
  				else
  					return 0;
  			}
! 			else if ((p = rindex(user, '(')) != NULL) {
  				do
  					*p = '\0';
  				while (*--p == ' ' || *p == '\t');
--- 55,62 ----
  				else
  					return 0;
  			}
! 			else if ((p = rindex(user, '(' )) != NULL ||
! 				 (p = rindex(user, '\n')) != NULL) {
  				do
  					*p = '\0';
  				while (*--p == ' ' || *p == '\t');
***************
*** 100,105 ****
--- 104,111 ----
  	else if ((p = index(host, '.')) != NULL)
  		*p = '\0';
  #endif	/* NODOMAINS */
+ 	if ((p = index(user, '\n')) != NULL)
+ 		*p = '\0';
  	if ((p = index(host, '\n')) != NULL)
  		*p = '\0';
  	*hostp = host;



More information about the Comp.sources.bugs mailing list