eudora-mac/Include/threading.h

1 line
13 KiB
C
Raw 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. */ /* File: Threading.h Author: Clarence Wong <cwong@qualcomm.com> Date: February 1997 - ... Copyright (c) 1997 by QUALCOMM Incorporated */ /* to switch threading on, #define THREADING_ON in PreCompTwoPPC.pch*/ #ifndef THREADING_H #define THREADING_H /* Decoder globals - these were once globals, but need to be thread specific for the decoders to work properly */ typedef struct HexBinGlobals_ **HBGHandle; typedef struct UUGlobals_ **UUGlobalsHandle; typedef struct decoderGlobals_ decoderGlobalsRec, *decoderGlobalsPtr, **decoderGlobalsHandle; struct decoderGlobals_ { Boolean DealingWithIdiotIMail; // is IMail here? Boolean AnyRich; /* any body parts with richText? */ Boolean AnyHTML; /* any body parts with html? */ Boolean AnyFlow; /* any body parts with flow? */ Boolean AnyDelSP; /* any body parts with flow? */ Boolean AnyCharset; /* any body parts with charset */ FSSpecHandle LastAttSpec; /* the received attachments */ Boolean BadBinHex; /* a bad binhex file was found */ Boolean BadEncoding; /* errors were found in encoding */ Boolean Headering; /* we're fetching only headers */ Boolean FixServers; /* do we need to fix up the server areas? */ int Prr; /* Pop Error code */ Boolean NoAttachments; /* don't recognize attachments file */ FSSpecHandle SingleSpec; /* an appledouble attachment */ MIMEMapHandle MMIn; /* incoming MIME map */ MIMEMapHandle MMOut; /* outgoing MIME map */ UHandle AttachedFiles; /* list of attachments saved */ PGPRecvContextPtr PGPRContext; /* PGP globals */ UUGlobalsHandle UUG; /* uudecoder globals */ HBGHandle HBG; /* hexbin globals */ StringHandle parseHeaderHandle; /* used in HeaderRecvLine */ long parseHeaderOffset; /* used in HeaderRecvLine */ long parseHeaderSize; /* used in HeaderRecvLine */ StackHandle tAttFolderStack; // stack of attachment folders FSSpec tCurrentAttFolderSpec; // our current attachment folder }; /* Encodier globals - these were once globals, but need to be thread specific for the encoders/send code to work properly */ typedef struct encoderGlobals_ encoderGlobalsRec, *encoderGlobalsPtr, **encoderGlobalsHandle; struct encoderGlobals_ { // static variables for BufferSend DecoderPB pb; Handle buffers[2]; Handle buffer; DecoderFunc *oldEncoder; }; /* thread globals */ typedef struct threadGlobals_ threadGlobalsRec, *threadGlobalsPtr