r4493@vps: verhaegs | 2007-04-19 14:44:00 -0400
[AROS.git] / rom / hyperlayers / newlayerinfo.c
blob82c8a2c8d5a6c97cd7f87cf0e23e8efd0fb40b37
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <aros/libcall.h>
9 #include <exec/memory.h>
10 #include <proto/exec.h>
12 #define DEBUG 0
13 #include <aros/debug.h>
14 #undef kprintf
16 /*****************************************************************************
18 NAME */
19 #include <proto/layers.h>
20 #include "layers_intern.h"
21 #include "basicfuncs.h"
23 AROS_LH0(struct Layer_Info *, NewLayerInfo,
25 /* SYNOPSIS */
26 /* void */
28 /* LOCATION */
29 struct LayersBase *, LayersBase, 24, Layers)
31 /* FUNCTION
33 INPUTS
35 RESULT
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 HISTORY
48 27-11-96 digulla automatically created from
49 layers_lib.fd and clib/layers_protos.h
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
54 AROS_LIBBASE_EXT_DECL(struct LayersBase *,LayersBase)
56 struct Layer_Info *li;
58 D(bug("NewLayerInfo(void)\n"));
60 if(!(li = (struct Layer_Info *)AllocMem(sizeof(struct Layer_Info), MEMF_PUBLIC)))
61 return NULL;
63 InitLayers(li);
65 /* get memory for LayerInfo_extra structure */
66 if(!_AllocExtLayerInfo(li, LayersBase))
68 FreeMem(li, sizeof(struct Layer_Info));
69 return NULL;
72 li->Flags |= NEWLAYERINFO_CALLED;
74 return li;
76 AROS_LIBFUNC_EXIT
77 } /* NewLayerInfo */