home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / x / volume13 / xmail / part01 next >
Internet Message Format  |  1991-06-15  |  55KB

  1. Path: uunet!uunet!cs.utexas.edu!sun-barr!newstop!exodus!uunet.UU.NET
  2. From: stratus!voder!nsc!berlioz.nsc.com!michael@uunet.UU.NET (Michael Wagnitz)
  3. Newsgroups: comp.sources.x
  4. Subject: v13i043: xmail, Part01/11
  5. Message-ID: <csx-13i043:xmail@uunet.UU.NET>
  6. Date: 15 Jun 91 19:44:09 GMT
  7. Sender: news@exodus.Eng.Sun.COM
  8. Lines: 1442
  9. Approved: argv@sun.com
  10.  
  11. Submitted-by: stratus!voder!nsc!berlioz.nsc.com!michael@uunet.UU.NET (Michael Wagnitz)
  12. Posting-number: Volume 13, Issue 43
  13. Archive-name: xmail/part01
  14.  
  15. Following this message will be eleven (11) shar files which contain the
  16. full sources for xmail - patchlevel 3.
  17.  
  18. Many, many bugs have been repaired, not the least of which are the various
  19. memory leaks found in the previous versions.  The current program maintains
  20. a resident image of about half of that of the previous versions.
  21.  
  22. Also, many new features and improvements have been added.  Please see the
  23. CHANGES, README, and man page documentation for additional details.
  24.  
  25. Not included with this posting are the sources for the X-Face compression
  26. library routines by James Ashton.  Those sources are available from archives
  27. or directly from the Rich Burridge archive server, if needed.  X-Face support
  28. has been added to xmail, as a conditional compilation option.
  29.  
  30. I have attempted to provide support for System-V variants, although I could
  31. not test them, and those that requested such features failed to respond to my
  32. requests for beta testing of the changes.  If those users on SysV machines
  33. find problems, I would appreciate knowing (along with any fixes if possible)
  34. so that I might post corrections for the rest.
  35.  
  36. I hope you find this version a considerable improvement over my previous one.
  37. Enjoy.
  38. --
  39. Michael C. Wagnitz    M/S D3-677      Domain: michael@berlioz.nsc.com
  40. National Semiconductor Corporation     Phone: 408/721-3266
  41. 2900 Semiconductor Drive   Santa Clara, CA    95052-8090
  42. UUCP: {apple|decwrl|hplabs|sun}!nsc!berlioz.nsc.com!michael
  43.  
  44. #! /bin/sh
  45. # This is a shell archive.  Remove anything before this line, then unpack
  46. # it by saving it into a file and typing "sh file".  To overwrite existing
  47. # files, type "sh file -c".  You can also feed this as standard input via
  48. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  49. # will see the following message at the end:
  50. #        "End of archive 1 (of 11)."
  51. # Contents:  COPYRIGHT Imakefile MANIFEST Mailwatch.h MailwatchP.h
  52. #   README confirm.c defs.h directory.c icon.mail icon.nomail
  53. #   make.file national.bm patchlevel.h revtable.h xmailregex.h
  54. # Wrapped by michael@harley on Fri May  3 13:35:48 1991
  55. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  56. if test -f 'COPYRIGHT' -a "${1}" != "-c" ; then 
  57.   echo shar: Will not clobber existing file \"'COPYRIGHT'\"
  58. else
  59. echo shar: Extracting \"'COPYRIGHT'\" \(2025 characters\)
  60. sed "s/^X//" >'COPYRIGHT' <<'END_OF_FILE'
  61. X/*
  62. X * xmail - X window system interface to the mail program
  63. X *
  64. X * Copyright 1989 The University of Texas at Austin
  65. X *
  66. X * Author:    Po Cheung
  67. X * Date:    March 10, 1989
  68. X *
  69. X * Permission to use, copy, modify, and distribute this software and
  70. X * its documentation for any purpose and without fee is hereby granted,
  71. X * provided that the above copyright notice appear in all copies and that
  72. X * both that copyright notice and this permission notice appear in
  73. X * supporting documentation.  The University of Texas at Austin makes no 
  74. X * representations about the suitability of this software for any purpose.  
  75. X * It is provided "as is" without express or implied warranty.
  76. X *
  77. X * Copyright 1990 by National Semiconductor Corporation
  78. X *
  79. X * Permission to use, copy, modify, and distribute this software and its
  80. X * documentation for any purpose is hereby granted without fee, provided that
  81. X * the above copyright notice appear in all copies and that both that
  82. X * copyright notice and this permission notice appear in supporting
  83. X * documentation, and that the name of National Semiconductor Corporation not
  84. X * be used in advertising or publicity pertaining to distribution of the
  85. X * software without specific, written prior permission.
  86. X *
  87. X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  88. X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  89. X * WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  90. X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  91. X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  92. X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  93. X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  94. X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  95. X * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  96. X * PERFORMANCE OF THIS SOFTWARE.
  97. X *
  98. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  99. X *
  100. X */
  101. X
  102. END_OF_FILE
  103. if test 2025 -ne `wc -c <'COPYRIGHT'`; then
  104.     echo shar: \"'COPYRIGHT'\" unpacked with wrong size!
  105. fi
  106. # end of 'COPYRIGHT'
  107. fi
  108. if test -f 'Imakefile' -a "${1}" != "-c" ; then 
  109.   echo shar: Will not clobber existing file \"'Imakefile'\"
  110. else
  111. echo shar: Extracting \"'Imakefile'\" \(1351 characters\)
  112. sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
  113. X/* */#
  114. X/* */# @(#)Imakefile - for xmail version 1 patchlevel 3
  115. X/* */#
  116. X/* */# Uncomment USE_DIRENT if readdir() uses <dirent.h> instead of <sys/dir.h>
  117. X/* */#
  118. X       USE_DIRENT = -DUSE_DIRENT
  119. X/* */#
  120. X/* */# Uncomment X_FACE and COMPFACE if you have the compface library installed
  121. X/* */# and you want xmail to automatically display the X-Face: header, if found
  122. X/* */# in a message.
  123. X/* */#
  124. X/* */#           X_FACE = -DX_FACE
  125. X/* */#         COMPFACE = -lcompface
  126. X/* */#
  127. X/* */# Uncomment NO_WAIT3 if your system does not support the wait3() function
  128. X/* */#
  129. X/* */#          NO_WAIT = -DNO_WAIT3
  130. X/* */#
  131. X/* */# Uncomment LPT if you require att environment support for pseudo ports.
  132. X/* */#
  133. X/* */#             LPT = -lpt
  134. X/* */#
  135. X          DEFINES = $(USE_DIRENT) $(X_FACE) $(NO_WAIT3)
  136. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  137. X  LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT)
  138. X
  139. X             SRCS = Mailwatch.c HelpText.c actions.c callMail.c callbacks.c \
  140. X            confirm.c directory.c environs.c handler.c mail.c parser.c \
  141. X            regex.c utils.c windows.c xmail.c
  142. X
  143. X             OBJS = Mailwatch.o HelpText.o actions.o callMail.o callbacks.o \
  144. X            confirm.o directory.o environs.o handler.o mail.o parser.o \
  145. X            regex.o utils.o windows.o xmail.o
  146. X
  147. XComplexProgramTarget(xmail)
  148. X
  149. XInstallAppDefaults(XMail)
  150. END_OF_FILE
  151. if test 1351 -ne `wc -c <'Imakefile'`; then
  152.     echo shar: \"'Imakefile'\" unpacked with wrong size!
  153. fi
  154. # end of 'Imakefile'
  155. fi
  156. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  157.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  158. else
  159. echo shar: Extracting \"'MANIFEST'\" \(1458 characters\)
  160. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  161. X   File Name        Archive #    Description
  162. X-----------------------------------------------------------
  163. X CHANGES                    6    List of changes and enhancements
  164. X COPYRIGHT                  1    Copyright notice
  165. X HelpText.c                 5    source
  166. X Imakefile                  1    Makefile imake source
  167. X MANIFEST                   1    This shipping list
  168. X Mailwatch.c                6    source
  169. X Mailwatch.h                1    source
  170. X MailwatchP.h               1    source
  171. X README                     1    documentation
  172. X XMail.ad                   2    application resources
  173. X actions.c                  8    source
  174. X callMail.c                 2    source
  175. X callbacks.c                9    source
  176. X confirm.c                  1    source
  177. X defs.h                     1    source
  178. X directory.c                1    source
  179. X environs.c                 4    source
  180. X global.h                   2    source
  181. X handler.c                  3    source
  182. X icon.mail                  1    source
  183. X icon.nomail                1    source
  184. X mail.c                     3    source
  185. X make.file                  1    alternate makefile
  186. X national.bm                1    source
  187. X parser.c                   5    source
  188. X patchlevel.h               1    source
  189. X regex.c                   11    source
  190. X regex.h                    2    source
  191. X revtable.h                 1    source
  192. X utils.c                    3    source
  193. X windows.c                  7    source
  194. X xmail.c                    4    source
  195. X xmail.man                 10    documentation
  196. X xmailregex.h               1    source
  197. END_OF_FILE
  198. if test 1458 -ne `wc -c <'MANIFEST'`; then
  199.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  200. fi
  201. # end of 'MANIFEST'
  202. fi
  203. if test -f 'Mailwatch.h' -a "${1}" != "-c" ; then 
  204.   echo shar: Will not clobber existing file \"'Mailwatch.h'\"
  205. else
  206. echo shar: Extracting \"'Mailwatch.h'\" \(936 characters\)
  207. sed "s/^X//" >'Mailwatch.h' <<'END_OF_FILE'
  208. X/*
  209. X * Author:  Dan heller
  210. X */
  211. X
  212. X#ifndef _XtMailwatch_h
  213. X#define _XtMailwatch_h
  214. X
  215. X/*
  216. X * Mailwatch widget; looks a lot like the Mailbox widget, don't it...
  217. X */
  218. X
  219. X#ifndef XtNupdate
  220. X#define XtNupdate    "update"    /* Int: how often to check mail */
  221. X#endif /* XtNupdate */
  222. X
  223. X#ifndef XtNfile
  224. X#define XtNfile        "file"        /* String:  file name to check */
  225. X#endif /* Xtfile */
  226. X
  227. X#define XtNbell        "bell"        /* boolean to ring bell on new mail */
  228. X#define XtNmailFlag    "mailFlag"    /* path to icon file for mail */
  229. X#define XtNnoMailFlag    "noMailFlag"    /* path to icon file for no mail */
  230. X#define XtNmail        "mail"        /* For XtGetValues to get mail info */
  231. X
  232. X#define XtCPixmapMask    "PixmapMask"
  233. X
  234. X/* structures */
  235. Xtypedef struct _MailwatchRec *MailwatchWidget;  /* see MailwatchP.h */
  236. Xtypedef struct _MailwatchClassRec *MailwatchWidgetClass;  /* see MailwatchP.h */
  237. X
  238. Xextern WidgetClass mailwatchWidgetClass;
  239. X
  240. X#endif /* _XtMailwatch_h */
  241. X/* DON'T ADD STUFF AFTER THIS #endif */
  242. END_OF_FILE
  243. if test 936 -ne `wc -c <'Mailwatch.h'`; then
  244.     echo shar: \"'Mailwatch.h'\" unpacked with wrong size!
  245. fi
  246. # end of 'Mailwatch.h'
  247. fi
  248. if test -f 'MailwatchP.h' -a "${1}" != "-c" ; then 
  249.   echo shar: Will not clobber existing file \"'MailwatchP.h'\"
  250. else
  251. echo shar: Extracting \"'MailwatchP.h'\" \(1968 characters\)
  252. sed "s/^X//" >'MailwatchP.h' <<'END_OF_FILE'
  253. X/*
  254. X * Author:  Dan Heller (see Mailwatch.c for detailed info)
  255. X */
  256. X#ifndef _XtMailwatchP_h
  257. X#define _XtMailwatchP_h
  258. X
  259. X#include "Mailwatch.h"
  260. X#include <X11/CoreP.h>
  261. X
  262. X#ifndef MAILBOX_DIRECTORY
  263. X#define MAILBOX_DIRECTORY "/usr/spool/mail"
  264. X#endif /* MAILBOX_DIRECTORY */
  265. X#define MAILBOX_VOLUME 33        /* percentage */
  266. X
  267. Xtypedef struct {            /* new fields for mailwatch widget */
  268. X    Pixel    foreground_pixel;    /* color index of normal state fg */
  269. X    GC        normal_GC;        /* normal GC to use */
  270. X    GC        invert_GC;        /* invert GC for FillRectangle call */
  271. X    int        update;            /* seconds between updates */
  272. X    String    filename;        /* filename to watch */
  273. X    long    last_size;        /* size in bytes of mailboxname */
  274. X    time_t    last_access;        /* last time user accessed mailbox */
  275. X    Boolean    reverseVideo;        /* do reverse video? */
  276. X    Boolean    flag_up;        /* is the flag up? */
  277. X    Boolean    bell;            /* ring the bell on new mail? */
  278. X    Boolean    useName;        /* add username to icon image? */
  279. X    Boolean    useHost;        /* add mailhost name to icon image? */
  280. X    String    username;        /* username of mailbox */
  281. X    String    mailhost;        /* host name of mail server */
  282. X    XFontStruct    *font;            /* font to use when displaying name */
  283. X    XtCallbackList    callback;    /* Call func(s) when mail arrives */
  284. X    XtIntervalId    interval_id;    /* time between checks */
  285. X    struct _mbimage {
  286. X    Pixmap    bitmap, mask;        /* depth 1, describing shape */
  287. X    Pixmap    pixmap;            /* full depth pixmap */
  288. X    int    width, height;
  289. X    } mail, nomail;
  290. X} MailwatchPart;
  291. X
  292. Xtypedef struct _MailwatchRec {        /* full instance record */
  293. X    CorePart core;
  294. X    MailwatchPart mailbox;
  295. X} MailwatchRec;
  296. X
  297. Xtypedef struct {            /* new fields for mailwatch class */
  298. X    int dummy;                /* stupid C compiler */
  299. X} MailwatchClassPart;
  300. X
  301. Xtypedef struct _MailwatchClassRec {    /* full class record declaration */
  302. X    CoreClassPart core_class;
  303. X    MailwatchClassPart mailwatch_class;
  304. X} MailwatchClassRec;
  305. X
  306. Xextern MailwatchClassRec mailwatchClassRec;     /* class pointer */
  307. X
  308. X#endif _XtMailwatchP_h
  309. END_OF_FILE
  310. if test 1968 -ne `wc -c <'MailwatchP.h'`; then
  311.     echo shar: \"'MailwatchP.h'\" unpacked with wrong size!
  312. fi
  313. # end of 'MailwatchP.h'
  314. fi
  315. if test -f 'README' -a "${1}" != "-c" ; then 
  316.   echo shar: Will not clobber existing file \"'README'\"
  317. else
  318. echo shar: Extracting \"'README'\" \(2555 characters\)
  319. sed "s/^X//" >'README' <<'END_OF_FILE'
  320. X
  321. X  xmail - X Window System interface to the mail program
  322. X
  323. X  Copyright 1990 by National Semiconductor Corporation
  324. X  Permission to use, copy, modify, and distribute this software and its
  325. X  documentation for any purpose is hereby granted without fee, provided that
  326. X  the above copyright notice appear in all copies and that both that
  327. X  copyright notice and this permission notice appear in supporting
  328. X  documentation, and that the name of National Semiconductor Corporation not
  329. X  be used in advertising or publicity pertaining to distribution of the
  330. X  software without specific, written prior permission.
  331. X  NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  332. X  SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  333. X  WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  334. X  DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  335. X  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  336. X  EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  337. X  INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  338. X  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  339. X  OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  340. X  PERFORMANCE OF THIS SOFTWARE.
  341. X  Author:  Michael C. Wagnitz - National Semiconductor Corporation
  342. X  xmail is my attempt to provide an X11 equivalent to the Sun mailtool
  343. X  application, both in the Sunview and XView implementations.  Its not
  344. X  as fancy in some ways as the newer XView version of mailtool, but it
  345. X  does have some features which I found to be practical.  For one, it
  346. X  provides built in help information on each of the xmail sub-windows.
  347. X  It also supports the user preferred editor when creating messages,
  348. X  utilizing either the editorCommand resource (or command line option)
  349. X  or the value in the user's VISUAL environment variable, if found.
  350. X  Please see the man page for additional details.
  351. X
  352. X  A non-imake version of a make file is provided as make.file.  You may
  353. X  use this file to build xmail, or invoke M.I.T.'s imake facility to
  354. X  upgrade the Makefile provided.
  355. X
  356. X  PLEASE report any bugs or enhancements to me at the address below, so
  357. X  that changes can be incorporated in my sources and official patches posted.
  358. X
  359. X  Michael Wagnitz M/S D3-677      uucp: {sun|hplabs|decwrl}!nsc!berlioz!michael
  360. X  National Semiconductor        Domain: michael@berlioz.nsc.com
  361. X  2900 Semiconductor Dr.         Phone: 408/721-3266
  362. X  Santa Clara, CA 95052-8090
  363. END_OF_FILE
  364. if test 2555 -ne `wc -c <'README'`; then
  365.     echo shar: \"'README'\" unpacked with wrong size!
  366. fi
  367. # end of 'README'
  368. fi
  369. if test -f 'confirm.c' -a "${1}" != "-c" ; then 
  370.   echo shar: Will not clobber existing file \"'confirm.c'\"
  371. else
  372. echo shar: Extracting \"'confirm.c'\" \(6384 characters\)
  373. sed "s/^X//" >'confirm.c' <<'END_OF_FILE'
  374. X/*
  375. X * @(#)Confirm - a Yes/No confirmation window with optional prompt argument.
  376. X *
  377. X * From an idea contributed by Mitchell L. Model <mlm@odi.com> on 5-17-89
  378. X *
  379. X * Copyright 1990 by National Semiconductor Corporation
  380. X *
  381. X * Permission to use, copy, modify, and distribute this software and its
  382. X * documentation for any purpose is hereby granted without fee, provided that
  383. X * the above copyright notice appear in all copies and that both that
  384. X * copyright notice and this permission notice appear in supporting
  385. X * documentation, and that the name of National Semiconductor Corporation not
  386. X * be used in advertising or publicity pertaining to distribution of the
  387. X * software without specific, written prior permission.
  388. X *
  389. X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  390. X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  391. X * WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  392. X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  393. X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  394. X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  395. X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  396. X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  397. X * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  398. X * PERFORMANCE OF THIS SOFTWARE.
  399. X *
  400. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  401. X *
  402. X */
  403. X#include "global.h"
  404. X
  405. X#define    btnsepr    7
  406. X
  407. Xtypedef struct _result {
  408. X            Bool    *popflg;
  409. X            Bool    *var;
  410. X            Widget    shell;
  411. X               } *Result;
  412. Xvoid
  413. XProcessOneEvent(display)
  414. XDisplay *display;
  415. X{
  416. X static XEvent event;
  417. X
  418. X XNextEvent(display, &event);
  419. X XtDispatchEvent(&event);
  420. X} /* ProcessOneEvent */
  421. X
  422. X
  423. Xstatic Result
  424. XMakeResult(shell, popflg, resultvar)
  425. XBool *popflg, *resultvar;
  426. XWidget shell;
  427. X{
  428. X Result rec = (Result) malloc(sizeof(struct _result));
  429. X
  430. X rec->popflg    = popflg;
  431. X rec->var    = resultvar;
  432. X rec->shell    = shell;
  433. X
  434. X return rec;
  435. X} /* MakeResult */
  436. X
  437. X
  438. X/* ARGSUSED */
  439. X/*
  440. X** ClearConfirm - get rid of the confirmation box.
  441. X*/
  442. Xvoid
  443. XClearConfirm(w, val, result)
  444. XWidget w;
  445. XBool val;
  446. XResult result;
  447. X{
  448. X XtPopdown(result->shell);
  449. X XtDestroyWidget(result->shell);
  450. X *result->popflg = FALSE;
  451. X *result->var = val;
  452. X} /* ClearConfirm */
  453. X
  454. X
  455. X/* ARGSUSED */
  456. Xstatic void
  457. XYes(w, result, call_data)
  458. XWidget w;
  459. XResult result;
  460. Xcaddr_t call_data;            /* unused */
  461. X{
  462. X ClearConfirm(w, TRUE, result);
  463. X}
  464. X
  465. X
  466. X/* ARGSUSED */
  467. Xstatic void
  468. XNo(w, result, call_data)
  469. XWidget w;                /* unused */
  470. XResult result;
  471. Xcaddr_t call_data;
  472. X{
  473. X ClearConfirm(w, FALSE, result);
  474. X} /* No */
  475. X
  476. X
  477. X/*
  478. X * Confirm - put up a window asking for confirmation.
  479. X */
  480. XBool
  481. XConfirm(prompt)
  482. Xchar*    prompt;
  483. X{
  484. X Arg        args[4];
  485. X Bool        popped_up = FALSE, result = FALSE;
  486. X Result        resultrec;
  487. X String        Translations = "<BtnDown>,<BtnUp>:\n";
  488. X Widget        shell, form, label, yes, no;
  489. X Window        root, child;
  490. X int        root_x, root_y, child_x, child_y;
  491. X int        nargs, buttons, labelwidth, yeswidth, btnborder, btnwidth;
  492. X char        *query = NULL;
  493. X
  494. X/*
  495. X** First, find out if expert flag is set.  If so, just return True.
  496. X*/
  497. X if (XMail.expert == TRUE)
  498. X    return TRUE;
  499. X/*
  500. X** Find out where the mouse is, so we can put the confirmation
  501. X** box right there.
  502. X*/
  503. X XQueryPointer(XtDisplay(toplevel), XtWindow(toplevel), &root, &child,
  504. X          &root_x, &root_y, &child_x, &child_y, &buttons);
  505. X /*
  506. X ** Construct the confirmation box
  507. X */
  508. X shell=XtCreatePopupShell("Confirm",overrideShellWidgetClass,toplevel,args,0);
  509. X
  510. X XtSetArg(args[0], XtNtranslations, XtParseTranslationTable(Translations));
  511. X XtSetArg(args[1], XtNborderWidth, (XtArgVal) 0);
  512. X form = XtCreateManagedWidget("form", formWidgetClass, shell, args, TWO);
  513. X
  514. X if (! prompt) label = NULL;
  515. X else {
  516. X    if (query) XtFree(query);
  517. X    query = NULL;
  518. X    if (query = XtMalloc(strlen(prompt) + 2)) {
  519. X       strcpy(query, prompt);
  520. X       strcat(query, "?");
  521. X      }
  522. X    XtSetArg(args[0], XtNlabel, (XtArgVal) query);
  523. X    XtSetArg(args[1], XtNjustify, XtJustifyCenter);
  524. X    XtSetArg(args[2], XtNborderWidth, (XtArgVal) 0);
  525. X    label = XtCreateManagedWidget("prompt", labelWidgetClass, form, args, 3);
  526. X   }
  527. X
  528. X nargs = 0;
  529. X XtSetArg(args[nargs], XtNhorizDistance, (XtArgVal) btnsepr);    nargs++;
  530. X if (prompt) {
  531. X    XtSetArg(args[nargs], XtNfromVert, (XtArgVal) label);    nargs++;
  532. X    XtSetArg(args[nargs], XtNvertDistance, (XtArgVal) 12);    nargs++;
  533. X   }
  534. X yes = XtCreateManagedWidget("yes", commandWidgetClass, form, args, nargs);
  535. X
  536. X nargs = 1;
  537. X XtSetArg(args[nargs], XtNfromHoriz, (XtArgVal) yes);        nargs++;
  538. X if (prompt) {
  539. X    XtSetArg(args[nargs], XtNfromVert, (XtArgVal) label);    nargs++;
  540. X    XtSetArg(args[nargs], XtNvertDistance, (XtArgVal) 12);    nargs++;
  541. X   }
  542. X no = XtCreateManagedWidget("no", commandWidgetClass, form, args, nargs);
  543. X
  544. X if (! label)
  545. X    labelwidth = 0;
  546. X else {
  547. X    XtSetArg(args[0], XtNwidth, (XtArgVal) NULL); 
  548. X    XtGetValues(label, args, ONE);
  549. X    labelwidth = args[0].value;
  550. X   }
  551. X    
  552. X XtSetArg(args[0], XtNwidth, (XtArgVal) NULL); 
  553. X XtSetArg(args[1], XtNborder, (XtArgVal) NULL); 
  554. X XtGetValues(yes, args, TWO);
  555. X
  556. X yeswidth = args[0].value;
  557. X btnborder = args[1].value;
  558. X
  559. X btnwidth = (labelwidth - btnsepr - (2 * btnborder)) / 2;
  560. X if (btnwidth < yeswidth) btnwidth = yeswidth;
  561. X
  562. X XtSetArg(args[0], XtNwidth, (XtArgVal) btnwidth); 
  563. X XtSetValues(yes, args, ONE);
  564. X XtSetValues(no, args, ONE);
  565. X
  566. X XtRealizeWidget(shell);
  567. X
  568. X XtSetArg(args[0], XtNwidth, (XtArgVal) NULL); 
  569. X XtSetArg(args[1], XtNheight, (XtArgVal) NULL); 
  570. X XtGetValues(shell, args, TWO);
  571. X
  572. X root_x -= args[0].value / 2;
  573. X root_y -= args[1].value / 2;
  574. X/*
  575. X** Keep confirm popup within root window borders (don't place it off-screen)
  576. X*/
  577. X if (root_x + args[0].value > RootWidth)
  578. X     root_x = RootWidth - args[0].value;
  579. X if (root_x < 0) root_x = 0;
  580. X
  581. X if (root_y + args[0].value > RootHeight)
  582. X     root_y = RootHeight - args[0].value;
  583. X if (root_y < 0) root_y = 0;
  584. X
  585. X XtSetArg(args[0], XtNx, (XtArgVal) root_x); 
  586. X XtSetArg(args[1], XtNy, (XtArgVal) root_y); 
  587. X XtSetValues(shell, args, TWO);
  588. X
  589. X resultrec = MakeResult(shell, &popped_up, &result);
  590. X XtAddCallback(yes, XtNcallback, Yes, resultrec);
  591. X XtAddCallback(no, XtNcallback, No, resultrec);
  592. X
  593. X if (XMail.bellRing)            /* ring bell if not silenced by user */
  594. X    XBell (XtDisplay (toplevel), 33);
  595. X
  596. X XtPopup(shell, XtGrabExclusive);
  597. X
  598. X popped_up = TRUE;
  599. X
  600. X while (popped_up) ProcessOneEvent(XtDisplay(shell));
  601. X
  602. X return result;
  603. X} /* Confirm */
  604. END_OF_FILE
  605. if test 6384 -ne `wc -c <'confirm.c'`; then
  606.     echo shar: \"'confirm.c'\" unpacked with wrong size!
  607. fi
  608. # end of 'confirm.c'
  609. fi
  610. if test -f 'defs.h' -a "${1}" != "-c" ; then 
  611.   echo shar: Will not clobber existing file \"'defs.h'\"
  612. else
  613. echo shar: Extracting \"'defs.h'\" \(5084 characters\)
  614. sed "s/^X//" >'defs.h' <<'END_OF_FILE'
  615. X/*
  616. X * xmail - X window system interface to the mail program
  617. X *
  618. X * Copyright 1989 The University of Texas at Austin
  619. X *
  620. X * Author:    Po Cheung
  621. X * Date:    March 10, 1989
  622. X *
  623. X * Permission to use, copy, modify, and distribute this software and
  624. X * its documentation for any purpose and without fee is hereby granted,
  625. X * provided that the above copyright notice appear in all copies and that
  626. X * both that copyright notice and this permission notice appear in
  627. X * supporting documentation.  The University of Texas at Austin makes no 
  628. X * representations about the suitability of this software for any purpose.  
  629. X * It is provided "as is" without express or implied warranty.
  630. X *
  631. X * Copyright 1990 by National Semiconductor Corporation
  632. X *
  633. X * Permission to use, copy, modify, and distribute this software and its
  634. X * documentation for any purpose is hereby granted without fee, provided that
  635. X * the above copyright notice appear in all copies and that both that
  636. X * copyright notice and this permission notice appear in supporting
  637. X * documentation, and that the name of National Semiconductor Corporation not
  638. X * be used in advertising or publicity pertaining to distribution of the
  639. X * software without specific, written prior permission.
  640. X *
  641. X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  642. X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  643. X * WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  644. X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  645. X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  646. X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  647. X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  648. X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  649. X * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  650. X * PERFORMANCE OF THIS SOFTWARE.
  651. X *
  652. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  653. X *
  654. X */
  655. X
  656. X
  657. X#include <stdio.h>
  658. X#include <sys/param.h>
  659. X#include <X11/IntrinsicP.h>
  660. X#include <X11/StringDefs.h>
  661. X#include <X11/Shell.h>
  662. X#include <X11/Xatom.h>
  663. X#include <X11/Xaw/Cardinals.h>
  664. X#include <X11/Xaw/Paned.h>
  665. X#include <X11/Xaw/Form.h>
  666. X#include <X11/Xaw/AsciiText.h>
  667. X#include <X11/Xaw/TextP.h>
  668. X#include <X11/Xaw/Box.h>
  669. X#include <X11/Xaw/List.h>
  670. X#include <X11/Xaw/Command.h>
  671. X#include <X11/Xaw/Dialog.h>
  672. X#include <X11/Xaw/Label.h>
  673. X
  674. X#define    TITLE        "xmail 1."    /* program title and version string */
  675. X#define    StartPos     6        /* size of 'File: ' (del stop point) */
  676. X#define    LASTCH(s)    (s[ *s ? strlen(s) - 1 : 0])
  677. X#define    CHARHEIGHT(X)    (X->max_bounds.descent + X->max_bounds.ascent)
  678. X
  679. X#if defined(NO_WAIT3)
  680. X#define    wait3(a, b, c)    waitpid(-1, a, b)
  681. X#endif
  682. X
  683. Xtypedef struct {
  684. X    XFontStruct    *textFont;        /* font to use when displaying text */
  685. X    XFontStruct    *helpFont;        /* font to use when displaying help */
  686. X    XFontStruct    *buttonFont;        /* font to use when making buttons */
  687. X    String    iconGeometry;        /* xmail icon geometry */
  688. X    String    MFileName;        /* mail option -f filename */
  689. X    String    editorCommand;        /* optional xmail send edit command */
  690. X    Dimension    shellWidth;        /* xmail window width */
  691. X    Dimension    fileBoxWidth;        /* file window box width */
  692. X    Dimension    indexHeight;        /* index window height */
  693. X    Dimension    textHeight;        /* text window height */
  694. X    Dimension    buttonWidth;        /* command button width */
  695. X    Dimension    buttonHeight;        /* command button height */
  696. X    Dimension    commandHSpace;        /* command horizontal spacing */
  697. X    Dimension    commandVSpace;        /* command vertical spacing */
  698. X    Dimension    commandHeight;        /* command window height */
  699. X    Dimension    helpWidth;        /* width of the help text popup */
  700. X    Dimension    helpHeight;        /* height of the help text popup */
  701. X    Dimension    helpX;            /* help x offset from textWindow */
  702. X    Dimension    helpY;            /* help y offset from textWindow */
  703. X    Dimension    menuX;            /* menu x offset from parent */
  704. X    Dimension    menuY;            /* menu y offset from parent */
  705. X    Boolean    bellRing;        /* xmail audible bell option */
  706. X    Boolean    expert;            /* do not confirm destructive acts */
  707. X    Boolean    iconic;            /* xmail starts in withdrawn state */
  708. X    Boolean    mailopt_n;        /* mail option -n */
  709. X    Boolean    mailopt_U;        /* mail option -U */
  710. X    Boolean    Show_Last;        /* xmail show latest option -ls */
  711. X    Boolean    Show_Info;        /* Do (or don't) show info messages */
  712. X    int        borderWidth;        /* default or specified border width */
  713. X} XmailResources;
  714. X
  715. X
  716. X/*
  717. X** structure sent to AddMenuButton()
  718. X*/
  719. Xtypedef struct    menuList_str
  720. X    {
  721. X    String        label;
  722. X    XtCallbackProc    func;
  723. X    String        data;
  724. X    } menuList, *menuList_p;
  725. X
  726. X/*
  727. X** structure used by AddHelpText() and ShowHelp()
  728. X*/
  729. Xtypedef struct    helpList_str
  730. X    {
  731. X    int        indx;
  732. X    String        name[27];
  733. X    Widget        text[27];
  734. X    } helpList, *helpList_p;
  735. X
  736. X
  737. Xtypedef struct {
  738. X    char            *pat;        /* regular expression */
  739. X    struct re_pattern_buffer    *buf;        /* buffer for compile regex */
  740. X} PatternRec, *PatternRecPtr;
  741. X
  742. Xtypedef struct {
  743. X    char            *name;        /* recipient name */
  744. X    char            *alias;        /* alias for name */
  745. X} AliasRec, *AliasRecPtr;
  746. END_OF_FILE
  747. if test 5084 -ne `wc -c <'defs.h'`; then
  748.     echo shar: \"'defs.h'\" unpacked with wrong size!
  749. fi
  750. # end of 'defs.h'
  751. fi
  752. if test -f 'directory.c' -a "${1}" != "-c" ; then 
  753.   echo shar: Will not clobber existing file \"'directory.c'\"
  754. else
  755. echo shar: Extracting \"'directory.c'\" \(5919 characters\)
  756. sed "s/^X//" >'directory.c' <<'END_OF_FILE'
  757. X/*
  758. X * xmail - X window system interface to the mail program
  759. X *
  760. X * Copyright 1990 by National Semiconductor Corporation
  761. X *
  762. X * Permission to use, copy, modify, and distribute this software and its
  763. X * documentation for any purpose is hereby granted without fee, provided that
  764. X * the above copyright notice appear in all copies and that both that
  765. X * copyright notice and this permission notice appear in supporting
  766. X * documentation, and that the name of National Semiconductor Corporation not
  767. X * be used in advertising or publicity pertaining to distribution of the
  768. X * software without specific, written prior permission.
  769. X *
  770. X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  771. X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  772. X * WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  773. X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  774. X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  775. X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  776. X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  777. X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  778. X * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  779. X * PERFORMANCE OF THIS SOFTWARE.
  780. X *
  781. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  782. X *
  783. X */
  784. X
  785. X
  786. X#include "global.h"
  787. X
  788. X#ifdef USE_DIRENT
  789. X#include <dirent.h>
  790. X#else
  791. X#include <sys/dir.h>
  792. X#endif
  793. X
  794. X
  795. X/*
  796. X** @(#)SetDirectory() - Create popup list of directory folder names
  797. X*/
  798. X/* ARGSUSED */
  799. XXtActionProc
  800. XSetDirectory(w, event, params, num_params)
  801. XWidget        w;
  802. XXEvent        *event;
  803. XString        *params;
  804. XCardinal    *num_params;
  805. X{
  806. X Arg        args[7];
  807. X Cardinal    label_width, path_length, n, depth, x;
  808. X DIR        *new_dir, *dirp;
  809. X String        name, path;
  810. X Widget        menu, layout, bw, above, to_left;
  811. X char        *s, trans[BUFSIZ], tmp[BUFSIZ];
  812. X
  813. X#ifdef USE_DIRENT
  814. X struct dirent    *dp;
  815. X#else
  816. X struct direct    *dp;
  817. X#endif
  818. X
  819. X static String dir_Trans =
  820. X    "<Btn1Down>: SetDirectory(%s, %s, %d)";
  821. X
  822. X static String m_Trans = "<LeaveWindow>:    MenuPopdown(%s)";
  823. X
  824. X static String b_Trans = "<EnterWindow>:    set() \n\
  825. X              <LeaveWindow>:    unset() \n\
  826. X              <Btn3Up>:        MyNotify(%d) MenuPopdown(%s)";
  827. X
  828. X static XtCallbackRec callbacks[] = {
  829. X        { (XtCallbackProc) GetFolderName, NULL },
  830. X        { NULL,          NULL }
  831. X       };
  832. X
  833. X
  834. X SetCursor(1);
  835. X name = params[0];
  836. X path = params[1];
  837. X path_length = strlen(path);
  838. X sscanf(params[2], "%d", &depth);
  839. X depth++;
  840. X
  841. X if (! XtNameToWidget(w, name)) {
  842. X    (void) sprintf(trans, m_Trans, name);
  843. X    XtSetArg(args[0], XtNtranslations, XtParseTranslationTable(trans));
  844. X    menu = XtCreatePopupShell(name, overrideShellWidgetClass, w, args, ONE);
  845. X
  846. X    XtSetArg(args[0], XtNdefaultDistance, 1);
  847. X    layout = XtCreateManagedWidget("menu", formWidgetClass, menu, args, ONE);
  848. X
  849. X    if ((dirp = opendir(path)) == NULL)
  850. X       XtError("xmail cannot access passed directory name in SetDirectory()");
  851. X/*
  852. X** Find width of longest label for this menu
  853. X*/
  854. X    tmp[0] = '\0';
  855. X    for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp))
  856. X        if (strcmp(dp->d_name, ".") && strcmp(dp->d_name, ".."))
  857. X           if (strlen(tmp) < strlen(dp->d_name))
  858. X              strcpy(tmp, dp->d_name);
  859. X
  860. X    rewinddir(dirp);
  861. X
  862. X    label_width = (n=strlen(tmp)) ? XTextWidth(XMail.buttonFont, tmp, n) + 12 : 0;
  863. X
  864. X    if (label_width) {
  865. X       (void) sprintf(trans, b_Trans, depth, name);
  866. X
  867. X       XtSetArg(args[0], XtNwidth, label_width);
  868. X       XtSetArg(args[1], XtNfont, XMail.buttonFont);
  869. X       XtSetArg(args[2], XtNcallback, callbacks);
  870. X       XtSetArg(args[3], XtNtranslations, XtParseTranslationTable(trans));
  871. X/*
  872. X** create the menu buttons
  873. X*/
  874. X       bw = above = to_left = NULL;
  875. X       x = 0;
  876. X       for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
  877. X           if (strcmp(dp->d_name, ".") && strcmp(dp->d_name, "..")) {
  878. X/*
  879. X** If this 'folder file' is also a directory, mark it with a trailing slash '/'
  880. X*/
  881. X              s = XtMalloc(path_length + strlen(dp->d_name) + 2);
  882. X              sprintf(s, "%s/%s", path, dp->d_name);
  883. X              if ((new_dir = opendir(s)) != NULL) {
  884. X                 sprintf(tmp, "%s/", dp->d_name);
  885. X                 XtSetArg(args[4], XtNlabel, tmp);
  886. X                } else
  887. X                 XtSetArg(args[4], XtNlabel, dp->d_name);
  888. X              XtSetArg(args[5], XtNfromHoriz, to_left);            n = 6;
  889. X              if (! to_left) XtSetArg(args[n], XtNfromVert, above);    n++;
  890. X              bw = XtCreateManagedWidget("menubutton",commandWidgetClass,layout,args,n);
  891. X              if (to_left == NULL) above = bw;
  892. X              to_left = bw;
  893. X              if (++x % 3 == 0) {        /* make box three items wide */
  894. X                 x = 0;
  895. X                 to_left = NULL;
  896. X                }
  897. X/*
  898. X** If this 'folder' is a directory, add a button popup menu of its files.
  899. X*/
  900. X              if (new_dir) {
  901. X                 closedir(new_dir);
  902. X                 sprintf(trans, dir_Trans, tmp, s, depth);
  903. X                 XtOverrideTranslations(bw, XtParseTranslationTable(trans));
  904. X                 AddInfoHandler(bw, Folder_Info[2]);
  905. X                } else
  906. X                 AddInfoHandler(bw, Folder_Info[1]);
  907. X              XtFree(s);
  908. X             }
  909. X          }
  910. X        closedir(dirp);
  911. X       }
  912. X/*
  913. X** If no buttons were created for this menu, destroy the widget.
  914. X*/
  915. X    if (! label_width)
  916. X       XtDestroyWidget(menu);
  917. X   } /* end - if menu had not yet been realized */
  918. X/*
  919. X** If menu exists, pop it up, after setting x,y coordinates
  920. X*/
  921. X menu = XtNameToWidget(w, name);
  922. X
  923. X SetCursor(0);
  924. X if (menu->core.being_destroyed)
  925. X    XBell(XtDisplay(toplevel), 33);
  926. X else {
  927. X    SetPopup(w, event, params, num_params);
  928. X
  929. X    XtSetArg(args[0], XtNy, NULL);
  930. X    XtGetValues(menu, args, ONE);
  931. X    args[0].value -= XMail.menuY;    /* don't offset menu below cursor */
  932. X    XtSetValues(menu, args, ONE);
  933. X
  934. X    XtPopup(menu, XtGrabNone);
  935. X   }
  936. X} /* SetDirectory */
  937. END_OF_FILE
  938. if test 5919 -ne `wc -c <'directory.c'`; then
  939.     echo shar: \"'directory.c'\" unpacked with wrong size!
  940. fi
  941. # end of 'directory.c'
  942. fi
  943. if test -f 'icon.mail' -a "${1}" != "-c" ; then 
  944.   echo shar: Will not clobber existing file \"'icon.mail'\"
  945. else
  946. echo shar: Extracting \"'icon.mail'\" \(3920 characters\)
  947. sed "s/^X//" >'icon.mail' <<'END_OF_FILE'
  948. X/*
  949. X * xmail - X window system interface to the mail program
  950. X *
  951. X * Copyright 1990 by National Semiconductor Corporation
  952. X *
  953. X * Permission to use, copy, modify, and distribute this software and its
  954. X * documentation for any purpose is hereby granted without fee, provided that
  955. X * the above copyright notice appear in all copies and that both that
  956. X * copyright notice and this permission notice appear in supporting
  957. X * documentation, and that the name of National Semiconductor Corporation not
  958. X * be used in advertising or publicity pertaining to distribution of the
  959. X * software without specific, written prior permission.  National Semiconductor
  960. X * Corporation makes no representations about the suitability of this software
  961. X * for any purpose.  It is provided "as is" without express or implied warranty.
  962. X *
  963. X * NATIONAL SEMICONDUCTOR CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
  964. X * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  965. X * FITNESS, IN NO EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR
  966. X * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  967. X * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
  968. X * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  969. X * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  970. X *
  971. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  972. X *
  973. X */
  974. X
  975. X#define mail_width 56
  976. X#define mail_height 56
  977. X
  978. Xstatic char mail_bits[] = {
  979. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
  980. X   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00,
  981. X   0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00,
  982. X   0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00,
  983. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
  984. X   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf0, 0x00, 0x00, 0x00, 0x00,
  985. X   0x00, 0x18, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x30, 0x03, 0x00,
  986. X   0x00, 0x00, 0x00, 0x07, 0x30, 0x06, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30,
  987. X   0x06, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x30, 0x07, 0x00, 0x00, 0x00, 0xe0,
  988. X   0x1f, 0xb0, 0x07, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x06, 0x00, 0x00,
  989. X   0x00, 0xb8, 0xee, 0x70, 0x06, 0x00, 0x00, 0x00, 0x5c, 0xd7, 0x31, 0x06,
  990. X   0x00, 0x00, 0x00, 0xae, 0xae, 0x39, 0x06, 0x00, 0x00, 0x00, 0x56, 0x5d,
  991. X   0x3f, 0x06, 0x00, 0x00, 0x00, 0x8a, 0xb4, 0x37, 0x06, 0x00, 0x00, 0x00,
  992. X   0x46, 0x64, 0x33, 0x06, 0x00, 0x00, 0x00, 0x22, 0xc4, 0x33, 0x06, 0x00,
  993. X   0x00, 0x00, 0x12, 0x84, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x33,
  994. X   0x06, 0x00, 0x00, 0x00, 0xfa, 0x07, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a,
  995. X   0x00, 0x33, 0x06, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x03, 0x03, 0x00, 0x00,
  996. X   0x00, 0x3a, 0x80, 0x83, 0x01, 0x00, 0x00, 0x00, 0x7a, 0x40, 0xc3, 0x00,
  997. X   0x00, 0x00, 0x00, 0xfa, 0xa0, 0x63, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x51,
  998. X   0x33, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x1b, 0x00, 0x00, 0x00, 0x00,
  999. X   0x3a, 0x06, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x1f, 0x00, 0x00,
  1000. X   0x00, 0x00, 0x0a, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19,
  1001. X   0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19, 0x00, 0x00, 0x00, 0x00, 0x02,
  1002. X   0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x19, 0x00, 0x00, 0x00,
  1003. X   0x00, 0xaa, 0x2b, 0x19, 0x00, 0x00, 0x00, 0x00, 0xba, 0x2a, 0x19, 0x00,
  1004. X   0x00, 0x00, 0x00, 0x2a, 0x29, 0x19, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00,
  1005. X   0x19, 0x00, 0x80, 0x85, 0xd8, 0x02, 0x00, 0x99, 0x02, 0x40, 0xc5, 0x92,
  1006. X   0x52, 0x15, 0x59, 0x46, 0x42, 0x69, 0xb2, 0xaa, 0x2a, 0xb9, 0x44, 0xc6,
  1007. X   0xee, 0xaa, 0x82, 0x02, 0x79, 0x64, 0xb5, 0x8a, 0x22, 0x12, 0x11, 0xad,
  1008. X   0xa9, 0x10, 0x29, 0xc8, 0xa2, 0x0b, 0xad, 0xc0, 0xba, 0xc4, 0x4a, 0xc6,
  1009. X   0x86, 0x87, 0x4e, 0x5a, 0xdb, 0x67, 0x07, 0xc2, 0x7e, 0xee, 0x3f, 0xb7,
  1010. X   0xdc, 0x8e, 0xc7, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0x1d, 0x63, 0x72, 0xb9,
  1011. X   0x7b, 0xfd, 0x72, 0xf9, 0x7f, 0x4e, 0xe7, 0xd4};
  1012. END_OF_FILE
  1013. if test 3920 -ne `wc -c <'icon.mail'`; then
  1014.     echo shar: \"'icon.mail'\" unpacked with wrong size!
  1015. fi
  1016. # end of 'icon.mail'
  1017. fi
  1018. if test -f 'icon.nomail' -a "${1}" != "-c" ; then 
  1019.   echo shar: Will not clobber existing file \"'icon.nomail'\"
  1020. else
  1021. echo shar: Extracting \"'icon.nomail'\" \(3929 characters\)
  1022. sed "s/^X//" >'icon.nomail' <<'END_OF_FILE'
  1023. X/*
  1024. X * xmail - X window system interface to the mail program
  1025. X *
  1026. X * Copyright 1990 by National Semiconductor Corporation
  1027. X *
  1028. X * Permission to use, copy, modify, and distribute this software and its
  1029. X * documentation for any purpose is hereby granted without fee, provided that
  1030. X * the above copyright notice appear in all copies and that both that
  1031. X * copyright notice and this permission notice appear in supporting
  1032. X * documentation, and that the name of National Semiconductor Corporation not
  1033. X * be used in advertising or publicity pertaining to distribution of the
  1034. X * software without specific, written prior permission.  National Semiconductor
  1035. X * Corporation makes no representations about the suitability of this software
  1036. X * for any purpose.  It is provided "as is" without express or implied warranty.
  1037. X *
  1038. X * NATIONAL SEMICONDUCTOR CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
  1039. X * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  1040. X * FITNESS, IN NO EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR
  1041. X * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  1042. X * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
  1043. X * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  1044. X * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  1045. X *
  1046. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  1047. X *
  1048. X */
  1049. X
  1050. X#define no_mail_width 56
  1051. X#define no_mail_height 56
  1052. X
  1053. Xstatic char no_mail_bits[] = {
  1054. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1055. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1056. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1057. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1058. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
  1059. X   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00,
  1060. X   0x00, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x04,
  1061. X   0x00, 0x00, 0x00, 0x07, 0x00, 0x06, 0x06, 0x00, 0x00, 0x80, 0x01, 0x00,
  1062. X   0x06, 0x07, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x87, 0x07, 0x00, 0x00, 0xe0,
  1063. X   0x1f, 0x80, 0xc7, 0x07, 0x00, 0x00, 0xf0, 0x3f, 0xc0, 0xe6, 0x07, 0x00,
  1064. X   0x00, 0xf8, 0xe2, 0x60, 0x76, 0x07, 0x00, 0x00, 0x9c, 0xce, 0x31, 0x3e,
  1065. X   0x03, 0x00, 0x00, 0x8e, 0x86, 0x19, 0x1e, 0x01, 0x00, 0x00, 0x86, 0x03,
  1066. X   0x0f, 0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00,
  1067. X   0xc2, 0x06, 0x83, 0x07, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0xc3, 0x07, 0x00,
  1068. X   0x00, 0x00, 0x12, 0x11, 0xe3, 0x06, 0x00, 0x00, 0x00, 0x82, 0x02, 0x73,
  1069. X   0x06, 0x00, 0x00, 0x00, 0xaa, 0x2a, 0x33, 0x06, 0x00, 0x00, 0x00, 0x52,
  1070. X   0x15, 0x13, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x03, 0x00, 0x00,
  1071. X   0x00, 0x02, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x29, 0xc3, 0x00,
  1072. X   0x00, 0x00, 0x00, 0xba, 0x2a, 0x63, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2b,
  1073. X   0x33, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x1b, 0x00, 0x00, 0x00, 0x00,
  1074. X   0x02, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x00,
  1075. X   0x00, 0x00, 0xfe, 0xff, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19,
  1076. X   0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0,
  1077. X   0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00,
  1078. X   0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00,
  1079. X   0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0,
  1080. X   0x18, 0x00, 0x80, 0x85, 0xd8, 0xca, 0xc0, 0x98, 0x02, 0x40, 0xc5, 0x92,
  1081. X   0xca, 0xc0, 0x58, 0x46, 0x42, 0x69, 0xb2, 0xe4, 0xc0, 0xb8, 0x44, 0xc6,
  1082. X   0xee, 0xaa, 0xe8, 0xc0, 0x78, 0x64, 0xb5, 0x8a, 0x22, 0xd6, 0xc0, 0xac,
  1083. X   0xa9, 0x10, 0x29, 0xc8, 0xd6, 0xd5, 0xaf, 0xc0, 0xba, 0xc4, 0x4a, 0xd2,
  1084. X   0xe9, 0x87, 0x4e, 0x5a, 0xdb, 0x67, 0xfb, 0xca, 0x7c, 0xee, 0x3f, 0xb7,
  1085. X   0xdc, 0xe6, 0xe9, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0xed, 0xba, 0x73, 0xb9,
  1086. X   0x7b, 0xfd, 0x72, 0x9b, 0xda, 0x4e, 0xe7, 0xd4};
  1087. END_OF_FILE
  1088. if test 3929 -ne `wc -c <'icon.nomail'`; then
  1089.     echo shar: \"'icon.nomail'\" unpacked with wrong size!
  1090. fi
  1091. # end of 'icon.nomail'
  1092. fi
  1093. if test -f 'make.file' -a "${1}" != "-c" ; then 
  1094.   echo shar: Will not clobber existing file \"'make.file'\"
  1095. else
  1096. echo shar: Extracting \"'make.file'\" \(2046 characters\)
  1097. sed "s/^X//" >'make.file' <<'END_OF_FILE'
  1098. X#
  1099. X# default makefile for xmail 1.3
  1100. X#
  1101. X# Uncomment USE_DIRENT if readdir() uses <dirent.h> instead of <sys/dir.h>
  1102. X#
  1103. X  USE_DIRENT = -DUSE_DIRENT
  1104. X#
  1105. X# Uncomment X_FACE and COMPFACE if you have the compface library installed
  1106. X# and you want xmail to automatically display the X-Face: header, if found
  1107. X# in a message.
  1108. X#
  1109. X      X_FACE = -DX_FACE
  1110. X    COMPFACE = -lcompface
  1111. X#
  1112. X# Uncomment NO_WAIT3 if your system does not support the wait3() function
  1113. X#
  1114. X#     NO_WAIT = -DNO_WAIT3
  1115. X#
  1116. X# Uncomment LPT if you require att environment support for pseudo ports.
  1117. X#
  1118. X#         LPT = -lpt
  1119. X#
  1120. X      BINDIR = /usr/bin/X11
  1121. X      APPDIR = /usr/lib/X11/app-defaults
  1122. X      MANDIR = /usr/man/mann
  1123. X      CC = cc
  1124. X      LD = ld
  1125. X     INSTALL = install
  1126. XINSTBINFLAGS = -s -m 0755
  1127. XINSTAPPFLAGS = -m 0644
  1128. XINSTMANFLAGS = -m 0644
  1129. X      RM = rm -f
  1130. X        LINK = ln -s
  1131. X      RANLIB = ranlib
  1132. X        MAKE = make
  1133. X       SHELL = /bin/sh
  1134. X     DEFINES = $(USE_DIRENT) $(X_FACE) $(NO_WAIT3)
  1135. X      CFLAGS = $(DEFINES)
  1136. X   LIBRARIES = -lXaw -lXmu -lXt -lXext -lX11
  1137. X     PROGRAM = xmail
  1138. X
  1139. X        SRCS = \
  1140. X        HelpText.c \
  1141. X        Mailwatch.c \
  1142. X        actions.c \
  1143. X        callMail.c \
  1144. X        callbacks.c \
  1145. X        confirm.c \
  1146. X        directory.c \
  1147. X        environs.c \
  1148. X        handler.c \
  1149. X        mail.c \
  1150. X        parser.c \
  1151. X        regex.c \
  1152. X        utils.c \
  1153. X        windows.c \
  1154. X        xmail.c
  1155. X
  1156. X        OBJS = \
  1157. X        HelpText.o \
  1158. X        Mailwatch.o \
  1159. X        actions.o \
  1160. X        callMail.o \
  1161. X        callbacks.o \
  1162. X        confirm.o \
  1163. X        directory.o \
  1164. X        environs.o \
  1165. X        handler.o \
  1166. X        mail.o \
  1167. X        parser.o \
  1168. X        regex.o \
  1169. X        utils.o \
  1170. X        windows.o \
  1171. X        xmail.o
  1172. X
  1173. X        INCS = \
  1174. X        MailwatchP.h \
  1175. X        Mailwatch.h \
  1176. X        defs.h \
  1177. X        global.h \
  1178. X        icon.mail \
  1179. X        icon.nomail \
  1180. X        national.bm \
  1181. X        patchlevel.h \
  1182. X        regex.h \
  1183. X        revtable.h \
  1184. X        xmailregex.h
  1185. X#
  1186. X$(PROGRAM):    $(OBJS)
  1187. X    @$(RM) $@
  1188. X    $(CC) -o $@ $(OBJS) $(LDFLAGS) $(LIBRARIES)
  1189. X
  1190. Xinstall::    $(PROGRAM)
  1191. X    $(INSTALL) -c $(INSTBINFLAGS) $? $(BINDIR)
  1192. X
  1193. Xinstall::    XMail.ad
  1194. X    $(INSTALL) -c $(INSTAPPFLAGS) $? $(APPDIR)/XMail
  1195. X
  1196. Xinstall::
  1197. X    @echo done
  1198. X
  1199. Xinstall.man::    xmail.man
  1200. X    $(INSTALL) -c $(INSTMANFLAGS) $? $(MANDIR)/xmail.n
  1201. X
  1202. Xinstall.man::
  1203. X    @echo install man done
  1204. X
  1205. Xclean:
  1206. X    @$(RM) *.o
  1207. X
  1208. X$(OBJS):    $(INCS)
  1209. END_OF_FILE
  1210. if test 2046 -ne `wc -c <'make.file'`; then
  1211.     echo shar: \"'make.file'\" unpacked with wrong size!
  1212. fi
  1213. # end of 'make.file'
  1214. fi
  1215. if test -f 'national.bm' -a "${1}" != "-c" ; then 
  1216.   echo shar: Will not clobber existing file \"'national.bm'\"
  1217. else
  1218. echo shar: Extracting \"'national.bm'\" \(1855 characters\)
  1219. sed "s/^X//" >'national.bm' <<'END_OF_FILE'
  1220. X/*
  1221. X * xmail - X window system interface to the mail program
  1222. X *
  1223. X * Copyright 1990 by National Semiconductor Corporation
  1224. X *
  1225. X * Permission to use, copy, modify, and distribute this software and its
  1226. X * documentation for any purpose is hereby granted without fee, provided that
  1227. X * the above copyright notice appear in all copies and that both that
  1228. X * copyright notice and this permission notice appear in supporting
  1229. X * documentation, and that the name of National Semiconductor Corporation not
  1230. X * be used in advertising or publicity pertaining to distribution of the
  1231. X * software without specific, written prior permission.  National Semiconductor
  1232. X * Corporation makes no representations about the suitability of this software
  1233. X * for any purpose.  It is provided "as is" without express or implied warranty.
  1234. X *
  1235. X * NATIONAL SEMICONDUCTOR CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
  1236. X * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  1237. X * FITNESS, IN NO EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR
  1238. X * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  1239. X * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
  1240. X * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  1241. X * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  1242. X *
  1243. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  1244. X *
  1245. X */
  1246. X
  1247. X#define national_width 20
  1248. X#define national_height 20
  1249. Xstatic char national_bits[] = {
  1250. X   0xff, 0xff, 0xff, 0xff, 0x7c, 0xff, 0x7f, 0x3c, 0xff, 0x3f, 0x1c, 0xff,
  1251. X   0x1f, 0x8d, 0xff, 0x8f, 0xc5, 0xff, 0xc7, 0xe1, 0xff, 0xe3, 0x71, 0xff,
  1252. X   0x71, 0x38, 0xff, 0x39, 0x1e, 0xff, 0x1d, 0x8e, 0xff, 0x8f, 0xc6, 0xff,
  1253. X   0xc7, 0xe2, 0xff, 0xe3, 0xf0, 0xff, 0xf1, 0xf8, 0xff, 0xf9, 0xfc, 0xff,
  1254. X   0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
  1255. END_OF_FILE
  1256. if test 1855 -ne `wc -c <'national.bm'`; then
  1257.     echo shar: \"'national.bm'\" unpacked with wrong size!
  1258. fi
  1259. # end of 'national.bm'
  1260. fi
  1261. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  1262.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  1263. else
  1264. echo shar: Extracting \"'patchlevel.h'\" \(21 characters\)
  1265. sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  1266. X#define PATCHLEVEL 3
  1267. END_OF_FILE
  1268. if test 21 -ne `wc -c <'patchlevel.h'`; then
  1269.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  1270. fi
  1271. # end of 'patchlevel.h'
  1272. fi
  1273. if test -f 'revtable.h' -a "${1}" != "-c" ; then 
  1274.   echo shar: Will not clobber existing file \"'revtable.h'\"
  1275. else
  1276. echo shar: Extracting \"'revtable.h'\" \(1870 characters\)
  1277. sed "s/^X//" >'revtable.h' <<'END_OF_FILE'
  1278. X/*
  1279. X** 256-byte table for quickly reversing the bits in an unsigned 8-bit char,
  1280. X** used to convert between MSBFirst and LSBFirst image formats.
  1281. X*/
  1282. X
  1283. Xchar revtable[256] = {
  1284. X        0, -128,   64,  -64,   32,  -96,   96,  -32,
  1285. X       16, -112,   80,  -48,   48,  -80,  112,  -16,
  1286. X        8, -120,   72,  -56,   40,  -88,  104,  -24,
  1287. X       24, -104,   88,  -40,   56,  -72,  120,   -8,
  1288. X        4, -124,   68,  -60,   36,  -92,  100,  -28,
  1289. X       20, -108,   84,  -44,   52,  -76,  116,  -12,
  1290. X       12, -116,   76,  -52,   44,  -84,  108,  -20,
  1291. X       28, -100,   92,  -36,   60,  -68,  124,   -4,
  1292. X        2, -126,   66,  -62,   34,  -94,   98,  -30,
  1293. X       18, -110,   82,  -46,   50,  -78,  114,  -14,
  1294. X       10, -118,   74,  -54,   42,  -86,  106,  -22,
  1295. X       26, -102,   90,  -38,   58,  -70,  122,   -6,
  1296. X        6, -122,   70,  -58,   38,  -90,  102,  -26,
  1297. X       22, -106,   86,  -42,   54,  -74,  118,  -10,
  1298. X       14, -114,   78,  -50,   46,  -82,  110,  -18,
  1299. X       30,  -98,   94,  -34,   62,  -66,  126,   -2,
  1300. X        1, -127,   65,  -63,   33,  -95,   97,  -31,
  1301. X       17, -111,   81,  -47,   49,  -79,  113,  -15,
  1302. X        9, -119,   73,  -55,   41,  -87,  105,  -23,
  1303. X       25, -103,   89,  -39,   57,  -71,  121,   -7,
  1304. X        5, -123,   69,  -59,   37,  -91,  101,  -27,
  1305. X       21, -107,   85,  -43,   53,  -75,  117,  -11,
  1306. X       13, -115,   77,  -51,   45,  -83,  109,  -19,
  1307. X       29,  -99,   93,  -35,   61,  -67,  125,   -3,
  1308. X        3, -125,   67,  -61,   35,  -93,   99,  -29,
  1309. X       19, -109,   83,  -45,   51,  -77,  115,  -13,
  1310. X       11, -117,   75,  -53,   43,  -85,  107,  -21,
  1311. X       27, -101,   91,  -37,   59,  -69,  123,   -5,
  1312. X        7, -121,   71,  -57,   39,  -89,  103,  -25,
  1313. X       23, -105,   87,  -41,   55,  -73,  119,   -9,
  1314. X       15, -113,   79,  -49,   47,  -81,  111,  -17,
  1315. X       31,  -97,   95,  -33,   63,  -65,  127,   -1,
  1316. X} ;
  1317. END_OF_FILE
  1318. if test 1870 -ne `wc -c <'revtable.h'`; then
  1319.     echo shar: \"'revtable.h'\" unpacked with wrong size!
  1320. fi
  1321. # end of 'revtable.h'
  1322. fi
  1323. if test -f 'xmailregex.h' -a "${1}" != "-c" ; then 
  1324.   echo shar: Will not clobber existing file \"'xmailregex.h'\"
  1325. else
  1326. echo shar: Extracting \"'xmailregex.h'\" \(3353 characters\)
  1327. sed "s/^X//" >'xmailregex.h' <<'END_OF_FILE'
  1328. X/*
  1329. X * xmail - X window system interface to the mail program
  1330. X *
  1331. X * Copyright 1989 The University of Texas at Austin
  1332. X *
  1333. X * Author:    Po Cheung
  1334. X * Date:    March 10, 1989
  1335. X *
  1336. X * Permission to use, copy, modify, and distribute this software and
  1337. X * its documentation for any purpose and without fee is hereby granted,
  1338. X * provided that the above copyright notice appear in all copies and that
  1339. X * both that copyright notice and this permission notice appear in
  1340. X * supporting documentation.  The University of Texas at Austin makes no 
  1341. X * representations about the suitability of this software for any purpose.  
  1342. X * It is provided "as is" without express or implied warranty.
  1343. X *
  1344. X * Copyright 1990 by National Semiconductor Corporation
  1345. X *
  1346. X * Permission to use, copy, modify, and distribute this software and its
  1347. X * documentation for any purpose is hereby granted without fee, provided that
  1348. X * the above copyright notice appear in all copies and that both that
  1349. X * copyright notice and this permission notice appear in supporting
  1350. X * documentation, and that the name of National Semiconductor Corporation not
  1351. X * be used in advertising or publicity pertaining to distribution of the
  1352. X * software without specific, written prior permission.
  1353. X *
  1354. X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  1355. X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  1356. X * WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  1357. X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  1358. X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  1359. X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  1360. X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  1361. X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  1362. X * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1363. X * PERFORMANCE OF THIS SOFTWARE.
  1364. X *
  1365. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  1366. X *
  1367. X */
  1368. X
  1369. X
  1370. X#define    C_START        0
  1371. X#define    C_EXEC        1
  1372. X#define    C_FILE        2
  1373. X#define    C_DELETE    3
  1374. X#define    C_NEWMAIL    4
  1375. X
  1376. X#ifndef PARSER
  1377. Xextern PatternRec *command_pattern;
  1378. X#else
  1379. X       PatternRec command_pattern[] = {
  1380. X    {"Start", NULL },
  1381. X    {"[pPcCsSw] [^\n]+\n\\|-\n\\|hold [^\n]+\n\\|m[^\n]+\n\\|n\n", NULL },
  1382. X    {"file[^%]*\n", NULL },
  1383. X    {"[du][^\n]*\n", NULL },
  1384. X    {"file %\n\\|inc\n", NULL },
  1385. X    NULL
  1386. X};
  1387. X#endif
  1388. X
  1389. X#define    O_BELL        0
  1390. X#define    O_EXEC        1
  1391. X#define    O_FILE        2
  1392. X#define    O_PRINT        3
  1393. X
  1394. X#ifndef PARSER
  1395. Xextern PatternRec *output_pattern;
  1396. X#else
  1397. X       PatternRec output_pattern[] = {
  1398. X    { "No \\|At \\|Unknown \\|Referencing \\|Cannot \\|Not \\|New \\|May \\|\
  1399. X\"[^\"]+\" \\[Appended\\] [0-9]+/[0-9]+\n\\|\
  1400. X\"[^\"]+\" \\[New file\\] [0-9]+/[0-9]+\n\\|\
  1401. X\"[^\"]+\" No such file or directory\n\\|\
  1402. X\"[^\"]+\" Invalid argument\n\\|\
  1403. X\"[^\"]+\" Permission denied\n\\|\
  1404. X[0-9]+: Inappropriate message\n\\|\
  1405. X[0-9]+: Invalid message number\n\\|\
  1406. X[^:]+: No such file or directory\n\\|\
  1407. X[^:]+: Not a directory\n\\|\
  1408. X[^:]+: not a regular file\n\\|\
  1409. X[^:]+: empty file\n\\|\
  1410. X[^ ]+ unreadable\\|\
  1411. X[^ ]+ not found\\|\
  1412. X[^:]+: [^:]+: Permission denied\\|\
  1413. X[^:]+: Permission denied\n", NULL },
  1414. X    { "From \\|Message ", NULL },
  1415. X    { "\"[^\"]+\": [0-9]+ message[^\n]+\n\\|[^:]+: [^\n]+\n", NULL },
  1416. X    { "Pipe to:[^\n]+\n[^\n]+\n", NULL },
  1417. X    NULL 
  1418. X};
  1419. X#endif
  1420. END_OF_FILE
  1421. if test 3353 -ne `wc -c <'xmailregex.h'`; then
  1422.     echo shar: \"'xmailregex.h'\" unpacked with wrong size!
  1423. fi
  1424. # end of 'xmailregex.h'
  1425. fi
  1426. echo shar: End of archive 1 \(of 11\).
  1427. cp /dev/null ark1isdone
  1428. MISSING=""
  1429. for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
  1430.     if test ! -f ark${I}isdone ; then
  1431.     MISSING="${MISSING} ${I}"
  1432.     fi
  1433. done
  1434. if test "${MISSING}" = "" ; then
  1435.     echo You have unpacked all 11 archives.
  1436.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1437. else
  1438.     echo You still need to unpack the following archives:
  1439.     echo "        " ${MISSING}
  1440. fi
  1441. ##  End of shell archive.
  1442. exit 0
  1443.  
  1444. --
  1445. Dan Heller
  1446. O'Reilly && Associates       Z-Code Software    Comp-sources-x:
  1447. Senior Writer                President          comp-sources-x@uunet.uu.net
  1448. argv@ora.com                 argv@zipcode.com
  1449.