(C) 1998 AROS - The Amiga Research OS


NAME

struct Library * MakeLibrary ( funcInit , structInit , libInit , dataSize , segList)

LOCATION
In SysBase at offset 14

SYNOPSIS
APTR funcInit
APTR structInit
ULONG_FUNC libInit
ULONG dataSize
BPTR segList

FUNCTION
Allocates memory for the library, builds it and calls the library's init vector. Generally this function is for internal use and for use by library programmers that don't want to use the automatic initialization procedure.

INPUTS
funcInit
Either a pointer to an array of function offsets
with
1, relative to funcInit) or to an array of absolute function pointers.
structInit
Pointer to a InitStruct() data region or NULL.
libInit
The library's init vector or NULL. The init vector is called with the library address (D0), the segList (A0) and ExecBase (A6) as arguments. If the init fails the init code has to free the base memory and return NULL (the library address for success).
dataSize
Size of the library structure including system structures. Must be at least sizeof(struct Library).
segList
BCPL pointer to the library segments. Used to free the library later.

RESULT
The library base address or NULL.

EXAMPLE

SEE ALSO
AddLibrary(), RemLibrary(), MakeFunctions(), InitStruct(), SumLibrary().

NOTES
The library base is always aligned to the maximum of sizeof(LONG) and double alignment restrictions.

BUGS

INTERNALS

HISTORY