eudora-mac/messact.c

1 line
96 KiB
C
Raw Permalink Normal View History

2018-05-23 09:59:15 +00:00
/* Copyright (c) 2017, Computer History Museum All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Computer History Museum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "messact.h" #define FILE_NUM 24 /* Copyright (c) 1990-1992 by the University of Illinois Board of Trustees */ #pragma segment Messact OSErr MakeSubjectTXE(MessHandle messH); void MessUpdate(MyWindowPtr win); void MessSubjRect(MyWindowPtr win,Rect *r); Boolean MessScroll(MyWindowPtr win,int h,int v); void MessHelp(MyWindowPtr win,Point mouse); short MyFSWrite(short refN,long *bytes,UPtr buffer); Boolean IsAttLine(PStr line,Boolean wantToOpen); OSErr OpenAttLine(PETEHandle pte,PStr line,Boolean finderSelect,Boolean printIt); Boolean GetBlahRect(MyWindowPtr win, short which, Rect *r); Boolean TogglePOPD(OSType theType,short id, MessHandle messH); void SADL_Hilite(DialogPtr dgPtr); void MessButton(MyWindowPtr win,ControlHandle button,long modifiers,short part); void MessTxChanged(MyWindowPtr win,TEHandle teh,short oldNl,short newNl,Boolean scroll); #define I_WIDTH 29 OSErr KillTransAttachments(FSSpecHandle files); Boolean GetTruckRect(MyWindowPtr win,Rect *c); void AddNotifyControls(MessHandle messH); void PlaceNotifyControls(MyWindowPtr win); static short SaveAsToOpenFileLo(short refN,MessHandle messH); void MessProxy(MyWindowPtr win,EventRecord *event); OSErr LopPoundHexDigits(PStr fileName); #ifdef USECMM_BAD OSErr MessBuildCMenu( MyWindowPtr win, EventRecord* contextEvent, CMenuInfoHndl* specCMenuInfo ); #endif /********************************************************************** * MessClose - close a message window **********************************************************************/ Boolean MessClose(MyWindowPtr win) { MessType **messH = (MessType **)GetMyWindowPrivateData(win); TOCType **tocH = (*messH)->tocH; int sumNum = (*messH)->sumNum; if (!GrowZoning && TheBody && (*messH)->subPTE && win->pte==(*messH)->subPTE) MessFocus(messH,TheBody); if (PeteIsDirty((*messH)->subPTE)) MessSaveSub(messH); if (!GrowZoning) win->isDirty = win->isDirty || PeteIsDirtyList(TheBody); if (!NoSaves && !GrowZoning) if (!SaveMessHi(win,True)) return(False); LL_Remove(MessList,messH,(MessType **)); AccuZap((*messH)->extras); AccuZap((*messH)->aSourceMID); if ((*messH)->etlFiles) KillTransAttachments((*messH)->etlFiles); ZapHandle((*messH)->etlFiles); SetMyWindowPrivateData (win, nil); AccuZap((*messH)->newsGroupAcc); ZapHandle(messH); (*tocH)->sums[sumNum].messH = nil; #ifdef IMAP // Cancel the IMAP download if this is an imap message ... if ((*tocH)->imapTOC) IM