oops.. only build it when it _is_ valid.
[AROS-Contrib.git] / regina / regina_init.c
blobacb826df5a4675d432d88e989ef3e05f25206102
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Regina code for initialization during opening and closing of the library
6 */
8 #define DEBUG 0
9 #include <exec/types.h>
10 #include <exec/memory.h>
11 #include <aros/libcall.h>
12 #include <aros/debug.h>
13 #include <proto/exec.h>
14 #include <proto/alib.h>
15 #include <proto/dos.h>
17 #include <stddef.h>
18 #include "rexx.h"
20 #include <aros/symbolsets.h>
21 #include LC_LIBDEFS_FILE
23 struct MinList *__regina_tsdlist = NULL;
25 static int InitLib(LIBBASETYPEPTR LIBBASE)
27 D(bug("Inside Init func of regina.library\n"));
29 __regina_semaphorepool = CreatePool(MEMF_PUBLIC, 1024, 256);
31 __regina_tsdlist = (struct MinList *)AllocPooled (__regina_semaphorepool, sizeof(struct MinList));
32 NewList((struct List *)__regina_tsdlist);
34 return TRUE;
37 static int ExpungeLib(LIBBASETYPEPTR LIBBASE)
39 D(bug("Inside Expunge func of regina.library\n"));
41 DeletePool(__regina_semaphorepool);
43 return TRUE;
46 ADD2INITLIB(InitLib, 0);
47 ADD2EXPUNGELIB(ExpungeLib, 0);