home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 13
/
AACD13.ISO
/
AACD
/
Resources
/
System
/
BoingBag1
/
Contributions
/
Workbench
/
RexxArpLib3p6
/
src
/
sreq
/
simplib.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-06-17
|
885b
|
46 lines
#include <exec/types.h>
#include <exec/exec.h>
#include <graphics/gfx.h>
#include <intuition/intuition.h>
#include <functions.h>
#include <stdlib.h>
#include <string.h>
extern struct GfxBase *GfxBase;
extern struct IntuitionBase *IntuitionBase;
#include <simpreq.h>
/**
*
* Open graphics and intuition. Returns 1 on success, 0 on failure.
*
**/
BOOL SReqOpenLibs ( void )
{
GfxBase = ( struct GfxBase * ) OpenLibrary("graphics.library", 0L);
if (GfxBase == NULL)
return( FALSE );
IntuitionBase = ( struct IntuitionBase * ) OpenLibrary("intuition.library", 0L);
if (IntuitionBase == NULL)
return( FALSE );
return( TRUE );
}
/**
*
* Close graphics and intuition. Returns 1.
*
**/
BOOL SReqCloseLibs( void )
{
if (IntuitionBase)
CloseLibrary( (struct Library *) IntuitionBase);
if (GfxBase)
CloseLibrary( (struct Library *) GfxBase);
return( TRUE );
}