home *** CD-ROM | disk | FTP | other *** search
- //************************************
- //
- // Name : Librarian.c
- //
- //************************************
-
-
- //**** Header files
-
- //** OS Include files
- #include <workbench/icon.h>
- #include <workbench/workbench.h>
- #include <libraries/wbstart.h>
-
- //** OS function prototypes
- #include <clib/exec_protos.h>
-
- //** OS function inline calls
- #include <pragmas/exec_pragmas.h>
-
- //** ANSI C includes
-
- //** application include
-
- #include "Librarian.h"
-
-
- //**** Library bases
-
- struct Library *WorkbenchBase=NULL;
- struct Library *WBStartBase=NULL;
- struct Library *CxBase=NULL;
- struct Library *UtilityBase=NULL;
- struct Library *IconBase=NULL;
- struct Library *AslBase = NULL;
- struct Library *IntuitionBase=NULL;
-
-
- //**** Aux functions
-
- int OpenLibs(void) {
- WBStartBase = OpenLibrary(WBSTART_NAME,WBSTART_VERSION);
- WorkbenchBase = OpenLibrary(WORKBENCH_NAME,37);
- CxBase = OpenLibrary("commodities.library", 37);
- UtilityBase = OpenLibrary("utility.library", 37);
- IconBase = OpenLibrary(ICONNAME, 0);
- AslBase = OpenLibrary("asl.library", 37L);
- IntuitionBase = OpenLibrary("intuition.library",37);
- return ( (WBStartBase) && (WorkbenchBase) && (IconBase) &&
- (CxBase) && (UtilityBase) &&
- (AslBase) && (IntuitionBase) );
- } // OpenLibs
-
- void CloseLibs(void) {
- if (WBStartBase) CloseLibrary(WBStartBase);
- if (WorkbenchBase) CloseLibrary(WorkbenchBase);
- if (CxBase) CloseLibrary(CxBase);
- if (UtilityBase) CloseLibrary(UtilityBase);
- if (IconBase) CloseLibrary(IconBase);
- if (AslBase) CloseLibrary(AslBase);
- if (IntuitionBase) CloseLibrary(IntuitionBase);
- } // CloseLibs()
-
- //**** End of file
-