/usr/include/ClearSilver/util/neo_hash.h is in clearsilver-dev 0.10.5-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | /*
* Copyright 2001-2004 Brandon Long
* All Rights Reserved.
*
* ClearSilver Templating System
*
* This code is made available under the terms of the ClearSilver License.
* http://www.clearsilver.net/license.hdf
*
*/
#ifndef __NEO_HASH_H_
#define __NEO_HASH_H_ 1
__BEGIN_DECLS
#include <stdlib.h>
#include "util/neo_misc.h"
typedef UINT32 (*NE_HASH_FUNC)(const void *);
typedef int (*NE_COMP_FUNC)(const void *, const void *);
typedef struct _NE_HASHNODE
{
void *key;
void *value;
UINT32 hashv;
struct _NE_HASHNODE *next;
} NE_HASHNODE;
typedef struct _HASH
{
UINT32 size;
UINT32 num;
NE_HASHNODE **nodes;
NE_HASH_FUNC hash_func;
NE_COMP_FUNC comp_func;
} NE_HASH;
NEOERR *ne_hash_init (NE_HASH **hash, NE_HASH_FUNC hash_func, NE_COMP_FUNC comp_func);
void ne_hash_destroy (NE_HASH **hash);
NEOERR *ne_hash_insert(NE_HASH *hash, void *key, void *value);
void *ne_hash_lookup(NE_HASH *hash, void *key);
int ne_hash_has_key(NE_HASH *hash, void *key);
void *ne_hash_remove(NE_HASH *hash, void *key);
void *ne_hash_next(NE_HASH *hash, void **key);
int ne_hash_str_comp(const void *a, const void *b);
UINT32 ne_hash_str_hash(const void *a);
int ne_hash_int_comp(const void *a, const void *b);
UINT32 ne_hash_int_hash(const void *a);
__END_DECLS
#endif /* __NEO_HASH_H_ */
|