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