/usr/share/doc/libbdd-dev/examples/hashtbl.h is in libbdd-dev 2.4-11.
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 | /*************************************************************************
$Header: /cvsroot/buddy/buddy/examples/bddcalc/hashtbl.h,v 1.1.1.1 2004/06/25 13:21:41 haimcohen Exp $
FILE: hashtbl.h
DESCR: Compiler hashtable
AUTH: Jorn Lind
DATE: (C) september 1998
*************************************************************************/
#ifndef _HASHTBL_H
#define _HASHTBL_H
#include <string.h>
class hashData
{
public:
hashData(void) { id=NULL; type=0; def=NULL; }
hashData(const char *s, int t, void *d) : id(s) { type=t; def=d; }
const char *id;
int type;
void *def;
};
class hashElement
{
public:
hashData data;
int first;
int next;
};
class hashTable
{
public:
hashTable(void);
~hashTable(void);
void add(hashData &);
int exists(const char *);
int lookup(const char *, hashData &) const;
int remove(const char *);
void clear(void);
private:
void reallocate_table(void);
unsigned int hashval(const char *) const;
hashElement *table;
int size, freepos;
};
#endif /* _HASHTBL_H */
/* EOF */
|