home *** CD-ROM | disk | FTP | other *** search
- /*
- ** DITO Extension, Main
- ** (C) Dirk Holtwick, 1996
- */
-
- /// HEADER
- #include <libraries/mui.h>
- #include <clib/alib_protos.h>
- #include <clib/exec_protos.h>
- #include <clib/dos_protos.h>
- #include <clib/muimaster_protos.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-
- #ifdef __MAXON__
- #include <pragma/exec_lib.h>
- #include <pragma/dos_lib.h>
- #include <pragma/muimaster_lib.h>
- #include <pragma/dito_lib.h>
- #else
- #include <pragmas/exec_pragmas.h>
- #include <pragmas/dos_pragmas.h>
- #include <pragmas/muimaster_pragmas.h>
- #include <proto/dito.h>
- #endif
-
- struct DITO_ExtInfo {
- char *Language,
- *Author,
- *Version,
- *Date,
- *Description;
- UWORD NumTypes;
- char **Types;
- };
-
- #include "defs.h" // Extension informations
- #include "cat.h" // Catalogs for English extension
-
- #ifdef __MAXON__
- #define REG(r) register __ ## r
- #define SAVEDS
- #define ASM
- #else
- #define REG(r) register __ ## r
- #define SAVEDS __saveds
- #define ASM __asm
- #endif
-
- struct Library *LocaleBase;
- struct Library *MUIMasterBase;
- struct Library *DitoBase;
-
- #include "funcs.h"
- ///
-
- /// DITO_OpenExtension()
- SAVEDS ASM ULONG DITO_OpenExtension(void)
- {
- MUIMasterBase = OpenLibrary("muimaster.library",0);
- if(!MUIMasterBase) return(FALSE);
- LocaleBase = OpenLibrary("locale.library",0);
- if(!LocaleBase) return(FALSE);
- DitoBase = OpenLibrary("dito:dito.library",0);
- if(!DitoBase) return(FALSE);
- OPENCAT;
- return(TRUE);
- }
- ///
- /// DITO_CloseExtension()
- SAVEDS ASM void DITO_CloseExtension(void)
- {
- CLOSECAT;
- CloseLibrary(DitoBase);
- CloseLibrary(LocaleBase);
- CloseLibrary(MUIMasterBase);
- }
- ///
-