/* *****                                                            *****
** *****           Program created by Ken Farinsky, 1986.           *****
** *****                                                            *****
**
** All material contained herein may be used in any way desired.
**                    >>>>> i.e.  PUBLIC DOMAIN. <<<<<
** Not limited to any single bulletin board - can be freely transferred.
**
** Original distribution through:
**     Slipped Disk, Inc.
**     Madison Heights,  MI  48071
**     (313) 583-9803
**
** Distributed in the hopes of increasing the level of understanding of the
** Amiga personal computer.  Even the best computer can only succeed with
** the proper software support.
*/
#include <libraries/dos.h>
#include <functions.h>
#include "view.h"


extern struct Library	*IntuitionBase ;
extern struct Library	*GfxBase ;
extern struct Library	*LayersBase ;
extern struct Library	*DosBase ;


/* if ( SUCCESS == library_open())	*/

short	library_open()
{
/* Open those libraries that the program uses directly */

if ( ( NULL == ( IntuitionBase = OpenLibrary("intuition.library", 0))) ||
	 ( NULL == ( GfxBase = OpenLibrary("graphics.library", 0))) ||
	 ( NULL == ( LayersBase = OpenLibrary("layers.library", 0))) ||
	 ( NULL == ( DosBase = OpenLibrary(DOSNAME, 0))))
	{
	if ( NULL != IntuitionBase)
		CloseLibrary( IntuitionBase) ;
	if ( NULL != GfxBase)
		CloseLibrary( GfxBase) ;
	if ( NULL != LayersBase)
		CloseLibrary( LayersBase) ;
	return( FAIL) ;
	}

return( SUCCESS) ;
}
