"Fossies" - the Fresh Open Source Software Archive

Member "sitecopy-0.16.6/lib/expat/xmlparse/hashtable.h" (10 Oct 2004, 1465 Bytes) of archive /linux/www/sitecopy-0.16.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "hashtable.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2 expat XML parser
    3 Copyright (C) 1998 James Clark
    4 
    5 This program is free software; you can redistribute it and/or
    6 modify it under the terms of the GNU General Public License
    7 as published by the Free Software Foundation; either version 2
    8 of the License, or (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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   18 */
   19 
   20 
   21 #include <stddef.h>
   22 
   23 #ifdef XML_UNICODE
   24 
   25 #ifdef XML_UNICODE_WCHAR_T
   26 typedef const wchar_t *KEY;
   27 #else /* not XML_UNICODE_WCHAR_T */
   28 typedef const unsigned short *KEY;
   29 #endif /* not XML_UNICODE_WCHAR_T */
   30 
   31 #else /* not XML_UNICODE */
   32 
   33 typedef const char *KEY;
   34 
   35 #endif /* not XML_UNICODE */
   36 
   37 typedef struct {
   38   KEY name;
   39 } NAMED;
   40 
   41 typedef struct {
   42   NAMED **v;
   43   size_t size;
   44   size_t used;
   45   size_t usedLim;
   46 } HASH_TABLE;
   47 
   48 NAMED *lookup(HASH_TABLE *table, KEY name, size_t createSize);
   49 void hashTableInit(HASH_TABLE *);
   50 void hashTableDestroy(HASH_TABLE *);
   51 
   52 typedef struct {
   53   NAMED **p;
   54   NAMED **end;
   55 } HASH_TABLE_ITER;
   56 
   57 void hashTableIterInit(HASH_TABLE_ITER *, const HASH_TABLE *);
   58 NAMED *hashTableIterNext(HASH_TABLE_ITER *);