FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
list.bi
Go to the documentation of this file.
1
#ifndef
__LIST_BI__
2
#define
__LIST_BI__
3
4
#include once
"
common.bi
"
5
6
enum
LIST_FLAGS
7
LIST_FLAGS_NONE
= &h00000000
8
9
LIST_FLAGS_CLEARNODES
= &h00000001
10
LIST_FLAGS_LINKFREENODES
= &h00000002
11
LIST_FLAGS_LINKUSEDNODES
= &h00000004
12
13
LIST_FLAGS_CLEAR
=
LIST_FLAGS_CLEARNODES
or
LIST_FLAGS_LINKFREENODES
or
LIST_FLAGS_LINKUSEDNODES
14
LIST_FLAGS_NOCLEAR
=
LIST_FLAGS_LINKFREENODES
or
LIST_FLAGS_LINKUSEDNODES
15
LIST_FLAGS_ALL
= &hFFFFFFFF
16
end enum
17
18
type
TLISTNODE
19
prev
as
TLISTNODE
ptr
20
next
as
TLISTNODE
ptr
21
end type
22
23
type
TLISTTB
24
next
as
TLISTTB
ptr
25
nodetb
as
any
ptr
26
nodes
as integer
27
end type
28
29
type
TLIST
30
tbhead
as
TLISTTB
ptr
31
tbtail
as
TLISTTB
ptr
32
nodes
as integer
33
nodelen
as integer
34
fhead
as
TLISTNODE
ptr
'' free list
35
head
as
any
ptr
'' used list
36
tail
as
any
ptr
'' /
37
flags
as
LIST_FLAGS
38
end type
39
40
declare sub
listInit
_
41
( _
42
byval
list
as
TLIST
ptr
, _
43
byval
nodes
as integer
, _
44
byval
nodelen
as integer
, _
45
byval
flags
as
LIST_FLAGS
=
LIST_FLAGS_ALL
_
46
)
47
48
declare sub
listEnd
(
byval
list
as
TLIST
ptr
)
49
50
declare function
listNewNode
_
51
( _
52
byval
list
as
TLIST
ptr
_
53
)
as
any
ptr
54
55
declare sub
listDelNode
_
56
( _
57
byval
list
as
TLIST
ptr
, _
58
byval
node
as
any
ptr
_
59
)
60
61
declare sub
listAllocTB
_
62
( _
63
byval
list
as
TLIST
ptr
, _
64
byval
nodes
as integer
_
65
)
66
67
declare function
listGetHead
_
68
( _
69
byval
list
as
TLIST
ptr
_
70
)
as
any
ptr
71
72
declare function
listGetTail
_
73
( _
74
byval
list
as
TLIST
ptr
_
75
)
as
any
ptr
76
77
declare function
listGetPrev
_
78
( _
79
byval
node
as
any
ptr
_
80
)
as
any
ptr
81
82
declare function
listGetNext
_
83
( _
84
byval
node
as
any
ptr
_
85
)
as
any
ptr
86
87
declare sub
strlistAppend
(
byval
list
as
TLIST
ptr
,
byref
s
as string
)
88
declare sub
strlistInit
(
byval
list
as
TLIST
ptr
,
byval
nodes
as integer
)
89
90
#endif
'' __LIST_BI__
91
compiler
list.bi
Generated on Thu Jan 23 2014 19:39:34 for FreeBASIC by
1.8.4