/* 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 "numcode.h"
#pragma segment FiltActions
void __SegFiltActions(void);
void __SegFiltActions(void){}
#pragma segment Log
void __SegLog(void);
void __SegLog(void){}
#pragma segment PersonWin
void __SegPersonWin(void);
void __SegPersonWin(void){}
#pragma segment Lex822
void __SegLex822(void);
void __SegLex822(void){}
#pragma segment ListItemLDEF
void __SegListItemLDEF(void);
void __SegListItemLDEF(void){}
#pragma segment ToolbarPopup
void __SegToolbarPopup(void);
void __SegToolbarPopup(void){}
#pragma segment Balloon
void __SegBalloon(void);
void __SegBalloon(void){}
#pragma segment TRANSLATOR
void __SegTRANSLATOR(void);
void __SegTRANSLATOR(void){}
#pragma segment Misc
void __SegMisc(void);
void __SegMisc(void){}
#pragma segment StdC
void __SegStdC(void);
void __SegStdC(void){}
#pragma segment FileUtil2
void __SegFileUtil2(void);
void __SegFileUtil2(void){}
#pragma segment LMgr
void __SegLMgr(void);
void __SegLMgr(void){}
#pragma segment FilterWin
void __SegFilterWin(void);
void __SegFilterWin(void){}
#pragma segment utl
void __Segutl(void);
void __Segutl(void){}
#pragma segment Progress
void __SegProgress(void);
void __SegProgress(void){}
#pragma segment ToolbarMain
void __SegToolbarMain(void);
void __SegToolbarMain(void){}
#pragma segment BuildMenus
void __SegBuildMenus(void);
void __SegBuildMenus(void){}
#pragma segment Mailxfer
void __SegMailxfer(void);
void __SegMailxfer(void){}
#pragma segment Hesiod
void __SegHesiod(void);
void __SegHesiod(void){}
#pragma segment FileUtil
void __SegFileUtil(void);
void __SegFileUtil(void){}
#pragma segment StationeryWin
void __SegStationeryWin(void);
void __SegStationeryWin(void){}
#pragma segment SMTP
void __SegSMTP(void);
void __SegSMTP(void){}
#pragma segment MboxWin
void __SegMboxWin(void);
void __SegMboxWin(void){}
#pragma segment MessWin
void __SegMessWin(void);
void __SegMessWin(void){}
#pragma segment DownURL
void __SegDownURL(void);
void __SegDownURL(void){}
#pragma segment LDAPUtils
void __SegLDAPUtils(void);
void __SegLDAPUtils(void){}
#pragma segment carbonutil
void __Segcarbonutil(void);
void __Segcarbonutil(void){}
#pragma segment MacOS
void __SegMacOS(void);
void __SegMacOS(void){}
#pragma segment Appcdef
void __SegAppcdef(void);
void __SegAppcdef(void){}
#pragma segment StringUtil
void __SegStringUtil(void);
void __SegStringUtil(void){}
#pragma segment Lib
void __SegLib(void);
void __SegLib(void){}
#pragma segment FILEGRAPHIC
void __SegFILEGRAPHIC(void);
void __SegFILEGRAPHIC(void){}
#pragma segment Cursor
void __SegCursor(void);
void __SegCursor(void){}
#pragma segment TaskProgressWindow
void __SegTaskProgressWindow(void);
void __SegTaskProgressWindow(void){}
#pragma segment GetPrefs
void __SegGetPrefs(void);
void __SegGetPrefs(void){}
#pragma segment Spell
void __SegSpell(void);
void __SegSpell(void){}
#pragma segment Boxes
void __SegBoxes(void);
void __SegBoxes(void){}
#pragma segment Links
void __SegLinks(void);
void __SegLinks(void){}
#pragma segment Table
void __SegTable(void);
void __SegTable(void){}
#pragma segment Help
void __SegHelp(void);
void __SegHelp(void){}
#pragma segment NickAE
void __SegNickAE(void);
void __SegNickAE(void){}
#pragma segment AppearanceUtil
void __SegAppearanceUtil(void);
void __SegAppearanceUtil(void){}
#pragma segment Wazoo
void __SegWazoo(void);
void __SegWazoo(void){}
#pragma segment Schizo
void __SegSchizo(void);
void __SegSchizo(void){}
#pragma segment MAEUtil
void __SegMAEUtil(void);
void __SegMAEUtil(void){}
#pragma segment FiltMng
void __SegFiltMng(void);
void __SegFiltMng(void){}
#pragma segment ADWIN
void __SegADWIN(void);
void __SegADWIN(void){}
#pragma segment NickWin
void __SegNickWin(void);
void __SegNickWin(void){}
#pragma segment ACAP
void __SegACAP(void);
void __SegACAP(void){}
#pragma segment BuildTOC
void __SegBuildTOC(void);
void __SegBuildTOC(void){}
#pragma segment MsgOps
void __SegMsgOps(void);
void __SegMsgOps(void){}
#pragma segment LinkWin
void __SegLinkWin(void);
void __SegLinkWin(void){}
#pragma segment SendAppleFile
void __SegSendAppleFile(void);
void __SegSendAppleFile(void){}
#pragma segment Headers
void __SegHeaders(void);
void __SegHeaders(void){}
#pragma segment Squish
void __SegSquish(void);
void __SegSquish(void){}
#pragma segment MyWindow
void __SegMyWindow(void);
void __SegMyWindow(void){}
#pragma segment Addresses
void __SegAddresses(void);
void __SegAddresses(void){}
#pragma segment HexBin
void __SegHexBin(void);
void __SegHexBin(void){}
#pragma segment Makefilter
void __SegMakefilter(void);
void __SegMakefilter(void){}
#pragma segment Text
void __SegText(void);
void __SegText(void){}
#pragma segment Register
void __SegRegister(void);
void __SegRegister(void){}
#pragma segment Message
void __SegMessage(void);
void __SegMessage(void){}
#pragma segment NickMng
void __SegNickMng(void);
void __SegNickMng(void){}
#pragma segment Ends
void __SegEnds(void);
void __SegEnds(void){}
#pragma segment Threads
void __SegThreads(void);
void __SegThreads(void){}
#pragma segment BoxWidget
void __SegBoxWidget(void);
void __SegBoxWidget(void){}
#pragma segment URL
void __SegURL(void);
void __SegURL(void){}
#pragma segment UUPCIn
void __SegUUPCIn(void);
void __SegUUPCIn(void){}
#pragma segment Menu
void __SegMenu(void);
void __SegMenu(void){}
#pragma segment ListView
void __SegListView(void);
void __SegListView(void){}
#pragma segment TEFuncs
void __SegTEFuncs(void);
void __SegTEFuncs(void){}
#pragma segment ICGlue
void __SegICGlue(void);
void __SegICGlue(void){}
#pragma segment CTBTrans
void __SegCTBTrans(void);
void __SegCTBTrans(void){}
#pragma segment Enriched
void __SegEnriched(void);
void __SegEnriched(void){}
#pragma segment MD5
void __SegMD5(void);
void __SegMD5(void){}
#pragma segment Icon
void __SegIcon(void);
void __SegIcon(void){}
#pragma segment StickyPopup
void __SegStickyPopup(void);
void __SegStickyPopup(void){}
#pragma segment Mailbox
void __SegMailbox(void);
void __SegMailbox(void){}
#pragma segment Transport
void __SegTransport(void);
void __SegTransport(void){}
#pragma segment TlateCalc
void __SegTlateCalc(void);
void __SegTlateCalc(void){}
#pragma segment Util2
void __SegUtil2(void);
void __SegUtil2(void){}
#pragma segment MiscLibs
void __SegMiscLibs(void);
void __SegMiscLibs(void){}
#pragma segment Stack
void __SegStack(void);
void __SegStack(void){}
#pragma segment AE2
void __SegAE2(void);
void __SegAE2(void){}
#pragma segment AE3
void __SegAE3(void);
void __SegAE3(void){}
#pragma segment Util
void __SegUtil(void);
void __SegUtil(void){}
#pragma segment FiltLdef
void __SegFiltLdef(void);
void __SegFiltLdef(void){}
#pragma segment WinUtil
void __SegWinUtil(void);
void __SegWinUtil(void){}
#pragma segment TcpTrans
void __SegTcpTrans(void);
void __SegTcpTrans(void){}
#pragma segment NickExp
void __SegNickExp(void);
void __SegNickExp(void){}
#pragma segment SignaturesWin
void __SegSignaturesWin(void);
void __SegSignaturesWin(void){}
#pragma segment newthreads
void __Segnewthreads(void);
void __Segnewthreads(void){}
#pragma segment Ph
void __SegPh(void);
void __SegPh(void){}
#pragma segment AssocArray
void __SegAssocArray(void);
void __SegAssocArray(void){}
#pragma segment MenuMain
void __SegMenuMain(void);
void __SegMenuMain(void){}
#pragma segment CompWin
void __SegCompWin(void);
void __SegCompWin(void){}
#pragma segment PGLUE
void __SegPGLUE(void);
void __SegPGLUE(void){}
#pragma segment Find
void __SegFind(void);
void __SegFind(void){}
#pragma segment SMTPUtil
void __SegSMTPUtil(void);
void __SegSMTPUtil(void){}
#pragma segment TOC
void __SegTOC(void);
void __SegTOC(void){}
#pragma segment FILTTHREAD
void __SegFILTTHREAD(void);
void __SegFILTTHREAD(void){}
#pragma segment PGP
void __SegPGP(void);
void __SegPGP(void){}
#pragma segment Outgoing
void __SegOutgoing(void);
void __SegOutgoing(void){}
#pragma segment SetPrefs
void __SegSetPrefs(void);
void __SegSetPrefs(void){}
#pragma segment Print
void __SegPrint(void);
void __SegPrint(void){}
#pragma segment BoxMain
void __SegBoxMain(void);
void __SegBoxMain(void){}
#pragma segment SettingDialog
void __SegSettingDialog(void);
void __SegSettingDialog(void){}
#pragma segment POP
void __SegPOP(void);
void __SegPOP(void){}
#pragma segment CompMng
void __SegCompMng(void);
void __SegCompMng(void){}
#pragma segment BoxSort
void __SegBoxSort(void);
void __SegBoxSort(void){}
#pragma segment Importer
void __SegImporter(void);
void __SegImporter(void){}
#pragma segment Toolbar
void __SegToolbar(void);
void __SegToolbar(void){}
#pragma segment HTML
void __SegHTML(void);
void __SegHTML(void){}
#pragma segment UUPCOut
void __SegUUPCOut(void);
void __SegUUPCOut(void){}
#pragma segment SMTP2
void __SegSMTP2(void);
void __SegSMTP2(void){}
#pragma segment speech
void __Segspeech(void);
void __Segspeech(void){}
#pragma segment BinHex
void __SegBinHex(void);
void __SegBinHex(void){}
#pragma segment FILTRUN
void __SegFILTRUN(void);
void __SegFILTRUN(void){}
#pragma segment AppleEvents
void __SegAppleEvents(void);
void __SegAppleEvents(void){}
#pragma segment IMAP
void __SegIMAP(void);
void __SegIMAP(void){}
#pragma segment MIME
void __SegMIME(void);
void __SegMIME(void){}
#pragma segment ListCdef
void __SegListCdef(void);
void __SegListCdef(void){}
#pragma segment Messact
void __SegMessact(void);
void __SegMessact(void){}
#pragma segment Abomination
void __SegAbomination(void);
void __SegAbomination(void){}
#pragma segment MIMEStore
void __SegMIMEStore(void);
void __SegMIMEStore(void){}
#pragma segment Search
void __SegSearch(void);
void __SegSearch(void){}
#pragma segment Filters
void __SegFilters(void);
void __SegFilters(void){}
#pragma segment DIAL
void __SegDIAL(void);
void __SegDIAL(void){}
#pragma segment Color
void __SegColor(void);
void __SegColor(void){}
#pragma segment Main
void UnloadSegments(void);
void UnloadSegments(void)
{
#if __profile__
	return;
#endif
	if (!CantLock && LockCode) return;
#ifdef THREADING_ON
/*
	this is a short term solution to the stack corruption bug that occurs when segments that 
	a thread is using are unloaded
*/
	if (GetNumBackgroundThreads ()) return;
#endif
  UnloadSeg(__SegFiltActions);
  UnloadSeg(__SegLog);
  UnloadSeg(__SegPersonWin);
  UnloadSeg(__SegLex822);
  UnloadSeg(__SegListItemLDEF);
  UnloadSeg(__SegToolbarPopup);
  UnloadSeg(__SegBalloon);
  UnloadSeg(__SegTRANSLATOR);
  UnloadSeg(__SegMisc);
  UnloadSeg(__SegStdC);
  UnloadSeg(__SegFileUtil2);
  UnloadSeg(__SegLMgr);
  UnloadSeg(__SegFilterWin);
  UnloadSeg(__Segutl);
  UnloadSeg(__SegProgress);
  UnloadSeg(__SegToolbarMain);
  UnloadSeg(__SegBuildMenus);
  UnloadSeg(__SegMailxfer);
  UnloadSeg(__SegHesiod);
  UnloadSeg(__SegFileUtil);
  UnloadSeg(__SegStationeryWin);
  UnloadSeg(__SegSMTP);
  UnloadSeg(__SegMboxWin);
  UnloadSeg(__SegMessWin);
  UnloadSeg(__SegDownURL);
  UnloadSeg(__SegLDAPUtils);
  UnloadSeg(__Segcarbonutil);
  UnloadSeg(__SegMacOS);
  UnloadSeg(__SegAppcdef);
  UnloadSeg(__SegStringUtil);
  UnloadSeg(__SegLib);
  UnloadSeg(__SegFILEGRAPHIC);
  UnloadSeg(__SegCursor);
  UnloadSeg(__SegTaskProgressWindow);
  UnloadSeg(__SegGetPrefs);
  UnloadSeg(__SegSpell);
  UnloadSeg(__SegBoxes);
  UnloadSeg(__SegLinks);
  UnloadSeg(__SegTable);
  UnloadSeg(__SegHelp);
  UnloadSeg(__SegNickAE);
  UnloadSeg(__SegAppearanceUtil);
  UnloadSeg(__SegWazoo);
  UnloadSeg(__SegSchizo);
  UnloadSeg(__SegMAEUtil);
  UnloadSeg(__SegFiltMng);
  UnloadSeg(__SegADWIN);
  UnloadSeg(__SegNickWin);
  UnloadSeg(__SegACAP);
  UnloadSeg(__SegBuildTOC);
  UnloadSeg(__SegMsgOps);
  UnloadSeg(__SegLinkWin);
  UnloadSeg(__SegSendAppleFile);
  UnloadSeg(__SegHeaders);
  UnloadSeg(__SegSquish);
  UnloadSeg(__SegMyWindow);
  UnloadSeg(__SegAddresses);
  UnloadSeg(__SegHexBin);
  UnloadSeg(__SegMakefilter);
  UnloadSeg(__SegText);
  UnloadSeg(__SegRegister);
  UnloadSeg(__SegMessage);
  UnloadSeg(__SegNickMng);
  UnloadSeg(__SegEnds);
  UnloadSeg(__SegThreads);
  UnloadSeg(__SegBoxWidget);
  UnloadSeg(__SegURL);
  UnloadSeg(__SegUUPCIn);
  UnloadSeg(__SegMenu);
  UnloadSeg(__SegListView);
  UnloadSeg(__SegTEFuncs);
  UnloadSeg(__SegICGlue);
  UnloadSeg(__SegCTBTrans);
  UnloadSeg(__SegEnriched);
  UnloadSeg(__SegMD5);
  UnloadSeg(__SegIcon);
  UnloadSeg(__SegStickyPopup);
  UnloadSeg(__SegMailbox);
  UnloadSeg(__SegTransport);
  UnloadSeg(__SegTlateCalc);
  UnloadSeg(__SegUtil2);
  UnloadSeg(__SegMiscLibs);
  UnloadSeg(__SegStack);
  UnloadSeg(__SegAE2);
  UnloadSeg(__SegAE3);
  UnloadSeg(__SegUtil);
  UnloadSeg(__SegFiltLdef);
  UnloadSeg(__SegWinUtil);
  UnloadSeg(__SegTcpTrans);
  UnloadSeg(__SegNickExp);
  UnloadSeg(__SegSignaturesWin);
  UnloadSeg(__Segnewthreads);
  UnloadSeg(__SegPh);
  UnloadSeg(__SegAssocArray);
  UnloadSeg(__SegMenuMain);
  UnloadSeg(__SegCompWin);
  UnloadSeg(__SegPGLUE);
  UnloadSeg(__SegFind);
  UnloadSeg(__SegSMTPUtil);
  UnloadSeg(__SegTOC);
  UnloadSeg(__SegFILTTHREAD);
  UnloadSeg(__SegPGP);
  UnloadSeg(__SegOutgoing);
  UnloadSeg(__SegSetPrefs);
  UnloadSeg(__SegPrint);
  UnloadSeg(__SegBoxMain);
  UnloadSeg(__SegSettingDialog);
  UnloadSeg(__SegPOP);
  UnloadSeg(__SegCompMng);
  UnloadSeg(__SegBoxSort);
  UnloadSeg(__SegImporter);
  UnloadSeg(__SegToolbar);
  UnloadSeg(__SegHTML);
  UnloadSeg(__SegUUPCOut);
  UnloadSeg(__SegSMTP2);
  UnloadSeg(__Segspeech);
  UnloadSeg(__SegBinHex);
  UnloadSeg(__SegFILTRUN);
  UnloadSeg(__SegAppleEvents);
  UnloadSeg(__SegIMAP);
  UnloadSeg(__SegMIME);
  UnloadSeg(__SegListCdef);
  UnloadSeg(__SegMessact);
  UnloadSeg(__SegAbomination);
  UnloadSeg(__SegMIMEStore);
  UnloadSeg(__SegSearch);
  UnloadSeg(__SegFilters);
  UnloadSeg(__SegDIAL);
  UnloadSeg(__SegColor);
}
