home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume13 / faces-1.4.5 / part04 < prev    next >
Encoding:
Text File  |  1990-07-02  |  42.9 KB  |  1,079 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v13i073: Faces v1.4.5: a visual list monitor for mail etc.. (Part 4 of 7).
  3. from: rburridge@Sun.COM (Rich Burridge)
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 13, Issue 73
  7. Submitted-by: rburridge@Sun.COM (Rich Burridge)
  8. Archive-name: faces-1.4.5/part04
  9.  
  10. ------CUT HERE------faces.part4------CUT HERE------
  11. #! /bin/sh
  12. # this is a shell archive, meaning:
  13. # 1. Remove everything above the #! /bin/sh line
  14. # 2. Save the resulting text in a file.
  15. # 3. Execute the file with /bin/sh to create the files:
  16. #    CHANGES
  17. #    README
  18. #    TODO
  19. #    MANIFEST
  20. #    FILES
  21. #    Makefile
  22. # This archive created: Fri Jun 29 10:45:12 EST 1990
  23. #
  24. #
  25. export PATH; PATH=/bin:$PATH
  26. #
  27. if [ -f CHANGES ]
  28. then
  29. echo shar: will not over-write existing file CHANGES
  30. else
  31. echo shar: extracting 'CHANGES',     5936 characters
  32. cat > CHANGES <<'Funky_Stuff'
  33.  
  34. Faces change history.
  35. ---------------------
  36.  
  37. v1.4 - patchlevel 0. - started 7th June 1990.
  38.  
  39.        released to volunteers for various enhancements.
  40.  
  41. v1.4 - patchlevel 1 - 19th June 1990.
  42.  
  43.        copy sent to James Ashton for uncompression enhancements.
  44.  
  45. v1.4 - patchlevel 2 - 20th June 1990.
  46.  
  47.        copy sent to various people for internal testing.
  48.  
  49. v1.4 - patchlevel 3 - 21st June 1990.
  50.  
  51.        version made available internally via anon ftp and the mail server.
  52.        also made available via fetchfile in Australia for beta testing.
  53.  
  54. v1.4 - patchlevel 4 - 26th June 1990.
  55.  
  56.        * From Pat Lashley <patl@Sun.COM>
  57.          made several adjustments to the Makefile to get "make install" to
  58.          work properly.
  59.  
  60.        * From Steve Piette <Steve.Piette@Central.Sun.COM>
  61.          added a missing i from an int (nt) declaration in xview.c.
  62.  
  63.        * included a new version of the face_update script. This version
  64.          logs an entry for each update in a logfile (var/log/facelog by
  65.          default. The script also has support for the "old" style of the
  66.          faces database, where the username was the ikon.
  67.  
  68.        * created a manual page for face_update (face_update.1). Updated
  69.          MANIFEST, FILES and Makefile to reflect this change.
  70.  
  71.        * From Pat Lashley <patl@Sun.COM>
  72.          the NeWS version has been fixed. The NeWS PostScript code has
  73.          been converted to use cps, and a faces_cps.cps file has been generated.
  74.          The news.c C frontend, has been rewritten to use the new cps
  75.          routines. The NeWS code has been changed to be more object oriented.
  76.  
  77.        * From Cameron Humphries <cameron@cs.flinders.oz.au>
  78.          From Chris Maltby <chris@softway.sw.oz.au>
  79.          From Rich McAllister <rfm@Eng>
  80.          From Hakon Lie <howcome@Eng>
  81.          From Darryl K. Ramm <darryl@pyrmania.oz.au>
  82.          From Tony Landells <ahl@technix.oz.au>
  83.          Need to include <ctype.h> in get.c
  84.  
  85.        * From Rick Gunderson <rickg@toshiba.tic.oz.au>
  86.          On the Sun386i version under SunView, the default icons were
  87.          scrambled because of byte ordering problems in the load_icon routine.
  88.          The icons loaded with get_blit_ikon were okay because I defined the
  89.          REVORDER flag in the Makefile so the image gets massaged when it is
  90.          loaded. I fixed this by redefining the interface to load_icon (but
  91.          only when REVORDER is defined) by adding a flag to tell load_icon if
  92.          the image had not already been ``massaged''.
  93.  
  94.        * From Rick Gunderson <rickg@toshiba.tic.oz.au>
  95.          From Tony Landells <ahl@technix.oz.au>
  96.          The FACEDIR make variable is undefined for make install
  97.          FACEDIR (for make install) clashes with FACEDIR (-D option).
  98.  
  99.        * From John Fong <johnfong@Ebay.Sun.COM>
  100.          With each mail message, stop looking for From: lines once you've
  101.          found one.
  102.  
  103.        * From Chris Maltby <chris@softway.sw.oz.au>
  104.          With the default mail option, the spy (unknown) ikon should
  105.          display the correct username.
  106.  
  107.        * When no faces database is found, the noface ikon should display
  108.          the correct username.
  109.  
  110.        * Added support for the "old" style of face database. This is where
  111.          the username is not a directory, but the ikon in 48x48x1 format.
  112.  
  113.        * If the spool file was non existent then the icon was blank instead
  114.          of NOMAIL.
  115.  
  116.        * The -a option used with the -U option was supplying the facemaker
  117.          alias with the wrong filename to update.
  118.  
  119.        * From Darryl K. Ramm <darryl@pyrmania.oz.au>
  120.          Make install, clean etc did not work because Pyramid make does not
  121.          predifine $(MAKE).  The declaration 'MAKE=make' fixes this.
  122.  
  123.        * From Darryl K. Ramm <darryl@pyrmania.oz.au>
  124.          The mv commands in install should be a cp because it makes
  125.          restarting install easier should it fall over half way through.
  126.  
  127.        * From Darryl K. Ramm <darryl@pyrmania.oz.au>
  128.          faces/compface/compface.h: Needs #include <strings.h> on Pyramid
  129.          not <string.h>.
  130.  
  131.        * From Darryl K. Ramm <darryl@pyrmania.oz.au>
  132.          x11.c: Pyramid's cc warns about illegal operation on geometry.
  133.          if (!geometry)   should be   if (geometry[0] != '\0')
  134.  
  135.        * The icon dimensions should be imagewidth and imageheight in case
  136.          the user has given the -w and -h command line options.
  137.  
  138.        * From Chris Maltby <chris@softway.sw.oz.au>
  139.          There is no mention in the manual about having to press DEL to
  140.          clear the open window display with the default mail option.
  141.  
  142.        * From Tony Landells <ahl@technix.oz.au>
  143.          The programs in the filters directory never get built. Make
  144.          install correctly does this now.
  145.  
  146.        * In the -a -U mode, when an "on-the-fly" face was found, faces
  147.          would attempt to send mail to update the database each time the
  148.          spoolfile was checked. The internal record chaining was incorrect,
  149.          and a new garbage collection routine has been written.
  150.  
  151.        * From Chris Maltby <chris@softway.sw.oz.au>
  152.          A rewrite of the faces manual page to provide the most important
  153.          information on the first page.
  154.  
  155.        * the X11 version now correctly displays on the icon.
  156.  
  157.        * From Chris Maltby <chris@softway.sw.oz.au>
  158.          Some machines don't automatically define popen() to return a
  159.          FILE *.
  160.  
  161.        * the X11 version no longer puts out the ICCCM protocol error message
  162.          when it's deleted.
  163.  
  164. v1.4 - patchlevel 5 - 29th June 1990.
  165.  
  166.        * From John Togasaki <toga@Eng.Sun.COM>
  167.          From John Fong <johnfong@Ebay.Sun.COM>
  168.          The definition in the Makefile for CFACEDIR was incorrect.
  169.          The use of CFACEDIR in main.c should be FACEDIR instead.
  170.  
  171.        * From John Togasaki <toga@Eng.Sun.COM>
  172.          The definition for MANDIR in the main Makefile is incorrect.
  173.  
  174.        [Posted to comp.sources.misc]
  175. Funky_Stuff
  176. len=`wc -c < CHANGES`
  177. if [ $len !=     5936 ] ; then
  178. echo error: CHANGES was $len bytes long, should have been     5936
  179. fi
  180. fi # end of overwriting check
  181. if [ -f README ]
  182. then
  183. echo shar: will not over-write existing file README
  184. else
  185. echo shar: extracting 'README',    13270 characters
  186. cat > README <<'Funky_Stuff'
  187.  
  188. README for faces, the visual list monitor.
  189.  
  190. Version 1.4 June 1990.
  191.  
  192. Permission is given to distribute these sources, as long as the
  193. copyright messages are not removed, and no monies are exchanged. 
  194.  
  195. -------------------------------------------------------------------------
  196. CONTENTS:
  197.  
  198. 1. What is faces?
  199. 2. Getting started.
  200. 3. Face formats.
  201. 4. How do I get a face image icon?
  202. 5. How to include your compressed face image with mail.
  203. 6. Automatically updating the faces database.
  204. 7. Acknowledgements.
  205. ------------------------------------------------------------------------
  206.  
  207.  
  208. 1. What is faces?
  209. -----------------
  210.  
  211. This is the third general release of a "faces" server for monitoring a
  212. list visually. Typically this is a list of incoming mail messages, jobs
  213. in the print queue or users on a system.
  214.  
  215. Faces has five different modes of operation:             
  216.                                                          
  217.  (a) The default will monitor for new mail. By default, only the last ten
  218.      messages are displayed. Using the left mouse button it is possible to
  219.      toggle the text in the faces window. This will either be the username
  220.      or the time the mail message arrived. The icon shows the image of the
  221.      last message to arrive.
  222.                                                          
  223.  (b) You can monitor the whole of a mail file. The open window will
  224.      automatically adjust it's size to correctly show the face icons. The
  225.      open window options are the username or the timestamp and number of
  226.      message from that user. The icon will display the image of the last
  227.      message, and a count of the total number of messages in the spool
  228.      file or mail folder.
  229.  
  230.  (c) Monitoring a given print queue. This will generate a single face icon
  231.      showing the job at the top of the print queue, and the text message
  232.      will display the printer name plus the number of jobs to be printed.
  233.      Opening the window will show images of all the jobs in the queue. The
  234.      text on each image can be toggled, choices being the owners' name and
  235.      the size of the job in bytes.
  236.  
  237.  (d) Monitoring users on a machine. For each user, a face image is displayed.
  238.      Text can be either the username or the time they logged on. The iconic
  239.      form displays the total number of users.
  240.  
  241.  (e) Custom monitoring. You can specify a program or shell script to run.
  242.      The standard output from this program will be read by the faces program,
  243.      and the appropriate faces displayed using the information provided. The
  244.      format of this face information is given in the faces manual page.
  245.  
  246. Included with this release, is the ability to include a face image with
  247. your mail message using an X-Face header line (plus continuation lines).
  248. Faces expects this line to be in a certain compressed format, and
  249. uncompresses it, and displays that image on-the-fly. There is also an
  250. option to automatically update the faces database with this new image.
  251.  
  252. By default, after every sixty seconds, faces will recheck the mail file or
  253. the print queue. If the mail spool file has changed size, it will produce a
  254. chain of records for which it has face icons.
  255.  
  256. This release contains graphical interfaces for NeWS, SunView, X11 and XView.
  257.  
  258. Faces is based on the AT&T v8 face server called vismon, but is not derived
  259. from vismon sources. With the previous version came vismon compatibility.
  260. Note that that resulted in a few changes from the way faces v1.1 worked.
  261. See the manual pages for more details.
  262.  
  263.  
  264. 2. Getting started.
  265. -------------------
  266.  
  267. You need to specify one of the following four options to compile faces:
  268.  
  269.  1/     make sunview      - to make the SunView version.
  270.  2/     make news         - to make the NeWS version.
  271.  3/     make x11          - to make the X11 version.
  272.  4/     make xview        - to make the XView version.
  273.  
  274. This should then be followed by a make install. You might need super-user
  275. permission to do this successfully. Create your face directory, hostname
  276. and username sub-directories and appropriate ikons/icons, machine and
  277. people tables, and you're set. The manual pages describe this in more
  278. detail. A small sample face directory and alias files have been included
  279. with this distribution.
  280.  
  281. The Makefile compilation details are setup to default to compiling the
  282. SunView version of faces on a Sun4 running SunOS v4.1. Note that there are
  283. various compilation definitions that might need uncommenting if you are
  284. trying to compile and run it on any other machine or graphics environment
  285. or operating system.
  286.  
  287. These are:
  288.  
  289. BACKGROUND    - alternate background icon pattern.
  290. DONTSHOWNO    - don't show number of message on face image.
  291. DONTSHOWTIME  - don't show timestamp on face image.
  292. DONTSHOWUSER  - don't show username on face image.
  293. FACEDIR       - alternate face database directory.
  294. FMONTYPE      - default monitoring type.
  295. INVERT        - inverse video.
  296. NEWSINCDIR    - NeWS only: location of the NeWS #include files.
  297. NEWSLIBDIR    - NeWS only: location of the NeWS libraries.
  298. NODOMAINS     - uncomment if you don't want full host domain names.
  299. NOINDEX       - uncomment if you don't have the index() function.
  300. PERIOD        - alternate period in seconds before recheck.
  301. REVORDER      - byte reversal for little-endian machines.
  302. SELTYPE       - uncomment for old select(2) calls.
  303. SPOOLFILE     - alternate default spoolfile to monitor.
  304. TTEXT         - SunView only: uncomment on SunOS v3.x systems.
  305. UPDATE        - alternate mail alias for faces database updating.
  306. X11INCDIR     - X11 only: location of the X11 #include files.
  307. X11LIBDIR     - X11 only: location of the X11 libraries.
  308. XVIEWINCDIR   - XView only: location of the XView #include files.
  309. XVIEWLIBDIR   - XView only: location of the XView libraries.
  310.  
  311. See the Makefile for a detailed description of each of these definitions.
  312.  
  313. If you need to make other changes in order to get faces to compile and run
  314. on your system, please let me know the details (see email address below),
  315. and I will try to include them into a future version.
  316.  
  317.  
  318. 3. Face formats.
  319. ----------------
  320.  
  321. Typically, there is a face directory, and under that are directories which are
  322. hostnames.  Under that are username directories, and this is where the face
  323. images are placed. The face images are currently stored in one of four ways:
  324.  
  325.   (a)   NeWS .ps format, called face.ps.
  326.   (b)   Sun icon format, called sun.icon.
  327.   (c)   Blit ikon format, called 48x48x1.
  328.   (d)   X11 xbm format, called face.xbm
  329.  
  330. The NeWS .ps allow for animation with the users' face. These files are
  331. drawn when the rest of the static faces have been displayed. They will be
  332. redrawn every time the mail or print queue is recheck or when the faces
  333. window or icon is damaged. See the manual page for details on the
  334. conditions imposed on these NeWS .ps files.
  335.  
  336. With this release, faces has support for reading a compressed face image
  337. included with the users mail message. This compressed face image consists
  338. of a line starting with "X-Face: " followed by compressed face data. This
  339. compressed data will be continued over subsequent lines. This X-Face image
  340. will have been created by running the compface program on a Blit ikon
  341. (48x48x1 format). The X-Face line and it's continuation records should
  342. be part of the mail header, but it is recognised that not many mailers can
  343. generate these records at the moment, so faces looks for the X-Face in
  344. both the mail header and message body. It is initially expected that the
  345. X-Face will become part of the users signature file. See the compface manual
  346. page for more details, on how to create you compressed image, and section 5
  347. below, on how to get it included with your mail.
  348.  
  349.  
  350. 4. How do I get a face image icon?
  351. ----------------------------------
  352.  
  353. In order to get a real representation of your face, you will have had to
  354. have sat down in front of a video camera attached to some kind of scanning
  355. system. These facilities have been available at recent Usenix conferences
  356. in the US (the FaceSaver project), and at the last couple of Australian
  357. Unix User Group conferences. I expect EUUG has done something similar.
  358.  
  359. This face image then needs to be converted into a 48x48x1 ikon. In the
  360. filters sub-directory of the faces distribution is a shell script that
  361. uses several utilities from the PBM toolkit to achieve this. The PBM
  362. (Portable BitMap) toolkit is an excellent set of programs to convert from
  363. one graphics format to another, and manipulate the resulting images.
  364. PBM was written by Jef Poskanzer, and is available from the sources
  365. archives on uunet, and other places. It was also distributed on the X11R4
  366. contribution tape.
  367.  
  368. When you have a 48x48x1 ikon, you then need to run the compface program
  369. on it. See the compface/compface.1 manual page for more details.
  370.  
  371.  
  372. 5. How to include your compressed face image with mail.
  373. -------------------------------------------------------
  374.  
  375. Faces is capable of recognising the compressed face image anywhere in the
  376. mail message (header or body), but the best place to put it is in the mail
  377. header (out of the way).
  378.  
  379. It is suggested that each user store the compressed image (generated by
  380. compface) in a file called .face in their home directory. For example, my
  381. .face file contains:
  382.  
  383. *7O.<19S{MCsaxxe=iCc*y5!i:>e,K40m^btp"<`~gNx5>o?eJMzUng=j]%KybY
  384. \/VaZ/3a4pD%#rGu7D<M$.TDpaDN8#8eJC&^^&Mr]@~}Pa,*F-ePrMg5.}e,,bu
  385. qROdT{Vzn{!ouXy.&*#V#Q&Zf7a8lX2Kb}"$UT^VhnsJ?){wFU5r+,duO>4@L
  386.  
  387. Note that there is no initial "X-Face:" and leading spaces have been
  388. removed from each line.
  389.  
  390. To automatically include this into a header into an Elm mail message, just
  391. add the following line to your .elm/elmheaders file:
  392.  
  393.     X-Face: `cat $HOME/.face`
  394.  
  395. In v7.1.2 (version 7.1 - patchlevel #2), the Mush mail program will look for
  396. the existence of a .face file (in the above format) in the users home
  397. directory, and generate a similar header.
  398.  
  399. For users of other mailers, it is suggested that the X-Face: line[s] be
  400. added to your .signature file. Note that in this case, the initial line
  401. should have "X-Face: " prepended, and second and subsequent lines should
  402. start with at least one whitespace character.
  403.  
  404.  
  405. 6. Automatically updating the faces database.
  406. ---------------------------------------------
  407.  
  408. The -U command line option to the faces program allows you to automatically
  409. update your faces database with these "on-the-fly" X-Face: images. Note, that
  410. this alias is not automatically installed for you as this might be a security
  411. risk on your system.
  412.  
  413. If the -U option is given, then every time a new X-Face: image is found,
  414. a copy of the converted blit ikon format data is sent to a certain mail
  415. address. The subject line for this mail message is the name of the file
  416. that should be created (or overwritten) in the faces database.
  417.  
  418. By default this mail alias is called "facemaker" but can be altered in the
  419. Makefile. You would then need to add the following alias to your
  420. /etc/aliases (usr/lib/aliases) file:
  421.  
  422. facemaker:      "|/usr/local/bin/face_update"
  423.  
  424. This face_update program is a shell script, and is included with this
  425. distributions. For it to work correctly, the faces directory should be
  426. owned by 'daemon' (with read/write permissions), and readable by the
  427. rest of the world.
  428.  
  429.  
  430. 7. Acknowledgements.
  431. --------------------
  432.  
  433. Special thanks go to:
  434.  
  435. James Ashton for the mail header face compression / uncompression code.
  436.  
  437. Pat Lashley for fixing up the NeWS version; modifying it to use cps, and
  438. improving the quality of the NeWS code.
  439.  
  440. Chris Maltby for the parsefrom routine used to extract the username and
  441. hostname from the "From " and "From:"lines. Chris also supplied a shell
  442. script to convert Usenix FaceSaver images to 48x48x1 ikons, and a rewrite
  443. of the faces manual page..
  444.  
  445. Hal Stern for the face_update shell script.
  446.  
  447. Dan Heller and Bart Schaefer for adding support for .face files in
  448. their latest patch to v7.1 of the mush mailer.
  449.  
  450. Guy Harris for the basis of the previous manual page.
  451.  
  452. Dave Lemke for many excellent suggestions and help with the original
  453. version of the X11 code.
  454.  
  455. Heather Rose for suggesting the animated NeWS faces.
  456.  
  457. Andrew Nicholson for help with some of the trickier NeWS code in the
  458. previous version.
  459.  
  460. Rob Pike for sending me a copy of the Pike/Presotto paper "Face the Nation",
  461. which I used to get vismon compatibility.
  462.  
  463. Jonathan Bowen for suggesting the rusers monitoring addition.
  464.  
  465. C.P. Lai for the Sun386i icon code plus numerous bug reports.
  466.  
  467. Jim Knutson for improving the previous version of the hostname and username
  468. parsing.
  469.  
  470. Dave Cohrs for several fixes and enhancements, the addition of X11 bitmap
  471. support, and generally sorting out most of the problems with the X11 version.
  472.  
  473. Greg Dudek for an alternative version of "on-the-fly" X-Face imaging which
  474. hasn't been used.
  475.  
  476. Also thanks to Jeremy Cook, John Machin, Neil Crellin, Mark Andrews, Sjoerd
  477. Mullender, Cameron Humphries, Rick Gunderson, Rich McAllister, Hakon Lie,
  478. John Fong, Chris Maltby, Darryl K. Ramm, Steve Piette, Tony Landells and
  479. Pat Lashley for various bug reports, fixes and suggestions for improvement.
  480.  
  481.  
  482. ----------------------------------------------------------------------------
  483.  
  484. Suggestions for further improvement would be most welcome, plus bug reports
  485. and comments.
  486.  
  487. Rich Burridge,          DOMAIN: richb@Aus.Sun.COM
  488. PHONE: +61 2 413 2666   ACSnet: richb@sunaus.sun.oz.au
  489. Funky_Stuff
  490. len=`wc -c < README`
  491. if [ $len !=    13270 ] ; then
  492. echo error: README was $len bytes long, should have been    13270
  493. fi
  494. fi # end of overwriting check
  495. if [ -f TODO ]
  496. then
  497. echo shar: will not over-write existing file TODO
  498. else
  499. echo shar: extracting 'TODO',     4511 characters
  500. cat > TODO <<'Funky_Stuff'
  501. 1/ From Lindsay F. Marshall <Lindsay.Marshall%newcastle.ac.uk@munnari.oz>
  502.    The domain name munging (i..e a.b.c -> b.c -> c) doesnt
  503.    seem to work at all, and of course its the wrong way round
  504.    for the uk anyway.
  505.  
  506. 2/ Alias file people.tab should be capable of understanding:
  507.    sunaus/richb=sun/rburridge
  508.    or some such format.
  509.  
  510. 3/ From Ian Donaldson <rcodi@melomys.co.rmit.oz>
  511.    Is it possible to have the faces cleared automatically once the
  512.    mail has been read?  I'm clearing by clicking on the window at
  513.    the moment.
  514.  
  515. 4/ From Pat Lashley <patl@Sun.COM>
  516.    Have you given any thought to how to support multiple windowing systems at
  517.    execution time?  I am currently using the sun386i version of architecture
  518.    independant /vol trees to make locally installed programs available
  519.    transparently to both sun386i and sun3 users; but this does not address the
  520.    possibility of a single user who sometimes uses SunView, sometimes NeWS,
  521.    sometimes X, etc.. I have considered retaining the names sv_faces, x11_faces,
  522.    etc., with a customized version of start_applic which would determine which
  523.    windowing system is in use, and envoke the appropriate binary. The difficulty
  524.    is in how to determine which system is in use.
  525.  
  526. 5/ From: Chris Orgill, cho%cs.aber.ac.uk@uunet.uu.net
  527.    How about allowing the Sunview version to use arbitrary size Sun icons ?
  528.  
  529. 6/ From Lindsay F. Marshall <Lindsay.Marshall%newcastle.ac.uk@munnari.oz>
  530.    There is a byte-order assumption somewhere that screws up
  531.    any X bitmaps read in from a file - why dont you use the
  532.    procedure provided by the system rather than writing your
  533.    own?? That copes with the problems correctly.
  534.  
  535. 7/ The NeWS version needs to be finished.
  536.    Remaining problems are:
  537.  
  538.     (a) There are two warnings on compiling news.c, due to FILE operations
  539.         being performed on PSFILE variables.
  540.  
  541.     (b) The new input functionality (click left mouse and Del) has to be
  542.         added in.
  543.  
  544. 8/ With the XView version, add a Properties pinup window which would
  545.    allow you to change the various monitoring options on the fly.
  546.  
  547. 9/ Add in audio capabilities.
  548.  
  549. 10/ From Pat Lashley <patl@Sun.COM>
  550.     There is no reason that FaceSaver images couldn't be parsed by faces and
  551.     sent to NeWS with the appropriate transformation matrix to squeeze it down
  552.     to icon size.  Let the NeWS PostScript interpreter do the bit
  553.     compression/dithering.
  554.  
  555. 11/ If an X-Face is found inside a piece of mail that has been forwarded
  556.     inside another mail item, and the -U option is set, then it is possible
  557.     to update the wrong face in the faces database. The only clean solution
  558.     to this, is if faces only recognises X-Face lines in the mail header.
  559.  
  560. 12/ From Pat Lashley <patl@Sun.COM>
  561.     An entry of the form `+domainname=community' in the machines.tab file to
  562.     indicate that if a hostname is found without domain specifier, and it
  563.     doesn't match any other machines.tab entry, and YP (oops, NIS) access to
  564.     a server for `domain' is available, and the host matches a key in that
  565.     domain, consider it part of the indicated community. `+=community'
  566.     indicates that the current NIS domain should be used.  This should
  567.     probably be enabled by a compile-time option for those who don't run NIS.
  568.  
  569. 13/ From Pat Lashley <patl@Sun.COM>
  570.     An option to display unknown users individually with the username,
  571.     instead of clustered under a single `unknown' user.  Really hot would be
  572.     some way to specify this on a per-community basis...
  573.  
  574. 14/ From Pat Lashley <patl@Sun.COM>
  575.     Multiple face directory hierarchies. I.e:
  576.     `-f $HOME/facedir -f /import/group/facedir -f /import/global/facedir ...'
  577.     The order of specification would indicate the search order.
  578.  
  579. 15/ From Pat Lashley <patl@Sun.COM>
  580.     Accept SIGHUP as an indication that various internal databases should be
  581.     updated from the files (i.e. machines.tab), and that the display should be
  582.     immediatly updated to reflect current state instead of waiting for the
  583.     polling period to end.
  584.  
  585. 16/ From Pat Lashley <patl@Sun.COM>
  586.     Accept SIGALRM as an indication that the current polling period should be
  587.     immediatly terminated, and the display updated.
  588.  
  589. 17/ From Pat Lashley <patl@Sun.COM>
  590.     More internal comments and a general design document.
  591.  
  592. 18/ Provide a template of what each of the independent graphics routine do,
  593.     to aid porting to new graphics environments.
  594.  
  595. 19/ Add an option to disable flashing and beeping when new mail arrives.
  596.  
  597. 20/ Optimise.
  598. Funky_Stuff
  599. len=`wc -c < TODO`
  600. if [ $len !=     4511 ] ; then
  601. echo error: TODO was $len bytes long, should have been     4511
  602. fi
  603. fi # end of overwriting check
  604. if [ -f MANIFEST ]
  605. then
  606. echo shar: will not over-write existing file MANIFEST
  607. else
  608. echo shar: extracting 'MANIFEST',     2803 characters
  609. cat > MANIFEST <<'Funky_Stuff'
  610. This file tells you in which part of the faces distribution each
  611. file appeared.
  612.  
  613. Filename.                              |  Part #
  614. --------------------------------------------------
  615. README                                 |    4
  616. MANIFEST                               |    4
  617. FILES                                  |    4
  618. CHANGES                                |    4
  619. TODO                                   |    4
  620. Makefile                               |    4
  621. faces.1                                |    5
  622. face_update.1                          |    5
  623. face_update                            |    4
  624. main.c                                 |    1
  625. get.c                                  |    2
  626. mon.c                                  |    1
  627. parsefrom.c                            |    2
  628. rec.c                                  |    1
  629. news.c                                 |    2
  630. faces_cps.cps                          |    5
  631. sunview.c                              |    2
  632. xview.c                                |    3
  633. x11.c                                  |    3
  634. extern.h                               |    3
  635. faces.h                                |    3
  636. patchlevel.h                           |    3
  637. noface.icon                            |    5
  638. nomail.icon                            |    5
  639. noprint.icon                           |    5
  640. nopaper.icon                           |    5
  641. nousers.icon                           |    5
  642. compface/Makefile                      |    7
  643. compface/README                        |    7
  644. compface/compface.1                    |    7
  645. compface/compface.3                    |    7
  646. compface/arith.c                       |    7
  647. compface/compface.c                    |    7
  648. compface/compress.c                    |    7
  649. compface/file.c                        |    7
  650. compface/gen.c                         |    7
  651. compface/main.c                        |    7
  652. compface/compface.h                    |    7
  653. compface/data.h                        |    7
  654. facedir/machine.tab                    |    6
  655. facedir/people.tab                     |    6
  656. facedir/misc./acsnet/48x48x1           |    6
  657. facedir/misc./adm/48x48x1              |    6
  658. facedir/misc./bin/48x48x1              |    6
  659. facedir/misc./daemon/48x48x1           |    6
  660. facedir/misc./mailer-daemon/48x48x1    |    6
  661. facedir/misc./net/48x48x1              |    6
  662. facedir/misc./root/48x48x1             |    6
  663. facedir/misc./sys/48x48x1              |    6
  664. facedir/misc./unknown/48x48x1          |    6
  665. facedir/misc./uucp/48x48x1             |    6
  666. facedir/sunaus/richb/48x48x1           |    6
  667. filters/Makefile                       |    6
  668. filters/fs2ikon                        |    6
  669. filters/icon2ikon.c                    |    6
  670. filters/ikon2icon.c                    |    6
  671. filters/rs2icon.c                      |    6
  672. Funky_Stuff
  673. len=`wc -c < MANIFEST`
  674. if [ $len !=     2803 ] ; then
  675. echo error: MANIFEST was $len bytes long, should have been     2803
  676. fi
  677. fi # end of overwriting check
  678. if [ -f FILES ]
  679. then
  680. echo shar: will not over-write existing file FILES
  681. else
  682. echo shar: extracting 'FILES',     3815 characters
  683. cat > FILES <<'Funky_Stuff'
  684. The file describes all the files that make up the faces distribution.
  685.  
  686. Directory faces: the visual monitor for mail and other things.
  687. --------------------------------------------------------------
  688.  
  689. README          - describes what faces is, and how to get started.
  690. MANIFEST        - tells you what archive part each file was posted in.
  691. FILES           - what you're reading now.
  692. CHANGES         - change history. Will be updated with each new patch.
  693. TODO            - suggested enhancements. Volunteers anyone?
  694. Makefile        - used to build faces on Unix systems.
  695. faces.1         - the faces manual page (tbl + troff/nroff -man format).
  696. face_update     - shell script to automatically update the faces database.
  697. face_update.1   - the face_update manual page (troff/nroff -man format)
  698.  
  699. main.c          - STANDARD SOURCE FILES: includes declarations and main().
  700. get.c           - routines to get information, objects, icons etc..
  701. mon.c           - monitoring routines for mail, print, users etc..
  702. parsefrom.c     - routine to extract user and host names from the From line.
  703. rec.c           - various record manipulation routines.
  704.  
  705. news.c          - INDEPENDENT GRAPHICS FILES: NeWS C interface.
  706. faces_cps.cps   - cps PostScript code used by the NeWS version.
  707. sunview.c       - Sun SunView graphics routines.
  708. xview.c         - X11 XView toolkit graphics routines.
  709. x11.c           - X11 (Xlib) graphics routines.
  710.  
  711. extern.h        - External declarations.
  712. faces.h         - Macro and constant definitions.
  713. patchlevel.h    - Current patchlevel for this release of faces.
  714.  
  715. noface.icon     - STANDARD ICONS: no faces available.
  716. nomail.icon     - currently no mail in spoolfile.
  717. noprint.icon    - no jobs on print queue.
  718. nopaper.icon    - no paper in printer.
  719. nousers.icon    - no users on machine.
  720.  
  721.  
  722. Sub-directory compface: face ikon compression/uncompression.
  723. ------------------------------------------------------------
  724.  
  725. compface/Makefile      - used to build the compface programs and library.
  726. compface/README        - overview of the compface kit.
  727. compface/compface.1    - manual page for [un]compface programs.
  728. compface/compface.3    - manual page for [un]compface library routines.
  729.  
  730. compface/arith.c       - compface source files.
  731. compface/compface.c 
  732. compface/compress.c
  733. compface/file.c 
  734. compface/gen.c 
  735. compface/main.c
  736.  
  737. compface/compface.h    - compface include files.
  738. compface/data.h 
  739.  
  740.  
  741. Sub-directory facedir: sample face database and alias files.
  742. ------------------------------------------------------------
  743.  
  744. facedir/machine.tab                  - sample machine alias file.
  745. facedir/people.tab                   - sample people alias file.
  746. facedir/misc./acsnet/48x48x1         - SAMPLE ICONS: user acsnet
  747. facedir/misc./adm/48x48x1                                 adm
  748. facedir/misc./bin/48x48x1                                 bin
  749. facedir/misc./daemon/48x48x1                              daemon
  750. facedir/misc./mailer-daemon/48x48x1                       mailer-daemon
  751. facedir/misc./net/48x48x1                                 net
  752. facedir/misc./root/48x48x1                                root
  753. facedir/misc./sys/48x48x1                                 sys
  754. facedir/misc./unknown/48x48x1                             unknown
  755. facedir/misc./uucp/48x48x1                                uucp
  756. facedir/sunaus/richb/48x48x1                              richb@sunaus
  757.  
  758.  
  759. Sub-directory filters: sample filters to convert from one format to another.
  760. ----------------------------------------------------------------------------
  761.  
  762. filters/Makefile         - used to build the filters.
  763. filters/fs2ikon          - Usenix FaceSaver to blit ikon (48x48x1).
  764. filters/icon2ikon.c      - Sun icon to blit ikon.
  765. filters/ikon2icon.c      - Blit ikon to Sun icon.
  766. filters/rs2icon.c        - Sun rasterfile to Sun icon (64x64 portion thereof).
  767. Funky_Stuff
  768. len=`wc -c < FILES`
  769. if [ $len !=     3815 ] ; then
  770. echo error: FILES was $len bytes long, should have been     3815
  771. fi
  772. fi # end of overwriting check
  773. if [ -f Makefile ]
  774. then
  775. echo shar: will not over-write existing file Makefile
  776. else
  777. echo shar: extracting 'Makefile',    10910 characters
  778. cat > Makefile <<'Funky_Stuff'
  779. #
  780. #  Makefile for faces, an icon face server, plus associated software.
  781. #
  782. #  Graphical versions for NeWS, SunView, X11 and XView.
  783. #
  784. #  @(#)Makefile 1.15 90/06/29
  785. #
  786. #  Copyright (c) Rich Burridge.
  787. #                Sun Microsystems, Australia - All rights reserved.
  788. #
  789. #  Permission is given to distribute these sources, as long as the
  790. #  copyright messages are not removed, and no monies are exchanged. 
  791. #
  792. #  No responsibility is taken for any errors inherent either
  793. #  to the comments or the code of this program, but if reported
  794. #  to me then an attempt will be made to fix them.
  795. #
  796. #========================================================================
  797. #
  798. #  There are various small changes needed when compiling faces on
  799. #  different systems.  These have been isolated here, and should be
  800. #  uncommented and set accordingly, if needed.
  801. #
  802. #========================================================================
  803. #  Faces displays a background pattern in its' window. When the window
  804. #  is not completely full, this gives the appearance of trying to blend
  805. #  in with the background. By default, this is a root gray color, but you
  806. #  can specify an alternate pattern to use here.
  807. #
  808. #BACKGROUND       = -DBACKGROUND=\"\"
  809. #------------------------------------------------------------------------
  810. #  If you do not want to show the number of messages on the face icon,
  811. #  then uncomment the next line.
  812. #DONTSHOWNO       = -DDONTSHOWNO
  813. #------------------------------------------------------------------------
  814. #  If you do not want to show the timestamp on the face icon, then
  815. #  uncomment the next line.
  816. #
  817. #DONTSHOWTIME     = -DDONTSHOWTIME
  818. #------------------------------------------------------------------------
  819. #  If you do not want to show the username on the face icon, then
  820. #  uncomment the next line.
  821. #
  822. #DONTSHOWUSER     = -DDONTSHOWUSER
  823. #------------------------------------------------------------------------
  824. #  By default, faces looks for the face images in /usr/local/faces. If
  825. #  you wish to specify an alternate location, then these two lines should
  826. #  be uncommented and set appropriately.
  827. #               
  828. FACEDIR           = /usr/local/faces
  829. CFACEDIR    = -DFACEDIR=\"$(FACEDIR)\"
  830. #------------------------------------------------------------------------
  831. #  It is possible to determine what type of monitoring faces does at
  832. #  run time with different command line options, but it is also possible
  833. #  to define it at compile time.
  834. #
  835. #  Monitor type (0 = mail (all),  1 = mail (new), 2 = print queue).
  836. #                3 = custom prog, 4 = users).
  837. #
  838. #FMONTYPE         = -DFMONTYPE=1
  839. #------------------------------------------------------------------------
  840. #  Some users on monochrome screens display everything in reverse video.
  841. #  If you would like faces to do the same, then this line needs to be
  842. #  uncommented.
  843. #
  844. #INVERT           = -DINVERT
  845. #------------------------------------------------------------------------
  846. #  If you are compiling the NeWS version, then the following two lines
  847. #  should be uncommented, and set appropriately.
  848. #
  849. #NEWSINCDIR    = -I$(OPENWINHOME)/include
  850. #NEWSLIBDIR    = -L$(OPENWINHOME)/lib
  851. #------------------------------------------------------------------------
  852. #  If you don't want faces to use full domain names for extracting face
  853. #  icons, then you should uncomment the NODOMAINS definition below.
  854. #
  855. #NODOMAINS    = -DNODOMAINS
  856. #------------------------------------------------------------------------
  857. #  By default, faces will check the "From " line first for username and
  858. #  hostname, and then the "From:" line. 
  859. #  Not all machines have the index() string library function. If you
  860. #  don't have this function then you should uncomment the NOINDEX
  861. #  definition below.
  862. #
  863. #NOINDEX         = -DNOINDEX
  864. #--------------------------------------------------------------------------
  865. #  By default, faces rechecks for new mail or print jobs every sixty
  866. #  seconds. If you would like to specify an alternate period, then uncomment
  867. #  the following line and set appropriately.
  868. #
  869. #PERIOD           = -DPERIOD=30
  870. #------------------------------------------------------------------------
  871. #  Faces is designed to work on a big-endian machine by default. If you
  872. #  are compiling for a little-endian machine (such as the Sun 386i), then
  873. #  you need to uncomment the following line.
  874. #
  875. #REVORDER      = -DREVORDER
  876. #------------------------------------------------------------------------
  877. #  If you not running under a BSD4.3 derived system, the parameters
  878. #  to the select call are different, and this definition should be
  879. #  uncommented. You need to uncomment this for SunOS v3.x.
  880. #
  881. #SELTYPE        = -DNO_43SELECT
  882. #------------------------------------------------------------------------
  883. #  If faces is setup to monitor mail, then the name of the default
  884. #  spoolfile is /usr/spool/mail/username. An alternative spoolfile name
  885. #  can be given by uncommenting the following line and setting
  886. #  appropriately.
  887. #
  888. #SPOOLFILE       = -DSPOOLFILE=\"/usr/richb/Mail/pending\"
  889. #------------------------------------------------------------------------
  890. #  If you are running SunOS v3.x, then pr_ttext doesn't exist, and
  891. #  you must uncomment this definition.
  892. #
  893. #TTEXT          = -DNO_PR_TTEXT
  894. #------------------------------------------------------------------------
  895. #  If the -U command line option is given to faces, then mail is sent to
  896. #  a special mail alias. This alias is really a shell script, which will
  897. #  take the given information, and try to update the faces database. By
  898. #  default that alias is called "facemaker", but it is possible to give an
  899. #  alternative alias here. This might be useful if a collection of machines
  900. #  were remotely mounting the faces database from a file server.
  901. #
  902. #UPDATE        = -DUPDATE=\"facemaker@fileserver\"
  903. #------------------------------------------------------------------------
  904. #  If you are compiling the X11 version and the X11 include and
  905. #  library files are not in a standard place, then the following
  906. #  two lines should be uncommented, and set appropriately.
  907. #
  908. #X11INCDIR         = -I$(OPENWINHOME)/include
  909. #X11LIBDIR         = -L$(OPENWINHOME)/lib
  910. #------------------------------------------------------------------------
  911. #  If you are compiling the XView version, then the following two lines
  912. #  should be uncommented, and set appropriately.
  913. #
  914. #XVIEWINCDIR      = -I$(OPENWINHOME)/include
  915. #XVIEWLIBDIR      = -L$(OPENWINHOME)/lib
  916. #
  917. #=======================================================================
  918. #
  919. #  Default locations where faces files will be installed.
  920. #  You might wish to alter these values.
  921. #
  922. BINDIR        = /usr/local/bin
  923. LIBDIR        = /usr/local/lib
  924. MANDIR        = /usr/man
  925. MANSECT        = l
  926.  
  927. #
  928. #  Options for submakes
  929. #
  930. MAKEOPTS    = $(MFLAGS) BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) MANDIR=$(MANDIR)
  931.  
  932. #
  933. #  Compilation flags and standard macro definitions.
  934. #
  935. CDEFS        = $(BACKGROUND) $(DONTSHOWNO) $(DONTSHOWTIME) \
  936.           $(DONTSHOWUSER) $(CFACEDIR) $(FMONTYPE) $(INVERT) \
  937.           $(NEWSINCDIR) $(NODOMAINS) $(NOINDEX) $(PERIOD) \
  938.           $(REVORDER) $(SELTYPE) $(SPOOLFILE) $(TTEXT) $(UPDATE) \
  939.           $(X11INCDIR) $(XVIEWINCDIR)
  940. CCOMP        = -g
  941. CFLAGS        = $(CCOMP) $(CDEFS)
  942. #
  943. #=======================================================================
  944.  
  945. BINARIES    = psfaces svfaces xfaces xvfaces
  946.  
  947. CC        = cc
  948. MAKE        = make
  949.  
  950. STDSRCS        = get.c main.c mon.c parsefrom.c rec.c
  951. STDOBJS        = get.o main.o mon.o parsefrom.o rec.o
  952. STDLIBS        = compface/libcompface.a
  953.  
  954. COMPFACE    = compface
  955. FACES        = facedir
  956. FILTERS        = filters
  957. GSRCS        = news.c sunview.c x11.c xview.c
  958. HDRS        = extern.h faces.h patchlevel.h
  959. IMAGES        = noface.icon nomail.icon noprint.icon nopaper.icon \
  960.           nousers.icon
  961. OTHERS        = CHANGES README TODO MANIFEST FILES \
  962.           faces.1 face_update.1 faces_cps.cps Makefile face_update
  963.  
  964. SFILES1        = mon.c main.c rec.c
  965. SFILES2        = get.c parsefrom.c news.c sunview.c
  966. SFILES3        = xview.c x11.c $(HDRS)
  967. SFILES4        = CHANGES README TODO MANIFEST FILES Makefile
  968. SFILES5        = faces.1 face_update.1 faces_cps.cps face_update $(IMAGES)
  969. SFILES6        = $(FACES) $(FILTERS)
  970. SFILES7        = $(COMPFACE)
  971.  
  972. NEWSLIBS    = $(NEWSLIBDIR) -lcps
  973. SVIEWLIBS    = -lsuntool -lsunwindow -lpixrect
  974. X11LIBS        = $(X11LIBDIR) -lX11
  975. XVIEWLIBS    = $(XVIEWLIBDIR) -lxview -lolgx -lX11
  976.  
  977. help:
  978.         @echo
  979.         @echo "You need to specify one of the following options:"
  980.         @echo
  981.         @echo "  make sunview    - to make the SunView version."
  982.         @echo "  make news       - to make the NeWS version."
  983.         @echo "  make x11        - to make the X11 version."
  984.         @echo "  make xview      - to make the XView version."
  985.         @echo
  986.         @echo "This should be followed by:"
  987.         @echo
  988.         @echo "  make install"
  989.         @echo "  make clean"
  990.         @echo
  991.  
  992. all:        $(BINARIES)
  993.  
  994. news:        $(STDOBJS) news.o faces_cps.h
  995.         (cd compface; $(MAKE) $(MAKEOPTS))
  996.         (cd filters; $(MAKE) $(MAKEOPTS))
  997.         $(CC) -o psfaces $(CFLAGS) $(STDOBJS) news.o \
  998.                         $(STDLIBS) $(NEWSLIBS)
  999.         -cp psfaces faces
  1000.  
  1001. sunview:    $(STDOBJS) sunview.o
  1002.         (cd compface; $(MAKE) $(MAKEOPTS))
  1003.         (cd filters; $(MAKE) $(MAKEOPTS))
  1004.         $(CC) -o svfaces $(CFLAGS) $(STDOBJS) sunview.o \
  1005.                         $(STDLIBS) $(SVIEWLIBS)
  1006.         -cp svfaces faces
  1007.  
  1008. x11:        $(STDOBJS) x11.o
  1009.         (cd compface; $(MAKE) $(MAKEOPTS))
  1010.         (cd filters; $(MAKE) $(MAKEOPTS))
  1011.         $(CC) -o xfaces $(CFLAGS) $(STDOBJS) x11.o \
  1012.                         $(STDLIBS) $(X11LIBS)
  1013.         -cp xfaces faces
  1014.  
  1015. xview:        $(STDOBJS) xview.o
  1016.         (cd compface; $(MAKE) $(MAKEOPTS))
  1017.         (cd filters; $(MAKE) $(MAKEOPTS))
  1018.         $(CC) -o xvfaces $(CFLAGS) $(STDOBJS) xview.o \
  1019.                         $(STDLIBS) $(XVIEWLIBS)
  1020.         -cp xvfaces faces
  1021.  
  1022. install:
  1023.         (cd compface; $(MAKE) $(MAKEOPTS) install)
  1024.         (cd filters; $(MAKE) $(MAKEOPTS) install)
  1025.         install -s -m 751 faces $(BINDIR)
  1026.         install -c -m 755 face_update $(BINDIR)
  1027.         install -c -m 644 machine.tab $(FACEDIR)
  1028.         install -c -m 644 people.tab $(FACEDIR)
  1029.         install -c -m 644 faces.1 \
  1030.                 $(MANDIR)/man$(MANSECT)/faces.$(MANSECT)
  1031.         install -c -m 644 face_update.1 \
  1032.                 $(MANDIR)/man$(MANSECT)face_update.$(MANSECT)
  1033.  
  1034. clean:
  1035.         (cd compface; $(MAKE) $(MAKEOPTS) clean)
  1036.         (cd filters; $(MAKE) $(MAKEOPTS) clean)
  1037.         rm -f *.o Part* *~ $(BINARIES) faces core
  1038.  
  1039. lint:        lint-news lint-sunview lint-x11 lint-xview
  1040. lint-news:;    lint $(CDEFS) $(STDSRCS) news.c $(NEWSLIBS)
  1041. lint-sunview:;    lint $(CDEFS) $(STDSRCS) sunview.c $(SVIEWLIBS)
  1042. lint-x11:;    lint $(CDEFS) $(STDSRCS) x11.c
  1043. lint-xview:;    lint $(CDEFS) $(STDSRCS) xview.c
  1044.  
  1045. shar:;          shar.script $(SFILES1) > Part1
  1046.         shar.script $(SFILES2) > Part2
  1047.         shar.script $(SFILES3) > Part3
  1048.         shar.script $(SFILES4) > Part4
  1049.         shar.script $(SFILES5) > Part5
  1050.         shar.script $(SFILES6) > Part6
  1051.         shar.script $(SFILES7) > Part7
  1052.  
  1053. create:         SCCS
  1054.         -sccs create $(STDSRCS) $(GSRCS) $(HDRS) $(IMAGES) $(OTHERS)
  1055.  
  1056. SCCS:
  1057.         mkdir SCCS
  1058.         chmod 755 SCCS
  1059.  
  1060. faces_cps.h:    faces_cps.cps
  1061.         cps $<
  1062.  
  1063. get.o:        get.c faces.h extern.h patchlevel.h
  1064. main.o:        main.c faces.h $(IMAGES)
  1065. mon.o:        mon.c faces.h extern.h
  1066. news.o:        news.c faces.h extern.h faces_cps.h
  1067. rec.o:        rec.c faces.h extern.h
  1068. sunview.o:    sunview.c faces.h extern.h
  1069. x11.o:        x11.c faces.h extern.h
  1070. xview.o:    xview.c faces.h extern.h
  1071. Funky_Stuff
  1072. len=`wc -c < Makefile`
  1073. if [ $len !=    10910 ] ; then
  1074. echo error: Makefile was $len bytes long, should have been    10910
  1075. fi
  1076. fi # end of overwriting check
  1077.  
  1078.