home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD1.img
/
d1xx
/
d111
/
amyload
/
cleanup.c
< prev
next >
Wrap
C/C++ Source or Header
|
1987-11-15
|
1KB
|
47 lines
#include <intuition/intuition.h>
#include <devices/load.h>
#include "execdef.h"
#include "intuidef.h"
#include "windownode.h"
#include "Cleanup.proto"
#include <exec/proto.h>
#include "CloseLoadWindow.proto"
extern Library *GfxBase;
extern struct IntuitionBase *IntuitionBase;
extern MinList windowList;
extern MsgPort *windowPort;
extern MsgPort *loadPort;
extern loadrequest *loadRequest;
void
Cleanup()
{
WindowNode *windownode, *oldwindownode;
for (windownode = (WindowNode *)windowList.mlh_Head;
windownode->node.mln_Succ; )
{
oldwindownode = windownode;
windownode = (WindowNode *)windownode->node.mln_Succ;
CloseLoadWindow(oldwindownode);
}
if (loadRequest)
{
if (loadRequest->lr_node.io_Device)
CloseDevice((IORequest *)loadRequest);
DeleteExtIO((IORequest *)loadRequest, sizeof(loadrequest));
}
if (loadPort)
DeletePort(loadPort);
if (windowPort)
DeletePort(windowPort);
if (IntuitionBase)
CloseLibrary((Library *)IntuitionBase);
if (GfxBase)
CloseLibrary(GfxBase);
}