michael@parns.nsc.com (Michael Wagnitz) (08/28/90)
Submitted-by: michael@parns.nsc.com (Michael Wagnitz) Posting-number: Volume 8, Issue 100 Archive-name: xmail/patch2.05 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 5 (of 5)." # Contents: Patch.02c # Wrapped by michael@harley on Mon Aug 27 12:47:27 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'Patch.02c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Patch.02c'\" else echo shar: Extracting \"'Patch.02c'\" \(53806 characters\) sed "s/^X//" >'Patch.02c' <<'END_OF_FILE' X ** create the menu buttons X */ X! bw = above = to_left = NULL; X! x = 0; X! for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) { X! if (strcmp(dp->d_name, ".") && strcmp(dp->d_name, "..")) { X /* X ** If this 'folder file' is also a directory, mark it with a trailing slash '/' X */ X! s = XtMalloc(path_length + strlen(dp->d_name) + 2); X! sprintf(s, "%s/%s", path, dp->d_name); X! if ((new_dir = opendir(s)) != NULL) { X! sprintf(tmp, "%s/", dp->d_name); X! XtSetArg(args[4], XtNlabel, tmp); X! } else X! XtSetArg(args[4], XtNlabel, dp->d_name); X! XtSetArg(args[5], XtNfromHoriz, to_left); n = 6; X! if (! to_left) XtSetArg(args[n], XtNfromVert, above); n++; X! bw = XtCreateManagedWidget("menubutton",commandWidgetClass,layout,args,n); X! if (to_left == NULL) above = bw; X! to_left = bw; X! if (++x % 3 == 0) { /* make box three items wide */ X! x = 0; X! to_left = NULL; X! } X /* X ** If this 'folder' is a directory, add a button popup menu of its files. X */ X! if (new_dir) { X! closedir(new_dir); X! sprintf(trans, dir_Trans, tmp, s, depth); X! XtOverrideTranslations(bw, XtParseTranslationTable(trans)); X! } X! XtFree(s); X } X } X+ closedir(dirp); X } X /* X ** If no buttons were created for this menu, destroy the widget. X */ X*** ../v1.1/environs.c Mon Jun 4 09:48:37 1990 X--- environs.c Mon Aug 27 11:09:19 1990 X*************** X*** 19,25 **** X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE X! * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Michael C. Wagnitz - National Semiconductor Corporation X--- 19,25 ---- X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE X! * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Michael C. Wagnitz - National Semiconductor Corporation X*************** X*** 28,37 **** X--- 28,95 ---- X #include "global.h" X X extern char *mailrcFile(); X+ char otherBuf[BUFSIZ]; X X AliasRecPtr *aliases = NULL; /* array of mail alias strings */ X X+ X /* X+ ** @(#)addtobuf() - add text to recipient or file and folder names buffer X+ ** drop any leading backslash from a recipient name X+ */ X+ void X+ addtobuf(text, buffer, current_line, otherBuffer) X+ char *text; X+ char *buffer; X+ char *current_line; X+ char *otherBuffer; X+ { X+ if (! index("./+", *text)) { X+ if (*buffer) strcat(buffer, ", "); X+ if (strlen(current_line) + strlen(text) > 71) { X+ strcat(buffer, "\n\t"); X+ current_line += strlen(current_line); X+ } X+ strcat(buffer, (*text == '\\') ? &text[1] : text); X+ } else { X+ if (*otherBuffer) strcat(otherBuffer, ", "); X+ strcat(otherBuffer, text); X+ } X+ } /* addtobuf */ X+ X+ X+ /* X+ ** @(#) de_alias(text, buffer, current_line, otherBuffer) X+ */ X+ void X+ de_alias(text, buffer, current_line, otherBuffer) X+ char *text; X+ char *buffer; X+ char *current_line; X+ char *otherBuffer; X+ { X+ char *cp, *list; X+ int in_comma; X+ X+ X+ if (! index(text, ',')) X+ addtobuf(text, buffer, ¤t_line, otherBuffer); X+ else { X+ for (list = text; *list;) { X+ in_comma = 0; X+ if (cp = index(list, ',')) { X+ *cp = '\0'; X+ in_comma = 1; X+ } else cp = list + strlen(list); X+ addtobuf(list, buffer, ¤t_line, otherBuffer); X+ if (in_comma) *cp++ = ','; X+ list = cp; X+ } X+ } X+ } /* de_alias */ X+ X+ X+ /* X ** @(#)alias() - return alias value(s) from mail, or name if no alias found X */ X char * X*************** X*** 40,47 **** X { X static char tmp[BUFSIZ]; X static char buf[BUFSIZ]; X! char *s, *p, *list, *value, *index(); X int i, n; X FILE *fp; X X X--- 98,106 ---- X { X static char tmp[BUFSIZ]; X static char buf[BUFSIZ]; X! char *line, *s, *p, *list, *value; X int i, n; X+ int testing_for_compound_address; X FILE *fp; X X X*************** X*** 53,59 **** X ** X ** We also provide support for the alias alias group, and the possibility that X ** the user has entered multiple names for an alias without comma separation, X! ** or that mail has handed us a list with wierd comma combinations due to the X ** user's attempts to include commas in the list. Support is also provided X ** for processing continuation lines, if we had to read the .mailrc ourselves. X */ X--- 112,118 ---- X ** X ** We also provide support for the alias alias group, and the possibility that X ** the user has entered multiple names for an alias without comma separation, X! ** or that mail has handed us a list with weird comma combinations due to the X ** user's attempts to include commas in the list. Support is also provided X ** for processing continuation lines, if we had to read the .mailrc ourselves. X */ X*************** X*** 116,128 **** X aliases[n] = (AliasRec *) XtMalloc(sizeof(AliasRec)); X for (; *p && (*p == ' ' || *p == '\t'); p++); X for (aliases[n]->name = p; *p && *p != ' ' && *p != '\t'; p++); X! for (*p++ = '\0'; *p && (*p == ' ' || *p == '\t'); p++); X for (aliases[n]->alias = p; *p && *p != '\n'; p++) { X if ((*p == ' ' || *p == '\t') && *(p+1) && *(p+1) != '\n' && X *(p-1) != *p && *(p-1) != ',') *p = ','; X } X! for (s = p - 1; *s == ',' || *s == ' ' || *s == '\t'; s--); X! if (*++s == ',' || *s == ' ' || *s == '\t') *s = '\0'; X if (*p) *p = '\0'; X } X aliases[n] = (AliasRec *) XtMalloc(sizeof(AliasRec)); X--- 175,215 ---- X aliases[n] = (AliasRec *) XtMalloc(sizeof(AliasRec)); X for (; *p && (*p == ' ' || *p == '\t'); p++); X for (aliases[n]->name = p; *p && *p != ' ' && *p != '\t'; p++); X! for (*p++ = '\0'; *p && index(" \t\"\'", *p); p++); X! testing_for_compound_address = True; X for (aliases[n]->alias = p; *p && *p != '\n'; p++) { X+ /* X+ ** if it contains a chevron or parenthesis, treat whole line as just one alias X+ */ X+ if (testing_for_compound_address) { X+ if ((s = index(p, '<')) || (s = index(p, '('))) { X+ if (line = index(p, '\n')) { /* could be more than one */ X+ if (s < line) { /* if its within this alias */ X+ p = line; /* point to end of this alias */ X+ if (*(p - 1) == '"' || /* could be true (no mailpid) */ X+ *(p - 1) == '\'') X+ *(p - 1) = '\0'; X+ break; X+ } else { X+ if (*s == '<' && (s = index(p, '(')) && s < line) { X+ p = line; /* point to end of this alias */ X+ if (*(p - 1) == '"' || /* possibly not in mail */ X+ *(p - 1) == '\'') X+ *(p - 1) = '\0'; X+ break; X+ } else testing_for_compound_address = False; X+ } X+ } else { /* last entry of this record */ X+ p += strlen(p); /* point to the end of line */ X+ break; X+ } X+ } else testing_for_compound_address = False; X+ } /* end - if testing_for_compound_address */ X if ((*p == ' ' || *p == '\t') && *(p+1) && *(p+1) != '\n' && X *(p-1) != *p && *(p-1) != ',') *p = ','; X } X! for (s = p - 1; index(", \t", *s); s--); X! if (index(", \t", *++s)) *s = '\0'; X if (*p) *p = '\0'; X } X aliases[n] = (AliasRec *) XtMalloc(sizeof(AliasRec)); X*************** X*** 130,176 **** X } X /* X ** If input is made up of more than one word, check each word for aliasing. X */ X! if (value = tmp) { X if (index(tmp, ',') || index(tmp, ' ') || index(tmp, '\t')) { X! buf[0] = '\0'; X! for (p = value; *p;) { X! for (; *p && *p != ',' && *p != ' ' && *p != '\t'; p++); X! if (*p) *p++ = '\0'; X for (n = 0; aliases[n]; n++) { X if (strcmp(value, aliases[n]->name) == 0) { X! if (*buf) strcat(buf, ", "); X! strcat(buf, aliases[n]->alias); X break; X } X } X! if (! aliases[n]) { /* If not an alias, use the name supplied. */ X! if (*buf) strcat(buf, ", "); X! strcat(buf, value); X! } X! for (; *p && (*p == ',' || *p == ' ' || *p == '\t'); p++); X value = p; X if (*p) p++; X } X! value = buf; X! } else { X! /* X! ** Otherwise, test the single word for aliasing, substituting if matched. X! */ X! for (n = 0; *tmp && aliases[n]; n++) X! if (strcmp(tmp, aliases[n]->name) == 0) { X! value = aliases[n]->alias; X break; X } X } X } X return ((char *)value); X } /* alias */ X X- X /* X ** @(#)GetMailEnv() - Get environment value from mail or shell X! ** Accomodate the case of trailing blanks on the item. X */ X char * X GetMailEnv(item) X--- 217,277 ---- X } X /* X ** If input is made up of more than one word, check each word for aliasing. X+ ** If it contains a chevron or parenthesis, it is a 'compound' address type. X+ ** If line length approaches 80 characters, add a newline-tab and continue. X */ X! if (*(value = tmp)) { X! buf[0] = '\0'; line = buf; X if (index(tmp, ',') || index(tmp, ' ') || index(tmp, '\t')) { X! for (p = value; *p;) { /* 'value' points to current 'word' */ X! for (; *p && !index(", \t", *p); p++); X! if (*p) { X! if (((s = index(p, '(')) || (s = index(p, '<'))) && X! NULL != index(p, ',') && s > index(p, ',')) X! s = NULL; X! if (*value != '(' && *value != '<' && s == NULL) { X! *p++ = '\0'; /* this is not a compound address */ X! } else { /* address has more than one word */ X! if (*value == '(' || *value == '<') X! p = index(value, *value == '(' ? ')' : '>'); X! else X! p = index(value, *s == '(' ? ')' : '>'); X! if (*p == ' ' || *p == '\t') p++; X! for (; *p && !index(", \t", *p); p++); X! if (*p) *p++ = '\0'; X! } X! } X for (n = 0; aliases[n]; n++) { X if (strcmp(value, aliases[n]->name) == 0) { X! de_alias(aliases[n]->alias, buf, &line, otherBuf); X break; X } X } X! if (! aliases[n]) /* If not an alias, use the name supplied. */ X! de_alias(value, buf, &line, otherBuf); X! for (; *p && index(", \t", *p); p++); X value = p; X if (*p) p++; X } X! } else { /* test single word for aliasing, substituting if matched. */ X! for (n = 0; aliases[n]; n++) { X! if (strcmp(value, aliases[n]->name) == 0) { X! de_alias(aliases[n]->alias, buf, &line, otherBuf); X break; X } X+ } X+ if (! aliases[n]) /* If not an alias, use the name supplied. */ X+ de_alias(value, buf, &line, otherBuf); X } X+ value = buf; X } X return ((char *)value); X } /* alias */ X X /* X ** @(#)GetMailEnv() - Get environment value from mail or shell X! ** Accommodate the case of trailing blanks on the item. X! ** Expand environment variables. X */ X char * X GetMailEnv(item) X*************** X*** 210,219 **** X value = XtMalloc(length + 1); X strncpy(value, s, length); X value[length] = '\0'; X! } X } X XtFree(mailenv); X } X return(value); X } /* GetMailEnv */ X X--- 311,342 ---- X value = XtMalloc(length + 1); X strncpy(value, s, length); X value[length] = '\0'; X! } X } X XtFree(mailenv); X } X+ /* X+ * Expand shell variables in value X+ */ X+ if (value) { X+ char *v, *e, *nvalue; X+ while (s = index(value, '$')) { X+ for (c = s + 1; *c && !index(" \t\n$/\"\'", *c); c++); X+ length = c - s - 1; X+ strncpy(buf, s + 1, length); X+ buf[length] = '\0'; X+ if (!(e = getenv(buf))) X+ e = ""; X+ if (nvalue = XtMalloc(strlen(value) - length + strlen(c) + 2)) { X+ for (c = nvalue, v = value; v != s; *c++ = *v++); X+ for (s = e; *s; *c++ = *s++); X+ for (v += length + 1; *v; *c++ = *v++); X+ *c = '\0'; X+ XtFree(value); X+ value = nvalue; X+ } X+ } X+ } X return(value); X } /* GetMailEnv */ X X*************** X*** 245,277 **** X char *item; X { X FILE *fp; X! char *s = NULL; X char buf[BUFSIZ]; X X X if ((fp = fopen(mailrcFile(), "r")) != NULL) { X while (s = fgets(buf, BUFSIZ, fp)) { X! if (strncmp(buf, "set", 3) == 0) { /* if this is a 'set' record */ X! s = &buf[3]; /* starting just beyond the 'set'... */ X while (*s) { /* there may be multiple assignments */ X! for (; *s && (*s == ' ' || *s == '\t' || *s == '\n'); s++); X if (*s) { X! if (strncmp(s, item, strlen(item)) == 0) X break; X } X! for (; *s && *s != ' ' && *s != '\t' && *s != '\n'; s++); X } X if (*s) { /* we have found a match */ X! s = s + strlen(item); /* look for a value to it */ X if (*s++ != '=') { /* variable only, no value */ X! s = XtNewString("True"); /* return a boolean string */ X } else { X if (*s == '\"') /* if surrounded by quotes */ X! buf[strlen(buf) - 2] = '\0'; X! else { X! buf[strlen(buf) - 1] = '\0'; X! --s; X! } X strcpy(buf, ++s); X s = XtNewString(buf); X } X--- 368,405 ---- X char *item; X { X FILE *fp; X! char *c, *s = NULL; X char buf[BUFSIZ]; X+ int negate = strncmp(item, "no", 2) == 0 ? 1 : 0; X+ int size = strlen(item) - 2 * negate; X+ int unset; X X X if ((fp = fopen(mailrcFile(), "r")) != NULL) { X while (s = fgets(buf, BUFSIZ, fp)) { X! if (strncmp(buf, "set", 3) == 0 || /* if this is a 'set' record */ X! strncmp(buf, "unset", 5) == 0) { /* or this an 'unset' record */ X! unset = (buf[0] == 'u') ? 1 : 0; X! s = &buf[(unset?5:3)]; /* starting just beyond the 'set'... */ X while (*s) { /* there may be multiple assignments */ X! for (; *s && index(" \t\n", *s); s++); X if (*s) { X! if (strncmp(s, item, size) == 0) break; X! if (unset && negate && strncmp(s, &item[2], size) == 0) X break; X } X! for (; *s && !index(" \t\n", *s); s++); X } X if (*s) { /* we have found a match */ X! s = s + size; /* look for a value to it */ X if (*s++ != '=') { /* variable only, no value */ X! s = (unset && ! negate) ? NULL : XtNewString("True"); X } else { X if (*s == '\"') /* if surrounded by quotes */ X! for (c = s + 1; *c && *c != '\"'; c++); X! else X! for (c = s--; *c && !index(" \t\n", *c); c++); X! *c = '\0'; X strcpy(buf, ++s); X s = XtNewString(buf); X } X*** ../v1.1/global.h Mon Jun 4 09:48:38 1990 X--- global.h Mon Aug 27 11:09:19 1990 X*************** X*** 32,38 **** X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE X! * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Michael C. Wagnitz - National Semiconductor Corporation X--- 32,38 ---- X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE X! * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Michael C. Wagnitz - National Semiconductor Corporation X*************** X*** 64,69 **** X--- 64,70 ---- X extern String Status_Help_Text; X extern String Subject_Help_Text; X extern String Text_Help_Text; X+ extern String Text2_Help_Text; X extern String Title_Help_Text; X extern String To_Help_Text; X X*************** X*** 85,90 **** X--- 86,92 ---- X extern XtActionProc MyNotify(); /* invokes callbacks w/ param */ X extern XtActionProc NextField(); /* warps pointer to data fld */ X extern XtActionProc PrintMsg(); /* send mail to the printer */ X+ extern XtActionProc SavePos(); /* save widget insert point */ X extern XtActionProc SetAliases(); /* menu list of alias names */ X extern XtActionProc SetCursor(); /* change between wait & norm */ X extern XtActionProc SetDirectory(); /* create folder files list */ X*************** X*** 92,111 **** X extern XtActionProc SetHelp(); /* Position help popup text */ X extern XtActionProc SetMenu(); /* Position set_menu popup */ X extern XtActionProc SetPopup(); /* Position relative to owner */ X extern XtActionProc SetSelect(); /* reposition select mark */ X extern XtActionProc Quit(); /* termination procedure */ X X /* callbacks.c */ X X! extern XtCallbackProc Autograph(); /* Adds Signature to message */ X! extern XtCallbackProc Done(); /* Completes mail delivery */ X extern XtCallbackProc DoIt(); /* callback do specified cmd */ X extern XtCallbackProc DoPrint(); /* callback printer execution */ X extern XtCallbackProc DoQuit(); /* callback termination func */ X extern XtCallbackProc DoSet(); /* callback to toggle options */ X extern XtCallbackProc DoWith(); /* do cmd with arguments */ X extern XtCallbackProc GetAliasName(); /* retrieve alias name */ X extern XtCallbackProc GetFolderName(); /* retrieve folder name */ X extern XtCallbackProc Reply(); /* use msg author and subject */ X extern XtCallbackProc Save(); /* callback save routine */ X extern XtCallbackProc SetNewmail(); /* highlight when new mail */ X--- 94,116 ---- X extern XtActionProc SetHelp(); /* Position help popup text */ X extern XtActionProc SetMenu(); /* Position set_menu popup */ X extern XtActionProc SetPopup(); /* Position relative to owner */ X+ extern XtActionProc SetPos(); /* reset widget insert point */ X extern XtActionProc SetSelect(); /* reposition select mark */ X extern XtActionProc Quit(); /* termination procedure */ X X /* callbacks.c */ X X! extern XtCallbackProc Autograph(); /* adds Signature to message */ X! extern XtCallbackProc Done(); /* completes mail delivery */ X extern XtCallbackProc DoIt(); /* callback do specified cmd */ X extern XtCallbackProc DoPrint(); /* callback printer execution */ X extern XtCallbackProc DoQuit(); /* callback termination func */ X extern XtCallbackProc DoSet(); /* callback to toggle options */ X extern XtCallbackProc DoWith(); /* do cmd with arguments */ X+ extern XtCallbackProc DropIt(); /* destroy Folder popup list */ X extern XtCallbackProc GetAliasName(); /* retrieve alias name */ X extern XtCallbackProc GetFolderName(); /* retrieve folder name */ X+ extern XtCallbackProc ReEdit(); /* re-edit the mail message */ X extern XtCallbackProc Reply(); /* use msg author and subject */ X extern XtCallbackProc Save(); /* callback save routine */ X extern XtCallbackProc SetNewmail(); /* highlight when new mail */ X*************** X*** 115,120 **** X--- 120,129 ---- X X extern void callMail(); /* fork child, exec mail */ X X+ /* confirm.c */ X+ X+ extern Bool Confirm(); /* Confirm destructive acts */ X+ X /* environs.c */ X X extern char *GetMailEnv(); /* get value from mail env */ X*************** X*** 129,141 **** X X /* mail.c */ X X extern XtInputCallbackProc readMail(); /* get data from mail */ X- extern void writeMail(); /* send data to mail */ X extern void sendMail(); /* used by Send/Reply cmds */ X X /* parser.c */ X X extern void parser_init(); /* compile patterns */ X extern void parse(); /* parse mail output */ X extern char *QueryMail(); /* ask mail for info */ X X--- 138,152 ---- X X /* mail.c */ X X+ extern void editMail(); /* create/compose a message */ X extern XtInputCallbackProc readMail(); /* get data from mail */ X extern void sendMail(); /* used by Send/Reply cmds */ X+ extern void writeMail(); /* send data to mail */ X X /* parser.c */ X X extern void parser_init(); /* compile patterns */ X+ extern int match(); /* eval command or output */ X extern void parse(); /* parse mail output */ X extern char *QueryMail(); /* ask mail for info */ X X*************** X*** 166,171 **** X--- 177,183 ---- X extern void CreateTextWindow(); /* another text window */ X extern void CreateTitleBar(); /* a text output window */ X extern Widget CreateInputWindow(); /* To, Subject, Cc, and Bcc */ X+ extern void ParseIconGeometry(); /* Parse icon geometry */ X X /* xmail.c */ X X*************** X*** 172,177 **** X--- 184,193 ---- X extern void initialize(); /* main initialization code */ X extern char **mailoptions(); /* sets up call to mail pgm */ X X+ /* extern functions */ X+ X+ extern char *index(), *rindex(); X+ X /* extern variables */ X X extern char *IndexBuf; /* buffer for index widget */ X*************** X*** 184,190 **** X extern char BccBuf[BUFSIZ]; /* message Bcc list */ X extern char tmpName[BUFSIZ]; /* message temporary filename */ X extern char *MailPrompt; /* mail program prompt string */ X! extern char *HelpNames[24]; /* array of help window names */ X extern char **mailargv; /* array passed to mail child */ X X extern Pixmap hatch; /* cross_weave, used for Newmail */ X--- 200,206 ---- X extern char BccBuf[BUFSIZ]; /* message Bcc list */ X extern char tmpName[BUFSIZ]; /* message temporary filename */ X extern char *MailPrompt; /* mail program prompt string */ X! extern char *HelpNames[25]; /* array of help window names */ X extern char **mailargv; /* array passed to mail child */ X X extern Pixmap hatch; /* cross_weave, used for Newmail */ X*************** X*** 194,200 **** X X extern AliasRecPtr *aliases; /* array of mail alias strings */ X extern XmailResources XMail; /* XMail application resources */ X! extern XtTextSource HelpStrings[23]; X extern XFontStruct *TextFontStr, *HelpFontStr; X X extern int mail_fd; /* descriptor to mail process i/o */ X--- 210,216 ---- X X extern AliasRecPtr *aliases; /* array of mail alias strings */ X extern XmailResources XMail; /* XMail application resources */ X! extern XtTextSource HelpStrings[24]; X extern XFontStruct *TextFontStr, *HelpFontStr; X X extern int mail_fd; /* descriptor to mail process i/o */ X*** ../v1.1/handler.c Mon Jun 4 09:48:39 1990 X--- handler.c Mon Aug 27 11:09:19 1990 X*************** X*** 32,38 **** X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE X! * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * The following software modules were created and are Copyrighted by National X--- 32,38 ---- X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE X! * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * The following software modules were created and are Copyrighted by National X*************** X*** 53,68 **** X #include "xmailregex.h" X #include "MailwatchP.h" X X! #if XtSpecificationRelease >= 4 X! #include <X11/Xaw/LabelP.h> /* R4 */ X! #else X #include <X11/LabelP.h> /* R3 */ X #endif X X /* X! ** This is unwise, because it depends on a Label Widget's private parts. X! ** Examine the current value of the titleBar label and return true/false X! ** does it match the system mail folder name? X */ X int X In_System_Folder(w) X--- 53,67 ---- X #include "xmailregex.h" X #include "MailwatchP.h" X X! #if XtSpecificationRelease < 4 X #include <X11/LabelP.h> /* R3 */ X+ #else X+ #include <X11/Xaw/LabelP.h> /* R4 */ X #endif X X /* X! ** Examine the current value of the titleBar label and return TRUE/FALSE X! ** to the question "Does it match the system mail folder name?" X */ X int X In_System_Folder(w) X*************** X*** 69,80 **** X Widget w; X { X int result; X! char *cp, *index(), *rindex(), buf[BUFSIZ]; X MailwatchWidget mb = (MailwatchWidget) WidgetOf(w, "mailbox"); X LabelWidget tb = (LabelWidget) WidgetOf(WidgetOf(WidgetOf(toplevel, X "topBox"), "titleBar"), "titleBar"); X X! strcpy(buf, tb->label.label); /* XtGetValues didn't work in R3 */ X if ((cp = rindex(buf, '"')) == NULL) result = FALSE; X else { /* if a current folder name exists */ X *cp = NULL; /* chop off the rest of the label */ X--- 68,83 ---- X Widget w; X { X int result; X! char *cp, buf[BUFSIZ]; X! Arg args[1]; X MailwatchWidget mb = (MailwatchWidget) WidgetOf(w, "mailbox"); X LabelWidget tb = (LabelWidget) WidgetOf(WidgetOf(WidgetOf(toplevel, X "topBox"), "titleBar"), "titleBar"); X X! XtSetArg(args[0], XtNlabel, (XtArgVal) NULL); X! XtGetValues(tb, args, ONE); X! strcpy(buf, (char *)args[0].value); X! X if ((cp = rindex(buf, '"')) == NULL) result = FALSE; X else { /* if a current folder name exists */ X *cp = NULL; /* chop off the rest of the label */ X*************** X*** 160,166 **** X int msg_num; X int undeleting; X { X! char *c, *s, *index(); X Arg args[2]; X Cardinal j, k; X Widget iw; X--- 163,169 ---- X int msg_num; X int undeleting; X { X! char *c, *s; X Arg args[2]; X Cardinal j, k; X Widget iw; X*************** X*** 225,231 **** X file_handler(show_latest) X int show_latest; X { X! char *c, *s, *p, *index(), msgnum_str[10]; X int more_than_one, msg_num = 0; /* zero means no message */ X Widget iw = WidgetOf(WidgetOf(toplevel, "topBox"), "indexWindow"); X X--- 228,234 ---- X file_handler(show_latest) X int show_latest; X { X! char *c, *s, *p, msgnum_str[10]; X int more_than_one, msg_num = 0; /* zero means no message */ X Widget iw = WidgetOf(WidgetOf(toplevel, "topBox"), "indexWindow"); X X*** ../v1.1/icon.mail Mon Jun 4 09:46:36 1990 X--- icon.mail Mon Aug 27 11:09:19 1990 X*************** X*** 29,64 **** X #define mail_height 56 X X static char mail_bits[] = { X! 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, X! 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, X! 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf0, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x18, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x30, 0x03, 0x00, X! 0x00, 0x00, 0x00, 0x07, 0x30, 0x06, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, X! 0x06, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x30, 0x07, 0x00, 0x00, 0x00, 0xe0, X! 0x1f, 0xb0, 0x07, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x06, 0x00, 0x00, X! 0x00, 0xb8, 0xee, 0x70, 0x06, 0x00, 0x00, 0x00, 0x5c, 0xd7, 0x31, 0x06, X! 0x00, 0x00, 0x00, 0xae, 0xae, 0x39, 0x06, 0x00, 0x00, 0x00, 0x56, 0x5d, X! 0x3f, 0x06, 0x00, 0x00, 0x00, 0x8a, 0xb4, 0x37, 0x06, 0x00, 0x00, 0x00, X! 0x46, 0x64, 0x33, 0x06, 0x00, 0x00, 0x00, 0x22, 0xc4, 0x33, 0x06, 0x00, X! 0x00, 0x00, 0x12, 0x84, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x33, X! 0x06, 0x00, 0xff, 0xff, 0xfa, 0x07, 0x33, 0xf6, 0xff, 0x00, 0x00, 0x0a, X! 0x00, 0x33, 0x06, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x03, 0x03, 0x00, 0x00, X! 0x00, 0x3a, 0x80, 0x83, 0x01, 0x00, 0x00, 0x00, 0x7a, 0x40, 0xc3, 0x00, X! 0x00, 0x00, 0x00, 0xfa, 0xa0, 0x63, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x51, X! 0x33, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x3b, 0x00, 0x00, 0x00, 0x00, X! 0x3a, 0x06, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x37, 0x00, 0x00, X! 0x00, 0x00, 0x0a, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x31, X! 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x31, 0x00, 0x00, 0x00, 0x00, 0x02, X! 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x31, 0x00, 0x00, 0x00, X! 0x00, 0xaa, 0x2b, 0x31, 0x00, 0x00, 0x00, 0x00, 0xba, 0x2a, 0x31, 0x00, X! 0x00, 0x00, 0x00, 0x2a, 0x29, 0x31, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, X! 0x31, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, X! 0x52, 0x15, 0x31, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2a, 0x31, 0x00, 0x00, X! 0xee, 0x28, 0x82, 0x02, 0x31, 0x20, 0x11, 0x88, 0x22, 0x12, 0x11, 0x2d, X! 0x29, 0x00, 0x29, 0xc8, 0xa2, 0x0b, 0xad, 0x40, 0x9a, 0xc4, 0x4a, 0xc6, X! 0x86, 0x87, 0x4e, 0x1a, 0xcb, 0x67, 0x07, 0xc2, 0x7e, 0xee, 0x3f, 0xbf, X! 0xdc, 0x8e, 0xc7, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0x1d, 0x63, 0x72, 0xb9, X! 0x7b, 0xfd, 0x72, 0xf9, 0x7f, 0x4e, 0xe7, 0xd4 }; X--- 29,64 ---- X #define mail_height 56 X X static char mail_bits[] = { X! 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, X! 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, X! 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf0, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x18, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x30, 0x03, 0x00, X! 0x00, 0x00, 0x00, 0x07, 0x30, 0x06, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, X! 0x06, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x30, 0x07, 0x00, 0x00, 0x00, 0xe0, X! 0x1f, 0xb0, 0x07, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x06, 0x00, 0x00, X! 0x00, 0xb8, 0xee, 0x70, 0x06, 0x00, 0x00, 0x00, 0x5c, 0xd7, 0x31, 0x06, X! 0x00, 0x00, 0x00, 0xae, 0xae, 0x39, 0x06, 0x00, 0x00, 0x00, 0x56, 0x5d, X! 0x3f, 0x06, 0x00, 0x00, 0x00, 0x8a, 0xb4, 0x37, 0x06, 0x00, 0x00, 0x00, X! 0x46, 0x64, 0x33, 0x06, 0x00, 0x00, 0x00, 0x22, 0xc4, 0x33, 0x06, 0x00, X! 0x00, 0x00, 0x12, 0x84, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x33, X! 0x06, 0x00, 0x00, 0x00, 0xfa, 0x07, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a, X! 0x00, 0x33, 0x06, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x03, 0x03, 0x00, 0x00, X! 0x00, 0x3a, 0x80, 0x83, 0x01, 0x00, 0x00, 0x00, 0x7a, 0x40, 0xc3, 0x00, X! 0x00, 0x00, 0x00, 0xfa, 0xa0, 0x63, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x51, X! 0x33, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x1b, 0x00, 0x00, 0x00, 0x00, X! 0x3a, 0x06, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x1f, 0x00, 0x00, X! 0x00, 0x00, 0x0a, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19, X! 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19, 0x00, 0x00, 0x00, 0x00, 0x02, X! 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x19, 0x00, 0x00, 0x00, X! 0x00, 0xaa, 0x2b, 0x19, 0x00, 0x00, 0x00, 0x00, 0xba, 0x2a, 0x19, 0x00, X! 0x00, 0x00, 0x00, 0x2a, 0x29, 0x19, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, X! 0x19, 0x00, 0x80, 0x85, 0xd8, 0x02, 0x00, 0x99, 0x02, 0x40, 0xc5, 0x92, X! 0x52, 0x15, 0x59, 0x46, 0x42, 0x69, 0xb2, 0xaa, 0x2a, 0xb9, 0x44, 0xc6, X! 0xee, 0xaa, 0x82, 0x02, 0x79, 0x64, 0xb5, 0x8a, 0x22, 0x12, 0x11, 0xad, X! 0xa9, 0x10, 0x29, 0xc8, 0xa2, 0x0b, 0xad, 0xc0, 0xba, 0xc4, 0x4a, 0xc6, X! 0x86, 0x87, 0x4e, 0x5a, 0xdb, 0x67, 0x07, 0xc2, 0x7e, 0xee, 0x3f, 0xb7, X! 0xdc, 0x8e, 0xc7, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0x1d, 0x63, 0x72, 0xb9, X! 0x7b, 0xfd, 0x72, 0xf9, 0x7f, 0x4e, 0xe7, 0xd4}; X*** ../v1.1/icon.nomail Mon Jun 4 09:46:41 1990 X--- icon.nomail Mon Aug 27 11:09:20 1990 X*************** X*** 29,64 **** X #define no_mail_height 56 X X static char no_mail_bits[] = { X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, X! 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x04, X! 0x00, 0x00, 0x00, 0x07, 0x00, 0x06, 0x06, 0x00, 0x00, 0x80, 0x01, 0x00, X! 0x06, 0x07, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x87, 0x07, 0x00, 0x00, 0xe0, X! 0x1f, 0x80, 0xc7, 0x07, 0x00, 0x00, 0xf0, 0x3f, 0xc0, 0xe6, 0x07, 0x00, X! 0x00, 0xf8, 0xe2, 0x60, 0x76, 0x07, 0x00, 0x00, 0x9c, 0xce, 0x31, 0x3e, X! 0x03, 0x00, 0x00, 0x8e, 0x86, 0x19, 0x1e, 0x01, 0x00, 0x00, 0x86, 0x03, X! 0x0f, 0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, X! 0xc2, 0x06, 0x83, 0x07, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0xc3, 0x07, 0x00, X! 0x00, 0x00, 0x12, 0x11, 0xe3, 0x06, 0x00, 0x00, 0x00, 0x82, 0x02, 0x73, X! 0x06, 0x00, 0xff, 0xff, 0xaa, 0x2a, 0x33, 0xf6, 0xff, 0x00, 0x00, 0x52, X! 0x15, 0x13, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x03, 0x00, 0x00, X! 0x00, 0x02, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x29, 0xc3, 0x00, X! 0x00, 0x00, 0x00, 0xba, 0x2a, 0x63, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2b, X! 0x33, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x3b, 0x00, 0x00, 0x00, 0x00, X! 0x02, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x37, 0x00, 0x00, X! 0x00, 0x00, 0xfe, 0xff, 0x33, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x31, X! 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, X! 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, X! 0x00, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, X! 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, X! 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, X! 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x30, 0x00, 0x00, X! 0xee, 0x28, 0x68, 0x60, 0x3a, 0x21, 0x11, 0x88, 0x22, 0x76, 0x60, 0x2c, X! 0x29, 0x00, 0x29, 0xc8, 0x76, 0x60, 0xaf, 0x40, 0x9a, 0xc4, 0x4a, 0x72, X! 0xe0, 0x87, 0x4e, 0x1a, 0xcb, 0x67, 0x7b, 0xe2, 0x7c, 0xee, 0x3f, 0xbf, X! 0xdc, 0x66, 0xe9, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0x6d, 0xba, 0x73, 0xb9, X! 0x7b, 0xfd, 0x72, 0x9b, 0xda, 0x4e, 0xe7, 0xd4 }; X--- 29,64 ---- X #define no_mail_height 56 X X static char no_mail_bits[] = { X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, X! 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, X! 0x00, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x04, X! 0x00, 0x00, 0x00, 0x07, 0x00, 0x06, 0x06, 0x00, 0x00, 0x80, 0x01, 0x00, X! 0x06, 0x07, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x87, 0x07, 0x00, 0x00, 0xe0, X! 0x1f, 0x80, 0xc7, 0x07, 0x00, 0x00, 0xf0, 0x3f, 0xc0, 0xe6, 0x07, 0x00, X! 0x00, 0xf8, 0xe2, 0x60, 0x76, 0x07, 0x00, 0x00, 0x9c, 0xce, 0x31, 0x3e, X! 0x03, 0x00, 0x00, 0x8e, 0x86, 0x19, 0x1e, 0x01, 0x00, 0x00, 0x86, 0x03, X! 0x0f, 0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, X! 0xc2, 0x06, 0x83, 0x07, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0xc3, 0x07, 0x00, X! 0x00, 0x00, 0x12, 0x11, 0xe3, 0x06, 0x00, 0x00, 0x00, 0x82, 0x02, 0x73, X! 0x06, 0x00, 0x00, 0x00, 0xaa, 0x2a, 0x33, 0x06, 0x00, 0x00, 0x00, 0x52, X! 0x15, 0x13, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x03, 0x00, 0x00, X! 0x00, 0x02, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x29, 0xc3, 0x00, X! 0x00, 0x00, 0x00, 0xba, 0x2a, 0x63, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2b, X! 0x33, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x6a, 0x1b, 0x00, 0x00, 0x00, 0x00, X! 0x02, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x00, X! 0x00, 0x00, 0xfe, 0xff, 0x1b, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x19, X! 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, X! 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, X! 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, X! 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, X! 0x18, 0x00, 0x80, 0x85, 0xd8, 0xca, 0xc0, 0x98, 0x02, 0x40, 0xc5, 0x92, X! 0xca, 0xc0, 0x58, 0x46, 0x42, 0x69, 0xb2, 0xe4, 0xc0, 0xb8, 0x44, 0xc6, X! 0xee, 0xaa, 0xe8, 0xc0, 0x78, 0x64, 0xb5, 0x8a, 0x22, 0xd6, 0xc0, 0xac, X! 0xa9, 0x10, 0x29, 0xc8, 0xd6, 0xd5, 0xaf, 0xc0, 0xba, 0xc4, 0x4a, 0xd2, X! 0xe9, 0x87, 0x4e, 0x5a, 0xdb, 0x67, 0xfb, 0xca, 0x7c, 0xee, 0x3f, 0xb7, X! 0xdc, 0xe6, 0xe9, 0xd2, 0x33, 0xa5, 0x2a, 0x8f, 0xed, 0xba, 0x73, 0xb9, X! 0x7b, 0xfd, 0x72, 0x9b, 0xda, 0x4e, 0xe7, 0xd4}; X*** ../v1.1/mail.c Mon Jun 4 09:48:39 1990 X--- mail.c Mon Aug 27 11:09:20 1990 X*************** X*** 32,59 **** X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE X! * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * The following software modules were created and are Copyrighted by National X * Semiconductor Corporation: X * X! * 1. sendMail: X * X * Author: Michael C. Wagnitz - National Semiconductor Corporation X * X */ X- X- X #include "global.h" X X #ifndef DEFAULT_VISUAL X #define DEFAULT_VISUAL "/usr/ucb/vi" X #endif X X /* X! ** @(#)readMail() - callback invoked everytime input is pending on mail fd X ** X ** Calls QueryMail() to read all available data from mail file descriptor, X ** and passes output to parse() for analysis and appropriate action. X */ X--- 32,133 ---- X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE X! * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * The following software modules were created and are Copyrighted by National X * Semiconductor Corporation: X * X! * 1. editMail: X! * 2. sendMail: X * X * Author: Michael C. Wagnitz - National Semiconductor Corporation X * X */ X #include "global.h" X+ #include <sys/wait.h> X+ #include <sys/stat.h> X X #ifndef DEFAULT_VISUAL X #define DEFAULT_VISUAL "/usr/ucb/vi" X #endif X X+ X /* X! ** @(#)editMail() - edit a mail message using the preferred editor X ** X+ ** Try to accommodate those editors (emacs, xedit,...) which start their own X+ ** windows in X11. We know for a fact that vi and ed do not. We assume (for X+ ** now) that any other editor selection does. X+ */ X+ void X+ editMail() X+ { X+ Display *ad; X+ char *Argv[11], *Editor, *pgm; X+ char cmd[BUFSIZ]; X+ int ed_or_vi, editor_pid; X+ union wait status; X+ X+ X+ ad = XtDisplay(WidgetOf(WidgetOf(toplevel, "topBox"), "statusWindow")); X+ X+ if ((Editor = GetMailEnv("VISUAL")) == NULL) X+ Editor = XtNewString(DEFAULT_VISUAL); X+ X+ if ((pgm = rindex(Editor, '/')) == NULL) pgm = Editor; X+ else ++pgm; X+ X+ ed_or_vi = (strcmp(pgm, "ed") == 0 || strcmp(pgm, "vi") == 0) ? 1 : 0; X+ X+ editor_pid = fork(); X+ switch (editor_pid) { X+ case -1: /* fork failed ... revert to a system call */ X+ if (ed_or_vi) X+ sprintf(cmd, "xterm -display %s -name XMail \ X+ -title \"xmail message entry\" -e %s %s", X+ ad->display_name, Editor, tmpName); X+ else X+ sprintf(cmd, "%s -display %s -name XMail \ X+ -title \"xmail message entry\" %s", X+ Editor, ad->display_name, tmpName); X+ X+ system(cmd); X+ break; X+ case 0: /* child starts the message entry session */ X+ Argv[0] = (ed_or_vi) ? "/usr/bin/X11/xterm" : Editor; X+ Argv[1] = "-display"; X+ Argv[2] = ad->display_name; X+ Argv[3] = "-name"; X+ Argv[4] = "XMail"; X+ Argv[5] = "-title"; X+ Argv[6] = "xmail message entry"; X+ if (ed_or_vi) { X+ Argv[7] = "-e"; X+ Argv[8] = Editor; X+ Argv[9] = tmpName; X+ Argv[10] = NULL; X+ } else { X+ Argv[7] = tmpName; X+ Argv[8] = NULL; X+ } X+ execvp(Argv[0], Argv); X+ perror("editMail: Failed to start editor"); X+ _exit(); X+ break; X+ default: /* wait for child to finish before continuing */ X+ while (wait3(&status, WNOHANG, NULL) != editor_pid) X+ ProcessOneEvent(XtDisplay(toplevel)); X+ break; X+ } X+ X+ XtFree(Editor); X+ } /* editMail */ X+ X+ X+ /* X+ ** @(#)readMail() - callback invoked every time input is pending on mail fd X+ ** X ** Calls QueryMail() to read all available data from mail file descriptor, X ** and passes output to parse() for analysis and appropriate action. X */ X*************** X*** 68,104 **** X X X /* X- ** @(#)writeMail() - Write s to mail, and flush the output. X- */ X- void X- writeMail(s) X- char *s; X- { X- write(mail_fd, s, strlen(s)); X- } /* writeMail */ X- X- X- /* X ** @(#)sendMail() - send a mail message to the indicated recipient(s) X */ X /* ARGSUSED */ X void X sendMail(parent) X! Widget parent; X { X! Arg args[10]; X! Display *ad; X! Widget Popup, Layout; X! Widget lab1, lab2, lab3, lab4; X! Widget To, Subject, Cclist, Bcc, Last; X! Window aw, dumy; X! String Editor, pgm; X! menuList_p *list; X! menuList b1, b2, b3; X! char *rindex(), cmd[BUFSIZ]; X! int x, y, scn; X X X aw = XtWindow(WidgetOf(WidgetOf(toplevel, "topBox"), "statusWindow")); X ad = XtDisplay(WidgetOf(WidgetOf(toplevel, "topBox"), "statusWindow")); X scn = DefaultScreen(ad); X--- 142,167 ---- X X X /* X ** @(#)sendMail() - send a mail message to the indicated recipient(s) X */ X /* ARGSUSED */ X void X sendMail(parent) X! Widget parent; X { X! Arg args[10]; X! Display *ad; X! Widget Popup, Layout; X! Widget lab1, lab2, lab3, lab4; X! Widget To, Subject, Cclist, Bcc, Last; X! Window aw, dumy; X! menuList_p *list; X! menuList b1, b2, b3, b4; X! int x, y, scn; X X X+ editMail(); X+ X aw = XtWindow(WidgetOf(WidgetOf(toplevel, "topBox"), "statusWindow")); X ad = XtDisplay(WidgetOf(WidgetOf(toplevel, "topBox"), "statusWindow")); X scn = DefaultScreen(ad); X*************** X*** 207,222 **** X b1.label = "Deliver the message"; X b1.func = (XtCallbackProc) Done; X b1.data = "Deliver"; X! b2.label = "Cancel message and delete"; X! b2.func = (XtCallbackProc) Done; X! b2.data = "Cancel"; X b3.label = "Cancel, save in DEAD folder"; X b3.func = (XtCallbackProc) Done; X b3.data = "cancel"; X! list[0] = &b1; list[1] = &b2; list[2] = &b3; list[3] = NULL; X X AddMenuWindow(Last, "Deliver", "DoDone", list); X X AddHelpText(Last, "Deliver", Deliver_Help_Text); X X Normalize(To); X--- 270,289 ---- X b1.label = "Deliver the message"; X b1.func = (XtCallbackProc) Done; X b1.data = "Deliver"; X! b2.label = "Re-edit the message"; X! b2.func = (XtCallbackProc) ReEdit; X! b2.data = "ReEdit"; X b3.label = "Cancel, save in DEAD folder"; X b3.func = (XtCallbackProc) Done; X b3.data = "cancel"; X! b4.label = "Cancel message and delete"; X! b4.func = (XtCallbackProc) Done; X! b4.data = "Cancel"; X! list[0] = &b1; list[1] = &b2; list[2] = &b3; list[3] = &b4; list[4] = NULL; X X AddMenuWindow(Last, "Deliver", "DoDone", list); X X+ XtFree(list); X AddHelpText(Last, "Deliver", Deliver_Help_Text); X X Normalize(To); X*************** X*** 224,245 **** X Normalize(Cclist); X Normalize(Bcc); X X- XtFree(list); X- X- if ((Editor = GetMailEnv("VISUAL")) == NULL) X- Editor = XtNewString(DEFAULT_VISUAL); X- X- if ((pgm = rindex(Editor, '/')) == NULL) pgm = Editor; X- else ++pgm; X- X- sprintf(cmd, "xterm -display %s -name \"XMail\" -T \"xmail message entry\" \ X- -n xmail_%s -e %s %s", ad->display_name, pgm, Editor, tmpName); X- X- system(cmd); X- X- XtFree(Editor); X- X XtPopup(Popup, XtGrabNone); X X XWarpPointer(XtDisplay(toplevel), None, XtWindow(To), 0, 0, 0, 0, 10, 5); X } /* sendMail */ X--- 291,308 ---- X Normalize(Cclist); X Normalize(Bcc); X X XtPopup(Popup, XtGrabNone); X X XWarpPointer(XtDisplay(toplevel), None, XtWindow(To), 0, 0, 0, 0, 10, 5); X } /* sendMail */ X+ X+ X+ /* X+ ** @(#)writeMail() - Write s to mail, and flush the output. X+ */ X+ void X+ writeMail(s) X+ char *s; X+ { X+ write(mail_fd, s, strlen(s)); X+ } /* writeMail */ X*** ../v1.1/make.file Mon Jun 4 09:48:40 1990 X--- make.file Mon Aug 27 11:09:20 1990 X*************** X*** 41,46 **** X--- 41,47 ---- X actions.c \ X callMail.c \ X callbacks.c \ X+ confirm.c \ X directory.c \ X environs.c \ X handler.c \ X*************** X*** 56,61 **** X--- 57,63 ---- X actions.o \ X callMail.o \ X callbacks.o \ X+ confirm.o \ X directory.o \ X environs.o \ X handler.o \ X*************** X*** 92,100 **** X # ########### DEPENDENCIES GO HERE ######################## X # X HelpText.o: defs.h global.h X! actions.o: defs.h global.h X callMail.o: defs.h global.h X! callbacks.o: defs.h global.h X directory.o: defs.h global.h X environs.o: defs.h global.h X handler.o: defs.h global.h xmailregex.h X--- 94,102 ---- X # ########### DEPENDENCIES GO HERE ######################## X # X HelpText.o: defs.h global.h X! actions.o: defs.h global.h xmailregex.h X callMail.o: defs.h global.h X! callbacks.o: defs.h global.h xmailregex.h X directory.o: defs.h global.h X environs.o: defs.h global.h X handler.o: defs.h global.h xmailregex.h X*** ../v1.1/parser.c Mon Jun 4 09:48:40 1990 X--- parser.c Mon Aug 27 11:09:21 1990 X*************** X*** 32,38 **** X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE X! * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Michael C. Wagnitz - National Semiconductor Corporation X--- 32,38 ---- X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE X! * OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Michael C. Wagnitz - National Semiconductor Corporation X*************** X*** 39,44 **** X--- 39,45 ---- X * X */ X X+ #define PARSER X X #include "global.h" X #include "regex.h" X*************** X*** 80,86 **** X ** @(#)match() - string against regular expressions in pattern table. X ** The best match is found, and function returns index to the pattern table. X */ X! static int X match(patternTable, string) X PatternRec *patternTable; X char *string; X--- 81,87 ---- X ** @(#)match() - string against regular expressions in pattern table. X ** The best match is found, and function returns index to the pattern table. X */ X! int X match(patternTable, string) X PatternRec *patternTable; X char *string; X*************** X*** 123,129 **** X XtTextBlock textblock; X XtTextPosition pos; X Widget button, icon, popup, iw; X! char tmp[128], *c, *index(); X int num; X static Boolean first_time = True; X static String old_msg = NULL; X--- 124,130 ---- X XtTextBlock textblock; X XtTextPosition pos; X Widget button, icon, popup, iw; X! char tmp[128], *c; X int num; X static Boolean first_time = True; X static String old_msg = NULL; X*************** X*** 159,166 **** X if (c = GetMailrc("nohold")) XtFree(c); X else strcat(tmp, "hold "); X X! strcat(tmp, "nocrt noreplyall"); X X c = QueryMail(tmp); X XtFree(c); X X--- 160,170 ---- X if (c = GetMailrc("nohold")) XtFree(c); X else strcat(tmp, "hold "); X X! c = QueryMail(tmp); X! XtFree(c); X X+ strcpy(tmp, "unset crt replyall"); X+ X c = QueryMail(tmp); X XtFree(c); X X*************** X*** 176,182 **** X sprintf(tmp, "%d", msgnum); X XtFree(msg); X msg = QueryMail(tmp); X! markIndex(" "); X } X } X } X--- 180,186 ---- X sprintf(tmp, "%d", msgnum); X XtFree(msg); X msg = QueryMail(tmp); X! markIndex("> "); X } X } X } X*************** X*** 186,191 **** X--- 190,196 ---- X icon_handler, NULL); X first_time = False; X } X+ strcpy(Command, ""); X break; X /* X ** In response to normal or change folder commands, test output. If an X*************** X*** 201,206 **** X--- 206,215 ---- X switch (j) { X case O_BELL : Bell(msg); X XtFree(msg); X+ pos = XtTextGetInsertionPoint(WidgetOf( X+ WidgetOf(toplevel,"topBox"), X+ "indexWindow")) + 1; X+ msgnum = PositionToMsgNumber(pos); X msg = QueryMail("file"); X if (strncmp(&msg[1], tmpName, strlen(tmpName)) == 0) { X UpdateTitleBar("No current folder"); X*************** X*** 207,218 **** X iw = WidgetOf(toplevel, "topBox"); X writeText(WidgetOf(iw, "indexWindow"), " ", FALSE); X writeTo(WidgetOf(iw, "textWindow"), " "); X } X XtFree(msg); X *msg='\0'; X break; X case O_EXEC : msgnum = index_handler(0, 0); X! markIndex(" "); X break; X case O_FILE : msgnum = file_handler(1); X c = index(msg, '\n'); X--- 216,231 ---- X iw = WidgetOf(toplevel, "topBox"); X writeText(WidgetOf(iw, "indexWindow"), " ", FALSE); X writeTo(WidgetOf(iw, "textWindow"), " "); X+ } else { X+ XtFree(msg); X+ sprintf(tmp, "f %d", msgnum); X+ msg = QueryMail(tmp); X } X XtFree(msg); X *msg='\0'; X break; X case O_EXEC : msgnum = index_handler(0, 0); X! markIndex("> "); X break; X case O_FILE : msgnum = file_handler(1); X c = index(msg, '\n'); X*************** X*** 233,239 **** X sprintf(tmp, "%d", msgnum); X XtFree(msg); X msg = QueryMail(tmp); END_OF_FILE if test 53806 -ne `wc -c <'Patch.02c'`; then echo shar: \"'Patch.02c'\" unpacked with wrong size! fi # end of 'Patch.02c' fi echo shar: End of archive 5 \(of 5\). cp /dev/null ark5isdone MISSING="" for I in 1 2 3 4 5 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 5 archives. echo Now ... echo "concatenate these five Patch.02? files (in order) into one file ..." echo "and apply to a set of xmail 1.1 sources, using the 'patch' program." rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.