home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / exml.lha / exml / expat / xmlparse / hashtable.h < prev    next >
C/C++ Source or Header  |  1999-04-13  |  1KB  |  52 lines

  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. */
  20.  
  21.  
  22. #include <stddef.h>
  23.  
  24. #ifdef XML_UNICODE
  25. typedef const wchar_t *KEY;
  26. #else
  27. typedef const char *KEY;
  28. #endif
  29.  
  30. typedef struct {
  31.   KEY name;
  32. } NAMED;
  33.  
  34. typedef struct {
  35.   NAMED **v;
  36.   size_t size;
  37.   size_t used;
  38.   size_t usedLim;
  39. } HASH_TABLE;
  40.  
  41. NAMED *lookup(HASH_TABLE *table, KEY name, size_t createSize);
  42. void hashTableInit(HASH_TABLE *);
  43. void hashTableDestroy(HASH_TABLE *);
  44.  
  45. typedef struct {
  46.   NAMED **p;
  47.   NAMED **end;
  48. } HASH_TABLE_ITER;
  49.  
  50. void hashTableIterInit(HASH_TABLE_ITER *, const HASH_TABLE *);
  51. NAMED *hashTableIterNext(HASH_TABLE_ITER *);
  52.