FireBirdLib - Topfield TMS PVR TAP Programming Library
EPGInfo_CountEvents.c
Go to the documentation of this file.
1
#include "
FBLib_EPG.h
"
2
3
dword
EPGInfo_CountEvents
(dword *TreePointer)
4
{
5
TRACEENTER
();
6
7
dword i;
8
tTreeEntry
*ListStart, *Entry;
9
10
i = 0;
11
12
if
(TreePointer)
13
{
14
ListStart = (
tTreeEntry
*)*TreePointer;
15
16
//If the list points to itself, no data is available
17
if
(ListStart == (
tTreeEntry
*)ListStart->
Next
)
18
{
19
TRACEEXIT
();
20
21
return
0;
22
}
23
24
//Loop until we're back at the beginning of the pool
25
Entry = ListStart;
26
do
27
{
28
i++;
29
Entry = (
tTreeEntry
*)Entry->
Next
;
30
}
while
(Entry && (Entry->
Next
!= ListStart->
Prev
));
31
}
32
33
TRACEEXIT
();
34
return
i;
35
}
EPGInfo_CountEvents
dword EPGInfo_CountEvents(dword *TreePointer)
Definition:
EPGInfo_CountEvents.c:3
FBLib_EPG.h
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
tTreeEntry
Definition:
FBLib_EPG.h:35
tTreeEntry::Next
dword * Next
Definition:
FBLib_EPG.h:36
tTreeEntry::Prev
dword * Prev
Definition:
FBLib_EPG.h:37
EPG
EPGInfo_CountEvents.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3