11 byval flist
as TFLIST
ptr, _
12 byval items
as integer, _
13 byval itemlen
as integer _
16 flist->totitems = items
19 listInit( @flist->list, items, itemlen +
len( TFLISTITEM ), LIST_FLAGS_NONE )
21 flist->listtb = flist->list.tbtail
23 flist->itemtb = flist->listtb->nodetb
24 flist->lastitem = NULL
32 flist->lastitem = NULL
39 byval flist
as TFLIST
ptr _
42 dim as TFLISTITEM
ptr item
45 if( flist->items <= 0 )
Then
47 flist->listtb = flist->listtb->
next
49 if( flist->listtb = NULL )
then
50 flist->items = cunsg(flist->totitems) \ 2
51 flist->totitems += flist->items
53 flist->listtb = flist->list.tbtail
55 flist->items = flist->listtb->nodes
58 flist->itemtb = flist->listtb->nodetb
63 item =
cast( TFLISTITEM
ptr, _
64 cast(
byte ptr, flist->itemtb ) + (flist->index * flist->list.nodelen) )
69 if( flist->lastitem <> NULL )
then
70 flist->lastitem->
next = item
73 flist->lastitem = item
77 function =
cast(
byte ptr, item ) +
len( TFLISTITEM )
84 byval flist
as TFLIST
ptr _
87 flist->listtb = flist->list.tbhead
88 flist->items = flist->listtb->nodes
89 flist->itemtb = flist->listtb->nodetb
91 flist->lastitem = NULL
98 byval flist
as TFLIST
ptr _
101 dim as TFLISTITEM
ptr item
103 item = flist->list.tbhead->nodetb
104 if( item = NULL )
then
107 function =
cast(
byte ptr, item ) +
len( TFLISTITEM )
115 byval node
as any ptr _
118 dim as TFLISTITEM
ptr nxt
121 if( node = NULL )
then
126 nxt =
cast( TFLISTITEM
ptr, _
127 cast(
byte ptr, node ) -
len( TFLISTITEM ) )->
next
129 if( nxt = NULL )
then
132 function =
cast(
byte ptr, nxt ) +
len( TFLISTITEM )