/* associative.h:
 *
 ****************************************************************
 * Copyright (C) 2003 Tom Lord
 *
 * See the file "COPYING" for further information about
 * the copyright and warranty status of this work.
 */

#ifndef INCLUDE__FILE_UTILS__ASSOCIATIVE_H
#define INCLUDE__FILE_UTILS__ASSOCIATIVE_H


#include "hackerlab/machine/types.h"
#include "libawk/relational.h"



/* definitions for string->pointer hash tables */
extern struct hashtree_rules pointer_map_rules;

typedef struct pointer_map_incomplete_type * pointer_map;

extern void pointer_map_insert (pointer_map * vtable, t_uchar const * key, void * value, void (*free_callback) (void *));
extern void * pointer_map_find (pointer_map vtable, t_uchar const * key);
extern void pointer_map_remove (pointer_map vtable, t_uchar const * key, void (*free_callback) (void *));
extern void pointer_map_free (pointer_map table, void (*callback) (void *));
//extern rel_table assoc_intersection(pointer_map left, pointer_map right);

typedef struct assoc_table_incomplete_type * assoc_table;


/* automatically generated __STDC__ prototypes */
extern void assoc_set (assoc_table * vtable, t_uchar const * key, t_uchar const * value);
extern t_uchar * assoc_ref (assoc_table vtable, t_uchar const * key);
extern void assoc_del (assoc_table vtable, t_uchar * key);
extern void free_assoc_table (assoc_table table);
extern rel_table assoc_intersection(assoc_table left, assoc_table right);



#endif  /* INCLUDE__FILE_UTILS__ASSOCIATIVE_H */


/* tag: Tom Lord Sat Jan  5 15:26:10 2002 (associative.h)
 */


syntax highlighted by Code2HTML, v. 0.9.1