v13i073: Faces v1.4.5: a visual list monitor for mail etc.. (Part 4 of 7).

Rich Burridge rburridge at Sun.COM
Tue Jul 3 09:55:15 AEST 1990


Posting-number: Volume 13, Issue 73
Submitted-by: rburridge at Sun.COM (Rich Burridge)
Archive-name: faces-1.4.5/part04

------CUT HERE------faces.part4------CUT HERE------
#! /bin/sh
# this is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh to create the files:
#	CHANGES
#	README
#	TODO
#	MANIFEST
#	FILES
#	Makefile
# This archive created: Fri Jun 29 10:45:12 EST 1990
#
#
export PATH; PATH=/bin:$PATH
#
if [ -f CHANGES ]
then
echo shar: will not over-write existing file CHANGES
else
echo shar: extracting 'CHANGES',     5936 characters
cat > CHANGES <<'Funky_Stuff'

Faces change history.
---------------------

v1.4 - patchlevel 0. - started 7th June 1990.

       released to volunteers for various enhancements.

v1.4 - patchlevel 1 - 19th June 1990.

       copy sent to James Ashton for uncompression enhancements.

v1.4 - patchlevel 2 - 20th June 1990.

       copy sent to various people for internal testing.

v1.4 - patchlevel 3 - 21st June 1990.

       version made available internally via anon ftp and the mail server.
       also made available via fetchfile in Australia for beta testing.

v1.4 - patchlevel 4 - 26th June 1990.

       * From Pat Lashley <patl at Sun.COM>
         made several adjustments to the Makefile to get "make install" to
         work properly.

       * From Steve Piette <Steve.Piette at Central.Sun.COM>
         added a missing i from an int (nt) declaration in xview.c.

       * included a new version of the face_update script. This version
         logs an entry for each update in a logfile (var/log/facelog by
         default. The script also has support for the "old" style of the
         faces database, where the username was the ikon.

       * created a manual page for face_update (face_update.1). Updated
         MANIFEST, FILES and Makefile to reflect this change.

       * From Pat Lashley <patl at Sun.COM>
         the NeWS version has been fixed. The NeWS PostScript code has
         been converted to use cps, and a faces_cps.cps file has been generated.
         The news.c C frontend, has been rewritten to use the new cps
         routines. The NeWS code has been changed to be more object oriented.

       * From Cameron Humphries <cameron at cs.flinders.oz.au>
         From Chris Maltby <chris at softway.sw.oz.au>
         From Rich McAllister <rfm at Eng>
         From Hakon Lie <howcome at Eng>
         From Darryl K. Ramm <darryl at pyrmania.oz.au>
         From Tony Landells <ahl at technix.oz.au>
         Need to include <ctype.h> in get.c

       * From Rick Gunderson <rickg at toshiba.tic.oz.au>
         On the Sun386i version under SunView, the default icons were
         scrambled because of byte ordering problems in the load_icon routine.
         The icons loaded with get_blit_ikon were okay because I defined the
         REVORDER flag in the Makefile so the image gets massaged when it is
         loaded. I fixed this by redefining the interface to load_icon (but
         only when REVORDER is defined) by adding a flag to tell load_icon if
         the image had not already been ``massaged''.

       * From Rick Gunderson <rickg at toshiba.tic.oz.au>
         From Tony Landells <ahl at technix.oz.au>
         The FACEDIR make variable is undefined for make install
         FACEDIR (for make install) clashes with FACEDIR (-D option).

       * From John Fong <johnfong at Ebay.Sun.COM>
         With each mail message, stop looking for From: lines once you've
         found one.

       * From Chris Maltby <chris at softway.sw.oz.au>
         With the default mail option, the spy (unknown) ikon should
         display the correct username.

       * When no faces database is found, the noface ikon should display
         the correct username.

       * Added support for the "old" style of face database. This is where
         the username is not a directory, but the ikon in 48x48x1 format.

       * If the spool file was non existent then the icon was blank instead
         of NOMAIL.

       * The -a option used with the -U option was supplying the facemaker
         alias with the wrong filename to update.

       * From Darryl K. Ramm <darryl at pyrmania.oz.au>
         Make install, clean etc did not work because Pyramid make does not
         predifine $(MAKE).  The declaration 'MAKE=make' fixes this.

       * From Darryl K. Ramm <darryl at pyrmania.oz.au>
         The mv commands in install should be a cp because it makes
         restarting install easier should it fall over half way through.

       * From Darryl K. Ramm <darryl at pyrmania.oz.au>
         faces/compface/compface.h: Needs #include <strings.h> on Pyramid
         not <string.h>.

       * From Darryl K. Ramm <darryl at pyrmania.oz.au>
         x11.c: Pyramid's cc warns about illegal operation on geometry.
         if (!geometry)   should be   if (geometry[0] != '\0')

       * The icon dimensions should be imagewidth and imageheight in case
         the user has given the -w and -h command line options.

       * From Chris Maltby <chris at softway.sw.oz.au>
         There is no mention in the manual about having to press DEL to
         clear the open window display with the default mail option.

       * From Tony Landells <ahl at technix.oz.au>
         The programs in the filters directory never get built. Make
         install correctly does this now.

       * In the -a -U mode, when an "on-the-fly" face was found, faces
         would attempt to send mail to update the database each time the
         spoolfile was checked. The internal record chaining was incorrect,
         and a new garbage collection routine has been written.

       * From Chris Maltby <chris at softway.sw.oz.au>
         A rewrite of the faces manual page to provide the most important
         information on the first page.

       * the X11 version now correctly displays on the icon.

       * From Chris Maltby <chris at softway.sw.oz.au>
         Some machines don't automatically define popen() to return a
         FILE *.

       * the X11 version no longer puts out the ICCCM protocol error message
         when it's deleted.

v1.4 - patchlevel 5 - 29th June 1990.

       * From John Togasaki <toga at Eng.Sun.COM>
         From John Fong <johnfong at Ebay.Sun.COM>
         The definition in the Makefile for CFACEDIR was incorrect.
         The use of CFACEDIR in main.c should be FACEDIR instead.

       * From John Togasaki <toga at Eng.Sun.COM>
         The definition for MANDIR in the main Makefile is incorrect.

       [Posted to comp.sources.misc]
Funky_Stuff
len=`wc -c < CHANGES`
if [ $len !=     5936 ] ; then
echo error: CHANGES was $len bytes long, should have been     5936
fi
fi # end of overwriting check
if [ -f README ]
then
echo shar: will not over-write existing file README
else
echo shar: extracting 'README',    13270 characters
cat > README <<'Funky_Stuff'

README for faces, the visual list monitor.

Version 1.4 June 1990.

Permission is given to distribute these sources, as long as the
copyright messages are not removed, and no monies are exchanged. 

-------------------------------------------------------------------------
CONTENTS:

1. What is faces?
2. Getting started.
3. Face formats.
4. How do I get a face image icon?
5. How to include your compressed face image with mail.
6. Automatically updating the faces database.
7. Acknowledgements.
------------------------------------------------------------------------


1. What is faces?
-----------------

This is the third general release of a "faces" server for monitoring a
list visually. Typically this is a list of incoming mail messages, jobs
in the print queue or users on a system.

Faces has five different modes of operation:             
                                                         
 (a) The default will monitor for new mail. By default, only the last ten
     messages are displayed. Using the left mouse button it is possible to
     toggle the text in the faces window. This will either be the username
     or the time the mail message arrived. The icon shows the image of the
     last message to arrive.
                                                         
 (b) You can monitor the whole of a mail file. The open window will
     automatically adjust it's size to correctly show the face icons. The
     open window options are the username or the timestamp and number of
     message from that user. The icon will display the image of the last
     message, and a count of the total number of messages in the spool
     file or mail folder.
 
 (c) Monitoring a given print queue. This will generate a single face icon
     showing the job at the top of the print queue, and the text message
     will display the printer name plus the number of jobs to be printed.
     Opening the window will show images of all the jobs in the queue. The
     text on each image can be toggled, choices being the owners' name and
     the size of the job in bytes.
 
 (d) Monitoring users on a machine. For each user, a face image is displayed.
     Text can be either the username or the time they logged on. The iconic
     form displays the total number of users.
 
 (e) Custom monitoring. You can specify a program or shell script to run.
     The standard output from this program will be read by the faces program,
     and the appropriate faces displayed using the information provided. The
     format of this face information is given in the faces manual page.

Included with this release, is the ability to include a face image with
your mail message using an X-Face header line (plus continuation lines).
Faces expects this line to be in a certain compressed format, and
uncompresses it, and displays that image on-the-fly. There is also an
option to automatically update the faces database with this new image.

By default, after every sixty seconds, faces will recheck the mail file or
the print queue. If the mail spool file has changed size, it will produce a
chain of records for which it has face icons.

This release contains graphical interfaces for NeWS, SunView, X11 and XView.

Faces is based on the AT&T v8 face server called vismon, but is not derived
from vismon sources. With the previous version came vismon compatibility.
Note that that resulted in a few changes from the way faces v1.1 worked.
See the manual pages for more details.


2. Getting started.
-------------------

You need to specify one of the following four options to compile faces:

 1/     make sunview      - to make the SunView version.
 2/     make news         - to make the NeWS version.
 3/     make x11          - to make the X11 version.
 4/     make xview        - to make the XView version.

This should then be followed by a make install. You might need super-user
permission to do this successfully. Create your face directory, hostname
and username sub-directories and appropriate ikons/icons, machine and
people tables, and you're set. The manual pages describe this in more
detail. A small sample face directory and alias files have been included
with this distribution.

The Makefile compilation details are setup to default to compiling the
SunView version of faces on a Sun4 running SunOS v4.1. Note that there are
various compilation definitions that might need uncommenting if you are
trying to compile and run it on any other machine or graphics environment
or operating system.

These are:

BACKGROUND    - alternate background icon pattern.
DONTSHOWNO    - don't show number of message on face image.
DONTSHOWTIME  - don't show timestamp on face image.
DONTSHOWUSER  - don't show username on face image.
FACEDIR       - alternate face database directory.
FMONTYPE      - default monitoring type.
INVERT        - inverse video.
NEWSINCDIR    - NeWS only: location of the NeWS #include files.
NEWSLIBDIR    - NeWS only: location of the NeWS libraries.
NODOMAINS     - uncomment if you don't want full host domain names.
NOINDEX       - uncomment if you don't have the index() function.
PERIOD        - alternate period in seconds before recheck.
REVORDER      - byte reversal for little-endian machines.
SELTYPE       - uncomment for old select(2) calls.
SPOOLFILE     - alternate default spoolfile to monitor.
TTEXT         - SunView only: uncomment on SunOS v3.x systems.
UPDATE        - alternate mail alias for faces database updating.
X11INCDIR     - X11 only: location of the X11 #include files.
X11LIBDIR     - X11 only: location of the X11 libraries.
XVIEWINCDIR   - XView only: location of the XView #include files.
XVIEWLIBDIR   - XView only: location of the XView libraries.

See the Makefile for a detailed description of each of these definitions.

If you need to make other changes in order to get faces to compile and run
on your system, please let me know the details (see email address below),
and I will try to include them into a future version.


3. Face formats.
----------------

Typically, there is a face directory, and under that are directories which are
hostnames.  Under that are username directories, and this is where the face
images are placed. The face images are currently stored in one of four ways:

  (a)   NeWS .ps format, called face.ps.
  (b)   Sun icon format, called sun.icon.
  (c)   Blit ikon format, called 48x48x1.
  (d)   X11 xbm format, called face.xbm

The NeWS .ps allow for animation with the users' face. These files are
drawn when the rest of the static faces have been displayed. They will be
redrawn every time the mail or print queue is recheck or when the faces
window or icon is damaged. See the manual page for details on the
conditions imposed on these NeWS .ps files.

With this release, faces has support for reading a compressed face image
included with the users mail message. This compressed face image consists
of a line starting with "X-Face: " followed by compressed face data. This
compressed data will be continued over subsequent lines. This X-Face image
will have been created by running the compface program on a Blit ikon
(48x48x1 format). The X-Face line and it's continuation records should
be part of the mail header, but it is recognised that not many mailers can
generate these records at the moment, so faces looks for the X-Face in
both the mail header and message body. It is initially expected that the
X-Face will become part of the users signature file. See the compface manual
page for more details, on how to create you compressed image, and section 5
below, on how to get it included with your mail.


4. How do I get a face image icon?
----------------------------------

In order to get a real representation of your face, you will have had to
have sat down in front of a video camera attached to some kind of scanning
system. These facilities have been available at recent Usenix conferences
in the US (the FaceSaver project), and at the last couple of Australian
Unix User Group conferences. I expect EUUG has done something similar.

This face image then needs to be converted into a 48x48x1 ikon. In the
filters sub-directory of the faces distribution is a shell script that
uses several utilities from the PBM toolkit to achieve this. The PBM
(Portable BitMap) toolkit is an excellent set of programs to convert from
one graphics format to another, and manipulate the resulting images.
PBM was written by Jef Poskanzer, and is available from the sources
archives on uunet, and other places. It was also distributed on the X11R4
contribution tape.

When you have a 48x48x1 ikon, you then need to run the compface program
on it. See the compface/compface.1 manual page for more details.


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`

In v7.1.2 (version 7.1 - patchlevel #2), 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.
---------------------------------------------

The -U command line option to the faces program allows you to automatically
update your faces database with these "on-the-fly" X-Face: images. Note, that
this alias is not automatically installed for you as this might be a security
risk on your system.

If the -U option is given, then every time a new X-Face: image is found,
a copy of the converted blit ikon format data is sent to a certain mail
address. The subject line for this mail message is the name of the file
that should be created (or overwritten) in the faces database.

By default this mail alias is called "facemaker" but can be altered in the
Makefile. You would then need to add the following alias to your
/etc/aliases (usr/lib/aliases) file:

facemaker:      "|/usr/local/bin/face_update"

This face_update program is a shell script, and is included with this
distributions. For it to work correctly, the faces directory should be
owned by 'daemon' (with read/write permissions), and readable by the
rest of the world.


7. Acknowledgements.
--------------------
 
Special thanks go to:

James Ashton for the mail header face compression / uncompression code.

Pat Lashley for fixing up the NeWS version; modifying it to use cps, and
improving the quality of the NeWS code.

Chris Maltby for the parsefrom routine used to extract the username and
hostname from the "From " and "From:"lines. Chris also supplied a shell
script to convert Usenix FaceSaver images to 48x48x1 ikons, and a rewrite
of the faces manual page..

Hal Stern for the face_update shell script.

Dan Heller and Bart Schaefer for adding support for .face files in
their latest patch to v7.1 of the mush mailer.

Guy Harris for the basis of the previous manual page.

Dave Lemke for many excellent suggestions and help with the original
version of the X11 code.

Heather Rose for suggesting the animated NeWS faces.

Andrew Nicholson for help with some of the trickier NeWS code in the
previous version.

Rob Pike for sending me a copy of the Pike/Presotto paper "Face the Nation",
which I used to get vismon compatibility.

Jonathan Bowen for suggesting the rusers monitoring addition.

C.P. Lai for the Sun386i icon code plus numerous bug reports.

Jim Knutson for improving the previous version of the hostname and username
parsing.

Dave Cohrs for several fixes and enhancements, the addition of X11 bitmap
support, and generally sorting out most of the problems with the X11 version.

Greg Dudek for an alternative version of "on-the-fly" X-Face imaging which
hasn't been used.

Also thanks to Jeremy Cook, John Machin, Neil Crellin, Mark Andrews, Sjoerd
Mullender, Cameron Humphries, Rick Gunderson, Rich McAllister, Hakon Lie,
John Fong, Chris Maltby, Darryl K. Ramm, Steve Piette, Tony Landells and
Pat Lashley for various bug reports, fixes and suggestions for improvement.


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

Suggestions for further improvement would be most welcome, plus bug reports
and comments.

Rich Burridge,          DOMAIN: richb at Aus.Sun.COM
PHONE: +61 2 413 2666   ACSnet: richb at sunaus.sun.oz.au
Funky_Stuff
len=`wc -c < README`
if [ $len !=    13270 ] ; then
echo error: README was $len bytes long, should have been    13270
fi
fi # end of overwriting check
if [ -f TODO ]
then
echo shar: will not over-write existing file TODO
else
echo shar: extracting 'TODO',     4511 characters
cat > TODO <<'Funky_Stuff'
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/ Alias file people.tab should be capable of understanding:
   sunaus/richb=sun/rburridge
   or some such format.

3/ 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.

4/ 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
   transparently to both sun386i and sun3 users; but this does not address the
   possibility of a single user who sometimes uses SunView, sometimes NeWS,
   sometimes X, etc.. I have considered retaining the names sv_faces, x11_faces,
   etc., with a customized version of start_applic which would determine which
   windowing system is in use, and envoke the appropriate binary. The difficulty
   is in how to determine which system is in use.

5/ From: Chris Orgill, cho%cs.aber.ac.uk at uunet.uu.net
   How about allowing the Sunview version to use arbitrary size Sun icons ?

6/ 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.

7/ The NeWS version needs to be finished.
   Remaining problems are:

    (a) There are two warnings on compiling news.c, due to FILE operations
        being performed on PSFILE variables.

    (b) The new input functionality (click left mouse and Del) has to be
        added in.

8/ With the XView version, add a Properties pinup window which would
   allow you to change the various monitoring options on the fly.

9/ Add in audio capabilities.

10/ 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.

11/ 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.

12/ 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
    a server for `domain' is available, and the host matches a key in that
    domain, consider it part of the indicated community. `+=community'
    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.

13/ 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...

14/ 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.

15/ 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.

16/ 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.

17/ From Pat Lashley <patl at Sun.COM>
    More internal comments and a general design document.

18/ Provide a template of what each of the independent graphics routine do,
    to aid porting to new graphics environments.

19/ Add an option to disable flashing and beeping when new mail arrives.

20/ Optimise.
Funky_Stuff
len=`wc -c < TODO`
if [ $len !=     4511 ] ; then
echo error: TODO was $len bytes long, should have been     4511
fi
fi # end of overwriting check
if [ -f MANIFEST ]
then
echo shar: will not over-write existing file MANIFEST
else
echo shar: extracting 'MANIFEST',     2803 characters
cat > MANIFEST <<'Funky_Stuff'
This file tells you in which part of the faces distribution each
file appeared.

Filename.                              |  Part #
--------------------------------------------------
README                                 |    4
MANIFEST                               |    4
FILES                                  |    4
CHANGES                                |    4
TODO                                   |    4
Makefile                               |    4
faces.1                                |    5
face_update.1                          |    5
face_update                            |    4
main.c                                 |    1
get.c                                  |    2
mon.c                                  |    1
parsefrom.c                            |    2
rec.c                                  |    1
news.c                                 |    2
faces_cps.cps                          |    5
sunview.c                              |    2
xview.c                                |    3
x11.c                                  |    3
extern.h                               |    3
faces.h                                |    3
patchlevel.h                           |    3
noface.icon                            |    5
nomail.icon                            |    5
noprint.icon                           |    5
nopaper.icon                           |    5
nousers.icon                           |    5
compface/Makefile                      |    7
compface/README                        |    7
compface/compface.1                    |    7
compface/compface.3                    |    7
compface/arith.c                       |    7
compface/compface.c                    |    7
compface/compress.c                    |    7
compface/file.c                        |    7
compface/gen.c                         |    7
compface/main.c                        |    7
compface/compface.h                    |    7
compface/data.h                        |    7
facedir/machine.tab                    |    6
facedir/people.tab                     |    6
facedir/misc./acsnet/48x48x1           |    6
facedir/misc./adm/48x48x1              |    6
facedir/misc./bin/48x48x1              |    6
facedir/misc./daemon/48x48x1           |    6
facedir/misc./mailer-daemon/48x48x1    |    6
facedir/misc./net/48x48x1              |    6
facedir/misc./root/48x48x1             |    6
facedir/misc./sys/48x48x1              |    6
facedir/misc./unknown/48x48x1          |    6
facedir/misc./uucp/48x48x1             |    6
facedir/sunaus/richb/48x48x1           |    6
filters/Makefile                       |    6
filters/fs2ikon                        |    6
filters/icon2ikon.c                    |    6
filters/ikon2icon.c                    |    6
filters/rs2icon.c                      |    6
Funky_Stuff
len=`wc -c < MANIFEST`
if [ $len !=     2803 ] ; then
echo error: MANIFEST was $len bytes long, should have been     2803
fi
fi # end of overwriting check
if [ -f FILES ]
then
echo shar: will not over-write existing file FILES
else
echo shar: extracting 'FILES',     3815 characters
cat > FILES <<'Funky_Stuff'
The file describes all the files that make up the faces distribution.

Directory faces: the visual monitor for mail and other things.
--------------------------------------------------------------

README          - describes what faces is, and how to get started.
MANIFEST        - tells you what archive part each file was posted in.
FILES           - what you're reading now.
CHANGES         - change history. Will be updated with each new patch.
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)

main.c          - STANDARD SOURCE FILES: includes declarations and main().
get.c           - routines to get information, objects, icons etc..
mon.c           - monitoring routines for mail, print, users etc..
parsefrom.c     - routine to extract user and host names from the From line.
rec.c           - various record manipulation routines.

news.c          - INDEPENDENT GRAPHICS FILES: NeWS C interface.
faces_cps.cps   - cps PostScript code used by the NeWS version.
sunview.c       - Sun SunView graphics routines.
xview.c         - X11 XView toolkit graphics routines.
x11.c           - X11 (Xlib) graphics routines.

extern.h        - External declarations.
faces.h         - Macro and constant definitions.
patchlevel.h    - Current patchlevel for this release of faces.

noface.icon     - STANDARD ICONS: no faces available.
nomail.icon     - currently no mail in spoolfile.
noprint.icon    - no jobs on print queue.
nopaper.icon    - no paper in printer.
nousers.icon    - no users on machine.


Sub-directory compface: face ikon compression/uncompression.
------------------------------------------------------------

compface/Makefile      - used to build the compface programs and library.
compface/README        - overview of the compface kit.
compface/compface.1    - manual page for [un]compface programs.
compface/compface.3    - manual page for [un]compface library routines.

compface/arith.c       - compface source files.
compface/compface.c 
compface/compress.c
compface/file.c 
compface/gen.c 
compface/main.c

compface/compface.h    - compface include files.
compface/data.h 


Sub-directory facedir: sample face database and alias files.
------------------------------------------------------------

facedir/machine.tab                  - sample machine alias file.
facedir/people.tab                   - sample people alias file.
facedir/misc./acsnet/48x48x1         - SAMPLE ICONS: user acsnet
facedir/misc./adm/48x48x1                                 adm
facedir/misc./bin/48x48x1                                 bin
facedir/misc./daemon/48x48x1                              daemon
facedir/misc./mailer-daemon/48x48x1                       mailer-daemon
facedir/misc./net/48x48x1                                 net
facedir/misc./root/48x48x1                                root
facedir/misc./sys/48x48x1                                 sys
facedir/misc./unknown/48x48x1                             unknown
facedir/misc./uucp/48x48x1                                uucp
facedir/sunaus/richb/48x48x1                              richb at sunaus


Sub-directory filters: sample filters to convert from one format to another.
----------------------------------------------------------------------------

filters/Makefile         - used to build the filters.
filters/fs2ikon          - Usenix FaceSaver to blit ikon (48x48x1).
filters/icon2ikon.c      - Sun icon to blit ikon.
filters/ikon2icon.c      - Blit ikon to Sun icon.
filters/rs2icon.c        - Sun rasterfile to Sun icon (64x64 portion thereof).
Funky_Stuff
len=`wc -c < FILES`
if [ $len !=     3815 ] ; then
echo error: FILES was $len bytes long, should have been     3815
fi
fi # end of overwriting check
if [ -f Makefile ]
then
echo shar: will not over-write existing file Makefile
else
echo shar: extracting 'Makefile',    10910 characters
cat > Makefile <<'Funky_Stuff'
#
#  Makefile for faces, an icon face server, plus associated software.
#
#  Graphical versions for NeWS, SunView, X11 and XView.
#
#  @(#)Makefile 1.15 90/06/29
#
#  Copyright (c) Rich Burridge.
#                Sun Microsystems, Australia - All rights reserved.
#
#  Permission is given to distribute these sources, as long as the
#  copyright messages are not removed, and no monies are exchanged. 
#
#  No responsibility is taken for any errors inherent either
#  to the comments or the code of this program, but if reported
#  to me then an attempt will be made to fix them.
#
#========================================================================
#
#  There are various small changes needed when compiling faces on
#  different systems.  These have been isolated here, and should be
#  uncommented and set accordingly, if needed.
#
#========================================================================
#  Faces displays a background pattern in its' window. When the window
#  is not completely full, this gives the appearance of trying to blend
#  in with the background. By default, this is a root gray color, but you
#  can specify an alternate pattern to use here.
#
#BACKGROUND       = -DBACKGROUND=\"\"
#------------------------------------------------------------------------
#  If you do not want to show the number of messages on the face icon,
#  then uncomment the next line.
# 
#DONTSHOWNO       = -DDONTSHOWNO
#------------------------------------------------------------------------
#  If you do not want to show the timestamp on the face icon, then
#  uncomment the next line.
#
#DONTSHOWTIME     = -DDONTSHOWTIME
#------------------------------------------------------------------------
#  If you do not want to show the username on the face icon, then
#  uncomment the next line.
#
#DONTSHOWUSER     = -DDONTSHOWUSER
#------------------------------------------------------------------------
#  By default, faces looks for the face images in /usr/local/faces. If
#  you wish to specify an alternate location, then these two lines should
#  be uncommented and set appropriately.
#               
FACEDIR           = /usr/local/faces
CFACEDIR	= -DFACEDIR=\"$(FACEDIR)\"
#------------------------------------------------------------------------
#  It is possible to determine what type of monitoring faces does at
#  run time with different command line options, but it is also possible
#  to define it at compile time.
#
#  Monitor type (0 = mail (all),  1 = mail (new), 2 = print queue).
#                3 = custom prog, 4 = users).
#
#FMONTYPE         = -DFMONTYPE=1
#------------------------------------------------------------------------
#  Some users on monochrome screens display everything in reverse video.
#  If you would like faces to do the same, then this line needs to be
#  uncommented.
#
#INVERT           = -DINVERT
#------------------------------------------------------------------------
#  If you are compiling the NeWS version, then the following two lines
#  should be uncommented, and set appropriately.
#
#NEWSINCDIR	= -I$(OPENWINHOME)/include
#NEWSLIBDIR	= -L$(OPENWINHOME)/lib
#------------------------------------------------------------------------
#  If you don't want faces to use full domain names for extracting face
#  icons, then you should uncomment the NODOMAINS definition below.
#
#NODOMAINS	= -DNODOMAINS
#------------------------------------------------------------------------
#  By default, faces will check the "From " line first for username and
#  hostname, and then the "From:" line. 
#  Not all machines have the index() string library function. If you
#  don't have this function then you should uncomment the NOINDEX
#  definition below.
#
#NOINDEX         = -DNOINDEX
#--------------------------------------------------------------------------
#  By default, faces rechecks for new mail or print jobs every sixty
#  seconds. If you would like to specify an alternate period, then uncomment
#  the following line and set appropriately.
#
#PERIOD           = -DPERIOD=30
#------------------------------------------------------------------------
#  Faces is designed to work on a big-endian machine by default. If you
#  are compiling for a little-endian machine (such as the Sun 386i), then
#  you need to uncomment the following line.
#
#REVORDER	  = -DREVORDER
#------------------------------------------------------------------------
#  If you not running under a BSD4.3 derived system, the parameters
#  to the select call are different, and this definition should be
#  uncommented. You need to uncomment this for SunOS v3.x.
#
#SELTYPE        = -DNO_43SELECT
#------------------------------------------------------------------------
#  If faces is setup to monitor mail, then the name of the default
#  spoolfile is /usr/spool/mail/username. An alternative spoolfile name
#  can be given by uncommenting the following line and setting
#  appropriately.
#
#SPOOLFILE       = -DSPOOLFILE=\"/usr/richb/Mail/pending\"
#------------------------------------------------------------------------
#  If you are running SunOS v3.x, then pr_ttext doesn't exist, and
#  you must uncomment this definition.
#
#TTEXT          = -DNO_PR_TTEXT
#------------------------------------------------------------------------
#  If the -U command line option is given to faces, then mail is sent to
#  a special mail alias. This alias is really a shell script, which will
#  take the given information, and try to update the faces database. By
#  default that alias is called "facemaker", but it is possible to give an
#  alternative alias here. This might be useful if a collection of machines
#  were remotely mounting the faces database from a file server.
#
#UPDATE		= -DUPDATE=\"facemaker at fileserver\"
#------------------------------------------------------------------------
#  If you are compiling the X11 version and the X11 include and
#  library files are not in a standard place, then the following
#  two lines should be uncommented, and set appropriately.
#
#X11INCDIR         = -I$(OPENWINHOME)/include
#X11LIBDIR         = -L$(OPENWINHOME)/lib
#------------------------------------------------------------------------
#  If you are compiling the XView version, then the following two lines
#  should be uncommented, and set appropriately.
#
#XVIEWINCDIR      = -I$(OPENWINHOME)/include
#XVIEWLIBDIR      = -L$(OPENWINHOME)/lib
#
#=======================================================================
#
#  Default locations where faces files will be installed.
#  You might wish to alter these values.
#
BINDIR		= /usr/local/bin
LIBDIR		= /usr/local/lib
MANDIR		= /usr/man
MANSECT		= l

#
#  Options for submakes
#
MAKEOPTS	= $(MFLAGS) BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) MANDIR=$(MANDIR)

#
#  Compilation flags and standard macro definitions.
#
CDEFS		= $(BACKGROUND) $(DONTSHOWNO) $(DONTSHOWTIME) \
		  $(DONTSHOWUSER) $(CFACEDIR) $(FMONTYPE) $(INVERT) \
		  $(NEWSINCDIR) $(NODOMAINS) $(NOINDEX) $(PERIOD) \
		  $(REVORDER) $(SELTYPE) $(SPOOLFILE) $(TTEXT) $(UPDATE) \
		  $(X11INCDIR) $(XVIEWINCDIR)
CCOMP		= -g
CFLAGS		= $(CCOMP) $(CDEFS)
#
#=======================================================================

BINARIES	= psfaces svfaces xfaces xvfaces

CC		= cc
MAKE		= make

STDSRCS		= get.c main.c mon.c parsefrom.c rec.c
STDOBJS		= get.o main.o mon.o parsefrom.o rec.o
STDLIBS		= compface/libcompface.a

COMPFACE	= compface
FACES		= facedir
FILTERS		= filters
GSRCS		= news.c sunview.c x11.c xview.c
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
SFILES2		= get.c parsefrom.c news.c sunview.c
SFILES3		= xview.c x11.c $(HDRS)
SFILES4		= CHANGES README TODO MANIFEST FILES Makefile
SFILES5		= faces.1 face_update.1 faces_cps.cps face_update $(IMAGES)
SFILES6		= $(FACES) $(FILTERS)
SFILES7		= $(COMPFACE)

NEWSLIBS	= $(NEWSLIBDIR) -lcps
SVIEWLIBS	= -lsuntool -lsunwindow -lpixrect
X11LIBS		= $(X11LIBDIR) -lX11
XVIEWLIBS	= $(XVIEWLIBDIR) -lxview -lolgx -lX11

help:
		@echo
		@echo "You need to specify one of the following options:"
		@echo
		@echo "  make sunview    - to make the SunView version."
		@echo "  make news       - to make the NeWS version."
		@echo "  make x11        - to make the X11 version."
		@echo "  make xview      - to make the XView version."
		@echo
		@echo "This should be followed by:"
		@echo
		@echo "  make install"
		@echo "  make clean"
		@echo

all:		$(BINARIES)

news:		$(STDOBJS) news.o faces_cps.h
		(cd compface; $(MAKE) $(MAKEOPTS))
		(cd filters; $(MAKE) $(MAKEOPTS))
		$(CC) -o psfaces $(CFLAGS) $(STDOBJS) news.o \
						$(STDLIBS) $(NEWSLIBS)
		-cp psfaces faces

sunview:	$(STDOBJS) sunview.o
		(cd compface; $(MAKE) $(MAKEOPTS))
		(cd filters; $(MAKE) $(MAKEOPTS))
		$(CC) -o svfaces $(CFLAGS) $(STDOBJS) sunview.o \
						$(STDLIBS) $(SVIEWLIBS)
		-cp svfaces faces

x11:		$(STDOBJS) x11.o
		(cd compface; $(MAKE) $(MAKEOPTS))
		(cd filters; $(MAKE) $(MAKEOPTS))
		$(CC) -o xfaces $(CFLAGS) $(STDOBJS) x11.o \
						$(STDLIBS) $(X11LIBS)
		-cp xfaces faces

xview:		$(STDOBJS) xview.o
		(cd compface; $(MAKE) $(MAKEOPTS))
		(cd filters; $(MAKE) $(MAKEOPTS))
		$(CC) -o xvfaces $(CFLAGS) $(STDOBJS) xview.o \
						$(STDLIBS) $(XVIEWLIBS)
		-cp xvfaces faces

install:
		(cd compface; $(MAKE) $(MAKEOPTS) install)
		(cd filters; $(MAKE) $(MAKEOPTS) install)
		install -s -m 751 faces $(BINDIR)
		install -c -m 755 face_update $(BINDIR)
		install -c -m 644 machine.tab $(FACEDIR)
		install -c -m 644 people.tab $(FACEDIR)
		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)
		(cd filters; $(MAKE) $(MAKEOPTS) clean)
		rm -f *.o Part* *~ $(BINARIES) faces core

lint:		lint-news lint-sunview lint-x11 lint-xview
lint-news:;	lint $(CDEFS) $(STDSRCS) news.c $(NEWSLIBS)
lint-sunview:;	lint $(CDEFS) $(STDSRCS) sunview.c $(SVIEWLIBS)
lint-x11:;	lint $(CDEFS) $(STDSRCS) x11.c
lint-xview:;	lint $(CDEFS) $(STDSRCS) xview.c

shar:;          shar.script $(SFILES1) > Part1
		shar.script $(SFILES2) > Part2
		shar.script $(SFILES3) > Part3
		shar.script $(SFILES4) > Part4
		shar.script $(SFILES5) > Part5
		shar.script $(SFILES6) > Part6
		shar.script $(SFILES7) > Part7

create:         SCCS
		-sccs create $(STDSRCS) $(GSRCS) $(HDRS) $(IMAGES) $(OTHERS)

SCCS:
		mkdir SCCS
		chmod 755 SCCS

faces_cps.h:	faces_cps.cps
		cps $<

get.o:		get.c faces.h extern.h patchlevel.h
main.o:		main.c faces.h $(IMAGES)
mon.o:		mon.c faces.h extern.h
news.o:		news.c faces.h extern.h faces_cps.h
rec.o:		rec.c faces.h extern.h
sunview.o:	sunview.c faces.h extern.h
x11.o:		x11.c faces.h extern.h
xview.o:	xview.c faces.h extern.h
Funky_Stuff
len=`wc -c < Makefile`
if [ $len !=    10910 ] ; then
echo error: Makefile was $len bytes long, should have been    10910
fi
fi # end of overwriting check



More information about the Comp.sources.misc mailing list