12345678910111213141516171819202122232425262728293031323334353637383940 |
- /*
- * Copyright (c) 2011-2012 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:
- *
- * A chained lookup hashtable implementation
- *
- */
- #ifndef _HASHTABLE_H_
- #define _HASHTABLE_H_
- #include "nodes.h"
- typedef Node1 HashNode;
- #include <ctype.h>
- typedef struct {
- size_t size;
- size_t free;
- Node1 **entries;
- } HashTable;
- HashTable *hashtable_new(size_t size);
- void hashtable_del(HashTable **h);
- size_t hashtable_gethash(const char *name);
- char *hashtable_lookup(HashTable *ht, const char *name);
- size_t hashtable_store(HashTable *ht, const char *key, const char *value);
- #endif
|