home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume19 / xmail / part09 < prev    next >
Encoding:
Text File  |  1993-04-27  |  58.2 KB  |  1,407 lines

  1. Newsgroups: comp.sources.x
  2. From: markham@cadence.com (Jeff Markham)
  3. Subject: v19i034:  xmail - X Window System interface to the mail program, Part09/10
  4. Message-ID: <1993Mar10.203111.11512@sparky.imd.sterling.com>
  5. X-Md4-Signature: a1b369872fa2f6720d7ad1e1ffe209c4
  6. Date: Wed, 10 Mar 1993 20:31:11 GMT
  7. Approved: chris@sparky.imd.sterling.com
  8.  
  9. Submitted-by: markham@cadence.com (Jeff Markham)
  10. Posting-number: Volume 19, Issue 34
  11. Archive-name: xmail/part09
  12. Environment: X11
  13. Supersedes: xmail: Volume 15, Issue 18-26
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then feed it
  17. # into a shell via "sh file" or similar.  To overwrite existing files,
  18. # type "sh file -c".
  19. # Contents:  Changes_1.5 MailwatchP.h callMail.c defs.h icon.mail
  20. #   icon.nomail mail.xpm make.file nomail.xpm revtable.h xmailregexp.h
  21. # Wrapped by chris@sparky on Wed Mar 10 14:17:52 1993
  22. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  23. echo If this archive is complete, you will see the following message:
  24. echo '          "shar: End of archive 9 (of 10)."'
  25. if test -f 'Changes_1.5' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'Changes_1.5'\"
  27. else
  28.   echo shar: Extracting \"'Changes_1.5'\" \(5217 characters\)
  29.   sed "s/^X//" >'Changes_1.5' <<'END_OF_FILE'
  30. X                                                                 January, 1992
  31. X
  32. XThe following changes have been implemented for xmail patchlevel 5.  This list
  33. Xis subject to additions as I am still in the process of repairing certain bugs
  34. X(detailed at the end of this list).
  35. X
  36. XMALLOC/FREE:
  37. X   Added several casts for XtMalloc() and XtFree() calls in order to try
  38. X   and eliminate problems with segmentation violations (see end of list).
  39. X   
  40. X   In an attempt to eliminate the occasional segmentation violation in
  41. X   either malloc or free, I no longer free the mail program output buffer
  42. X   each time it is used.  Instead I simply allow it to grow to the maximum
  43. X   size of a read ever performed on the mail pipe.
  44. X
  45. XMESSAGE DELIVERY:
  46. X   Added support for completing a message composition delivery from only
  47. X   the keyboard, instead of requiring the use of the mouse.  Keypress
  48. X   combinations have been added for:
  49. X
  50. X      <Meta>S (to append your [.]Signature Autograph),
  51. X      <Meta>x (to append your [.]signature autograph),
  52. X      <Meta>R (to ReEdit the message),
  53. X      <Meta>C (to Cancel message delivery and save text in dead.letter file),
  54. X      <Meta>A (to abort delivery), and
  55. X      <Meta>D (to deliver the message).
  56. X
  57. X   Added support for editheaders mail environment variable to enable
  58. X   editing of selected headers within the message body when sending a
  59. X   message.  This resource is also alterable from within the 'Set' menu
  60. X   options.
  61. X
  62. X   Optimized the mechanism for making copies of outgoing messages into
  63. X   additional folders or the record file.
  64. X
  65. X   User is now forced to destroy or complete a message composition when
  66. X   delivery is attempted with no addressee and/or no message body and no
  67. X   subject line, in lieu of the previous action which simply canceled the
  68. X   message composition and left the original text file standing in the tmp
  69. X   directory.
  70. X
  71. X   Cleaned up the code which translated the alias names in the address
  72. X   buffer into real names to allow for more variety in addressing schemes
  73. X   and to permit the declaration of pipes as aliases.
  74. X
  75. X   Fixed case of segmentation violation when reply subject did not need
  76. X   the 'Re:' string inserted.
  77. X
  78. X   In deference to those who didn't install the app-defaults file, accept
  79. X   a newline character as a word separator as well as the comma normally
  80. X   found in address specifications.
  81. X
  82. X   Eliminated stuck in wait cursor when using non-Sun version of Berkeley
  83. X   mail.  Also extended support to properly parse returns of set command
  84. X   from non-Sun Berkeley mail handler (no equals sign or quoted values)
  85. X   which used to result in record folder file name being set to the word
  86. X   'True'.
  87. X
  88. XHELP:
  89. X   Changed the requirement for displaying help on a portion of xmail from
  90. X   using the Shift key in conjunction with the middle mouse button, to just
  91. X   using the mouse button for most cases.  Some cases still require the
  92. X   use of the Shift key as the default middle mouse button action is paste
  93. X   from the selection buffer.
  94. X
  95. XMISCELLANEOUS:
  96. X   Added a hatching pattern to those folders which have been modified
  97. X   more recently than accessed, to indicate when unread messages exist in
  98. X   those folders.
  99. X   
  100. X   Added functions to initialize the value of the global HOME and foldir
  101. X   variables (if a folder directory is defined), instead of doing repeated
  102. X   calls to getenv() and GetMailEnv().
  103. X   
  104. X   Fixed a bug which failed to detect deleted messages in a folder which
  105. X   also had saved messages, causing the confirm popup to not appear when
  106. X   required.
  107. X
  108. X   Made additional changes to support the printmail environment definition
  109. X   if not running on a Sun.
  110. X
  111. X   Added support for the SCO system environment when running xmail.
  112. X
  113. X   Added an exec to the sendmail and other forked processes to eliminate
  114. X   excess shells.
  115. X
  116. X   Added support for POSIX sigaction() as well as sigvec() calls.
  117. X
  118. X   Added support for non-Sun Berkeley mail handler when user wishes to
  119. X   Save or Copy a message to a file named for the author of the message.
  120. X
  121. X   Added a test to ensure we are not running binmail by mistake.  This
  122. X   eliminates a hanging condition when starting xmail because the wrong
  123. X   mail handler was invoked.
  124. X
  125. X   Fixed a bug when selecting the next message to be processed using the
  126. X   mouse button which caused the wrong value to be interpreted as the
  127. X   selected message number.
  128. X
  129. XThe two remaining (interrelated?) fixes which must be effected before these
  130. Xchanges for version 1.5 can be released involve the elimination of a segment-
  131. Xation violation when expanding a folder directory (in cfree called by XtParse-
  132. XTranslationTableProduction) and the elimination of a corruption of the Index
  133. Xwindow buffer during a subsequent fetch of its content.  Both problems are
  134. Xextremely intermittent (but repeatable under certain exact conditions).  I am
  135. Xplanning to acquire a new tool for diagnosing these problems in the very near
  136. Xfuture, and hope to be able to release the 1.5 patches in February (but don't 
  137. Xhold your breath).
  138. X
  139. XThere is also a plan to develop a version 2.00 xmail with embedded support
  140. Xfor MIME (multi-media email processing) and Internationalization.  But I must
  141. Xeliminate the current segmentation violations first, and release those patches.
  142. X
  143. END_OF_FILE
  144.   if test 5217 -ne `wc -c <'Changes_1.5'`; then
  145.     echo shar: \"'Changes_1.5'\" unpacked with wrong size!
  146.   fi
  147.   # end of 'Changes_1.5'
  148. fi
  149. if test -f 'MailwatchP.h' -a "${1}" != "-c" ; then 
  150.   echo shar: Will not clobber existing file \"'MailwatchP.h'\"
  151. else
  152.   echo shar: Extracting \"'MailwatchP.h'\" \(1973 characters\)
  153.   sed "s/^X//" >'MailwatchP.h' <<'END_OF_FILE'
  154. X/*
  155. X * Author:  Dan Heller (see Mailwatch.c for detailed info)
  156. X */
  157. X#ifndef _XtMailwatchP_h
  158. X#define _XtMailwatchP_h
  159. X
  160. X#include "Mailwatch.h"
  161. X#include <X11/CoreP.h>
  162. X
  163. X#ifndef MAILBOX_DIRECTORY
  164. X#define MAILBOX_DIRECTORY "/usr/spool/mail"
  165. X#endif /* MAILBOX_DIRECTORY */
  166. X
  167. X#define MAILBOX_VOLUME 33        /* percentage */
  168. X
  169. Xtypedef struct {            /* new fields for mailwatch widget */
  170. X    Pixel    foreground_pixel;    /* color index of normal state fg */
  171. X    GC        normal_GC;        /* normal GC to use */
  172. X    GC        invert_GC;        /* invert GC for FillRectangle call */
  173. X    int        update;            /* seconds between updates */
  174. X    String    filename;        /* filename to watch */
  175. X    long    last_size;        /* size in bytes of mailboxname */
  176. X    time_t    last_access;        /* last time user accessed mailbox */
  177. X    Boolean    reverseVideo;        /* do reverse video? */
  178. X    Boolean    flag_up;        /* is the flag up? */
  179. X    Boolean    bell;            /* ring the bell on new mail? */
  180. X    Boolean    useName;        /* add username to icon image? */
  181. X    Boolean    useHost;        /* add mailhost name to icon image? */
  182. X    String    username;        /* username of mailbox */
  183. X    String    mailhost;        /* host name of mail server */
  184. X    XFontStruct    *font;            /* font to use when displaying name */
  185. X    XtCallbackList    callback;    /* Call func(s) when mail arrives */
  186. X    XtIntervalId    interval_id;    /* time between checks */
  187. X    struct _mbimage {
  188. X    int    width, height;
  189. X    Pixmap    pixmap;            /* full depth pixmap */
  190. X#ifndef    XPM
  191. X    Pixmap  bitmap;
  192. X#else
  193. X    String  bitmap;
  194. X#endif
  195. X    } mail, nomail;
  196. X} MailwatchPart;
  197. X
  198. Xtypedef struct _MailwatchRec {        /* full instance record */
  199. X    CorePart core;
  200. X    MailwatchPart mailbox;
  201. X} MailwatchRec;
  202. X
  203. Xtypedef struct {            /* new fields for mailwatch class */
  204. X    int dummy;                /* stupid C compiler */
  205. X} MailwatchClassPart;
  206. X
  207. Xtypedef struct _MailwatchClassRec {    /* full class record declaration */
  208. X    CoreClassPart core_class;
  209. X    MailwatchClassPart mailwatch_class;
  210. X} MailwatchClassRec;
  211. X
  212. Xextern MailwatchClassRec mailwatchClassRec;     /* class pointer */
  213. X
  214. X#endif _XtMailwatchP_h
  215. END_OF_FILE
  216.   if test 1973 -ne `wc -c <'MailwatchP.h'`; then
  217.     echo shar: \"'MailwatchP.h'\" unpacked with wrong size!
  218.   fi
  219.   # end of 'MailwatchP.h'
  220. fi
  221. if test -f 'callMail.c' -a "${1}" != "-c" ; then 
  222.   echo shar: Will not clobber existing file \"'callMail.c'\"
  223. else
  224.   echo shar: Extracting \"'callMail.c'\" \(9126 characters\)
  225.   sed "s/^X//" >'callMail.c' <<'END_OF_FILE'
  226. X/*
  227. X * xmail - X window system interface to the mail program
  228. X *
  229. X * Copyright 1990,1991,1992 by National Semiconductor Corporation
  230. X *
  231. X * Permission to use, copy, modify, and distribute this software and its
  232. X * documentation for any purpose is hereby granted without fee, provided that
  233. X * the above copyright notice appear in all copies and that both that
  234. X * copyright notice and this permission notice appear in supporting
  235. X * documentation, and that the name of National Semiconductor Corporation not
  236. X * be used in advertising or publicity pertaining to distribution of the
  237. X * software without specific, written prior permission.
  238. X *
  239. X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  240. X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  241. X * WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  242. X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  243. X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  244. X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  245. X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  246. X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  247. X * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  248. X * PERFORMANCE OF THIS SOFTWARE.
  249. X *
  250. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  251. X *
  252. X**  Xmail talks to mail through a pseudo terminal which is a pair of master
  253. X**  and slave devices: /dev/pty?? and /dev/tty??, where ?? goes from p0 to
  254. X**  zf (system dependent).  The terminal is opened for both read and write.
  255. X**
  256. X*/
  257. X
  258. X#include    "global.h"
  259. X#include    <sys/stat.h>
  260. X#include    <signal.h>
  261. X
  262. X#if    defined(AIXV3) || defined(_IBMR2)
  263. X#include    <sys/select.h>
  264. X#endif
  265. X
  266. X#if    !defined(SYSV) || defined(clipper)
  267. X#include    <sgtty.h>
  268. X#else
  269. X#include    <sys/termio.h>
  270. X#include    <sys/sysmacros.h>
  271. X#include    <fcntl.h>
  272. X#if    defined(att)
  273. X#include    <sys/stropts.h>
  274. X#endif
  275. X#endif
  276. X
  277. X#ifndef TTYDEV
  278. X#ifdef        sco
  279. X#define TTYDEV        "/dev/ptypxx"
  280. X#else    /* !sco */
  281. X#ifdef        hpux
  282. X#define TTYDEV        "/dev/pty/ptyxx"
  283. X#else    /* !hpux */
  284. X#define    TTYDEV        "/dev/ptyxx"
  285. X#endif    /* !sco */
  286. X#endif    /* !hpux */
  287. X#endif    /* !TTYDEV */
  288. X
  289. X#ifndef PTYCHAR1
  290. X#ifdef        sco
  291. X#define PTYCHAR1    "0123456789abcdef"
  292. X#else    /* !sco */
  293. X#ifdef        hpux
  294. X#define PTYCHAR1    "zyxwvutsrqp"
  295. X#else    /* !hpux */
  296. X#define    PTYCHAR1    "pqrstuvwxyz"
  297. X#endif    /* !sco */
  298. X#endif    /* !hpux */
  299. X#endif    /* !PTYCHAR1 */
  300. X
  301. X#ifndef PTYCHAR2
  302. X#ifdef        hpux
  303. X#define    PTYCHAR2    "fedcba9876543210"
  304. X#else    /* !hpux */
  305. X#define    PTYCHAR2    "0123456789abcdef"
  306. X#endif    /* !hpux */
  307. X#endif    /* !PTYCHAR2 */
  308. X
  309. Xint                mail_fd;        /* mail process master tty id */
  310. Xint                mailpid;        /* mail process id */
  311. Xint                mailInputId;        /* mail input id */
  312. Xchar        pseudo_tty[20];
  313. X
  314. X
  315. X/*
  316. X** @(#) openMaster - searches for and opens a pty master.  If it finds one,
  317. X**             it returns the value of the file descriptor.  If not,
  318. X**             it reports an error and terminates.  Portions of this
  319. X**             routine were stolen from X11R4 xterm get_pty() sources.
  320. X*/
  321. Xint
  322. XopenMaster()
  323. X{
  324. X static int    devindex = 0;
  325. X static int    letter = 0;
  326. X struct    stat    st_buf;
  327. X int        master;
  328. X
  329. X#ifdef att
  330. X (void) strcpy(pseudo_tty, "/dev/ptmx");
  331. X if ((master = open(pseudo_tty, O_RDWR)) >= 0)
  332. X    return(master);
  333. X#else /* !att, need lots of code */
  334. X#if defined(umips) || defined(sgi) && defined (SYSV)
  335. X int        c;
  336. X
  337. X (void) strcpy(pseudo_tty, "/dev/ptc");
  338. X master = open(pseudo_tty, O_RDWR);
  339. X if (master >= 0 && (fstat(master, &st_buf)) == 0) {
  340. X    (void) sprintf(pseudo_tty, "/dev/ttyq%d", minor(st_buf.st_rdev));
  341. X#if ! defined(sgi)
  342. X    if ((c = open(pseudo_tty, O_RDWR)) < 0) {
  343. X       (void) close (master);
  344. X      } else {                /* got one! */
  345. X       (void) close (c);
  346. X       return(master);
  347. X      }
  348. X#else
  349. X    return(master);
  350. X#endif
  351. X   }
  352. X#else /* not (umips && SYSV) */
  353. X (void) strcpy(pseudo_tty, TTYDEV);
  354. X while (PTYCHAR1[letter]) {
  355. X       pseudo_tty[strlen(pseudo_tty) - 2] = PTYCHAR1[letter];
  356. X       pseudo_tty[strlen(pseudo_tty) - 1] = PTYCHAR2[0];
  357. X
  358. X       if (stat(pseudo_tty, &st_buf) == 0)
  359. X          while (PTYCHAR2[devindex]) {
  360. X                pseudo_tty[strlen(pseudo_tty) - 1] = PTYCHAR2[devindex];
  361. X                if ((master = open(pseudo_tty, O_RDWR)) >= 0)
  362. X                   return(master);
  363. X
  364. X                devindex++;
  365. X               }
  366. X       devindex = 0;
  367. X       (void) letter++;
  368. X      }
  369. X#endif /* umips || sgi && SYSV */
  370. X#endif /* att */
  371. X/*
  372. X** We were unable to allocate a pty master!  Report the error and terminate.
  373. X*/
  374. X XtError("xmail cannot open master/slave pipe connection");
  375. X /* NOTREACHED */
  376. X} /* end - openMaster */
  377. X
  378. X
  379. X/*
  380. X** @(#)openSlave() - open slave side of pipe
  381. X*/
  382. X/* ARGSUSED */
  383. Xint
  384. XopenSlave(master)
  385. Xint    master;
  386. X{
  387. X int        slave;
  388. X
  389. X#ifdef att
  390. X char        *slaveName;
  391. X int        grantpt(), unlockpt();
  392. X char        *ptsname();
  393. X
  394. X if (grantpt(master) >= 0 &&
  395. X    unlockpt(master) >= 0 &&
  396. X    (slaveName = ptsname(master)) != NULL &&
  397. X    (slave = open(slaveName, O_RDWR)) >= 0 &&
  398. X    (void) ioctl(slave, I_PUSH, "ptem") >= 0 &&
  399. X    (void) ioctl(slave, I_PUSH, "ldterm") >= 0)
  400. X    return(slave);
  401. X#else /* !att */
  402. X#if defined(umips) || defined(sgi) && defined(SYSV)
  403. X struct    stat    st_buf;
  404. X
  405. X fstat(master, &st_buf);
  406. X (void) sprintf(pseudo_tty, "/dev/ttyq%d", minor(st_buf.st_rdev));
  407. X if ((slave = open(pseudo_tty, O_RDWR)) >= 0)
  408. X    return(slave);                /* got one! */
  409. X#else /* not (umips || sgi && SYSV) */
  410. X#if defined(sco) || defined(hpux)
  411. X pseudo_tty[strlen(pseudo_tty) - 6] = 't';
  412. X#else
  413. X pseudo_tty[strlen(pseudo_tty) - 5] = 't';
  414. X#endif
  415. X if ((slave = open(pseudo_tty, O_RDWR)) >= 0)
  416. X    return(slave);
  417. X#endif
  418. X#endif
  419. X return(-1);                /* look for more master/slave pairs */
  420. X} /* openSlave */
  421. X
  422. X
  423. X/*
  424. X** @(#)callMail() - fork child to execute mail and attach to xmail input
  425. X*/
  426. X/* ARGSUSED */
  427. Xvoid
  428. XcallMail(argv)
  429. Xchar *argv[];
  430. X{
  431. X#if defined(SYSV)  && !defined(clipper)
  432. X struct termio    tio;
  433. X#else    
  434. X struct sgttyb    Sgtty;
  435. X#endif
  436. X int        slave;            /* file descriptor to slave pty */
  437. X
  438. X
  439. X for (;;) {                /* find a pair, or master fails */
  440. X     mail_fd = openMaster();
  441. X     if ((slave = openSlave(mail_fd)) != -1)
  442. X        break;
  443. X    }
  444. X/*
  445. X** Set minimal requirements for slave connection (no echo, no NL->CR, keep TABS)
  446. X*/
  447. X#if defined(SYSV) && !defined(clipper)
  448. X (void) ioctl(slave, TCGETA, &tio);
  449. X tio.c_oflag &= ~(OCRNL|ONLCR|ONLRET|TABDLY);
  450. X tio.c_iflag &= ~IXOFF;
  451. X tio.c_iflag |= ICRNL;
  452. X tio.c_lflag &= ~(ISIG|ECHO);
  453. X tio.c_lflag |= ICANON;
  454. X (void) ioctl(slave, TCSETA, &tio);
  455. X#else    
  456. X (void) ioctl(slave, TIOCGETP, &Sgtty);
  457. X Sgtty.sg_flags &= ~(ECHO|CRMOD|XTABS);
  458. X (void) ioctl(slave, TIOCSETP, &Sgtty);
  459. X#endif
  460. X
  461. X mailpid = fork();
  462. X if (mailpid == -1) {
  463. X    XtError("callMail could not fork the child process");
  464. X   } else if (mailpid) { 
  465. X             /* 
  466. X              * Parent : close the slave side of pty
  467. X              *          set the mail file descriptor to append mode
  468. X              *          register mail input with X
  469. X              */
  470. X             (void) close(slave);
  471. X             (void) fcntl(mail_fd, F_SETFL, FAPPEND);
  472. X             mailInputId = XtAddInput(mail_fd, XtInputReadMask, readMail, NULL);
  473. X            } else { 
  474. X             /* 
  475. X              * Child : close X connection and mail_fd side of pty
  476. X              *         redirect stdin, stdout, stderr of mail to pty
  477. X              *         unbuffer output data from mail
  478. X              *         exec mail with arguments
  479. X              *
  480. X              *         Use a select() call to delay starting the mail process
  481. X              *         until our parent can close its slave side of the pipe.
  482. X              *         Eliminates the parent hanging (for approximately 15
  483. X              *         seconds) on the close because the child terminated for
  484. X              *         lack of mail before the parent could issue its close.
  485. X              */
  486. X             int        readfds, width;
  487. X             struct timeval    timeout;
  488. X
  489. X             (void) close(ConnectionNumber(XtDisplay(toplevel)));
  490. X
  491. X             timeout.tv_sec = 0; timeout.tv_usec = 250000; /* 0.25 seconds */
  492. X             readfds = 1 << slave; width = slave + 1;
  493. X
  494. X             (void) select(width, (fd_set *) &readfds, (fd_set *) NULL, (fd_set *) NULL, &timeout);
  495. X
  496. X             (void) close(mail_fd);
  497. X             (void) dup2(slave, 0);
  498. X             (void) dup2(slave, 1);
  499. X             (void) dup2(slave, 2);
  500. X             if (slave > 2)
  501. X                 (void) close(slave);
  502. X             (void) fcntl(1, F_SETFL, FAPPEND);
  503. X             setbuf(stdout, (char *) NULL);
  504. X             (void) execvp(argv[0], argv);
  505. X             /*
  506. X              * If we fail to make contact, we must re-establish access to
  507. X              * the terminal screen that started us for our error message,
  508. X              * because we don't want to send it up the xmail pipe.
  509. X              * Also terminate our parent.
  510. X              */
  511. X             if ((slave = open("/dev/tty", O_RDWR)) != -1) {
  512. X                (void) dup2(slave, 1);
  513. X                (void) dup2(slave, 2);
  514. X                perror(argv[0]);
  515. X               }
  516. X             (void) kill(getppid(), SIGKILL);        /* kill our parent */
  517. X             (void) exit(1);
  518. X             /* NOTREACHED */
  519. X            }
  520. X} /* callMail */
  521. END_OF_FILE
  522.   if test 9126 -ne `wc -c <'callMail.c'`; then
  523.     echo shar: \"'callMail.c'\" unpacked with wrong size!
  524.   fi
  525.   # end of 'callMail.c'
  526. fi
  527. if test -f 'defs.h' -a "${1}" != "-c" ; then 
  528.   echo shar: Will not clobber existing file \"'defs.h'\"
  529. else
  530.   echo shar: Extracting \"'defs.h'\" \(5257 characters\)
  531.   sed "s/^X//" >'defs.h' <<'END_OF_FILE'
  532. X/*
  533. X * xmail - X window system interface to the mail program
  534. X *
  535. X * Copyright 1990,1991,1992 by National Semiconductor Corporation
  536. X *
  537. X * Permission to use, copy, modify, and distribute this software and its
  538. X * documentation for any purpose is hereby granted without fee, provided that
  539. X * the above copyright notice appear in all copies and that both that
  540. X * copyright notice and this permission notice appear in supporting
  541. X * documentation, and that the name of National Semiconductor Corporation not
  542. X * be used in advertising or publicity pertaining to distribution of the
  543. X * software without specific, written prior permission.
  544. X *
  545. X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  546. X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  547. X * WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  548. X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  549. X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  550. X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  551. X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  552. X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  553. X * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  554. X * PERFORMANCE OF THIS SOFTWARE.
  555. X *
  556. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  557. X*/
  558. X
  559. X
  560. X#include <stdio.h>
  561. X#if XtSpecificationRelease > 4
  562. X#else
  563. X#include <sys/types.h>
  564. X#endif
  565. X#include <sys/param.h>
  566. X#include <X11/Xos.h>
  567. X
  568. X#if XtSpecificationRelease > 4
  569. X#ifndef    X_NOT_STDC_ENV
  570. X#include <stdlib.h>
  571. X#else
  572. Xchar    *malloc(), *realloc(), *calloc();
  573. X#endif
  574. X#if defined(macII) && !defined(__STDC__)   /* stdlib.h fails to define these */
  575. Xchar    *malloc(), *realloc(), *calloc();
  576. X#endif    /* macII */
  577. X#endif
  578. X
  579. X#include <X11/IntrinsicP.h>
  580. X#include <X11/StringDefs.h>
  581. X#include <X11/Shell.h>
  582. X#include <X11/Xatom.h>
  583. X#include <X11/Xaw/Cardinals.h>
  584. X#include <X11/Xaw/Paned.h>
  585. X#include <X11/Xaw/Form.h>
  586. X#include <X11/Xaw/AsciiText.h>
  587. X#include <X11/Xaw/TextP.h>
  588. X#include <X11/Xaw/Box.h>
  589. X#include <X11/Xaw/List.h>
  590. X#include <X11/Xaw/Command.h>
  591. X#include <X11/Xaw/Dialog.h>
  592. X#include <X11/Xaw/Label.h>
  593. X
  594. X#if XtSpecificationRelease > 4
  595. X#include <X11/Xfuncs.h>            /* for bcopy, et.al. */
  596. X#else
  597. X#define    _XawTextActionsTable        textActionsTable
  598. X#define    _XawTextActionsTableCount    textActionsTableCount
  599. X#endif
  600. X
  601. X#define    TITLE        "xmail 1."    /* program title and version string */
  602. X#define    StartPos     6        /* size of 'File: ' (del stop point) */
  603. X#define    LASTCH(s)    (s[ *s ? strlen(s) - 1 : 0])
  604. X#define    CHARHEIGHT(X)    (X->max_bounds.descent + X->max_bounds.ascent)
  605. X#define    APPEND        True        /* used in writeTo function logic */
  606. X#define    REPLACE        False
  607. X#define    WATCH        True        /* used in SetCursor function logic */
  608. X#define    NORMAL        False
  609. X
  610. X#ifndef    DEFAULT_MAILER
  611. X#define    DEFAULT_MAILER    "/usr/ucb/Mail"
  612. X#endif
  613. X
  614. Xtypedef struct {
  615. X    XFontStruct    *textFont;        /* font to use when displaying text */
  616. X    XFontStruct    *helpFont;        /* font to use when displaying help */
  617. X    XFontStruct    *buttonFont;        /* font to use when making buttons */
  618. X    String    iconGeometry;        /* xmail icon geometry */
  619. X    String    MFileName;        /* mail option -f filename */
  620. X    String    editorCommand;        /* optional xmail send edit command */
  621. X    Dimension    shellWidth;        /* xmail window width */
  622. X    Dimension    fileBoxWidth;        /* file window box width */
  623. X    Dimension    indexHeight;        /* index window height */
  624. X    Dimension    textHeight;        /* text window height */
  625. X    Dimension    buttonWidth;        /* command button width */
  626. X    Dimension    buttonHeight;        /* command button height */
  627. X    Dimension    commandHSpace;        /* command horizontal spacing */
  628. X    Dimension    commandVSpace;        /* command vertical spacing */
  629. X    Dimension    commandHeight;        /* command window height */
  630. X    Dimension    helpWidth;        /* width of the help text popup */
  631. X    Dimension    helpHeight;        /* height of the help text popup */
  632. X    Dimension    helpX;            /* help x offset from textWindow */
  633. X    Dimension    helpY;            /* help y offset from textWindow */
  634. X    Dimension    menuX;            /* menu x offset from parent */
  635. X    Dimension    menuY;            /* menu y offset from parent */
  636. X    Boolean    bellRing;        /* xmail audible bell option */
  637. X    Boolean    expert;            /* do not confirm destructive acts */
  638. X    Boolean    iconic;            /* xmail starts in withdrawn state */
  639. X    Boolean    mailopt_n;        /* mail option -n */
  640. X    Boolean    mailopt_U;        /* mail option -U */
  641. X    Boolean    Show_Last;        /* xmail show latest option -ls */
  642. X    Boolean    Show_Info;        /* Do (or don't) show info messages */
  643. X    Boolean    No_X_Hdr;        /* don't show xface header option -nx */
  644. X    int        borderWidth;        /* default or specified border width */
  645. X} XmailResources;
  646. X
  647. X
  648. X/*
  649. X** structure sent to AddMenuButton()
  650. X*/
  651. Xtypedef struct    menuList_str
  652. X    {
  653. X    String        label;
  654. X    XtCallbackProc    func;
  655. X    String        data;
  656. X    } menuList, *menuList_p;
  657. X
  658. X/*
  659. X** structure used by AddHelpText() and ShowHelp()
  660. X*/
  661. Xtypedef struct    _helpText
  662. X    {
  663. X    String            name;
  664. X    AsciiSrcObject        data;
  665. X    struct    _helpText    *next;
  666. X    } helpText;
  667. X
  668. X
  669. Xtypedef struct {
  670. X    char            *pat;        /* regular expression */
  671. X    char            *buf;        /* buffer for compiled regexp */
  672. X} PatternRec, *PatternRecPtr;
  673. X
  674. X
  675. Xtypedef struct {
  676. X    char            *name;        /* recipient name */
  677. X    char            *alias;        /* alias for name */
  678. X} AliasRec, *AliasRecPtr;
  679. END_OF_FILE
  680.   if test 5257 -ne `wc -c <'defs.h'`; then
  681.     echo shar: \"'defs.h'\" unpacked with wrong size!
  682.   fi
  683.   # end of 'defs.h'
  684. fi
  685. if test -f 'icon.mail' -a "${1}" != "-c" ; then 
  686.   echo shar: Will not clobber existing file \"'icon.mail'\"
  687. else
  688.   echo shar: Extracting \"'icon.mail'\" \(3920 characters\)
  689.   sed "s/^X//" >'icon.mail' <<'END_OF_FILE'
  690. X/*
  691. X * xmail - X window system interface to the mail program
  692. X *
  693. X * Copyright 1990 by National Semiconductor Corporation
  694. X *
  695. X * Permission to use, copy, modify, and distribute this software and its
  696. X * documentation for any purpose is hereby granted without fee, provided that
  697. X * the above copyright notice appear in all copies and that both that
  698. X * copyright notice and this permission notice appear in supporting
  699. X * documentation, and that the name of National Semiconductor Corporation not
  700. X * be used in advertising or publicity pertaining to distribution of the
  701. X * software without specific, written prior permission.  National Semiconductor
  702. X * Corporation makes no representations about the suitability of this software
  703. X * for any purpose.  It is provided "as is" without express or implied warranty.
  704. X *
  705. X * NATIONAL SEMICONDUCTOR CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
  706. X * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  707. X * FITNESS, IN NO EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR
  708. X * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  709. X * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
  710. X * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  711. X * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  712. X *
  713. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  714. X *
  715. X */
  716. X
  717. X#define mail_width 56
  718. X#define mail_height 56
  719. X
  720. Xstatic char mail_bits[] = {
  721. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
  722. X   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00,
  723. X   0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00,
  724. X   0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00,
  725. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
  726. X   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf0, 0x00, 0x00, 0x00, 0x00,
  727. X   0x00, 0x18, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x30, 0x03, 0x00,
  728. X   0x00, 0x00, 0x00, 0x07, 0x30, 0x06, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30,
  729. X   0x06, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x30, 0x07, 0x00, 0x00, 0x00, 0xe0,
  730. X   0x1f, 0xb0, 0x07, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x06, 0x00, 0x00,
  731. X   0x00, 0xb8, 0xee, 0x70, 0x06, 0x00, 0x00, 0x00, 0x5c, 0xd7, 0x31, 0x06,
  732. X   0x00, 0x00, 0x00, 0xae, 0xae, 0x39, 0x06, 0x00, 0x00, 0x00, 0x56, 0x5d,
  733. X   0x3f, 0x06, 0x00, 0x00, 0x00, 0x8a, 0xb4, 0x37, 0x06, 0x00, 0x00, 0x00,
  734. X   0x46, 0x64, 0x33, 0x06, 0x00, 0x00, 0x00, 0x22, 0xc4, 0x33, 0x06, 0x00,
  735. X   0x00, 0x00, 0x12, 0x84, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x33,
  736. X   0x06, 0x00, 0x00, 0x00, 0xfa, 0x07, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a,
  737. X   0x00, 0x33, 0x06, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x03, 0x03, 0x00, 0x00,
  738. X   0x00, 0x3a, 0x80, 0x83, 0x01, 0x00, 0x00, 0x00, 0x7a, 0x40, 0xc3, 0x00,
  739. X   0x00, 0x00, 0x00, 0xfa, 0xa0, 0x63, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x51,
  740. X   0x33, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x1b, 0x00, 0x00, 0x00, 0x00,
  741. X   0x3a, 0x06, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x1f, 0x00, 0x00,
  742. X   0x00, 0x00, 0x0a, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19,
  743. X   0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19, 0x00, 0x00, 0x00, 0x00, 0x02,
  744. X   0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x19, 0x00, 0x00, 0x00,
  745. X   0x00, 0xaa, 0x2b, 0x19, 0x00, 0x00, 0x00, 0x00, 0xba, 0x2a, 0x19, 0x00,
  746. X   0x00, 0x00, 0x00, 0x2a, 0x29, 0x19, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00,
  747. X   0x19, 0x00, 0x80, 0x85, 0xd8, 0x02, 0x00, 0x99, 0x02, 0x40, 0xc5, 0x92,
  748. X   0x52, 0x15, 0x59, 0x46, 0x42, 0x69, 0xb2, 0xaa, 0x2a, 0xb9, 0x44, 0xc6,
  749. X   0xee, 0xaa, 0x82, 0x02, 0x79, 0x64, 0xb5, 0x8a, 0x22, 0x12, 0x11, 0xad,
  750. X   0xa9, 0x10, 0x29, 0xc8, 0xa2, 0x0b, 0xad, 0xc0, 0xba, 0xc4, 0x4a, 0xc6,
  751. X   0x86, 0x87, 0x4e, 0x5a, 0xdb, 0x67, 0x07, 0xc2, 0x7e, 0xee, 0x3f, 0xb7,
  752. X   0xdc, 0x8e, 0xc7, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0x1d, 0x63, 0x72, 0xb9,
  753. X   0x7b, 0xfd, 0x72, 0xf9, 0x7f, 0x4e, 0xe7, 0xd4};
  754. END_OF_FILE
  755.   if test 3920 -ne `wc -c <'icon.mail'`; then
  756.     echo shar: \"'icon.mail'\" unpacked with wrong size!
  757.   fi
  758.   # end of 'icon.mail'
  759. fi
  760. if test -f 'icon.nomail' -a "${1}" != "-c" ; then 
  761.   echo shar: Will not clobber existing file \"'icon.nomail'\"
  762. else
  763.   echo shar: Extracting \"'icon.nomail'\" \(3929 characters\)
  764.   sed "s/^X//" >'icon.nomail' <<'END_OF_FILE'
  765. X/*
  766. X * xmail - X window system interface to the mail program
  767. X *
  768. X * Copyright 1990 by National Semiconductor Corporation
  769. X *
  770. X * Permission to use, copy, modify, and distribute this software and its
  771. X * documentation for any purpose is hereby granted without fee, provided that
  772. X * the above copyright notice appear in all copies and that both that
  773. X * copyright notice and this permission notice appear in supporting
  774. X * documentation, and that the name of National Semiconductor Corporation not
  775. X * be used in advertising or publicity pertaining to distribution of the
  776. X * software without specific, written prior permission.  National Semiconductor
  777. X * Corporation makes no representations about the suitability of this software
  778. X * for any purpose.  It is provided "as is" without express or implied warranty.
  779. X *
  780. X * NATIONAL SEMICONDUCTOR CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO
  781. X * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  782. X * FITNESS, IN NO EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR
  783. X * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
  784. X * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
  785. X * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  786. X * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  787. X *
  788. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  789. X *
  790. X */
  791. X
  792. X#define no_mail_width 56
  793. X#define no_mail_height 56
  794. X
  795. Xstatic char no_mail_bits[] = {
  796. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  797. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  798. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  799. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  800. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
  801. X   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00,
  802. X   0x00, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x04,
  803. X   0x00, 0x00, 0x00, 0x07, 0x00, 0x06, 0x06, 0x00, 0x00, 0x80, 0x01, 0x00,
  804. X   0x06, 0x07, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x87, 0x07, 0x00, 0x00, 0xe0,
  805. X   0x1f, 0x80, 0xc7, 0x07, 0x00, 0x00, 0xf0, 0x3f, 0xc0, 0xe6, 0x07, 0x00,
  806. X   0x00, 0xf8, 0xe2, 0x60, 0x76, 0x07, 0x00, 0x00, 0x9c, 0xce, 0x31, 0x3e,
  807. X   0x03, 0x00, 0x00, 0x8e, 0x86, 0x19, 0x1e, 0x01, 0x00, 0x00, 0x86, 0x03,
  808. X   0x0f, 0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00,
  809. X   0xc2, 0x06, 0x83, 0x07, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0xc3, 0x07, 0x00,
  810. X   0x00, 0x00, 0x12, 0x11, 0xe3, 0x06, 0x00, 0x00, 0x00, 0x82, 0x02, 0x73,
  811. X   0x06, 0x00, 0x00, 0x00, 0xaa, 0x2a, 0x33, 0x06, 0x00, 0x00, 0x00, 0x52,
  812. X   0x15, 0x13, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x03, 0x00, 0x00,
  813. X   0x00, 0x02, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x29, 0xc3, 0x00,
  814. X   0x00, 0x00, 0x00, 0xba, 0x2a, 0x63, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2b,
  815. X   0x33, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x1b, 0x00, 0x00, 0x00, 0x00,
  816. X   0x02, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x00,
  817. X   0x00, 0x00, 0xfe, 0xff, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19,
  818. X   0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0,
  819. X   0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00,
  820. X   0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00,
  821. X   0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0,
  822. X   0x18, 0x00, 0x80, 0x85, 0xd8, 0xca, 0xc0, 0x98, 0x02, 0x40, 0xc5, 0x92,
  823. X   0xca, 0xc0, 0x58, 0x46, 0x42, 0x69, 0xb2, 0xe4, 0xc0, 0xb8, 0x44, 0xc6,
  824. X   0xee, 0xaa, 0xe8, 0xc0, 0x78, 0x64, 0xb5, 0x8a, 0x22, 0xd6, 0xc0, 0xac,
  825. X   0xa9, 0x10, 0x29, 0xc8, 0xd6, 0xd5, 0xaf, 0xc0, 0xba, 0xc4, 0x4a, 0xd2,
  826. X   0xe9, 0x87, 0x4e, 0x5a, 0xdb, 0x67, 0xfb, 0xca, 0x7c, 0xee, 0x3f, 0xb7,
  827. X   0xdc, 0xe6, 0xe9, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0xed, 0xba, 0x73, 0xb9,
  828. X   0x7b, 0xfd, 0x72, 0x9b, 0xda, 0x4e, 0xe7, 0xd4};
  829. END_OF_FILE
  830.   if test 3929 -ne `wc -c <'icon.nomail'`; then
  831.     echo shar: \"'icon.nomail'\" unpacked with wrong size!
  832.   fi
  833.   # end of 'icon.nomail'
  834. fi
  835. if test -f 'mail.xpm' -a "${1}" != "-c" ; then 
  836.   echo shar: Will not clobber existing file \"'mail.xpm'\"
  837. else
  838.   echo shar: Extracting \"'mail.xpm'\" \(6765 characters\)
  839.   sed "s/^X//" >'mail.xpm' <<'END_OF_FILE'
  840. X/* XPM */
  841. X/*                                                                           */
  842. X/* xmail - X window system interface to the mail program                     */
  843. X/*                                                                           */
  844. X/* Copyright 1990-1991 by National Semiconductor Corporation                 */
  845. X/*                                                                           */
  846. X/* Permission to use, copy, modify, and distribute this software and its     */
  847. X/* documentation for any purpose is hereby granted without fee, provided     */
  848. X/* that the above copyright notice appear in all copies and that both that   */
  849. X/* copyright notice and this permission notice appear in supporting          */
  850. X/* documentation, and that the name of National Semiconductor Corporation    */
  851. X/* not be used in advertising or publicity pertaining to distribution of the */
  852. X/* software without specific, written prior permission.  National            */
  853. X/* Semiconductor Corporation makes no representations about the suitability  */
  854. X/* of this software for any purpose.  It is provided "as is" without express */
  855. X/* or implied warranty.                                                      */
  856. X/*                                                                           */
  857. X/* NATIONAL SEMICONDUCTOR CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD   */
  858. X/* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND */
  859. X/* FITNESS, IN NO EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE   */
  860. X/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES         */
  861. X/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN     */
  862. X/* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   */
  863. X/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.            */
  864. X/*                                                                           */
  865. X/* Author:  Michael C. Wagnitz - National Semiconductor Corporation          */
  866. X/*                                                                           */
  867. X
  868. Xstatic char *mail_xpm [] = {
  869. X"64 64 9 1",
  870. X"L  c #9898FBFB9898  m white",
  871. X"D  c #2E2E8B8B5757  m black",
  872. X"B  c lightskyblue   m white",
  873. X"W  c tan            m white",
  874. X"F  c indianred      m black",
  875. X"o  c black          m black",
  876. X"M  c darkorange     m white",
  877. X"I  c brown          m white",
  878. X"+  c white          m white",
  879. X"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDL",
  880. X"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD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BBBBBBBBBBBBBBBBBBoooMMMMMMMMMoMMMMooBBBBBBBBBBBBBBBLL",
  896. X"DDBBBBBBBBBBBBBBBBBBBBBBBBBooMMMMMMMMMMMoMMMMooBBBBBBBBBBBBBBBLL",
  897. X"DDBBBBBBBBBBBBBBBBBBBBBBBBooMMMMMMMMMMMMoMMMoooBBBBBBBBBBBBBBBLL",
  898. X"DDBBBBBBBBBBBBBBBBBBBBBBBooooooooMMMMMMMoMMooMoBBBBBBBBBBBBBBBLL",
  899. X"DDBBBBBBBBBBBBBBBBBBBBBBoooooooooooMMMMMoMooMMoBBBBBBBBBBBBBBBLL",
  900. X"DDBBBBBBBBBBBBBBBBBBBBBooIIIIIIIoIooMMMMoooMMMoBBBBBBBBBBBBBBBLL",
  901. X"DDBBBBBBBBBBBBBBBBBBBBooIIIIIIIIoIIooMMMooMMMMoBBBBBBBBBBBBBBBLL",
  902. X"DDBBBBBBBBBBBBBBBBBBBooIIIIIIooooIIooMMooMMMMMoBBBBBBBBBBBBBBBLL",
  903. X"DDBBBBBBBBBBBBBBBBBBBooIIIIIo+oooIIIoMoooMMMMMoBBBBBBBBBBBBBBBLL",
  904. X"DDBBBBBBBBBBBBBBBBBBBoIIIIIo++o+ooIIoooMoMMMMMoBBBBBBBBBBBBBBBLL",
  905. X"DDBBBBBBBBBBBBBBBBBBBoIIIIo+++o++ooIooMMoMMMMMoBBBBBBBBBBBBBBBLL",
  906. X"DDBBBBBBBBBBBBBBBBBBBoIIIo++++o+++oooMMMoMMMMMoBBBBBBBBBBBBBBBLL",
  907. X"DDBBBBBBBBBBBBBBBBBBBoIIo+++++o++++ooMMMoMMMMMoBBBBBBBBBBBBBBBLL",
  908. X"DDBBBBBBBBBBBBBBBBBBBoIo++++++o+++++oMMMoMMMMMoBBBBBBBBBBBBBBBLL",
  909. X"DDBBBBBBBBBBBBBBBBBBBoIoooooooo+++++oMMMoMMMMMoBBBBBBBBBBBBBBBLL",
  910. X"DDBBBBBBBBBBBBBBBBBBBoIo++++++++++++oMMMoMMMMooBBBBBBBBBBBBBBBLL",
  911. X"DDBBBBBBBBBBBBBBBBBBBoIoo+++++++++++oMMMMMMMooBBBBBBBBBBBBBBBBLL",
  912. X"DDBBBBBBBBBBBBBBBBBBBoMooo+++++++++ooMMMMMMooBBBBBBBBBBBBBBBBBLL",
  913. X"DDBBBBBBBBBBBBBBBBBBBoMoooo+++++++oIoMMMMMooBBBBBBBBBBBBBBBBBBLL",
  914. X"DDBBBBBBBBBBBBBBBBBBBoMMoooo+++++oIIoMMMMooBBBBBBBBBBBBBBBBBBBLL",
  915. X"DDBBBBBBBBBBBBBBBBBBBoMMooooo+++oIIIoMMMooBBBBBBBBBBBBBBBBBBBBLL",
  916. X"DDBBBBBBBBBBBBBBBBBBBoMMMooooo+oMMMIoMMooBBBBBBBBBBBBBBBBBBBBBLL",
  917. X"DDBBBBBBBBBBBBBBBBBBBoMMMooooooMMMMMoMoooBBBBBBBBBBBBBBBBBBBBBLL",
  918. X"DDBBBBBBBBBBBBBBBBBBBoMooMMMMMMMMMMMoooWoBBBBBBBBBBBBBBBBBBBBBLL",
  919. X"DDBBBBBBBBBBBBBBBBBBBoooMMMMMMMMMMMMooWWoBBBBBBBBBBBBBBBBBBBBBLL",
  920. X"DDBBBBBBBBBBBBBBBBBBBooooooooooooooooWWWoBBBBBBBBBBBBBBBBBBBBBLL",
  921. X"DDBBBBBBBBBBBBBBBBBBBooooooooooooooooWWWoBBBBBBBBBBBBBBBBBBBBBLL",
  922. X"DDBBBBBBBBBBBBBBBBBBBoMMMMMMMMMMMMMMoWWWoBBBBBBBBBBBBBBBBBBBBBLL",
  923. X"DDBBBBBBBBBBBBBBBBBBBoMoMoMoMoMoMooMoWWWoBBBBBBBBBBBBBBBBBBBBBLL",
  924. X"DDBBBBBBBBBBBBBBBBBBBoMoMoMoooMoMoMMoWWWoBBBBBBBBBBBBBBBBBBBBBLL",
  925. X"DDBBBBBBBBBBBBBBBBBBBoMoooMoMoMoMoMMoWWWoBBB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BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBLL",
  941. X"DLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL",
  942. X"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL"};
  943. END_OF_FILE
  944.   if test 6765 -ne `wc -c <'mail.xpm'`; then
  945.     echo shar: \"'mail.xpm'\" unpacked with wrong size!
  946.   fi
  947.   # end of 'mail.xpm'
  948. fi
  949. if test -f 'make.file' -a "${1}" != "-c" ; then 
  950.   echo shar: Will not clobber existing file \"'make.file'\"
  951. else
  952.   echo shar: Extracting \"'make.file'\" \(3750 characters\)
  953.   sed "s/^X//" >'make.file' <<'END_OF_FILE'
  954. X#
  955. X# alternate make file for xmail 1.5
  956. X#
  957. X# It is HIGHLY recommended that you utilize xmkmf and the imake utilities
  958. X# to build a Makefile from the Imakefile source.  This default make file is
  959. X# provided for those systems that do not have the imake utilities installed.
  960. X# There may be several instances of local defines which are not implemented
  961. X# because of their normal existance from within imake.  You may have to
  962. X# experiment with using this make file in order to build a working program.
  963. X#
  964. X#
  965. X# Uncomment USE_DIRENT if readdir() uses <dirent.h> instead of <sys/dir.h>
  966. X#
  967. X#   USE_DIRENT = -DUSE_DIRENT
  968. X#
  969. X# Uncomment X_FACE and COMPFACE if you have the compface library installed
  970. X# and you want xmail to automatically display the X-Face: header, if found
  971. X# in a message.
  972. X#
  973. X#       X_FACE = -DX_FACE
  974. X#     COMPFACE = -lcompface
  975. X#
  976. X# Uncomment XPM if you have the Xpm version 3 library and want color icons
  977. X#
  978. X#          XPM = -DXPM
  979. X#       LIBXPM = -lXpm
  980. X#
  981. X# Uncomment LPT if you require att environment support for pseudo ports.
  982. X#
  983. X#          LPT = -lpt
  984. X#
  985. X# Uncomment REGEXP if your system supplies the regexp.h include file.
  986. X# Otherwise, xmail will use the regex procedures re_comp and re_exec.
  987. X#
  988. X#   REGEXP = -DUSE_REGEXP
  989. X#
  990. X# Uncomment MAILBOX_DIRECTORY if your mail spool is located in other than the
  991. X# default /usr/spool/mail.  (If not specified, the default will be used.)
  992. X#
  993. X#  MAILBOX_DIR = -DMAILBOX_DIRECTORY=\"/usr/spool/mail\"
  994. X#
  995. X# Uncomment DEFAULT_VISUAL if your copy of vi lies in some place other than
  996. X# /usr/ucb.  (If not specified, /usr/ucb/vi will be the default editor.)
  997. X#
  998. X#   DEF_VISUAL = -DDEFAULT_VISUAL=\"/usr/ucb/vi\"
  999. X#
  1000. X# Uncomment DEFAULT_MAILER if your mail program is not the standard
  1001. X# /usr/ucb/Mail.  CAUTION - Operation is NOT guaranteed with other mailers.
  1002. X#
  1003. X#   DEF_MAILER = -DDEFAULT_MAILER=\"/usr/ucb/Mail\"
  1004. X#
  1005. X# Define SIGACTION if your system utilizes the sigaction() call rather
  1006. X# than the sigvec() call (true on most SYSV and POSIX compilant systems)
  1007. X# You may also need to add the following BSD define (true on SGI systems)
  1008. X#
  1009. X#         SIGDEF = -D_BSD_SIGNALS
  1010. X#
  1011. X#         SIGACT = -DSIGACTION
  1012. X#
  1013. X       BINDIR = /usr/bin/X11
  1014. X       APPDIR = /usr/lib/X11/app-defaults
  1015. X       MANDIR = /usr/man/mann
  1016. X       CC = cc
  1017. X       LD = ld
  1018. X      INSTALL = install
  1019. X INSTBINFLAGS = -s -m 0755
  1020. X INSTAPPFLAGS = -m 0644
  1021. X INSTMANFLAGS = -m 0644
  1022. X       RM = rm -f
  1023. X         LINK = ln -s
  1024. X       RANLIB = ranlib
  1025. X         MAKE = make
  1026. X        SHELL = /bin/sh
  1027. XXMAIL_DEFINES = $(MAILBOX_DIR) $(DEF_VISUAL) $(DEF_MAILER) $(SIGACT) $(SIGDEF)
  1028. X      DEFINES = $(USE_DIRENT) $(X_FACE) $(XPM) $(REGEXP) $(XMAIL_DEFINES)
  1029. X       CFLAGS = $(DEFINES)
  1030. X    LIBRARIES = $(LIBXPM) -lXaw -lXmu -lXt -lXext -lX11 $(COMPFACE) $(LPT)
  1031. X      PROGRAM = xmail
  1032. X
  1033. X         SRCS = \
  1034. X        HelpText.c \
  1035. X        Mailwatch.c \
  1036. X        actions.c \
  1037. X        callMail.c \
  1038. X        callbacks.c \
  1039. X        confirm.c \
  1040. X        directory.c \
  1041. X        environs.c \
  1042. X        handler.c \
  1043. X        mail.c \
  1044. X        parser.c \
  1045. X        utils.c \
  1046. X        windows.c \
  1047. X        xmail.c
  1048. X
  1049. X         OBJS = \
  1050. X        HelpText.o \
  1051. X        Mailwatch.o \
  1052. X        actions.o \
  1053. X        callMail.o \
  1054. X        callbacks.o \
  1055. X        confirm.o \
  1056. X        directory.o \
  1057. X        environs.o \
  1058. X        handler.o \
  1059. X        mail.o \
  1060. X        parser.o \
  1061. X        utils.o \
  1062. X        windows.o \
  1063. X        xmail.o
  1064. X
  1065. X         INCS = \
  1066. X        MailwatchP.h \
  1067. X        Mailwatch.h \
  1068. X        defs.h \
  1069. X        global.h \
  1070. X        mail.xpm \
  1071. X        nomail.xpm \
  1072. X        icon.mail \
  1073. X        icon.nomail \
  1074. X        national.bm \
  1075. X        patchlevel.h \
  1076. X        revtable.h \
  1077. X        xmailregexp.h
  1078. X#
  1079. X$(PROGRAM):    $(OBJS)
  1080. X    @$(RM) $@
  1081. X    $(CC) -o $@ $(OBJS) $(LDFLAGS) $(LIBRARIES)
  1082. X
  1083. Xinstall::    $(PROGRAM)
  1084. X    $(INSTALL) -c $(INSTBINFLAGS) $? $(BINDIR)
  1085. X
  1086. Xinstall::    XMail.ad
  1087. X    $(INSTALL) -c $(INSTAPPFLAGS) $? $(APPDIR)/XMail
  1088. X
  1089. Xinstall::
  1090. X    @echo done
  1091. X
  1092. Xinstall.man::    xmail.man
  1093. X    $(INSTALL) -c $(INSTMANFLAGS) $? $(MANDIR)/xmail.n
  1094. X
  1095. Xinstall.man::
  1096. X    @echo install man done
  1097. X
  1098. Xclean:
  1099. X    @$(RM) *.o
  1100. X
  1101. X$(OBJS):    $(INCS)
  1102. END_OF_FILE
  1103.   if test 3750 -ne `wc -c <'make.file'`; then
  1104.     echo shar: \"'make.file'\" unpacked with wrong size!
  1105.   fi
  1106.   # end of 'make.file'
  1107. fi
  1108. if test -f 'nomail.xpm' -a "${1}" != "-c" ; then 
  1109.   echo shar: Will not clobber existing file \"'nomail.xpm'\"
  1110. else
  1111.   echo shar: Extracting \"'nomail.xpm'\" \(6705 characters\)
  1112.   sed "s/^X//" >'nomail.xpm' <<'END_OF_FILE'
  1113. X/* XPM */
  1114. X/*                                                                           */
  1115. X/* xmail - X window system interface to the mail program                     */
  1116. X/*                                                                           */
  1117. X/* Copyright 1990-1991 by National Semiconductor Corporation                 */
  1118. X/*                                                                           */
  1119. X/* Permission to use, copy, modify, and distribute this software and its     */
  1120. X/* documentation for any purpose is hereby granted without fee, provided     */
  1121. X/* that the above copyright notice appear in all copies and that both that   */
  1122. X/* copyright notice and this permission notice appear in supporting          */
  1123. X/* documentation, and that the name of National Semiconductor Corporation    */
  1124. X/* not be used in advertising or publicity pertaining to distribution of the */
  1125. X/* software without specific, written prior permission.  National            */
  1126. X/* Semiconductor Corporation makes no representations about the suitability  */
  1127. X/* of this software for any purpose.  It is provided "as is" without express */
  1128. X/* or implied warranty.                                                      */
  1129. X/*                                                                           */
  1130. X/* NATIONAL SEMICONDUCTOR CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD   */
  1131. X/* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND */
  1132. X/* FITNESS, IN NO EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE   */
  1133. X/* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES         */
  1134. X/* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN     */
  1135. X/* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   */
  1136. X/* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.            */
  1137. X/*                                                                           */
  1138. X/* Author:  Michael C. Wagnitz - National Semiconductor Corporation          */
  1139. X/*                                                                           */
  1140. X
  1141. Xstatic char *nomail_xpm [] = {
  1142. X"64 64 7 1",
  1143. X"L  c #9898FBFB9898  m white",
  1144. X"D  c #2E2E8B8B5757  m black",
  1145. X"B  c lightskyblue   m white",
  1146. X"W  c tan            m white",
  1147. X"F  c indianred      m black",
  1148. X"o  c black          m black",
  1149. X"M  c darkorange     m white",
  1150. X"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLD",
  1151. X"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDD",
  1152. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1153. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1154. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1155. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1156. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1157. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1158. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1159. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1160. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1161. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBoooooooBBBBBBBBBBBBBBBBBBBBDD",
  1162. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBooooooooooBBBBBBBBBBBBBBBBBBBDD",
  1163. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBoooMMMMMMMooBBBBBBBBBBBBBBBBBBDD",
  1164. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBooMMMMMMMMMMooBBBBBBBBBBBBBBBBBDD",
  1165. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBoooMMMMMMMMMMMMooBBBBBBBBFBBBBBBBDD",
  1166. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBoooMMMMMMMMMMMMMMooBBBBBBFFBBBBBBBDD",
  1167. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBooMMMMMMMMMMMMMMMMooBBBBBFFFBBBBBBBDD",
  1168. X"LLBBBBBBBBBBBBBBBBBBBBBBBBooMMoooMMMMMMMMMMMoooBBBBoFFFBBBBBBBDD",
  1169. X"LLBBBBBBBBBBBBBBBBBBBBBBBooooooooMMMMMMMMMMooMoBBBooFFFBBBBBBBDD",
  1170. X"LLBBBBBBBBBBBBBBBBBBBBBBooooooooooMMMMMMMMooMMoBBooBFFFBBBBBBBDD",
  1171. X"LLBBBBBBBBBBBBBBBBBBBBBoooooFoMMMoooMMMMMooMMMoBooBBFFFBBBBBBBDD",
  1172. X"LLBBBBBBBBBBBBBBBBBBBBoooMMoFoooMMoooMMMooMMMMoooBBBFFBBBBBBBBDD",
  1173. X"LLBBBBBBBBBBBBBBBBBBBoooMMMoFooMMMMooMMooMMMMMooBBBBFBBBBBBBBBDD",
  1174. X"LLBBBBBBBBBBBBBBBBBBBooMMMMoooMMMMMMooooMMMMMooBBBBBBBBBBBBBBBDD",
  1175. X"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X"LLBBLDDLDLDDDDDLDDLLDLLDLDoWLWLWLWWoWWLLDLDLDDDDDDLLDLDLLLDLBBDD",
  1205. X"LLBBDDLDDDLLDLDLDDLDDLDDLDoWLWWLWLWoWLLDDDDLDLLLDDLDDLDLLDLDBBDD",
  1206. X"LLBBLLDLLDLLLLLDDLLDLLDLLLLLDLDLDDLLDDLLLLLDDLLLDLLLLLLLLLDDBBDD",
  1207. X"LLBBLLLDLLDLDDLLLDLLDLLDDLLLLDDLDLLLDLDDLDLLLLDDLLDDLDLDDLDLBBDD",
  1208. X"LLBBDLDLDLDDLLLLDDDLLDLLDLLLDLDLLLDLLLDDLLLDLDDLLLDLLLDLLLLDBBDD",
  1209. X"LLBBLDLLLLLLDLDDLLLDLLDLLDLLDLDLLDLLDLLLDDLDLLLDDLLLDDLDLDLLBBDD",
  1210. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1211. X"LLBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBDD",
  1212. X"LDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD",
  1213. X"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"};
  1214. END_OF_FILE
  1215.   if test 6705 -ne `wc -c <'nomail.xpm'`; then
  1216.     echo shar: \"'nomail.xpm'\" unpacked with wrong size!
  1217.   fi
  1218.   # end of 'nomail.xpm'
  1219. fi
  1220. if test -f 'revtable.h' -a "${1}" != "-c" ; then 
  1221.   echo shar: Will not clobber existing file \"'revtable.h'\"
  1222. else
  1223.   echo shar: Extracting \"'revtable.h'\" \(1870 characters\)
  1224.   sed "s/^X//" >'revtable.h' <<'END_OF_FILE'
  1225. X/*
  1226. X** 256-byte table for quickly reversing the bits in an unsigned 8-bit char,
  1227. X** used to convert between MSBFirst and LSBFirst image formats.
  1228. X*/
  1229. X
  1230. Xchar revtable[256] = {
  1231. X        0, -128,   64,  -64,   32,  -96,   96,  -32,
  1232. X       16, -112,   80,  -48,   48,  -80,  112,  -16,
  1233. X        8, -120,   72,  -56,   40,  -88,  104,  -24,
  1234. X       24, -104,   88,  -40,   56,  -72,  120,   -8,
  1235. X        4, -124,   68,  -60,   36,  -92,  100,  -28,
  1236. X       20, -108,   84,  -44,   52,  -76,  116,  -12,
  1237. X       12, -116,   76,  -52,   44,  -84,  108,  -20,
  1238. X       28, -100,   92,  -36,   60,  -68,  124,   -4,
  1239. X        2, -126,   66,  -62,   34,  -94,   98,  -30,
  1240. X       18, -110,   82,  -46,   50,  -78,  114,  -14,
  1241. X       10, -118,   74,  -54,   42,  -86,  106,  -22,
  1242. X       26, -102,   90,  -38,   58,  -70,  122,   -6,
  1243. X        6, -122,   70,  -58,   38,  -90,  102,  -26,
  1244. X       22, -106,   86,  -42,   54,  -74,  118,  -10,
  1245. X       14, -114,   78,  -50,   46,  -82,  110,  -18,
  1246. X       30,  -98,   94,  -34,   62,  -66,  126,   -2,
  1247. X        1, -127,   65,  -63,   33,  -95,   97,  -31,
  1248. X       17, -111,   81,  -47,   49,  -79,  113,  -15,
  1249. X        9, -119,   73,  -55,   41,  -87,  105,  -23,
  1250. X       25, -103,   89,  -39,   57,  -71,  121,   -7,
  1251. X        5, -123,   69,  -59,   37,  -91,  101,  -27,
  1252. X       21, -107,   85,  -43,   53,  -75,  117,  -11,
  1253. X       13, -115,   77,  -51,   45,  -83,  109,  -19,
  1254. X       29,  -99,   93,  -35,   61,  -67,  125,   -3,
  1255. X        3, -125,   67,  -61,   35,  -93,   99,  -29,
  1256. X       19, -109,   83,  -45,   51,  -77,  115,  -13,
  1257. X       11, -117,   75,  -53,   43,  -85,  107,  -21,
  1258. X       27, -101,   91,  -37,   59,  -69,  123,   -5,
  1259. X        7, -121,   71,  -57,   39,  -89,  103,  -25,
  1260. X       23, -105,   87,  -41,   55,  -73,  119,   -9,
  1261. X       15, -113,   79,  -49,   47,  -81,  111,  -17,
  1262. X       31,  -97,   95,  -33,   63,  -65,  127,   -1,
  1263. X} ;
  1264. END_OF_FILE
  1265.   if test 1870 -ne `wc -c <'revtable.h'`; then
  1266.     echo shar: \"'revtable.h'\" unpacked with wrong size!
  1267.   fi
  1268.   # end of 'revtable.h'
  1269. fi
  1270. if test -f 'xmailregexp.h' -a "${1}" != "-c" ; then 
  1271.   echo shar: Will not clobber existing file \"'xmailregexp.h'\"
  1272. else
  1273.   echo shar: Extracting \"'xmailregexp.h'\" \(4066 characters\)
  1274.   sed "s/^X//" >'xmailregexp.h' <<'END_OF_FILE'
  1275. X/*
  1276. X** @(#) xmailregexp.h
  1277. X**
  1278. X** xmail - X window system interface to the mail program
  1279. X**
  1280. X** Copyright 1991,1992 by National Semiconductor Corporation
  1281. X**
  1282. X** Permission to use, copy, modify, and distribute this software and its
  1283. X** documentation for any purpose is hereby granted without fee, provided that
  1284. X** the above copyright notice appear in all copies and that both that
  1285. X** copyright notice and this permission notice appear in supporting
  1286. X** documentation, and that the name of National Semiconductor Corporation not
  1287. X** be used in advertising or publicity pertaining to distribution of the
  1288. X** software without specific, written prior permission.
  1289. X**
  1290. X** NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  1291. X** SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  1292. X** WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  1293. X** DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  1294. X** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  1295. X** EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  1296. X** INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  1297. X** LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  1298. X** OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1299. X** PERFORMANCE OF THIS SOFTWARE.
  1300. X**
  1301. X** Author:  Michael C. Wagnitz - National Semiconductor Corporation
  1302. X**
  1303. X*/
  1304. X
  1305. X#define    XM_C_START        0
  1306. X#define    XM_C_EXEC        1
  1307. X#define    XM_C_FILE        2
  1308. X#define    XM_C_DELETE    3
  1309. X#define    XM_C_NEWMAIL    4
  1310. X
  1311. X#ifndef PARSER
  1312. Xextern PatternRec command_pattern[];
  1313. X#else
  1314. XPatternRec command_pattern[] = {
  1315. X    { "^Start",                        NULL }, /* 0 */
  1316. X    {  NULL,                          "" }, /* indx chg */
  1317. X    { "^[-n]",                        NULL }, /* 1 */
  1318. X    { "^[pPcCsSw] .*",                    NULL }, /* 1 */
  1319. X    { "^hold .*",                    NULL }, /* 1 */
  1320. X    { NULL,                          "" },
  1321. X    { "^file [^%].*",                    NULL }, /* 2 */
  1322. X    { NULL,                          "" },
  1323. X    { "^[du].*",                    NULL }, /* 3 */
  1324. X    { NULL,                          "" },
  1325. X    { "^file %",                    NULL }, /* 4 */
  1326. X    { "^inc",                        NULL }, /* 4 */
  1327. X    { NULL,                        NULL },
  1328. X   };
  1329. X#endif
  1330. X
  1331. X#define    XM_O_BELL        0
  1332. X#define    XM_O_EXEC        1
  1333. X#define    XM_O_PRINT        2
  1334. X#define    XM_O_FILE        3
  1335. X
  1336. X#ifndef PARSER
  1337. Xextern PatternRec output_pattern[];
  1338. X#else
  1339. XPatternRec output_pattern[] = {
  1340. X    { "^At ",                        NULL }, /* 0 */
  1341. X    { "^No ",                        NULL }, /* 0 */
  1342. X    { "^Unknown ",                    NULL }, /* 0 */
  1343. X    { "^Referencing ",                    NULL }, /* 0 */
  1344. X    { "^Cannot ",                    NULL }, /* 0 */
  1345. X    { "^Not ",                        NULL }, /* 0 */
  1346. X    { "^May ",                        NULL }, /* 0 */
  1347. X    { "^\"[^\"]*\" \\[Appended\\] ",            NULL }, /* 0 */
  1348. X    { "^\"[^\"]*\" \\[New file\\] ",            NULL }, /* 0 */
  1349. X    { "^\"[^\"]*\" No such file or directory",        NULL }, /* 0 */
  1350. X    { "^\"[^\"]*\" Invalid argument",            NULL }, /* 0 */
  1351. X    { "^\"[^\"]*\" Permission denied",            NULL }, /* 0 */
  1352. X    { "^\"[^\"]*\" The file access permissions do not",    NULL }, /* 0 */
  1353. X    { "^\"[^\"]*\" Not a directory",            NULL }, /* 0 */
  1354. X    { "^[0-9][0-9]*: Inappropriate message",        NULL }, /* 0 */
  1355. X    { "^[0-9][0-9]*: Invalid message number",        NULL }, /* 0 */
  1356. X    { "^[^:]*: No such file or directory",        NULL }, /* 0 */
  1357. X    { "^[^:]*: A file or directory in the path name",    NULL }, /* 0 */
  1358. X    { "^[^:]*: Not a directory",            NULL }, /* 0 */
  1359. X    { "^[^:]*: not a regular file",            NULL }, /* 0 */
  1360. X    { "^[^:]*: Cannot write to a directory",        NULL }, /* 0 */
  1361. X    { "^[^:]*: empty file",                NULL }, /* 0 */
  1362. X    { "^[^ ]* unreadable",                NULL }, /* 0 */
  1363. X    { "^[^ ]* not found",                NULL }, /* 0 */
  1364. X    { "^[^:]*: [^:]*: Permission denied",        NULL }, /* 0 */
  1365. X    { "^[^:]*: Permission denied",            NULL }, /* 0 */
  1366. X    { NULL,                          "" },
  1367. X    { "^From ",                        NULL }, /* 1 */
  1368. X    { "^Message ",                    NULL }, /* 1 */
  1369. X    { NULL,                          "" },
  1370. X    { "^Pipe to: \"[^\"]*\"",                NULL }, /* 2 */
  1371. X    { NULL,                          "" },
  1372. X    { "^Held ",                        NULL }, /* 3 */
  1373. X    { "^\"[^\"]*\": [0-9][0-9]* message.*",        NULL }, /* 3 */
  1374. X    { "^\"[^\"]*\" complete",                NULL }, /* 3 */
  1375. X    { "^[^:]*: .*",                    NULL }, /* 3 */
  1376. X    { NULL,                        NULL }, /* 3 */
  1377. X};
  1378. X#endif
  1379. END_OF_FILE
  1380.   if test 4066 -ne `wc -c <'xmailregexp.h'`; then
  1381.     echo shar: \"'xmailregexp.h'\" unpacked with wrong size!
  1382.   fi
  1383.   # end of 'xmailregexp.h'
  1384. fi
  1385. echo shar: End of archive 9 \(of 10\).
  1386. cp /dev/null ark9isdone
  1387. MISSING=""
  1388. for I in 1 2 3 4 5 6 7 8 9 10 ; do
  1389.     if test ! -f ark${I}isdone ; then
  1390.     MISSING="${MISSING} ${I}"
  1391.     fi
  1392. done
  1393. if test "${MISSING}" = "" ; then
  1394.     echo You have unpacked all 10 archives.
  1395.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1396. else
  1397.     echo You still must unpack the following archives:
  1398.     echo "        " ${MISSING}
  1399. fi
  1400. exit 0
  1401. exit 0 # Just in case...
  1402. -- 
  1403.   // chris@IMD.Sterling.COM            | Send comp.sources.x submissions to:
  1404. \X/  Amiga - The only way to fly!      |
  1405.  "It's intuitively obvious to the most |    sources-x@imd.sterling.com
  1406.   casual observer..."                  |
  1407.