TORCS
1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
hashtable.h
Go to the documentation of this file.
1
/*
2
The contents of this file are subject to the Mozilla Public License
3
Version 1.0 (the "License"); you may not use this file except in
4
compliance with the License. You may obtain a copy of the License at
5
http://www.mozilla.org/MPL/
6
7
Software distributed under the License is distributed on an "AS IS"
8
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
9
License for the specific language governing rights and limitations
10
under the License.
11
12
The Original Code is expat.
13
14
The Initial Developer of the Original Code is James Clark.
15
Portions created by James Clark are Copyright (C) 1998
16
James Clark. All Rights Reserved.
17
18
Contributor(s):
19
$Id$
20
*/
21
22
23
#include <stddef.h>
24
25
#ifdef XML_UNICODE
26
typedef
const
wchar_t
*
KEY
;
27
#else
28
typedef
const
char
*
KEY
;
29
#endif
30
31
typedef
struct
{
32
KEY
name
;
33
}
NAMED
;
34
35
typedef
struct
{
36
NAMED
**
v
;
37
size_t
size
;
38
size_t
used
;
39
size_t
usedLim
;
40
}
HASH_TABLE
;
41
42
NAMED
*
lookup
(
HASH_TABLE
*table,
KEY
name,
size_t
createSize);
43
void
hashTableInit
(
HASH_TABLE
*);
44
void
hashTableDestroy
(
HASH_TABLE
*);
45
46
typedef
struct
{
47
NAMED
**
p
;
48
NAMED
**
end
;
49
}
HASH_TABLE_ITER
;
50
51
void
hashTableIterInit
(
HASH_TABLE_ITER
*,
const
HASH_TABLE
*);
52
NAMED
*
hashTableIterNext
(
HASH_TABLE_ITER
*);
hashTableIterInit
void hashTableIterInit(HASH_TABLE_ITER *, const HASH_TABLE *)
hashTableIterNext
NAMED * hashTableIterNext(HASH_TABLE_ITER *)
hashTableInit
void hashTableInit(HASH_TABLE *)
lookup
NAMED * lookup(HASH_TABLE *table, KEY name, size_t createSize)
KEY
const char * KEY
Definition
hashtable.h:28
hashTableDestroy
void hashTableDestroy(HASH_TABLE *)
HASH_TABLE_ITER
Definition
hashtable.h:46
HASH_TABLE_ITER::p
NAMED ** p
Definition
hashtable.h:47
HASH_TABLE_ITER::end
NAMED ** end
Definition
hashtable.h:48
HASH_TABLE
Definition
hashtable.h:35
HASH_TABLE::v
NAMED ** v
Definition
hashtable.h:36
HASH_TABLE::used
size_t used
Definition
hashtable.h:38
HASH_TABLE::usedLim
size_t usedLim
Definition
hashtable.h:39
HASH_TABLE::size
size_t size
Definition
hashtable.h:37
NAMED
Definition
hashtable.h:31
NAMED::name
KEY name
Definition
hashtable.h:32
C:
Users
berni
Development
torcs_git
torcs-code
torcs
torcs
src
libs
txml
hashtable.h
Generated by
1.14.0