home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
x
/
volume13
/
xmail
/
part01
next >
Wrap
Internet Message Format
|
1991-06-15
|
55KB
Path: uunet!uunet!cs.utexas.edu!sun-barr!newstop!exodus!uunet.UU.NET
From: stratus!voder!nsc!berlioz.nsc.com!michael@uunet.UU.NET (Michael Wagnitz)
Newsgroups: comp.sources.x
Subject: v13i043: xmail, Part01/11
Message-ID: <csx-13i043:xmail@uunet.UU.NET>
Date: 15 Jun 91 19:44:09 GMT
Sender: news@exodus.Eng.Sun.COM
Lines: 1442
Approved: argv@sun.com
Submitted-by: stratus!voder!nsc!berlioz.nsc.com!michael@uunet.UU.NET (Michael Wagnitz)
Posting-number: Volume 13, Issue 43
Archive-name: xmail/part01
Following this message will be eleven (11) shar files which contain the
full sources for xmail - patchlevel 3.
Many, many bugs have been repaired, not the least of which are the various
memory leaks found in the previous versions. The current program maintains
a resident image of about half of that of the previous versions.
Also, many new features and improvements have been added. Please see the
CHANGES, README, and man page documentation for additional details.
Not included with this posting are the sources for the X-Face compression
library routines by James Ashton. Those sources are available from archives
or directly from the Rich Burridge archive server, if needed. X-Face support
has been added to xmail, as a conditional compilation option.
I have attempted to provide support for System-V variants, although I could
not test them, and those that requested such features failed to respond to my
requests for beta testing of the changes. If those users on SysV machines
find problems, I would appreciate knowing (along with any fixes if possible)
so that I might post corrections for the rest.
I hope you find this version a considerable improvement over my previous one.
Enjoy.
--
Michael C. Wagnitz M/S D3-677 Domain: michael@berlioz.nsc.com
National Semiconductor Corporation Phone: 408/721-3266
2900 Semiconductor Drive Santa Clara, CA 95052-8090
UUCP: {apple|decwrl|hplabs|sun}!nsc!berlioz.nsc.com!michael
#! /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 archive 1 (of 11)."
# Contents: COPYRIGHT Imakefile MANIFEST Mailwatch.h MailwatchP.h
# README confirm.c defs.h directory.c icon.mail icon.nomail
# make.file national.bm patchlevel.h revtable.h xmailregex.h
# Wrapped by michael@harley on Fri May 3 13:35:48 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'COPYRIGHT' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'COPYRIGHT'\"
else
echo shar: Extracting \"'COPYRIGHT'\" \(2025 characters\)
sed "s/^X//" >'COPYRIGHT' <<'END_OF_FILE'
X/*
X * xmail - X window system interface to the mail program
X *
X * Copyright 1989 The University of Texas at Austin
X *
X * Author: Po Cheung
X * Date: March 10, 1989
X *
X * Permission to use, copy, modify, and distribute this software and
X * its documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation. The University of Texas at Austin makes no
X * representations about the suitability of this software for any purpose.
X * It is provided "as is" without express or implied warranty.
X *
X * Copyright 1990 by National Semiconductor Corporation
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of National Semiconductor Corporation not
X * be used in advertising or publicity pertaining to distribution of the
X * software without specific, written prior permission.
X *
X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS"
X * WITHOUT EXPRESS OR IMPLIED WARRANTY. NATIONAL SEMICONDUCTOR CORPORATION
X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO
X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
X * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
X * PERFORMANCE OF THIS SOFTWARE.
X *
X * Author: Michael C. Wagnitz - National Semiconductor Corporation
X *
X */
X
END_OF_FILE
if test 2025 -ne `wc -c <'COPYRIGHT'`; then
echo shar: \"'COPYRIGHT'\" unpacked with wrong size!
fi
# end of 'COPYRIGHT'
fi
if test -f 'Imakefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'Imakefile'\"
else
echo shar: Extracting \"'Imakefile'\" \(1351 characters\)
sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
X/* */#
X/* */# @(#)Imakefile - for xmail version 1 patchlevel 3
X/* */#
X/* */# Uncomment USE_DIRENT if readdir() uses <dirent.h> instead of <sys/dir.h>
X/* */#
X USE_DIRENT = -DUSE_DIRENT
X/* */#
X/* */# Uncomment X_FACE and COMPFACE if you have the compface library installed
X/* */# and you want xmail to automatically display the X-Face: header, if found
X/* */# in a message.
X/* */#
X/* */# X_FACE = -DX_FACE
X/* */# COMPFACE = -lcompface
X/* */#
X/* */# Uncomment NO_WAIT3 if your system does not support the wait3() function
X/* */#
X/* */# NO_WAIT = -DNO_WAIT3
X/* */#
X/* */# Uncomment LPT if you require att environment support for pseudo ports.
X/* */#
X/* */# LPT = -lpt
X/* */#
X DEFINES = $(USE_DIRENT) $(X_FACE) $(NO_WAIT3)
X DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
X LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT)
X
X SRCS = Mailwatch.c HelpText.c actions.c callMail.c callbacks.c \
X confirm.c directory.c environs.c handler.c mail.c parser.c \
X regex.c utils.c windows.c xmail.c
X
X OBJS = Mailwatch.o HelpText.o actions.o callMail.o callbacks.o \
X confirm.o directory.o environs.o handler.o mail.o parser.o \
X regex.o utils.o windows.o xmail.o
X
XComplexProgramTarget(xmail)
X
XInstallAppDefaults(XMail)
END_OF_FILE
if test 1351 -ne `wc -c <'Imakefile'`; then
echo shar: \"'Imakefile'\" unpacked with wrong size!
fi
# end of 'Imakefile'
fi
if test -f 'MANIFEST' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'MANIFEST'\"
else
echo shar: Extracting \"'MANIFEST'\" \(1458 characters\)
sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
X File Name Archive # Description
X-----------------------------------------------------------
X CHANGES 6 List of changes and enhancements
X COPYRIGHT 1 Copyright notice
X HelpText.c 5 source
X Imakefile 1 Makefile imake source
X MANIFEST 1 This shipping list
X Mailwatch.c 6 source
X Mailwatch.h 1 source
X MailwatchP.h 1 source
X README 1 documentation
X XMail.ad 2 application resources
X actions.c 8 source
X callMail.c 2 source
X callbacks.c 9 source
X confirm.c 1 source
X defs.h 1 source
X directory.c 1 source
X environs.c 4 source
X global.h 2 source
X handler.c 3 source
X icon.mail 1 source
X icon.nomail 1 source
X mail.c 3 source
X make.file 1 alternate makefile
X national.bm 1 source
X parser.c 5 source
X patchlevel.h 1 source
X regex.c 11 source
X regex.h 2 source
X revtable.h 1 source
X utils.c 3 source
X windows.c 7 source
X xmail.c 4 source
X xmail.man 10 documentation
X xmailregex.h 1 source
END_OF_FILE
if test 1458 -ne `wc -c <'MANIFEST'`; then
echo shar: \"'MANIFEST'\" unpacked with wrong size!
fi
# end of 'MANIFEST'
fi
if test -f 'Mailwatch.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'Mailwatch.h'\"
else
echo shar: Extracting \"'Mailwatch.h'\" \(936 characters\)
sed "s/^X//" >'Mailwatch.h' <<'END_OF_FILE'
X/*
X * Author: Dan heller
X */
X
X#ifndef _XtMailwatch_h
X#define _XtMailwatch_h
X
X/*
X * Mailwatch widget; looks a lot like the Mailbox widget, don't it...
X */
X
X#ifndef XtNupdate
X#define XtNupdate "update" /* Int: how often to check mail */
X#endif /* XtNupdate */
X
X#ifndef XtNfile
X#define XtNfile "file" /* String: file name to check */
X#endif /* Xtfile */
X
X#define XtNbell "bell" /* boolean to ring bell on new mail */
X#define XtNmailFlag "mailFlag" /* path to icon file for mail */
X#define XtNnoMailFlag "noMailFlag" /* path to icon file for no mail */
X#define XtNmail "mail" /* For XtGetValues to get mail info */
X
X#define XtCPixmapMask "PixmapMask"
X
X/* structures */
Xtypedef struct _MailwatchRec *MailwatchWidget; /* see MailwatchP.h */
Xtypedef struct _MailwatchClassRec *MailwatchWidgetClass; /* see MailwatchP.h */
X
Xextern WidgetClass mailwatchWidgetClass;
X
X#endif /* _XtMailwatch_h */
X/* DON'T ADD STUFF AFTER THIS #endif */
END_OF_FILE
if test 936 -ne `wc -c <'Mailwatch.h'`; then
echo shar: \"'Mailwatch.h'\" unpacked with wrong size!
fi
# end of 'Mailwatch.h'
fi
if test -f 'MailwatchP.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'MailwatchP.h'\"
else
echo shar: Extracting \"'MailwatchP.h'\" \(1968 characters\)
sed "s/^X//" >'MailwatchP.h' <<'END_OF_FILE'
X/*
X * Author: Dan Heller (see Mailwatch.c for detailed info)
X */
X#ifndef _XtMailwatchP_h
X#define _XtMailwatchP_h
X
X#include "Mailwatch.h"
X#include <X11/CoreP.h>
X
X#ifndef MAILBOX_DIRECTORY
X#define MAILBOX_DIRECTORY "/usr/spool/mail"
X#endif /* MAILBOX_DIRECTORY */
X#define MAILBOX_VOLUME 33 /* percentage */
X
Xtypedef struct { /* new fields for mailwatch widget */
X Pixel foreground_pixel; /* color index of normal state fg */
X GC normal_GC; /* normal GC to use */
X GC invert_GC; /* invert GC for FillRectangle call */
X int update; /* seconds between updates */
X String filename; /* filename to watch */
X long last_size; /* size in bytes of mailboxname */
X time_t last_access; /* last time user accessed mailbox */
X Boolean reverseVideo; /* do reverse video? */
X Boolean flag_up; /* is the flag up? */
X Boolean bell; /* ring the bell on new mail? */
X Boolean useName; /* add username to icon image? */
X Boolean useHost; /* add mailhost name to icon image? */
X String username; /* username of mailbox */
X String mailhost; /* host name of mail server */
X XFontStruct *font; /* font to use when displaying name */
X XtCallbackList callback; /* Call func(s) when mail arrives */
X XtIntervalId interval_id; /* time between checks */
X struct _mbimage {
X Pixmap bitmap, mask; /* depth 1, describing shape */
X Pixmap pixmap; /* full depth pixmap */
X int width, height;
X } mail, nomail;
X} MailwatchPart;
X
Xtypedef struct _MailwatchRec { /* full instance record */
X CorePart core;
X MailwatchPart mailbox;
X} MailwatchRec;
X
Xtypedef struct { /* new fields for mailwatch class */
X int dummy; /* stupid C compiler */
X} MailwatchClassPart;
X
Xtypedef struct _MailwatchClassRec { /* full class record declaration */
X CoreClassPart core_class;
X MailwatchClassPart mailwatch_class;
X} MailwatchClassRec;
X
Xextern MailwatchClassRec mailwatchClassRec; /* class pointer */
X
X#endif _XtMailwatchP_h
END_OF_FILE
if test 1968 -ne `wc -c <'MailwatchP.h'`; then
echo shar: \"'MailwatchP.h'\" unpacked with wrong size!
fi
# end of 'MailwatchP.h'
fi
if test -f 'README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(2555 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
X
X xmail - X Window System interface to the mail program
X
X Copyright 1990 by National Semiconductor Corporation
X
X Permission to use, copy, modify, and distribute this software and its
X documentation for any purpose is hereby granted without fee, provided that
X the above copyright notice appear in all copies and that both that
X copyright notice and this permission notice appear in supporting
X documentation, and that the name of National Semiconductor Corporation not
X be used in advertising or publicity pertaining to distribution of the
X software without specific, written prior permission.
X
X NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
X SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS"
X WITHOUT EXPRESS OR IMPLIED WARRANTY. NATIONAL SEMICONDUCTOR CORPORATION
X DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
X WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO
X EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
X INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
X LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
X OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
X PERFORMANCE OF THIS SOFTWARE.
X
X Author: Michael C. Wagnitz - National Semiconductor Corporation
X
X xmail is my attempt to provide an X11 equivalent to the Sun mailtool
X application, both in the Sunview and XView implementations. Its not
X as fancy in some ways as the newer XView version of mailtool, but it
X does have some features which I found to be practical. For one, it
X provides built in help information on each of the xmail sub-windows.
X It also supports the user preferred editor when creating messages,
X utilizing either the editorCommand resource (or command line option)
X or the value in the user's VISUAL environment variable, if found.
X Please see the man page for additional details.
X
X A non-imake version of a make file is provided as make.file. You may
X use this file to build xmail, or invoke M.I.T.'s imake facility to
X upgrade the Makefile provided.
X
X PLEASE report any bugs or enhancements to me at the address below, so
X that changes can be incorporated in my sources and official patches posted.
X
X Michael Wagnitz M/S D3-677 uucp: {sun|hplabs|decwrl}!nsc!berlioz!michael
X National Semiconductor Domain: michael@berlioz.nsc.com
X 2900 Semiconductor Dr. Phone: 408/721-3266
X Santa Clara, CA 95052-8090
END_OF_FILE
if test 2555 -ne `wc -c <'README'`; then
echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'confirm.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'confirm.c'\"
else
echo shar: Extracting \"'confirm.c'\" \(6384 characters\)
sed "s/^X//" >'confirm.c' <<'END_OF_FILE'
X/*
X * @(#)Confirm - a Yes/No confirmation window with optional prompt argument.
X *
X * From an idea contributed by Mitchell L. Model <mlm@odi.com> on 5-17-89
X *
X * Copyright 1990 by National Semiconductor Corporation
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of National Semiconductor Corporation not
X * be used in advertising or publicity pertaining to distribution of the
X * software without specific, written prior permission.
X *
X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS"
X * WITHOUT EXPRESS OR IMPLIED WARRANTY. NATIONAL SEMICONDUCTOR CORPORATION
X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO
X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
X * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
X * PERFORMANCE OF THIS SOFTWARE.
X *
X * Author: Michael C. Wagnitz - National Semiconductor Corporation
X *
X */
X#include "global.h"
X
X#define btnsepr 7
X
Xtypedef struct _result {
X Bool *popflg;
X Bool *var;
X Widget shell;
X } *Result;
Xvoid
XProcessOneEvent(display)
XDisplay *display;
X{
X static XEvent event;
X
X XNextEvent(display, &event);
X XtDispatchEvent(&event);
X} /* ProcessOneEvent */
X
X
Xstatic Result
XMakeResult(shell, popflg, resultvar)
XBool *popflg, *resultvar;
XWidget shell;
X{
X Result rec = (Result) malloc(sizeof(struct _result));
X
X rec->popflg = popflg;
X rec->var = resultvar;
X rec->shell = shell;
X
X return rec;
X} /* MakeResult */
X
X
X/* ARGSUSED */
X/*
X** ClearConfirm - get rid of the confirmation box.
X*/
Xvoid
XClearConfirm(w, val, result)
XWidget w;
XBool val;
XResult result;
X{
X XtPopdown(result->shell);
X XtDestroyWidget(result->shell);
X *result->popflg = FALSE;
X *result->var = val;
X} /* ClearConfirm */
X
X
X/* ARGSUSED */
Xstatic void
XYes(w, result, call_data)
XWidget w;
XResult result;
Xcaddr_t call_data; /* unused */
X{
X ClearConfirm(w, TRUE, result);
X}
X
X
X/* ARGSUSED */
Xstatic void
XNo(w, result, call_data)
XWidget w; /* unused */
XResult result;
Xcaddr_t call_data;
X{
X ClearConfirm(w, FALSE, result);
X} /* No */
X
X
X/*
X * Confirm - put up a window asking for confirmation.
X */
XBool
XConfirm(prompt)
Xchar* prompt;
X{
X Arg args[4];
X Bool popped_up = FALSE, result = FALSE;
X Result resultrec;
X String Translations = "<BtnDown>,<BtnUp>:\n";
X Widget shell, form, label, yes, no;
X Window root, child;
X int root_x, root_y, child_x, child_y;
X int nargs, buttons, labelwidth, yeswidth, btnborder, btnwidth;
X char *query = NULL;
X
X/*
X** First, find out if expert flag is set. If so, just return True.
X*/
X if (XMail.expert == TRUE)
X return TRUE;
X/*
X** Find out where the mouse is, so we can put the confirmation
X** box right there.
X*/
X XQueryPointer(XtDisplay(toplevel), XtWindow(toplevel), &root, &child,
X &root_x, &root_y, &child_x, &child_y, &buttons);
X /*
X ** Construct the confirmation box
X */
X shell=XtCreatePopupShell("Confirm",overrideShellWidgetClass,toplevel,args,0);
X
X XtSetArg(args[0], XtNtranslations, XtParseTranslationTable(Translations));
X XtSetArg(args[1], XtNborderWidth, (XtArgVal) 0);
X form = XtCreateManagedWidget("form", formWidgetClass, shell, args, TWO);
X
X if (! prompt) label = NULL;
X else {
X if (query) XtFree(query);
X query = NULL;
X if (query = XtMalloc(strlen(prompt) + 2)) {
X strcpy(query, prompt);
X strcat(query, "?");
X }
X XtSetArg(args[0], XtNlabel, (XtArgVal) query);
X XtSetArg(args[1], XtNjustify, XtJustifyCenter);
X XtSetArg(args[2], XtNborderWidth, (XtArgVal) 0);
X label = XtCreateManagedWidget("prompt", labelWidgetClass, form, args, 3);
X }
X
X nargs = 0;
X XtSetArg(args[nargs], XtNhorizDistance, (XtArgVal) btnsepr); nargs++;
X if (prompt) {
X XtSetArg(args[nargs], XtNfromVert, (XtArgVal) label); nargs++;
X XtSetArg(args[nargs], XtNvertDistance, (XtArgVal) 12); nargs++;
X }
X yes = XtCreateManagedWidget("yes", commandWidgetClass, form, args, nargs);
X
X nargs = 1;
X XtSetArg(args[nargs], XtNfromHoriz, (XtArgVal) yes); nargs++;
X if (prompt) {
X XtSetArg(args[nargs], XtNfromVert, (XtArgVal) label); nargs++;
X XtSetArg(args[nargs], XtNvertDistance, (XtArgVal) 12); nargs++;
X }
X no = XtCreateManagedWidget("no", commandWidgetClass, form, args, nargs);
X
X if (! label)
X labelwidth = 0;
X else {
X XtSetArg(args[0], XtNwidth, (XtArgVal) NULL);
X XtGetValues(label, args, ONE);
X labelwidth = args[0].value;
X }
X
X XtSetArg(args[0], XtNwidth, (XtArgVal) NULL);
X XtSetArg(args[1], XtNborder, (XtArgVal) NULL);
X XtGetValues(yes, args, TWO);
X
X yeswidth = args[0].value;
X btnborder = args[1].value;
X
X btnwidth = (labelwidth - btnsepr - (2 * btnborder)) / 2;
X if (btnwidth < yeswidth) btnwidth = yeswidth;
X
X XtSetArg(args[0], XtNwidth, (XtArgVal) btnwidth);
X XtSetValues(yes, args, ONE);
X XtSetValues(no, args, ONE);
X
X XtRealizeWidget(shell);
X
X XtSetArg(args[0], XtNwidth, (XtArgVal) NULL);
X XtSetArg(args[1], XtNheight, (XtArgVal) NULL);
X XtGetValues(shell, args, TWO);
X
X root_x -= args[0].value / 2;
X root_y -= args[1].value / 2;
X/*
X** Keep confirm popup within root window borders (don't place it off-screen)
X*/
X if (root_x + args[0].value > RootWidth)
X root_x = RootWidth - args[0].value;
X if (root_x < 0) root_x = 0;
X
X if (root_y + args[0].value > RootHeight)
X root_y = RootHeight - args[0].value;
X if (root_y < 0) root_y = 0;
X
X XtSetArg(args[0], XtNx, (XtArgVal) root_x);
X XtSetArg(args[1], XtNy, (XtArgVal) root_y);
X XtSetValues(shell, args, TWO);
X
X resultrec = MakeResult(shell, &popped_up, &result);
X XtAddCallback(yes, XtNcallback, Yes, resultrec);
X XtAddCallback(no, XtNcallback, No, resultrec);
X
X if (XMail.bellRing) /* ring bell if not silenced by user */
X XBell (XtDisplay (toplevel), 33);
X
X XtPopup(shell, XtGrabExclusive);
X
X popped_up = TRUE;
X
X while (popped_up) ProcessOneEvent(XtDisplay(shell));
X
X return result;
X} /* Confirm */
END_OF_FILE
if test 6384 -ne `wc -c <'confirm.c'`; then
echo shar: \"'confirm.c'\" unpacked with wrong size!
fi
# end of 'confirm.c'
fi
if test -f 'defs.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'defs.h'\"
else
echo shar: Extracting \"'defs.h'\" \(5084 characters\)
sed "s/^X//" >'defs.h' <<'END_OF_FILE'
X/*
X * xmail - X window system interface to the mail program
X *
X * Copyright 1989 The University of Texas at Austin
X *
X * Author: Po Cheung
X * Date: March 10, 1989
X *
X * Permission to use, copy, modify, and distribute this software and
X * its documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation. The University of Texas at Austin makes no
X * representations about the suitability of this software for any purpose.
X * It is provided "as is" without express or implied warranty.
X *
X * Copyright 1990 by National Semiconductor Corporation
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of National Semiconductor Corporation not
X * be used in advertising or publicity pertaining to distribution of the
X * software without specific, written prior permission.
X *
X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS"
X * WITHOUT EXPRESS OR IMPLIED WARRANTY. NATIONAL SEMICONDUCTOR CORPORATION
X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO
X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
X * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
X * PERFORMANCE OF THIS SOFTWARE.
X *
X * Author: Michael C. Wagnitz - National Semiconductor Corporation
X *
X */
X
X
X#include <stdio.h>
X#include <sys/param.h>
X#include <X11/IntrinsicP.h>
X#include <X11/StringDefs.h>
X#include <X11/Shell.h>
X#include <X11/Xatom.h>
X#include <X11/Xaw/Cardinals.h>
X#include <X11/Xaw/Paned.h>
X#include <X11/Xaw/Form.h>
X#include <X11/Xaw/AsciiText.h>
X#include <X11/Xaw/TextP.h>
X#include <X11/Xaw/Box.h>
X#include <X11/Xaw/List.h>
X#include <X11/Xaw/Command.h>
X#include <X11/Xaw/Dialog.h>
X#include <X11/Xaw/Label.h>
X
X#define TITLE "xmail 1." /* program title and version string */
X#define StartPos 6 /* size of 'File: ' (del stop point) */
X#define LASTCH(s) (s[ *s ? strlen(s) - 1 : 0])
X#define CHARHEIGHT(X) (X->max_bounds.descent + X->max_bounds.ascent)
X
X#if defined(NO_WAIT3)
X#define wait3(a, b, c) waitpid(-1, a, b)
X#endif
X
Xtypedef struct {
X XFontStruct *textFont; /* font to use when displaying text */
X XFontStruct *helpFont; /* font to use when displaying help */
X XFontStruct *buttonFont; /* font to use when making buttons */
X String iconGeometry; /* xmail icon geometry */
X String MFileName; /* mail option -f filename */
X String editorCommand; /* optional xmail send edit command */
X Dimension shellWidth; /* xmail window width */
X Dimension fileBoxWidth; /* file window box width */
X Dimension indexHeight; /* index window height */
X Dimension textHeight; /* text window height */
X Dimension buttonWidth; /* command button width */
X Dimension buttonHeight; /* command button height */
X Dimension commandHSpace; /* command horizontal spacing */
X Dimension commandVSpace; /* command vertical spacing */
X Dimension commandHeight; /* command window height */
X Dimension helpWidth; /* width of the help text popup */
X Dimension helpHeight; /* height of the help text popup */
X Dimension helpX; /* help x offset from textWindow */
X Dimension helpY; /* help y offset from textWindow */
X Dimension menuX; /* menu x offset from parent */
X Dimension menuY; /* menu y offset from parent */
X Boolean bellRing; /* xmail audible bell option */
X Boolean expert; /* do not confirm destructive acts */
X Boolean iconic; /* xmail starts in withdrawn state */
X Boolean mailopt_n; /* mail option -n */
X Boolean mailopt_U; /* mail option -U */
X Boolean Show_Last; /* xmail show latest option -ls */
X Boolean Show_Info; /* Do (or don't) show info messages */
X int borderWidth; /* default or specified border width */
X} XmailResources;
X
X
X/*
X** structure sent to AddMenuButton()
X*/
Xtypedef struct menuList_str
X {
X String label;
X XtCallbackProc func;
X String data;
X } menuList, *menuList_p;
X
X/*
X** structure used by AddHelpText() and ShowHelp()
X*/
Xtypedef struct helpList_str
X {
X int indx;
X String name[27];
X Widget text[27];
X } helpList, *helpList_p;
X
X
Xtypedef struct {
X char *pat; /* regular expression */
X struct re_pattern_buffer *buf; /* buffer for compile regex */
X} PatternRec, *PatternRecPtr;
X
Xtypedef struct {
X char *name; /* recipient name */
X char *alias; /* alias for name */
X} AliasRec, *AliasRecPtr;
END_OF_FILE
if test 5084 -ne `wc -c <'defs.h'`; then
echo shar: \"'defs.h'\" unpacked with wrong size!
fi
# end of 'defs.h'
fi
if test -f 'directory.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'directory.c'\"
else
echo shar: Extracting \"'directory.c'\" \(5919 characters\)
sed "s/^X//" >'directory.c' <<'END_OF_FILE'
X/*
X * xmail - X window system interface to the mail program
X *
X * Copyright 1990 by National Semiconductor Corporation
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of National Semiconductor Corporation not
X * be used in advertising or publicity pertaining to distribution of the
X * software without specific, written prior permission.
X *
X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS"
X * WITHOUT EXPRESS OR IMPLIED WARRANTY. NATIONAL SEMICONDUCTOR CORPORATION
X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO
X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
X * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
X * PERFORMANCE OF THIS SOFTWARE.
X *
X * Author: Michael C. Wagnitz - National Semiconductor Corporation
X *
X */
X
X
X#include "global.h"
X
X#ifdef USE_DIRENT
X#include <dirent.h>
X#else
X#include <sys/dir.h>
X#endif
X
X
X/*
X** @(#)SetDirectory() - Create popup list of directory folder names
X*/
X/* ARGSUSED */
XXtActionProc
XSetDirectory(w, event, params, num_params)
XWidget w;
XXEvent *event;
XString *params;
XCardinal *num_params;
X{
X Arg args[7];
X Cardinal label_width, path_length, n, depth, x;
X DIR *new_dir, *dirp;
X String name, path;
X Widget menu, layout, bw, above, to_left;
X char *s, trans[BUFSIZ], tmp[BUFSIZ];
X
X#ifdef USE_DIRENT
X struct dirent *dp;
X#else
X struct direct *dp;
X#endif
X
X static String dir_Trans =
X "<Btn1Down>: SetDirectory(%s, %s, %d)";
X
X static String m_Trans = "<LeaveWindow>: MenuPopdown(%s)";
X
X static String b_Trans = "<EnterWindow>: set() \n\
X <LeaveWindow>: unset() \n\
X <Btn3Up>: MyNotify(%d) MenuPopdown(%s)";
X
X static XtCallbackRec callbacks[] = {
X { (XtCallbackProc) GetFolderName, NULL },
X { NULL, NULL }
X };
X
X
X SetCursor(1);
X name = params[0];
X path = params[1];
X path_length = strlen(path);
X sscanf(params[2], "%d", &depth);
X depth++;
X
X if (! XtNameToWidget(w, name)) {
X (void) sprintf(trans, m_Trans, name);
X XtSetArg(args[0], XtNtranslations, XtParseTranslationTable(trans));
X menu = XtCreatePopupShell(name, overrideShellWidgetClass, w, args, ONE);
X
X XtSetArg(args[0], XtNdefaultDistance, 1);
X layout = XtCreateManagedWidget("menu", formWidgetClass, menu, args, ONE);
X
X if ((dirp = opendir(path)) == NULL)
X XtError("xmail cannot access passed directory name in SetDirectory()");
X/*
X** Find width of longest label for this menu
X*/
X tmp[0] = '\0';
X for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp))
X if (strcmp(dp->d_name, ".") && strcmp(dp->d_name, ".."))
X if (strlen(tmp) < strlen(dp->d_name))
X strcpy(tmp, dp->d_name);
X
X rewinddir(dirp);
X
X label_width = (n=strlen(tmp)) ? XTextWidth(XMail.buttonFont, tmp, n) + 12 : 0;
X
X if (label_width) {
X (void) sprintf(trans, b_Trans, depth, name);
X
X XtSetArg(args[0], XtNwidth, label_width);
X XtSetArg(args[1], XtNfont, XMail.buttonFont);
X XtSetArg(args[2], XtNcallback, callbacks);
X XtSetArg(args[3], XtNtranslations, XtParseTranslationTable(trans));
X/*
X** create the menu buttons
X*/
X bw = above = to_left = NULL;
X x = 0;
X for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
X if (strcmp(dp->d_name, ".") && strcmp(dp->d_name, "..")) {
X/*
X** If this 'folder file' is also a directory, mark it with a trailing slash '/'
X*/
X s = XtMalloc(path_length + strlen(dp->d_name) + 2);
X sprintf(s, "%s/%s", path, dp->d_name);
X if ((new_dir = opendir(s)) != NULL) {
X sprintf(tmp, "%s/", dp->d_name);
X XtSetArg(args[4], XtNlabel, tmp);
X } else
X XtSetArg(args[4], XtNlabel, dp->d_name);
X XtSetArg(args[5], XtNfromHoriz, to_left); n = 6;
X if (! to_left) XtSetArg(args[n], XtNfromVert, above); n++;
X bw = XtCreateManagedWidget("menubutton",commandWidgetClass,layout,args,n);
X if (to_left == NULL) above = bw;
X to_left = bw;
X if (++x % 3 == 0) { /* make box three items wide */
X x = 0;
X to_left = NULL;
X }
X/*
X** If this 'folder' is a directory, add a button popup menu of its files.
X*/
X if (new_dir) {
X closedir(new_dir);
X sprintf(trans, dir_Trans, tmp, s, depth);
X XtOverrideTranslations(bw, XtParseTranslationTable(trans));
X AddInfoHandler(bw, Folder_Info[2]);
X } else
X AddInfoHandler(bw, Folder_Info[1]);
X XtFree(s);
X }
X }
X closedir(dirp);
X }
X/*
X** If no buttons were created for this menu, destroy the widget.
X*/
X if (! label_width)
X XtDestroyWidget(menu);
X } /* end - if menu had not yet been realized */
X/*
X** If menu exists, pop it up, after setting x,y coordinates
X*/
X menu = XtNameToWidget(w, name);
X
X SetCursor(0);
X if (menu->core.being_destroyed)
X XBell(XtDisplay(toplevel), 33);
X else {
X SetPopup(w, event, params, num_params);
X
X XtSetArg(args[0], XtNy, NULL);
X XtGetValues(menu, args, ONE);
X args[0].value -= XMail.menuY; /* don't offset menu below cursor */
X XtSetValues(menu, args, ONE);
X
X XtPopup(menu, XtGrabNone);
X }
X} /* SetDirectory */
END_OF_FILE
if test 5919 -ne `wc -c <'directory.c'`; then
echo shar: \"'directory.c'\" unpacked with wrong size!
fi
# end of 'directory.c'
fi
if test -f 'icon.mail' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'icon.mail'\"
else
echo shar: Extracting \"'icon.mail'\" \(3920 characters\)
sed "s/^X//" >'icon.mail' <<'END_OF_FILE'
X/*
X * xmail - X window system interface to the mail program
X *
X * Copyright 1990 by National Semiconductor Corporation
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of National Semiconductor Corporation not
X * be used in advertising or publicity pertaining to distribution of the
X * software without specific, written prior permission. National Semiconductor
X * Corporation makes no representations about the suitability of this software
X * for any purpose. It is provided "as is" without express or implied warranty.
X *
X * NATIONAL SEMICONDUCTOR CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
X * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
X * FITNESS, IN NO EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR
X * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
X * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
X * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
X * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X *
X * Author: Michael C. Wagnitz - National Semiconductor Corporation
X *
X */
X
X#define mail_width 56
X#define mail_height 56
X
Xstatic char mail_bits[] = {
X 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
X 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
X 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf0, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x18, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x30, 0x03, 0x00,
X 0x00, 0x00, 0x00, 0x07, 0x30, 0x06, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30,
X 0x06, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x30, 0x07, 0x00, 0x00, 0x00, 0xe0,
X 0x1f, 0xb0, 0x07, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x06, 0x00, 0x00,
X 0x00, 0xb8, 0xee, 0x70, 0x06, 0x00, 0x00, 0x00, 0x5c, 0xd7, 0x31, 0x06,
X 0x00, 0x00, 0x00, 0xae, 0xae, 0x39, 0x06, 0x00, 0x00, 0x00, 0x56, 0x5d,
X 0x3f, 0x06, 0x00, 0x00, 0x00, 0x8a, 0xb4, 0x37, 0x06, 0x00, 0x00, 0x00,
X 0x46, 0x64, 0x33, 0x06, 0x00, 0x00, 0x00, 0x22, 0xc4, 0x33, 0x06, 0x00,
X 0x00, 0x00, 0x12, 0x84, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x33,
X 0x06, 0x00, 0x00, 0x00, 0xfa, 0x07, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a,
X 0x00, 0x33, 0x06, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x03, 0x03, 0x00, 0x00,
X 0x00, 0x3a, 0x80, 0x83, 0x01, 0x00, 0x00, 0x00, 0x7a, 0x40, 0xc3, 0x00,
X 0x00, 0x00, 0x00, 0xfa, 0xa0, 0x63, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x51,
X 0x33, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x1b, 0x00, 0x00, 0x00, 0x00,
X 0x3a, 0x06, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x1f, 0x00, 0x00,
X 0x00, 0x00, 0x0a, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19,
X 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19, 0x00, 0x00, 0x00, 0x00, 0x02,
X 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x19, 0x00, 0x00, 0x00,
X 0x00, 0xaa, 0x2b, 0x19, 0x00, 0x00, 0x00, 0x00, 0xba, 0x2a, 0x19, 0x00,
X 0x00, 0x00, 0x00, 0x2a, 0x29, 0x19, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00,
X 0x19, 0x00, 0x80, 0x85, 0xd8, 0x02, 0x00, 0x99, 0x02, 0x40, 0xc5, 0x92,
X 0x52, 0x15, 0x59, 0x46, 0x42, 0x69, 0xb2, 0xaa, 0x2a, 0xb9, 0x44, 0xc6,
X 0xee, 0xaa, 0x82, 0x02, 0x79, 0x64, 0xb5, 0x8a, 0x22, 0x12, 0x11, 0xad,
X 0xa9, 0x10, 0x29, 0xc8, 0xa2, 0x0b, 0xad, 0xc0, 0xba, 0xc4, 0x4a, 0xc6,
X 0x86, 0x87, 0x4e, 0x5a, 0xdb, 0x67, 0x07, 0xc2, 0x7e, 0xee, 0x3f, 0xb7,
X 0xdc, 0x8e, 0xc7, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0x1d, 0x63, 0x72, 0xb9,
X 0x7b, 0xfd, 0x72, 0xf9, 0x7f, 0x4e, 0xe7, 0xd4};
END_OF_FILE
if test 3920 -ne `wc -c <'icon.mail'`; then
echo shar: \"'icon.mail'\" unpacked with wrong size!
fi
# end of 'icon.mail'
fi
if test -f 'icon.nomail' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'icon.nomail'\"
else
echo shar: Extracting \"'icon.nomail'\" \(3929 characters\)
sed "s/^X//" >'icon.nomail' <<'END_OF_FILE'
X/*
X * xmail - X window system interface to the mail program
X *
X * Copyright 1990 by National Semiconductor Corporation
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of National Semiconductor Corporation not
X * be used in advertising or publicity pertaining to distribution of the
X * software without specific, written prior permission. National Semiconductor
X * Corporation makes no representations about the suitability of this software
X * for any purpose. It is provided "as is" without express or implied warranty.
X *
X * NATIONAL SEMICONDUCTOR CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
X * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
X * FITNESS, IN NO EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR
X * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
X * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
X * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
X * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X *
X * Author: Michael C. Wagnitz - National Semiconductor Corporation
X *
X */
X
X#define no_mail_width 56
X#define no_mail_height 56
X
Xstatic char no_mail_bits[] = {
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
X 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00,
X 0x00, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x04,
X 0x00, 0x00, 0x00, 0x07, 0x00, 0x06, 0x06, 0x00, 0x00, 0x80, 0x01, 0x00,
X 0x06, 0x07, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x87, 0x07, 0x00, 0x00, 0xe0,
X 0x1f, 0x80, 0xc7, 0x07, 0x00, 0x00, 0xf0, 0x3f, 0xc0, 0xe6, 0x07, 0x00,
X 0x00, 0xf8, 0xe2, 0x60, 0x76, 0x07, 0x00, 0x00, 0x9c, 0xce, 0x31, 0x3e,
X 0x03, 0x00, 0x00, 0x8e, 0x86, 0x19, 0x1e, 0x01, 0x00, 0x00, 0x86, 0x03,
X 0x0f, 0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00,
X 0xc2, 0x06, 0x83, 0x07, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0xc3, 0x07, 0x00,
X 0x00, 0x00, 0x12, 0x11, 0xe3, 0x06, 0x00, 0x00, 0x00, 0x82, 0x02, 0x73,
X 0x06, 0x00, 0x00, 0x00, 0xaa, 0x2a, 0x33, 0x06, 0x00, 0x00, 0x00, 0x52,
X 0x15, 0x13, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x03, 0x00, 0x00,
X 0x00, 0x02, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x29, 0xc3, 0x00,
X 0x00, 0x00, 0x00, 0xba, 0x2a, 0x63, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2b,
X 0x33, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x1b, 0x00, 0x00, 0x00, 0x00,
X 0x02, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x00,
X 0x00, 0x00, 0xfe, 0xff, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19,
X 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0,
X 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00,
X 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00,
X 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0,
X 0x18, 0x00, 0x80, 0x85, 0xd8, 0xca, 0xc0, 0x98, 0x02, 0x40, 0xc5, 0x92,
X 0xca, 0xc0, 0x58, 0x46, 0x42, 0x69, 0xb2, 0xe4, 0xc0, 0xb8, 0x44, 0xc6,
X 0xee, 0xaa, 0xe8, 0xc0, 0x78, 0x64, 0xb5, 0x8a, 0x22, 0xd6, 0xc0, 0xac,
X 0xa9, 0x10, 0x29, 0xc8, 0xd6, 0xd5, 0xaf, 0xc0, 0xba, 0xc4, 0x4a, 0xd2,
X 0xe9, 0x87, 0x4e, 0x5a, 0xdb, 0x67, 0xfb, 0xca, 0x7c, 0xee, 0x3f, 0xb7,
X 0xdc, 0xe6, 0xe9, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0xed, 0xba, 0x73, 0xb9,
X 0x7b, 0xfd, 0x72, 0x9b, 0xda, 0x4e, 0xe7, 0xd4};
END_OF_FILE
if test 3929 -ne `wc -c <'icon.nomail'`; then
echo shar: \"'icon.nomail'\" unpacked with wrong size!
fi
# end of 'icon.nomail'
fi
if test -f 'make.file' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'make.file'\"
else
echo shar: Extracting \"'make.file'\" \(2046 characters\)
sed "s/^X//" >'make.file' <<'END_OF_FILE'
X#
X# default makefile for xmail 1.3
X#
X# Uncomment USE_DIRENT if readdir() uses <dirent.h> instead of <sys/dir.h>
X#
X USE_DIRENT = -DUSE_DIRENT
X#
X# Uncomment X_FACE and COMPFACE if you have the compface library installed
X# and you want xmail to automatically display the X-Face: header, if found
X# in a message.
X#
X X_FACE = -DX_FACE
X COMPFACE = -lcompface
X#
X# Uncomment NO_WAIT3 if your system does not support the wait3() function
X#
X# NO_WAIT = -DNO_WAIT3
X#
X# Uncomment LPT if you require att environment support for pseudo ports.
X#
X# LPT = -lpt
X#
X BINDIR = /usr/bin/X11
X APPDIR = /usr/lib/X11/app-defaults
X MANDIR = /usr/man/mann
X CC = cc
X LD = ld
X INSTALL = install
XINSTBINFLAGS = -s -m 0755
XINSTAPPFLAGS = -m 0644
XINSTMANFLAGS = -m 0644
X RM = rm -f
X LINK = ln -s
X RANLIB = ranlib
X MAKE = make
X SHELL = /bin/sh
X DEFINES = $(USE_DIRENT) $(X_FACE) $(NO_WAIT3)
X CFLAGS = $(DEFINES)
X LIBRARIES = -lXaw -lXmu -lXt -lXext -lX11
X PROGRAM = xmail
X
X SRCS = \
X HelpText.c \
X Mailwatch.c \
X actions.c \
X callMail.c \
X callbacks.c \
X confirm.c \
X directory.c \
X environs.c \
X handler.c \
X mail.c \
X parser.c \
X regex.c \
X utils.c \
X windows.c \
X xmail.c
X
X OBJS = \
X HelpText.o \
X Mailwatch.o \
X actions.o \
X callMail.o \
X callbacks.o \
X confirm.o \
X directory.o \
X environs.o \
X handler.o \
X mail.o \
X parser.o \
X regex.o \
X utils.o \
X windows.o \
X xmail.o
X
X INCS = \
X MailwatchP.h \
X Mailwatch.h \
X defs.h \
X global.h \
X icon.mail \
X icon.nomail \
X national.bm \
X patchlevel.h \
X regex.h \
X revtable.h \
X xmailregex.h
X#
X$(PROGRAM): $(OBJS)
X @$(RM) $@
X $(CC) -o $@ $(OBJS) $(LDFLAGS) $(LIBRARIES)
X
Xinstall:: $(PROGRAM)
X $(INSTALL) -c $(INSTBINFLAGS) $? $(BINDIR)
X
Xinstall:: XMail.ad
X $(INSTALL) -c $(INSTAPPFLAGS) $? $(APPDIR)/XMail
X
Xinstall::
X @echo done
X
Xinstall.man:: xmail.man
X $(INSTALL) -c $(INSTMANFLAGS) $? $(MANDIR)/xmail.n
X
Xinstall.man::
X @echo install man done
X
Xclean:
X @$(RM) *.o
X
X$(OBJS): $(INCS)
END_OF_FILE
if test 2046 -ne `wc -c <'make.file'`; then
echo shar: \"'make.file'\" unpacked with wrong size!
fi
# end of 'make.file'
fi
if test -f 'national.bm' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'national.bm'\"
else
echo shar: Extracting \"'national.bm'\" \(1855 characters\)
sed "s/^X//" >'national.bm' <<'END_OF_FILE'
X/*
X * xmail - X window system interface to the mail program
X *
X * Copyright 1990 by National Semiconductor Corporation
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of National Semiconductor Corporation not
X * be used in advertising or publicity pertaining to distribution of the
X * software without specific, written prior permission. National Semiconductor
X * Corporation makes no representations about the suitability of this software
X * for any purpose. It is provided "as is" without express or implied warranty.
X *
X * NATIONAL SEMICONDUCTOR CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
X * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
X * FITNESS, IN NO EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR
X * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
X * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
X * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
X * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X *
X * Author: Michael C. Wagnitz - National Semiconductor Corporation
X *
X */
X
X#define national_width 20
X#define national_height 20
Xstatic char national_bits[] = {
X 0xff, 0xff, 0xff, 0xff, 0x7c, 0xff, 0x7f, 0x3c, 0xff, 0x3f, 0x1c, 0xff,
X 0x1f, 0x8d, 0xff, 0x8f, 0xc5, 0xff, 0xc7, 0xe1, 0xff, 0xe3, 0x71, 0xff,
X 0x71, 0x38, 0xff, 0x39, 0x1e, 0xff, 0x1d, 0x8e, 0xff, 0x8f, 0xc6, 0xff,
X 0xc7, 0xe2, 0xff, 0xe3, 0xf0, 0xff, 0xf1, 0xf8, 0xff, 0xf9, 0xfc, 0xff,
X 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
END_OF_FILE
if test 1855 -ne `wc -c <'national.bm'`; then
echo shar: \"'national.bm'\" unpacked with wrong size!
fi
# end of 'national.bm'
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'\" \(21 characters\)
sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
X#define PATCHLEVEL 3
END_OF_FILE
if test 21 -ne `wc -c <'patchlevel.h'`; then
echo shar: \"'patchlevel.h'\" unpacked with wrong size!
fi
# end of 'patchlevel.h'
fi
if test -f 'revtable.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'revtable.h'\"
else
echo shar: Extracting \"'revtable.h'\" \(1870 characters\)
sed "s/^X//" >'revtable.h' <<'END_OF_FILE'
X/*
X** 256-byte table for quickly reversing the bits in an unsigned 8-bit char,
X** used to convert between MSBFirst and LSBFirst image formats.
X*/
X
Xchar revtable[256] = {
X 0, -128, 64, -64, 32, -96, 96, -32,
X 16, -112, 80, -48, 48, -80, 112, -16,
X 8, -120, 72, -56, 40, -88, 104, -24,
X 24, -104, 88, -40, 56, -72, 120, -8,
X 4, -124, 68, -60, 36, -92, 100, -28,
X 20, -108, 84, -44, 52, -76, 116, -12,
X 12, -116, 76, -52, 44, -84, 108, -20,
X 28, -100, 92, -36, 60, -68, 124, -4,
X 2, -126, 66, -62, 34, -94, 98, -30,
X 18, -110, 82, -46, 50, -78, 114, -14,
X 10, -118, 74, -54, 42, -86, 106, -22,
X 26, -102, 90, -38, 58, -70, 122, -6,
X 6, -122, 70, -58, 38, -90, 102, -26,
X 22, -106, 86, -42, 54, -74, 118, -10,
X 14, -114, 78, -50, 46, -82, 110, -18,
X 30, -98, 94, -34, 62, -66, 126, -2,
X 1, -127, 65, -63, 33, -95, 97, -31,
X 17, -111, 81, -47, 49, -79, 113, -15,
X 9, -119, 73, -55, 41, -87, 105, -23,
X 25, -103, 89, -39, 57, -71, 121, -7,
X 5, -123, 69, -59, 37, -91, 101, -27,
X 21, -107, 85, -43, 53, -75, 117, -11,
X 13, -115, 77, -51, 45, -83, 109, -19,
X 29, -99, 93, -35, 61, -67, 125, -3,
X 3, -125, 67, -61, 35, -93, 99, -29,
X 19, -109, 83, -45, 51, -77, 115, -13,
X 11, -117, 75, -53, 43, -85, 107, -21,
X 27, -101, 91, -37, 59, -69, 123, -5,
X 7, -121, 71, -57, 39, -89, 103, -25,
X 23, -105, 87, -41, 55, -73, 119, -9,
X 15, -113, 79, -49, 47, -81, 111, -17,
X 31, -97, 95, -33, 63, -65, 127, -1,
X} ;
END_OF_FILE
if test 1870 -ne `wc -c <'revtable.h'`; then
echo shar: \"'revtable.h'\" unpacked with wrong size!
fi
# end of 'revtable.h'
fi
if test -f 'xmailregex.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xmailregex.h'\"
else
echo shar: Extracting \"'xmailregex.h'\" \(3353 characters\)
sed "s/^X//" >'xmailregex.h' <<'END_OF_FILE'
X/*
X * xmail - X window system interface to the mail program
X *
X * Copyright 1989 The University of Texas at Austin
X *
X * Author: Po Cheung
X * Date: March 10, 1989
X *
X * Permission to use, copy, modify, and distribute this software and
X * its documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation. The University of Texas at Austin makes no
X * representations about the suitability of this software for any purpose.
X * It is provided "as is" without express or implied warranty.
X *
X * Copyright 1990 by National Semiconductor Corporation
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of National Semiconductor Corporation not
X * be used in advertising or publicity pertaining to distribution of the
X * software without specific, written prior permission.
X *
X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS"
X * WITHOUT EXPRESS OR IMPLIED WARRANTY. NATIONAL SEMICONDUCTOR CORPORATION
X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO
X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
X * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
X * PERFORMANCE OF THIS SOFTWARE.
X *
X * Author: Michael C. Wagnitz - National Semiconductor Corporation
X *
X */
X
X
X#define C_START 0
X#define C_EXEC 1
X#define C_FILE 2
X#define C_DELETE 3
X#define C_NEWMAIL 4
X
X#ifndef PARSER
Xextern PatternRec *command_pattern;
X#else
X PatternRec command_pattern[] = {
X {"Start", NULL },
X {"[pPcCsSw] [^\n]+\n\\|-\n\\|hold [^\n]+\n\\|m[^\n]+\n\\|n\n", NULL },
X {"file[^%]*\n", NULL },
X {"[du][^\n]*\n", NULL },
X {"file %\n\\|inc\n", NULL },
X NULL
X};
X#endif
X
X#define O_BELL 0
X#define O_EXEC 1
X#define O_FILE 2
X#define O_PRINT 3
X
X#ifndef PARSER
Xextern PatternRec *output_pattern;
X#else
X PatternRec output_pattern[] = {
X { "No \\|At \\|Unknown \\|Referencing \\|Cannot \\|Not \\|New \\|May \\|\
X\"[^\"]+\" \\[Appended\\] [0-9]+/[0-9]+\n\\|\
X\"[^\"]+\" \\[New file\\] [0-9]+/[0-9]+\n\\|\
X\"[^\"]+\" No such file or directory\n\\|\
X\"[^\"]+\" Invalid argument\n\\|\
X\"[^\"]+\" Permission denied\n\\|\
X[0-9]+: Inappropriate message\n\\|\
X[0-9]+: Invalid message number\n\\|\
X[^:]+: No such file or directory\n\\|\
X[^:]+: Not a directory\n\\|\
X[^:]+: not a regular file\n\\|\
X[^:]+: empty file\n\\|\
X[^ ]+ unreadable\\|\
X[^ ]+ not found\\|\
X[^:]+: [^:]+: Permission denied\\|\
X[^:]+: Permission denied\n", NULL },
X { "From \\|Message ", NULL },
X { "\"[^\"]+\": [0-9]+ message[^\n]+\n\\|[^:]+: [^\n]+\n", NULL },
X { "Pipe to:[^\n]+\n[^\n]+\n", NULL },
X NULL
X};
X#endif
END_OF_FILE
if test 3353 -ne `wc -c <'xmailregex.h'`; then
echo shar: \"'xmailregex.h'\" unpacked with wrong size!
fi
# end of 'xmailregex.h'
fi
echo shar: End of archive 1 \(of 11\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 11 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
--
Dan Heller
O'Reilly && Associates Z-Code Software Comp-sources-x:
Senior Writer President comp-sources-x@uunet.uu.net
argv@ora.com argv@zipcode.com