| 1 |
/** |
| 2 |
* This file is part of the Detox package. |
| 3 |
* |
| 4 |
* Copyright (c) Doug Harple <[email protected]> |
| 5 |
* |
| 6 |
* For the full copyright and license information, please view the LICENSE |
| 7 |
* file that was distributed with this source code. |
| 8 |
*/ |
| 9 |
|
| 10 |
#ifndef __TABLE_H |
| 11 |
#define __TABLE_H |
| 12 |
|
| 13 |
#include "detox_struct.h" |
| 14 |
|
| 15 |
#define table_reset(t) t->hits = t->misses = t->seeks = 0; |
| 16 |
|
| 17 |
extern table_t *table_init(int max_rows); |
| 18 |
extern table_t *table_resize(table_t *table, int rows, int use_hash); |
| 19 |
extern void table_free(table_t *table); |
| 20 |
extern int table_put(table_t *table, unsigned int key, char *data); |
| 21 |
extern char *table_get(table_t *table, unsigned int key); |
| 22 |
|
| 23 |
#endif /* __TABLE_H */ |