fixed RtlCompareUnicodeString and RtlCompareString (said stuff were equal when it...
[reactos.git] / reactos / lib / rtl / generictable.c
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2003 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19 /* $Id$
20 *
21 * COPYRIGHT: See COPYING in the top level directory
22 * PROJECT: ReactOS system libraries
23 * PURPOSE: Generic Table Implementation
24 * FILE: lib/rtl/genertictbl.c
25 */
26
27 #include <rtl.h>
28
29 #define NDEBUG
30 #include <debug.h>
31
32 /* FUNCTIONS *****************************************************************/
33
34 /*
35 * @unimplemented
36 */
37 BOOLEAN
38 STDCALL
39 RtlDeleteElementGenericTable (
40 PRTL_GENERIC_TABLE Table,
41 PVOID Buffer
42 )
43 {
44 UNIMPLEMENTED;
45 return FALSE;
46 }
47
48 /*
49 * @unimplemented
50 */
51 BOOLEAN
52 STDCALL
53 RtlDeleteElementGenericTableAvl (
54 PRTL_AVL_TABLE Table,
55 PVOID Buffer
56 )
57 {
58 UNIMPLEMENTED;
59 return FALSE;
60 }
61
62 /*
63 * @unimplemented
64 */
65 PVOID
66 STDCALL
67 RtlEnumerateGenericTable (
68 PRTL_GENERIC_TABLE Table,
69 BOOLEAN Restart
70 )
71 {
72 UNIMPLEMENTED;
73 return 0;
74 }
75
76 /*
77 * @unimplemented
78 */
79 PVOID
80 STDCALL
81 RtlEnumerateGenericTableAvl (
82 PRTL_AVL_TABLE Table,
83 BOOLEAN Restart
84 )
85 {
86 UNIMPLEMENTED;
87 return 0;
88 }
89
90 /*
91 * @unimplemented
92 */
93 PVOID
94 STDCALL
95 RtlEnumerateGenericTableLikeADirectory (
96 IN PRTL_AVL_TABLE Table,
97 IN PRTL_AVL_MATCH_FUNCTION MatchFunction,
98 IN PVOID MatchData,
99 IN ULONG NextFlag,
100 IN OUT PVOID *RestartKey,
101 IN OUT PULONG DeleteCount,
102 IN OUT PVOID Buffer
103 )
104 {
105 UNIMPLEMENTED;
106 return 0;
107 }
108
109 /*
110 * @unimplemented
111 */
112 PVOID
113 STDCALL
114 RtlEnumerateGenericTableWithoutSplaying (
115 PRTL_GENERIC_TABLE Table,
116 PVOID *RestartKey
117 )
118 {
119 UNIMPLEMENTED;
120 return 0;
121 }
122
123 /*
124 * @unimplemented
125 */
126 PVOID
127 STDCALL
128 RtlEnumerateGenericTableWithoutSplayingAvl (
129 PRTL_AVL_TABLE Table,
130 PVOID *RestartKey
131 )
132 {
133 UNIMPLEMENTED;
134 return 0;
135 }
136
137 /*
138 * @unimplemented
139 */
140 PVOID
141 STDCALL
142 RtlGetElementGenericTable(
143 PRTL_GENERIC_TABLE Table,
144 ULONG I
145 )
146 {
147 UNIMPLEMENTED;
148 return 0;
149 }
150
151 /*
152 * @unimplemented
153 */
154 PVOID
155 STDCALL
156 RtlGetElementGenericTableAvl (
157 PRTL_AVL_TABLE Table,
158 ULONG I
159 )
160 {
161 UNIMPLEMENTED;
162 return 0;
163 }
164
165 /*
166 * @unimplemented
167 */
168 VOID
169 STDCALL
170 RtlInitializeGenericTable (
171 PRTL_GENERIC_TABLE Table,
172 PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine,
173 PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine,
174 PRTL_GENERIC_FREE_ROUTINE FreeRoutine,
175 PVOID TableContext
176 )
177 {
178 UNIMPLEMENTED;
179 }
180
181
182 /*
183 * @implemented
184 */
185 VOID STDCALL
186 RtlInitializeGenericTableAvl(IN OUT PRTL_AVL_TABLE Table,
187 IN PRTL_AVL_COMPARE_ROUTINE CompareRoutine,
188 IN PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine,
189 IN PRTL_AVL_FREE_ROUTINE FreeRoutine,
190 IN PVOID TableContext)
191 {
192 RtlZeroMemory(Table,
193 sizeof(RTL_AVL_TABLE));
194 Table->BalancedRoot.Parent = &Table->BalancedRoot;
195
196 Table->CompareRoutine = CompareRoutine;
197 Table->AllocateRoutine = AllocateRoutine;
198 Table->FreeRoutine = FreeRoutine;
199 Table->TableContext = TableContext;
200 }
201
202
203 /*
204 * @unimplemented
205 */
206 PVOID
207 STDCALL
208 RtlInsertElementGenericTable (
209 PRTL_GENERIC_TABLE Table,
210 PVOID Buffer,
211 ULONG BufferSize,
212 PBOOLEAN NewElement OPTIONAL
213 )
214 {
215 UNIMPLEMENTED;
216 return 0;
217 }
218
219 /*
220 * @unimplemented
221 */
222 PVOID
223 STDCALL
224 RtlInsertElementGenericTableAvl (
225 PRTL_AVL_TABLE Table,
226 PVOID Buffer,
227 ULONG BufferSize,
228 PBOOLEAN NewElement OPTIONAL
229 )
230 {
231 UNIMPLEMENTED;
232 return 0;
233 }
234
235 /*
236 * @unimplemented
237 */
238 PVOID
239 STDCALL
240 RtlInsertElementGenericTableFull (
241 PRTL_GENERIC_TABLE Table,
242 PVOID Buffer,
243 ULONG BufferSize,
244 PBOOLEAN NewElement OPTIONAL,
245 PVOID NodeOrParent,
246 TABLE_SEARCH_RESULT SearchResult
247 )
248 {
249 UNIMPLEMENTED;
250 return 0;
251 }
252
253 /*
254 * @unimplemented
255 */
256 PVOID
257 STDCALL
258 RtlInsertElementGenericTableFullAvl (
259 PRTL_AVL_TABLE Table,
260 PVOID Buffer,
261 ULONG BufferSize,
262 PBOOLEAN NewElement OPTIONAL,
263 PVOID NodeOrParent,
264 TABLE_SEARCH_RESULT SearchResult
265 )
266 {
267 UNIMPLEMENTED;
268 return 0;
269 }
270
271
272 /*
273 * @unimplemented
274 */
275 BOOLEAN
276 STDCALL
277 RtlIsGenericTableEmpty (
278 PRTL_GENERIC_TABLE Table
279 )
280 {
281 UNIMPLEMENTED;
282 return FALSE;
283 }
284
285 /*
286 * @unimplemented
287 */
288 BOOLEAN
289 STDCALL
290 RtlIsGenericTableEmptyAvl (
291 PRTL_AVL_TABLE Table
292 )
293 {
294 UNIMPLEMENTED;
295 return FALSE;
296 }
297
298
299 /*
300 * @unimplemented
301 */
302 PVOID
303 STDCALL
304 RtlLookupElementGenericTable (
305 PRTL_GENERIC_TABLE Table,
306 PVOID Buffer
307 )
308 {
309 UNIMPLEMENTED;
310 return 0;
311 }
312
313 /*
314 * @unimplemented
315 */
316 PVOID
317 STDCALL
318 RtlLookupElementGenericTableAvl (
319 PRTL_AVL_TABLE Table,
320 PVOID Buffer
321 )
322 {
323 UNIMPLEMENTED;
324 return 0;
325 }
326
327 /*
328 * @unimplemented
329 */
330 PVOID
331 STDCALL
332 RtlLookupElementGenericTableFull (
333 PRTL_GENERIC_TABLE Table,
334 PVOID Buffer,
335 OUT PVOID *NodeOrParent,
336 OUT TABLE_SEARCH_RESULT *SearchResult
337 )
338 {
339 UNIMPLEMENTED;
340 return 0;
341 }
342
343 /*
344 * @unimplemented
345 */
346 PVOID
347 STDCALL
348 RtlLookupElementGenericTableFullAvl (
349 PRTL_AVL_TABLE Table,
350 PVOID Buffer,
351 OUT PVOID *NodeOrParent,
352 OUT TABLE_SEARCH_RESULT *SearchResult
353 )
354 {
355 UNIMPLEMENTED;
356 return 0;
357 }
358
359
360 /*
361 * @implemented
362 */
363 ULONG STDCALL
364 RtlNumberGenericTableElements(IN PRTL_GENERIC_TABLE Table)
365 {
366 return Table->NumberGenericTableElements;
367 }
368
369
370 /*
371 * @implemented
372 */
373 ULONG STDCALL
374 RtlNumberGenericTableElementsAvl(IN PRTL_AVL_TABLE Table)
375 {
376 return Table->NumberGenericTableElements;
377 }
378
379 /* EOF */