NListtree.mcc: fix sorted insert
[AROS.git] / rom / hyperlayers / initlayers.c
blob4b527d2986d99d37f846c7b054de0153e3fe380e
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <aros/libcall.h>
9 #include <proto/exec.h>
10 #include <proto/alib.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"
22 AROS_LH1(void, InitLayers,
24 /* SYNOPSIS */
25 AROS_LHA(struct Layer_Info *, li, A0),
27 /* LOCATION */
28 struct LayersBase *, LayersBase, 5, Layers)
30 /* FUNCTION
31 Initializes the supplied Layer_Info, so it's ready for use.
32 Leaves the Layer_Info in an unlocked state.
34 INPUTS
35 li -- pointer to Layer_Info structure
37 RESULT
39 NOTES
40 This function is obsolete. Use NewLayerInfo() instead.
42 EXAMPLE
44 BUGS
46 SEE ALSO
47 NewLayerInfo()
49 INTERNALS
51 HISTORY
52 27-11-96 digulla automatically created from
53 layers_lib.fd and clib/layers_protos.h
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
59 UWORD i;
61 D(bug("InitLayers(li @ $%lx)\n", li));
63 /* init LayerInfo structure with all zeros */
64 for(i = 0; i < sizeof(struct Layer_Info); i++)
65 ((UBYTE *)li)[i] = 0;
67 NewList((struct List *)&li->gs_Head);
69 InitSemaphore(&li->Lock);
71 li->fatten_count = -1;
72 li->Flags = LIFLG_SUPPORTS_OFFSCREEN_LAYERS;
74 AROS_LIBFUNC_EXIT
75 } /* InitLayers */