Version 1.0 Initial Release R5 release Version 1.1 Append command displays dialog box. Version 1.2 Annotations avoid automatic rescan of folder. Version 1.3 Fcc bug fixed. Fcc: truncated after first folder name. Open folders on FCC list no longer force a rescan of that folder. Side affect is that send can not do a push if FCC list includes an open folder. Prereq: patch.2 diff -c3 ../xmh.baseline/Patchlevel ./Patchlevel *** ../xmh.baseline/Patchlevel Thu Nov 28 10:03:55 1991 --- ./Patchlevel Sat Jan 11 18:28:33 1992 *************** *** 1 **** ! Xmh.sei.mods patch.2 --- 1 ---- ! Xmh.sei.mods patch.3 diff -c3 ../xmh.baseline/command.c ./command.c *** ../xmh.baseline/command.c Thu Nov 28 09:54:38 1991 --- ./command.c Sat Jan 11 18:28:35 1992 *************** *** 42,47 **** --- 42,51 ---- #endif #endif + #if defined(sun) && defined(sparc) + #include + #endif + /* number of user input events to queue before malloc */ #define TYPEAHEADSIZE 20 diff -c3 ../xmh.baseline/editor.c ./editor.c *** ../xmh.baseline/editor.c Thu Nov 28 09:54:38 1991 --- ./editor.c Sat Jan 11 18:28:39 1992 *************** *** 36,41 **** --- 36,45 ---- #include #include + #if defined(sun) && defined(sparc) + #include + #endif + #ifdef macII #define vfork() fork() #endif /* macII */ diff -c3 ../xmh.baseline/msg.c ./msg.c *** ../xmh.baseline/msg.c Thu Nov 28 10:03:56 1991 --- ./msg.c Sat Jan 11 15:11:10 1992 *************** *** 709,751 **** /* append the scan of the msg to the toc of folders on the fcc list */ ! void MsgFccScan(ptr,msg) Msg msg; char *ptr; { char *q,*s; Toc toc; char * strpbrk(); char *scan; ! q =ptr +4; /* skip by fcc: */ q = q + strspn(q," \t"); s = q; while(s != 0 && *s != '\0' && (isalpha(*s) || *s == '+')){ /* find end of token */ ! q = strpbrk(q," \n\t"); if(q != 0){ *q++ = '\0'; ! q = q + strspn(q," \t"); } if (*s == '+') s++; if((toc = TocGetNamed(s)) && toc->scrn){ scan = MsgDraftScan(msg); if(scan != NULL){ TocStopUpdate(toc); (void) TUAppendToc(toc, scan); toc->haschanged = TRUE; toc->needscachesave = TRUE; toc->needsrepaint = TRUE; TocStartUpdate(toc); XFlush(XtDisplay(toc->scrn[0]->parent)); } } if(q == 0) break; s = q; } } #endif /* FCC */ --- 709,768 ---- /* append the scan of the msg to the toc of folders on the fcc list */ ! Boolean MsgFccScan(ptr,msg) Msg msg; char *ptr; { + /* return true if open folder is on FCC list */ + char *q,*s; Toc toc; char * strpbrk(); char *scan; + char* buf; + Boolean fcclist; ! fcclist = FALSE; ! /* we scan line in place for folder names */ ! buf = XtMalloc((Cardinal)(strlen(ptr)+1)); ! strcpy(buf,ptr); ! q =buf +4; /* skip by fcc: */ q = q + strspn(q," \t"); s = q; while(s != 0 && *s != '\0' && (isalpha(*s) || *s == '+')){ /* find end of token */ ! q = strpbrk(q," \n\t,"); if(q != 0){ *q++ = '\0'; ! q = q + strspn(q," \t,"); } if (*s == '+') s++; if((toc = TocGetNamed(s)) && toc->scrn){ + fcclist = TRUE; scan = MsgDraftScan(msg); if(scan != NULL){ + TUGetFullFolderInfo(toc); + if(toc->validity == valid) + TUEnsureScanIsValidAndOpen(toc); TocStopUpdate(toc); (void) TUAppendToc(toc, scan); toc->haschanged = TRUE; toc->needscachesave = TRUE; toc->needsrepaint = TRUE; + toc->fccupdate = TRUE; TocStartUpdate(toc); XFlush(XtDisplay(toc->scrn[0]->parent)); } } + else if (strcmp(buf,"inbox")== 0) + fcclist = TRUE; if(q == 0) break; s = q; } + XtFree(buf); + return fcclist; } #endif /* FCC */ *************** *** 801,807 **** inheader = TRUE; #ifdef FCC /* An fcc to inbox can be lost, if the send is done in background, ! is delayed and the user does an inc for new mail */ inboxfcc = FALSE; #endif /* FCC */ while (ptr = ReadLine(from)) { --- 818,824 ---- inheader = TRUE; #ifdef FCC /* An fcc to inbox can be lost, if the send is done in background, ! is delayed and the user does an inc for new mail. There can also be a problem with refiles to folders that are open and do a rescan during the send */ inboxfcc = FALSE; #endif /* FCC */ while (ptr = ReadLine(from)) { *************** *** 812,820 **** } #ifdef FCC if (strncmpIgnoringCase(ptr, "fcc:", 4) == 0) { ! MsgFccScan(ptr,msg); ! if(strstr(ptr,"inbox")!= (char *)0) ! inboxfcc++; } #endif /* FCC */ if (strncmpIgnoringCase(ptr, "sendbreakwidth:", 15) == 0) { --- 829,835 ---- } #ifdef FCC if (strncmpIgnoringCase(ptr, "fcc:", 4) == 0) { ! inboxfcc = MsgFccScan(ptr,msg); } #endif /* FCC */ if (strncmpIgnoringCase(ptr, "sendbreakwidth:", 15) == 0) { *************** *** 878,883 **** --- 893,907 ---- argv[2] = str; } retvalue = DoCommand(argv, (char * )NULL, (char *) NULL); + if(inboxfcc){ + int i; + for (i = 0; i < numScrns; i++) { + if (scrnList[i]->toc && scrnList[i]->toc->fccupdate == TRUE){ + scrnList[i]->toc->fccupdate = FALSE; + TUSaveTocFile(scrnList[i]->toc); + } + } + } XtFree((char *) argv); return retvalue; #else diff -c3 ../xmh.baseline/toc.c ./toc.c *** ../xmh.baseline/toc.c Thu Nov 28 10:03:56 1991 --- ./toc.c Sat Jan 11 18:28:38 1992 *************** *** 492,497 **** --- 492,501 ---- Toc toc; { int i; + #ifdef FCC + if(toc->fccupdate) + return; + #endif #ifdef ANNOTATE if (toc && toc->validity == valid && !toc->forcecache && TUScanFileOutOfDate(toc)) { diff -c3 ../xmh.baseline/tocintrnl.h ./tocintrnl.h *** ../xmh.baseline/tocintrnl.h Thu Nov 28 10:03:57 1991 --- ./tocintrnl.h Fri Jan 10 15:47:16 1992 *************** *** 125,130 **** --- 125,133 ---- #ifdef ANNOTATE Boolean forcecache; /* force cache write for annotate */ #endif + #ifdef FCC + Boolean fccupdate; /* force cache write for fcc */ + #endif } TocRec; #endif /* _tocinternal_h */