[comp.sources.x] v12i047: xpbiff, Part01/01

shutoh@uunet.UU.NET (Kazuhiko Shutoh) (03/20/91)

Submitted-by: kddlab!isl.yamaha.co.jp!shutoh@uunet.UU.NET (Kazuhiko Shutoh)
Posting-number: Volume 12, Issue 47
Archive-name: xpbiff/part01

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Imakefile README XPbiff.ad arrive.bitmap no.bitmap
#   patchlevel.h xpbiff.c xpbiff.man
# Wrapped by shutoh@iruka on Fri Mar  1 17:31:54 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Imakefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Imakefile'\"
else
echo shar: Extracting \"'Imakefile'\" \(915 characters\)
sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
X# SCCS ID : @(#)Imakefile	1.6   2/28/91
X#
X#   Imakefile - Imakefile for xpbiff
X# 
X#   Author: Kazuhiko Shutoh, 1990.
X#
X#   Permission to use, copy, modify and distribute without charge this
X#   software, documentation, images, etc. is granted, provided that this 
X#   comment and the author's name is retained.  The author assumes no 
X#   responsibility for lost sleep as a consequence of use of this software.
X#
X#   Send any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or, 
X#   for oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net  
X#
X
X#	For X11R3
X#DEFINES = -DX11R3
X
X#	For SystemV
X#DEFINES = -DUSG
X
X#	For Slow WorkStation
X#DEFINES = -DSLOW_MACHINE
X
X#	No cuserid() in library.
X#DEFINES = -DNO_CUSERID
X
X       INCLUDES = -I$(TOP)/X11
XLOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
X  SYS_LIBRARIES = -lm
X           SRCS = xpbiff.c
X           OBJS = xpbiff.o
X
XComplexProgramTarget(xpbiff)
X
END_OF_FILE
if test 915 -ne `wc -c <'Imakefile'`; then
    echo shar: \"'Imakefile'\" unpacked with wrong size!
fi
# end of 'Imakefile'
fi
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(3468 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
X
X
X
X			xpbiff1.25 
X
X
X* Command line options
X
XUsage : xpbiff [Toolkit-Options][-nfg noarrive_bitmap_foreground color]
X                [-nbg noarrive_bitmap_background_color]
X		[-afg arrive_bitmap_foreground_color]
X                [-abg arrive_bitmap_background_color]
X		[-polling_time  time(msec)]
X                [-noraise][-nopopup][-noanimate][-nobell]
X		[-nopopdown][-patchlevel]
X		[-no_bitmap no_arrive_bitmap_filename]
X		[-arrive_bitmap arrive_bitmap_filename]
X		[-geometry popup_geometry]
X
X-nfg color_name :
X-nbg color_name :
X
X	Picture foreground / background color when still not arrive mail.
X	The default value is black and cyan.
X
X-afg color_name :
X-abg color_name :
X
X	Picture foreground / background color when arrive mail.
X	The default value is yellow and red.
X
X-polling_time  time(msec) :
X
X	Polling /usr/spool/mail interval time.
X	Default time is 15000[msec] = 15 [seconds]
X
X-noraise :
X	Do not raise up xpbiff when arrive mail.
X
X-nopopup :
X	Do not popup sender and subject information.
X
X-noanimate :
X	Do not animate.
X
X-nobell :
X	Do not bell.
X
X-nopopdown :
X	Do not show popdown button on sender information.
X
X-mono:
X	Color coordinates for monochrome server.
X
X-patchlevel :
X	Show current patchlevel and source code version.
X
X-no_bitmap filename:
X-arrive_bitmap filename:
X	Use any bitmap files.
X
X-geopetry geometry:
X	Set popup window geometry. This option can parse standard x geometry form.
X	Such as,
X		xpbiff -geometry +10+20
X
X* Compile
X
X	If you can't uses imake, Please manually compile:
X
X	% cc -o xpbiff xpbiff.c -lXaw -lXmu -lXt -lX11 -lm
X	or
X	% cc -o xpbiff xpbiff.c -lXaw -lXmu -lXt -lX11 -lXext -lm
X
X	If your server is toooo slow animation, Please try
X
X	#	DEFINES = -DSLOW_MACHINE
X
X	in Imakefile, then recompile with Imake.
X	Rotational mail animation become more shortly.
X
X						enjoy!!!
X
X* Comments & suggestion
X
X	Send any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or, 
X	for oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net  
X
X* Special Thanks to:
X
X	Bug report & fix suggestion :
X
X    Michael Glad <glad@daimi.aau.dk>
X    Andrew Krzywdzinski <andrew@cs.utk.edu>
X    Andy Malis <malis@BBN.COM>
X    Bob Primmer <rprimmer%lemond.webo.dg.com@RELAY.CS.NET>
X    Chris Garrigues <7thSon@SLCS.SLB.COM>
X    David Asano <david@comm.toronto.edu>
X    Felix Ingrand <felix@ai.sri.com>
X    Hidetsugu Nakashio <naka@soum.co.jp>
X    Ken Nelson <nelson@wrl.EPI.COM>
X    Luis Miguel Silveira <lms@sobolev.mit.edu>
X    Peter Jackson <peterj@cs.adelaide.edu.au>
X    Ricardo Cardenas <rcardena@us.oracle.com>
X    Robert Lupton (the Good) <rhl@astro.Princeton.EDU>
X    Steven Reiz <sreiz@cs.vu.nl>
X    Sting Takubon TAKEUCHI <take@train.ncl.omron.co.jp>
X    chiba@is.s.u-tokyo.ac.jp (Chiba)
X    hkato@krc.sony.co.jp (Hiroshi KATO)
X    hotta@flab.fujitsu.co.jp (Yuji Hotta)
X    imp@Solbourne.COM (Warner Losh)
X    jgraf@smdgr1.intel.com (Jim Graf )
X    lindheim@sampson.ccsf.caltech.edu (Jan Lindheim)
X    lusk@antares.mcs.anl.gov (Rusty Lusk)
X    masuhara@is.s.u-tokyo.ac.jp
X    murase@ctf5.drl.mei.co.jp (Kouichi Murase)
X    nishida@phantom.src.ricoh.co.jp (Akihiro Nishida)  
X    rekers@cwi.nl (Jan Rekers)
X    remy@cs.uoregon.edu (Remy Evard)
X    saka@pfu.fujitsu.co.JP (SAKAEDA Ken-ichi)
X    sako@joke.cl.nec.co.jp (SAKO Shinji)
X    site@mfd.cs.fujitsu.co.jp (SAITOH-Ely-Yasuhiro)
X    vita@oxford.dab.ge.com (Mark Vita)
X				
X					Thanks a lot!!!!!!!
X
X--
X						Kazuhiko Shutoh
X						InSoft System Lab.
X						YAMAHA Corp.
X						shutoh@isl.yamama.co.jp
X
X
END_OF_FILE
if test 3468 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'XPbiff.ad' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'XPbiff.ad'\"
else
echo shar: Extracting \"'XPbiff.ad'\" \(250 characters\)
sed "s/^X//" >'XPbiff.ad' <<'END_OF_FILE'
XXPbiff*info_base.hSpace: 0
XXPbiff*info_base.vSpace: 0
XXPbiff*info_base.background: lightgray
XXPbiff*info.foreground: white
XXPbiff*info.background: darkolivegreen
XXPbiff*popdown_button.background: lightslateblue
XXPbiff*popdown_button.foreground: pink
END_OF_FILE
if test 250 -ne `wc -c <'XPbiff.ad'`; then
    echo shar: \"'XPbiff.ad'\" unpacked with wrong size!
fi
# end of 'XPbiff.ad'
fi
if test -f 'arrive.bitmap' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'arrive.bitmap'\"
else
echo shar: Extracting \"'arrive.bitmap'\" \(1880 characters\)
sed "s/^X//" >'arrive.bitmap' <<'END_OF_FILE'
X#define arrive_width 48
X#define arrive_height 48
Xstatic char arrive_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x1f,
X   0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f,
X   0xfc, 0xea, 0xff, 0xff, 0xff, 0x3f, 0x7c, 0xe0, 0xff, 0xff, 0xff, 0x3f,
X   0x3c, 0xcf, 0xff, 0xff, 0xff, 0x3f, 0x7c, 0xef, 0xff, 0xff, 0xff, 0x3f,
X   0x3c, 0xcf, 0xff, 0xff, 0xff, 0x3f, 0x7c, 0xef, 0xff, 0xff, 0xff, 0x3f,
X   0x3c, 0xcf, 0xff, 0xff, 0xff, 0x3f, 0x7c, 0xe0, 0xff, 0xff, 0xff, 0x3f,
X   0x7c, 0xf5, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f,
X   0xfc, 0x7f, 0x61, 0xa9, 0xf0, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f,
X   0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xc2, 0x11, 0xfa, 0x3f,
X   0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f,
X   0xfc, 0x7f, 0x41, 0x64, 0xfd, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f,
X   0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0x7f, 0x26, 0xfc, 0xff, 0x3f,
X   0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0x15, 0x3f,
X   0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0x2a, 0x3f,
X   0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x1f,
X   0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c,
X   0xc0, 0x00, 0x00, 0x02, 0x00, 0x1c, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x1c,
X   0x20, 0x91, 0x65, 0x26, 0x72, 0x08, 0x20, 0x51, 0x14, 0x22, 0x8a, 0x08,
X   0xf0, 0x33, 0x0c, 0x22, 0x8a, 0x00, 0x10, 0x32, 0x0c, 0x42, 0x79, 0x08,
X   0x08, 0x14, 0x04, 0x82, 0x08, 0x1c, 0x08, 0x14, 0x04, 0x87, 0xf0, 0x08,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
END_OF_FILE
if test 1880 -ne `wc -c <'arrive.bitmap'`; then
    echo shar: \"'arrive.bitmap'\" unpacked with wrong size!
fi
# end of 'arrive.bitmap'
fi
if test -f 'no.bitmap' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'no.bitmap'\"
else
echo shar: Extracting \"'no.bitmap'\" \(1868 characters\)
sed "s/^X//" >'no.bitmap' <<'END_OF_FILE'
X#define no_width 48
X#define no_height 48
Xstatic char no_bits[] = {
X   0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf7, 0x41, 0x44, 0x2f, 0x7a,
X   0xff, 0x07, 0xe0, 0x45, 0x69, 0x0b, 0xff, 0x07, 0x50, 0x44, 0xa9, 0x0a,
X   0xff, 0x03, 0xe0, 0x7c, 0xa9, 0x3a, 0xff, 0x0b, 0x40, 0x45, 0x29, 0x0a,
X   0xff, 0x31, 0xf0, 0x44, 0x29, 0x0a, 0xff, 0xc0, 0x40, 0x44, 0x2f, 0x7a,
X   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x02, 0x00, 0x00, 0x00, 0xff,
X   0x0f, 0x04, 0x00, 0x00, 0x80, 0xff, 0x00, 0x08, 0x00, 0x00, 0xc0, 0xff,
X   0x22, 0x08, 0x00, 0x00, 0xe0, 0xff, 0x22, 0x00, 0x00, 0x00, 0xf0, 0xff,
X   0x42, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x42, 0x00, 0x00, 0x00, 0xfc, 0xff,
X   0x02, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
X   0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0xe4, 0xff, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00,
X   0x00, 0x00, 0x80, 0x0f, 0xa4, 0xdf, 0x00, 0x00, 0x40, 0x10, 0xa4, 0x50,
X   0x00, 0x00, 0x40, 0x10, 0xa4, 0x50, 0x00, 0x00, 0x40, 0x17, 0xa4, 0x50,
X   0x00, 0x00, 0x40, 0x10, 0xa4, 0xdf, 0x00, 0x00, 0x40, 0x10, 0x24, 0x00,
X   0x00, 0x00, 0x40, 0x10, 0xa4, 0xdf, 0x00, 0x00, 0x40, 0x10, 0xa4, 0x50,
X   0x00, 0x00, 0xc0, 0x1f, 0xa4, 0x50, 0x00, 0x14, 0x00, 0x02, 0xa4, 0x50,
X   0x50, 0x20, 0x00, 0x02, 0xa4, 0xdf, 0xc8, 0x0a, 0x00, 0x02, 0x24, 0x00,
X   0xac, 0x20, 0x00, 0x02, 0xe4, 0xff, 0x10, 0x0c, 0x00, 0x02, 0x04, 0x00,
X   0xa8, 0x08, 0x00, 0x02, 0x04, 0x00, 0x20, 0x28, 0x00, 0x02, 0x04, 0x00,
X   0x24, 0x1d, 0x00, 0x02, 0x04, 0x00, 0xa8, 0x08, 0x00, 0xc2, 0x0f, 0x00,
X   0x70, 0x7f, 0x00, 0x3e, 0xf0, 0xff, 0xff, 0x81, 0xff, 0x01, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
END_OF_FILE
if test 1868 -ne `wc -c <'no.bitmap'`; then
    echo shar: \"'no.bitmap'\" unpacked with wrong size!
fi
# end of 'no.bitmap'
fi
if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'patchlevel.h'\"
else
echo shar: Extracting \"'patchlevel.h'\" \(25 characters\)
sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
X
X#define PATCHLEVEL 0
X
X
X
END_OF_FILE
if test 25 -ne `wc -c <'patchlevel.h'`; then
    echo shar: \"'patchlevel.h'\" unpacked with wrong size!
fi
# end of 'patchlevel.h'
fi
if test -f 'xpbiff.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xpbiff.c'\"
else
echo shar: Extracting \"'xpbiff.c'\" \(21523 characters\)
sed "s/^X//" >'xpbiff.c' <<'END_OF_FILE'
X
Xstatic char     sccsid[] = "@(#)xpbiff.c	1.25   2/28/91";
X
X/*
X * xpbiff - popup biff for X
X * 
X * Author: Kazuhiko Shutoh, 1990.
X *
X *  Special thanks for comment, bug fix, testing to:
X *
X *  Michael Glad <glad@daimi.aau.dk>
X *  Andrew Krzywdzinski <andrew@cs.utk.edu>
X *  Andy Malis <malis@BBN.COM>
X *  Bob Primmer <rprimmer%lemond.webo.dg.com@RELAY.CS.NET>
X *  Chris Garrigues <7thSon@SLCS.SLB.COM>
X *  David Asano <david@comm.toronto.edu>
X *  Felix Ingrand <felix@ai.sri.com>
X *  Hidetsugu Nakashio <naka@soum.co.jp>
X *  Ken Nelson <nelson@wrl.EPI.COM>
X *  Luis Miguel Silveira <lms@sobolev.mit.edu>
X *  Peter Jackson <peterj@cs.adelaide.edu.au>
X *  Ricardo Cardenas <rcardena@us.oracle.com>
X *  Robert Lupton (the Good) <rhl@astro.Princeton.EDU>
X *  Steven Reiz <sreiz@cs.vu.nl>
X *  Sting Takubon TAKEUCHI <take@train.ncl.omron.co.jp>
X *  chiba@is.s.u-tokyo.ac.jp (Chiba)
X *  hkato@krc.sony.co.jp (Hiroshi KATO)
X *  hotta@flab.fujitsu.co.jp (Yuji Hotta)
X *  imp@Solbourne.COM (Warner Losh)
X *  jgraf@smdgr1.intel.com (Jim Graf )
X *  lindheim@sampson.ccsf.caltech.edu (Jan Lindheim)
X *  lusk@antares.mcs.anl.gov (Rusty Lusk)
X *  masuhara@is.s.u-tokyo.ac.jp
X *  murase@ctf5.drl.mei.co.jp (Kouichi Murase)
X *  nishida@phantom.src.ricoh.co.jp (Akihiro Nishida)  
X *  rekers@cwi.nl (Jan Rekers)
X *  remy@cs.uoregon.edu (Remy Evard)
X *  saka@pfu.fujitsu.co.JP (SAKAEDA Ken-ichi)
X *  sako@joke.cl.nec.co.jp (SAKO Shinji)
X *  site@mfd.cs.fujitsu.co.jp (SAITOH-Ely-Yasuhiro)
X *  vita@oxford.dab.ge.com (Mark Vita)
X *
X *
X *						THANKS A LOT!!!!
X *
X *
X * Permission to use, copy, modify and distribute without charge this software,
X * documentation, images, etc. is granted, provided that this comment and the
X * author's name is retained.  The author assumes no responsibility for lost
X * sleep as a consequence of use of this software.
X * 
X * Send any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or, for
X * oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net
X * 
X */
X
X#include <X11/Intrinsic.h>
X#include <X11/StringDefs.h>
X#include <X11/Shell.h>
X
X#ifndef X11R3
X#include <X11/Xaw/Box.h>
X#include <X11/Xaw/Label.h>
X#include <X11/Xaw/Command.h>
X#include <X11/Xaw/Cardinals.h>
X#include <X11/Xmu/Drawing.h>
X#else
X#include <X11/Box.h>
X#include <X11/Label.h>
X#include <X11/Command.h>
X#include <X11/Cardinals.h>
Xtyoedef char* XtPointer;
X#endif
X
X#include <X11/Xos.h>
X
X#ifndef O_RDONLY
X#include <fcntl.h>
X#endif
X
X#include <sys/types.h>
X#include <sys/stat.h>
X#include <stdio.h>
X#include <math.h>
X
X#include "patchlevel.h"
X#include "arrive.bitmap"
X#include "no.bitmap"
X
X#define	PI	3.141592654
X#define	ARRIVE	1
X#define	NO	0
X#ifdef	SLOW_MACHINE
X#define	ROTATION	180	/* For Slow Server */
X#else
X#define	ROTATION	720
X#endif
X 
X#ifdef USG
X#define SPOOLPATH	"/usr/mail/"
X#else
X#define SPOOLPATH	"/usr/spool/mail/"
X#endif
X
XXtCallbackProc  redraw_callback();
XXtCallbackProc  BreakPopup();
XXtCallbackProc  popup_again();
XXtTimerCallbackProc Polling();
Xchar           *GetMailHeader();
Xvoid            PopupMailHeader();
Xvoid            AnimateBiff();
X
XWidget          toplevel, biff, header, info_base, info, popdown_button;
X
X
X/*
X * widget tree:
X * 
X * toplevel --- biff ... header --- info_base ---+--- popdown_button 
X *                                               +--- info
X * 
X */
X
XGC              gcBiff, gcAnimate, gcAnimateBack;
XPixmap          arrivePixmap, noPixmap, workPixmap;
Xint             width, height, popup_geometry_x, popup_geometry_y;
Xunsigned char   current_status;
Xunsigned char   showing_header = 0;
Xlong            mail_size = 0;
XXtIntervalId    polling_id;
X
XString          colors[4] = {"dummy_colorname", "dummy_colorname", "dummy_colorname", "dummy_colorname"};
Xchar            spool_path[100];
Xunsigned long   polling_time = 15000;	/* Default 15 second */
X
Xunsigned char   raise = True;
Xunsigned char	stay_raised = False;
Xunsigned char   animate = True;
Xunsigned char   popup = True;
Xunsigned char   bell = True;
Xunsigned char   popdown = True;
Xunsigned char   popup_geometry = False;
X
Xchar		*Arrive_bitmap;
Xunsigned int	Arrive_bitmap_width, Arrive_bitmap_height;
X
Xchar		*No_bitmap;
Xunsigned int	No_bitmap_width, No_bitmap_height;
X
X
Xmain(argc, argv)
X	int             argc;
X	char          **argv;
X{
X
X	Arg             args[10];
X	XtTranslations  newTranslations;
X	static XtActionsRec redrawActions[] = {
X		{"expose", (XtCallbackProc) redraw_callback},
X		{"select", (XtCallbackProc) popup_again},
X	};
X
X	static char    *overrideTranslations =
X	"<Expose>:	expose() \n\
X	 <ResReq>:	expose() \n\
X         <Btn1Up>:      select()";
X
X	XColor          backColor, foreColor, dummyColor;
X
X	char		*arrive_bitmap_file;
X	char		*no_bitmap_file;
X
X	int		dummy;
X	int             i;
X	int             count;
X
X	XtTimerCallbackProc Polling();
X
X	strcpy(spool_path, SPOOLPATH);
X#ifndef NO_CUSERID
X	strcat(spool_path, cuserid(NULL));
X#else
X	strcat(spool_path, getenv("USER"));
X#endif
X	strcpy(colors[0], "black");
X	strcpy(colors[1], "cyan");
X	strcpy(colors[2], "yellow");
X	strcpy(colors[3], "red");
X
X	toplevel = XtInitialize("xpbiff", "XPbiff", NULL, 0, &argc, argv);
X
X	arrive_bitmap_file = NULL;
X	no_bitmap_file = NULL;
X
X	for (count = 1; count < argc; count++) {
X		if ((strcmp("-nfg", argv[count]) == 0) && (count + 1 <= argc))
X			strcpy(colors[0], argv[++count]);
X		else if ((strcmp("-nbg", argv[count]) == 0) && (count + 1 <= argc))
X			strcpy(colors[1], argv[++count]);
X		else if ((strcmp("-afg", argv[count]) == 0) && (count + 1 <= argc))
X			strcpy(colors[2], argv[++count]);
X		else if ((strcmp("-abg", argv[count]) == 0) && (count + 1 <= argc))
X			strcpy(colors[3], argv[++count]);
X		else if ((strcmp("-polling_time", argv[count]) == 0) && (count + 1 <= argc))
X			polling_time = (unsigned long) atol(argv[++count]);
X		else if ((strcmp("-noraise", argv[count]) == 0) && (count + 1 <= argc))
X			raise = False;
X		else if ((strcmp("-keepup", argv[count]) == 0) && (count + 1 <= argc))
X 			stay_raised = True;
X		else if ((strcmp("-nopopup", argv[count]) == 0) && (count + 1 <= argc))
X			popup = False;
X		else if ((strcmp("-noanimate", argv[count]) == 0) && (count + 1 <= argc))
X			animate = False;
X		else if ((strcmp("-nobell", argv[count]) == 0) && (count + 1 <= argc))
X			bell = False;
X		else if ((strcmp("-nopopdown", argv[count]) == 0) && (count + 1 <= argc))
X			popdown = False;
X		else if ((strcmp("-mono", argv[count]) == 0) && (count + 1 <= argc)) {
X			strcpy(colors[0], "black");
X			strcpy(colors[1], "white");
X			strcpy(colors[2], "white");
X			strcpy(colors[3], "black");
X		} else if ((strcmp("-patchlevel", argv[count]) == 0) && (count + 1 <= argc)) {
X			printf("xpbiff -  written by Kazuhiko Shutoh\nSCCS ID : %s\nPatchlevel : %d\n", sccsid, PATCHLEVEL);
X			printf("\nSpecial thanks to:\n\
X	Michael Glad <glad@daimi.aau.dk>\n\
X	Andrew Krzywdzinski <andrew@cs.utk.edu>\n\
X	Andy Malis <malis@BBN.COM>\n\
X	Bob Primmer <rprimmer%lemond.webo.dg.com@RELAY.CS.NET>\n\
X	Chris Garrigues <7thSon@SLCS.SLB.COM>\n\
X	David Asano <david@comm.toronto.edu>\n\
X	Felix Ingrand <felix@ai.sri.com>\n\
X	Hidetsugu Nakashio <naka@soum.co.jp>\n\
X	Ken Nelson <nelson@wrl.EPI.COM>\n\
X	Luis Miguel Silveira <lms@sobolev.mit.edu>\n\
X	Peter Jackson <peterj@cs.adelaide.edu.au>\n\
X	Ricardo Cardenas <rcardena@us.oracle.com>\n\
X	Robert Lupton (the Good) <rhl@astro.Princeton.EDU>\n\
X	Steven Reiz <sreiz@cs.vu.nl>\n\
X	Sting Takubon TAKEUCHI <take@train.ncl.omron.co.jp>\n\
X	chiba@is.s.u-tokyo.ac.jp (Chiba)\n\
X	hkato@krc.sony.co.jp (Hiroshi KATO)\n\
X	hotta@flab.fujitsu.co.jp (Yuji Hotta)\n\
X	imp@Solbourne.COM (Warner Losh)\n\
X	jgraf@smdgr1.intel.com (Jim Graf )\n\
X	lindheim@sampson.ccsf.caltech.edu (Jan Lindheim)\n\
X	lusk@antares.mcs.anl.gov (Rusty Lusk)\n\
X	masuhara@is.s.u-tokyo.ac.jp\n\
X	murase@ctf5.drl.mei.co.jp (Kouichi Murase)\n\
X	nishida@phantom.src.ricoh.co.jp (Akihiro Nishida)  \n\
X	rekers@cwi.nl (Jan Rekers)\n\
X	remy@cs.uoregon.edu (Remy Evard)\n\
X 	saka@pfu.fujitsu.co.JP (SAKAEDA Ken-ichi)\n\
X 	sako@joke.cl.nec.co.jp (SAKO Shinji)\n\
X	site@mfd.cs.fujitsu.co.jp (SAITOH-Ely-Yasuhiro)\n\
X	vita@oxford.dab.ge.com (Mark Vita)\n");
X			exit(0);
X		} else if ((strcmp("-arrive_bitmap", argv[count]) == 0) && (count + 1 <= argc)) {
X			arrive_bitmap_file = argv[++count];
X		} else 	if ((strcmp("-no_bitmap", argv[count]) == 0) && (count + 1 <= argc)) {
X			no_bitmap_file = argv[++count];
X		} else 	if ((strcmp("-popup_geometry", argv[count]) == 0) && (count + 1 <= argc)) {
X			popup_geometry = True;
X			XParseGeometry(argv[++count], &popup_geometry_x, &popup_geometry_y, &dummy, &dummy);
X		} else {
X			fprintf(stderr, "Usage : xpbiff [Toolkit-Options]\n");
X			fprintf(stderr, "		[-nfg noarrive_bitmap_foreground color]\n");
X			fprintf(stderr, "		[-nbg noarrive_bitmap_background_color]\n");
X			fprintf(stderr, "		[-afg arrive_bitmap_foreground_color]\n");
X			fprintf(stderr, "		[-abg arrive_bitmap_background_color]\n");
X			fprintf(stderr, "		[-polling_time  time(msec)]\n");
X			fprintf(stderr, "		[-noraise]\n");
X			fprintf(stderr, "		[-nopopup]\n");
X			fprintf(stderr, "		[-noanimate]\n");
X			fprintf(stderr, "		[-nopopdown]\n");
X			fprintf(stderr, "		[-keepup]\n");
X			fprintf(stderr, "		[-nobell]\n");
X			fprintf(stderr, "		[-mono]\n");
X			fprintf(stderr, "		[-patchlevel]\n");
X			fprintf(stderr, "		[-no_bitmap bitmap_file]\n");
X			fprintf(stderr, "		[-arrive_bitmap bitmap_file]\n");
X			fprintf(stderr, "		[-popup_geometry geometry]\n");
X			exit(0);
X		}
X	}
X
X	if (no_bitmap_file == NULL)
X	{
X		No_bitmap = no_bits;
X		No_bitmap_width = no_width;
X		No_bitmap_height = no_height;
X	}
X	else
X	{
X		if(XmuReadBitmapDataFromFile(no_bitmap_file, &No_bitmap_width, &No_bitmap_height,
X				&No_bitmap, &dummy, &dummy) != BitmapSuccess) {
X			fprintf(stderr, "cannot make a bitmap '%s'.\n", no_bitmap_file);
X			exit(1);
X		}
X		
X	}
X
X	if (arrive_bitmap_file == NULL)
X	{
X		Arrive_bitmap = arrive_bits;
X		Arrive_bitmap_width = arrive_width;
X		Arrive_bitmap_height = arrive_height;
X	}
X	else
X	{
X		if(XmuReadBitmapDataFromFile(arrive_bitmap_file, &Arrive_bitmap_width, &Arrive_bitmap_height,
X				&Arrive_bitmap, &dummy, &dummy) != BitmapSuccess) {
X			fprintf(stderr, "cannot make a bitmap '%s'.\n", arrive_bitmap_file);
X			exit(1);
X		}
X		
X	}
X
X
X	i = 0;
X	XtSetArg(args[i], XtNwidth, No_bitmap_width);
X	i++;
X	XtSetArg(args[i], XtNheight, No_bitmap_height);
X	i++;
X	biff = XtCreateManagedWidget("biff", boxWidgetClass, toplevel, args, i);
X
X	XtAddActions(redrawActions, XtNumber(redrawActions));
X	newTranslations = XtParseTranslationTable(overrideTranslations);
X	XtOverrideTranslations(biff, newTranslations);
X
X	XtRealizeWidget(toplevel);
X
X	/* Get graphic context	 */
X
X	gcBiff = XCreateGC(XtDisplay(toplevel), XtWindow(biff),
X			   (unsigned long) 0, NULL);
X	XSetGraphicsExposures(XtDisplay(toplevel), gcBiff, False);
X
X	/* Create Pixmap's */
X
X	XAllocNamedColor(XtDisplay(toplevel), DefaultColormapOfScreen(XtScreen(toplevel)), colors[0], &foreColor, &dummyColor);
X	XAllocNamedColor(XtDisplay(toplevel), DefaultColormapOfScreen(XtScreen(toplevel)), colors[1], &backColor, &dummyColor);
X
X	noPixmap = XCreatePixmapFromBitmapData(XtDisplay(toplevel), XtWindow(biff),
X		  No_bitmap, No_bitmap_width, No_bitmap_height, foreColor.pixel,
X		 backColor.pixel, DefaultDepthOfScreen(XtScreen(toplevel)));
X
X	XAllocNamedColor(XtDisplay(toplevel), DefaultColormapOfScreen(XtScreen(toplevel)), colors[2], &foreColor, &dummyColor);
X	XAllocNamedColor(XtDisplay(toplevel), DefaultColormapOfScreen(XtScreen(toplevel)), colors[3], &backColor, &dummyColor);
X
X	arrivePixmap = XCreatePixmapFromBitmapData(XtDisplay(toplevel), XtWindow(biff),
X		  Arrive_bitmap, Arrive_bitmap_width, Arrive_bitmap_height, foreColor.pixel,
X		 backColor.pixel, DefaultDepthOfScreen(XtScreen(toplevel)));
X
X	workPixmap = XCreatePixmap(XtDisplay(toplevel), XtWindow(biff), Arrive_bitmap_width, Arrive_bitmap_height, DefaultDepthOfScreen(XtScreen(toplevel)));
X
X	gcAnimate = XCreateGC(XtDisplay(toplevel), XtWindow(biff),
X			      (unsigned long) 0, NULL);
X	XSetGraphicsExposures(XtDisplay(toplevel), gcAnimate, False);
X	XSetForeground(XtDisplay(toplevel), gcAnimate, foreColor.pixel);
X
X	gcAnimateBack = XCreateGC(XtDisplay(toplevel), XtWindow(biff),
X				  (unsigned long) 0, NULL);
X	XSetGraphicsExposures(XtDisplay(toplevel), gcAnimateBack, False);
X	XSetForeground(XtDisplay(toplevel), gcAnimateBack, backColor.pixel);
X
X	/* Interval timer start	 */
X	polling_id = XtAddTimeOut(polling_time, Polling, NULL);
X
X	XtMainLoop();
X}
X
X
XXtCallbackProc
Xredraw_callback(w, event, params, nparams)
X	Widget          w;
X	XEvent         *event;
X	String         *params;
X	Cardinal       *nparams;
X{
X
X	Arg             args[10];
X
X	XtSetArg(args[0], XtNwidth, 0);
X	XtSetArg(args[1], XtNheight, 0);
X	XtGetValues(w, args, 2);
X
X	width = args[0].value;
X	height = args[1].value;
X
X	if (current_status == ARRIVE) {
X		XCopyArea(XtDisplay(toplevel), arrivePixmap, XtWindow(biff), gcBiff, 0, 0, Arrive_bitmap_width, Arrive_bitmap_height, 0, 0);
X	} else {
X		XCopyArea(XtDisplay(toplevel), noPixmap, XtWindow(biff), gcBiff, 0, 0, No_bitmap_width, No_bitmap_height, 0, 0);
X	}
X}
X
X
XXtTimerCallbackProc
XPolling(client_data, id)
X	caddr_t         client_data;
X	XtIntervalId    *id;
X{
X
X	struct stat     file_stat;
X	char           *mail_header;
X
X
X	if ((stat(spool_path, &file_stat) == 0) && (file_stat.st_size != 0)) {
X		/* There are Mail */
X
X		if (current_status == NO) {
X			/* NEW mail !! */
X			current_status = ARRIVE;
X			mail_size = file_stat.st_size;
X			if (popup == True)
X				mail_header = GetMailHeader();
X			XtResizeWidget(toplevel,  Arrive_bitmap_width, Arrive_bitmap_height, 1);
X			XtResizeWidget(biff,  Arrive_bitmap_width, Arrive_bitmap_height, 0);
X			if (raise == True)
X			XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel));
X			if (animate == True)
X				AnimateBiff();
X			XCopyArea(XtDisplay(toplevel), arrivePixmap, XtWindow(biff),
X			   gcBiff, 0, 0, Arrive_bitmap_width, Arrive_bitmap_height, 0, 0);
X			if (popup == True)
X				PopupMailHeader(mail_header);
X			XSync(XtDisplay(toplevel), 0);
X			if (bell == True)
X				XBell(XtDisplay(toplevel), 0);
X		} else if (file_stat.st_size > mail_size) {
X			mail_size = file_stat.st_size;
X			if (popup == True)
X				mail_header = GetMailHeader();
X			/* more come! only ringing bell. */
X			if (popup == True)
X				BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL);
X			XtResizeWidget(toplevel,  Arrive_bitmap_width, Arrive_bitmap_height, 1);
X			XtResizeWidget(biff,  Arrive_bitmap_width, Arrive_bitmap_height, 0);
X			if (raise == True)
X			XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel));
X			if (animate == True)
X				AnimateBiff();
X			XCopyArea(XtDisplay(toplevel), arrivePixmap, XtWindow(biff),
X			   gcBiff, 0, 0, Arrive_bitmap_width, Arrive_bitmap_height, 0, 0);
X			if (popup == True)
X				PopupMailHeader(mail_header);
X			XSync(XtDisplay(toplevel), 0);
X			if (bell == True)
X				XBell(XtDisplay(toplevel), 0);
X		} else {
X			mail_size = file_stat.st_size;
X			if (raise == True && stay_raised == False)
X				XLowerWindow(XtDisplay(toplevel), XtWindow(toplevel));
X			if (popup == True)
X				BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL);
X		}
X	} else
X		/* No mail */
X	if (current_status == ARRIVE) {
X		current_status = NO;
X		XtResizeWidget(toplevel,  No_bitmap_width, No_bitmap_height, 1);
X		XtResizeWidget(biff,  No_bitmap_width, No_bitmap_height, 0);
X		XCopyArea(XtDisplay(toplevel), noPixmap, XtWindow(biff), gcBiff, 0, 0,
X			  No_bitmap_width, No_bitmap_height, 0, 0);
X		if (raise == True && stay_raised == False)
X			XLowerWindow(XtDisplay(toplevel), XtWindow(toplevel));
X		if (popup == True)
X			BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL);
X	}
X	/* No arrive */
X
X	polling_id = XtAddTimeOut(polling_time, Polling, NULL);
X
X}
X
X
Xvoid
XAnimateBiff()
X{
X
X	XPoint          points[4];
X	double          r, angle, t1, t2, t3, t4;
X
X
X	for (r = 0, angle = 90; angle < (ROTATION + 90); angle++, r += (double) (Arrive_bitmap_width) / (double) (ROTATION * 2)) {
X
X		t1 = (angle + 40) * PI / 180.0;
X		t2 = (angle + 140) * PI / 180.0;
X		t3 = (angle + 220) * PI / 180.0;
X		t4 = (angle + 320) * PI / 180.0;
X
X		points[0].x = (short) (sin(t1) * r + (double) Arrive_bitmap_width / 2);
X		points[0].y = (short) (cos(t1) * r + (double) Arrive_bitmap_height / 2 - 5);
X		points[1].x = (short) (sin(t2) * r + (double) Arrive_bitmap_width / 2);
X		points[1].y = (short) (cos(t2) * r + (double) Arrive_bitmap_height / 2 - 5);
X		points[2].x = (short) (sin(t3) * r + (double) Arrive_bitmap_width / 2);
X		points[2].y = (short) (cos(t3) * r + (double) Arrive_bitmap_height / 2 - 5);
X		points[3].x = (short) (sin(t4) * r + (double) Arrive_bitmap_width / 2);
X		points[3].y = (short) (cos(t4) * r + (double) Arrive_bitmap_height / 2 - 5);
X
X		XFillRectangle(XtDisplay(toplevel), workPixmap, gcAnimateBack, 0, 0, Arrive_bitmap_width, Arrive_bitmap_height);
X		XFillPolygon(XtDisplay(toplevel), workPixmap, gcAnimate, points, 4, Convex, CoordModeOrigin);
X		XCopyArea(XtDisplay(toplevel), workPixmap, XtWindow(biff), gcAnimate, 0, 0, Arrive_bitmap_width, Arrive_bitmap_height, 0, 0);
X	}
X
X}
X
X
Xvoid
XPopupMailHeader(head)
X	char           *head;
X{
X
X	Arg             args[5];
X	int             arg_count;
X	Position        biff_x, biff_y, root_x, root_y;
X
X	/* Calcurate Relative position -> Root absolute position */
X
X	arg_count = 0;
X	XtSetArg(args[arg_count], XtNwidth, &biff_x);
X	arg_count++;
X	XtSetArg(args[arg_count], XtNheight, &biff_y);
X	arg_count++;
X	XtGetValues(biff, args, arg_count);
X
X	XtTranslateCoords(biff, biff_x, biff_y, &root_x, &root_y);
X
X	if (popup_geometry == True)
X	{
X		root_x = popup_geometry_x;
X		root_y = popup_geometry_y;
X	}
X
X	/* Create Popup Shell */
X
X	arg_count = 0;
X	XtSetArg(args[arg_count], XtNx, root_x);
X	arg_count++;
X	XtSetArg(args[arg_count], XtNy, root_y);
X	arg_count++;
X
X	header = XtCreatePopupShell("header", transientShellWidgetClass, biff,
X				    args, arg_count);
X
X	info_base = XtCreateManagedWidget("info_base", boxWidgetClass, header, args,
X					  arg_count);
X
X	if (popdown == True) {
X		arg_count = 0;
X		XtSetArg(args[arg_count], XtNlabel, "PopDown");
X		arg_count++;
X		popdown_button = XtCreateManagedWidget("popdown_button", commandWidgetClass, info_base, args,
X						       arg_count);
X		XtAddCallback(popdown_button, XtNcallback, BreakPopup, (XtPointer) NULL);
X	}
X	arg_count = 0;
X	XtSetArg(args[arg_count], XtNlabel, head);
X	arg_count++;
X
X	info = XtCreateManagedWidget("info", labelWidgetClass, info_base, args,
X				     arg_count);
X
X	XtPopup(header, XtGrabNone);
X
X	showing_header = 1;
X
X}
X
X
Xchar           *
XGetMailHeader()
X{
X
X	struct stat     status;
X	int             fd, count;
X	char            *mail_header, *mail_buffer, *head;
X	static	char	*save_head = NULL;
X
X	/* get mail headers */
X
X	fd = open(spool_path, O_RDONLY);
X	fstat(fd, &status);
X	mail_buffer = (char *) malloc((unsigned int) (status.st_size + 1));
X
X	if (save_head != NULL)
X	free(save_head);
X
X	save_head = head = mail_header = (char *) malloc((unsigned int) (status.st_size + 1));
X	read(fd, mail_buffer, (int)status.st_size);
X	close(fd);
X
X	for(count = 0; count < status.st_size; count++)
X	  {
X	    if((strncmp(mail_buffer + count, "From:", 5) == 0) && (count != 0) && (mail_buffer[count - 1] == '\n')) {
X		while(mail_buffer[count] != '\n')
X		*mail_header++ = mail_buffer[count++];
X		*mail_header++ = '\n';
X		} 
X	else if ((strncmp(mail_buffer + count, "Subject:", 8) == 0) && (count != 0) && (mail_buffer[count - 1] == '\n')) { 
X		while(mail_buffer[count] != '\n')
X		*mail_header++ = mail_buffer[count++];
X		*mail_header++ = '\n';
X		}
X 	    if(mail_buffer[count] == '\n' && mail_buffer[count + 1] == '\n')
X 	      for (;count < status.st_size;count++) {
X 		if ((strncmp(mail_buffer + count, "From ", 5) == 0) &&
X 		    (mail_buffer[count - 1] == '\n') ) break;
X 	      }
X	}
X
X	*mail_header = '\0';
X
X	free(mail_buffer);
X	return (head);
X
X}
X
X
XXtCallbackProc
XBreakPopup(w, client_data, call_data)
X	Widget          w;
X	XtPointer       client_data;
X	XtPointer       call_data;
X{
X
X  if(showing_header) {
X
X	XtPopdown(header);
X	XtDestroyWidget(header);
X	showing_header = 0;
X
X      }
X}
X
X
XXtCallbackProc
Xpopup_again(widget, client_data, call_data)
X     Widget widget;
X     caddr_t client_data;
X     caddr_t call_data;
X{
X    struct stat file_stat;
X    char *mail_header;
X
X    if ((stat(spool_path, &file_stat) == 0) && (file_stat.st_size != 0)) {
X	/* There are mail */
X	if (current_status == NO) {
X	    /* the click catchs new mail */
X	    current_status = ARRIVE;
X	    mail_size = file_stat.st_size;
X	    if (popup == True)
X		mail_header = GetMailHeader();
X		XtResizeWidget(toplevel, Arrive_bitmap_width, Arrive_bitmap_height, 1);
X		XtResizeWidget(biff, Arrive_bitmap_width, Arrive_bitmap_height, 0);
X		if (raise == True)
X		XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel));
X	    if (animate == True)
X		AnimateBiff();
X	    XCopyArea(XtDisplay(toplevel), arrivePixmap, XtWindow(biff),
X		      gcBiff, 0, 0, Arrive_bitmap_width, Arrive_bitmap_height, 0, 0);
X	    if (popup == True)
X		PopupMailHeader(mail_header);
X	    XSync(XtDisplay(toplevel), 0);
X	    if (bell == True)
X		XBell(XtDisplay(toplevel), 0);
X	} else {
X	    mail_size = file_stat.st_size;
X	    if (popup == True)
X		mail_header = GetMailHeader();
X	    if (popup == True && showing_header)
X		BreakPopup(toplevel, (XtPointer) NULL, (XtPointer) NULL);
X	    if (raise == True)
X		XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel));
X	    XCopyArea(XtDisplay(toplevel), arrivePixmap, XtWindow(biff),
X		      gcBiff, 0, 0, Arrive_bitmap_width, Arrive_bitmap_height, 0, 0);
X	    if (popup == True)
X		PopupMailHeader(mail_header);
X	    XSync(XtDisplay(toplevel), 0);
X	}
X    }
X
X    XtRemoveTimeOut(polling_id);
X    polling_id = XtAddTimeOut(polling_time, Polling, NULL);
X
X}
END_OF_FILE
if test 21523 -ne `wc -c <'xpbiff.c'`; then
    echo shar: \"'xpbiff.c'\" unpacked with wrong size!
fi
# end of 'xpbiff.c'
fi
if test -f 'xpbiff.man' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xpbiff.man'\"
else
echo shar: Extracting \"'xpbiff.man'\" \(1891 characters\)
sed "s/^X//" >'xpbiff.man' <<'END_OF_FILE'
X.TH XPBIFF 1 "18 October 1990" "X Version 11"
X.SH NAME
Xxpbiff - Popup biff for X
X.SH SYNOPSIS
X.B xpbiff
X[-\fItoolkitoption\fP ...] [-option ...]
X.SH DESCRIPTION
XThe
X.I xpbiff
Xprogram displays a little image of a mailbox.  When mail arrives, the animate "Flying mail", and popup sender & subject information.
X.SH OPTIONS
X.I Xpbiff
Xaccepts all of the standard X Toolkit command line options along with the
Xadditional options listed below:
X.TP 8
X.B \-nfg \fIcolor_name\fP
X.B \-nbg \fIcolor_name\fP
XPicture foreground / background color when still not arrive mail.
XThe default value is black and cyan.
X.TP 8
X.B \-polling_time \fItime\fP
XPolling /usr/spool/mail interval time.
XDefault time is 15000[msec] = 15 [seconds]
X.TP 8
X.B \-noraise
XDo not raise up xpbiff when arrive mail.
X.TP 8
X.B \-nopopup
XDo not popup sender and subject information.
X.TP 8
X.B \-noanimate
XDo not animate.
X.TP 8
X.B \-nobell
XDo not bell.
X.TP 8
X.B \-nopopdown
XDo not show popdown button on sender information.
X.TP 8
X.B \-mono
XColor coordinates for monochrome server.
X.TP 8
X.B \-patchlevel
XShow current patchlevel and source code version.
X.TP 8
X.B \-arrive_bitmap \fIarrive_bitmap_filname\fP
X.B \-no_bitmap \fIno_bitmap_filname\fP
XSet bitmap file when mail arrived, and no arrive.
X.TP 8
X.B \-popup_geometry \fIgeometry\fP
XSet popup abusolute geometry in X geometry format.
X.SH "SEE ALSO"
XX(1),
Xstat(2)
X.SH BUGS
XThe mailbox bitmaps are ugly too.
X.SH COPYRIGHT NOTICE
XPermission to use, copy, modify and distribute without charge this
Xsoftware, documentation, images, etc. is granted, provided that this 
Xcomment and the author's name is retained.  The author assumes no 
Xresponsibility for lost sleep as a consequence of use of this software.
XSend any comments, bug reports, etc. to: shutoh@isl.yamaha.co.jp or, 
Xfor oversea: shutoh%isl.yamaha.co.jp%kddlab@uunet.uu.net  
X.SH AUTHOR
XKazuhiko Shutoh (shutoh@isl.yamaha.co.jp)
END_OF_FILE
if test 1891 -ne `wc -c <'xpbiff.man'`; then
    echo shar: \"'xpbiff.man'\" unpacked with wrong size!
fi
chmod +x 'xpbiff.man'
# end of 'xpbiff.man'
fi
echo shar: End of shell archive.
exit 0

--
Dan Heller
------------------------------------------------
O'Reilly && Associates		 Z-Code Software
Senior Writer			       President
argv@ora.com			argv@zipcode.com
------------------------------------------------
General Email: argv@sun.com
Comp-sources-x stuff: comp-sources.x@uunet.uu.net