~ubuntu-branches/ubuntu/trusty/lifelines/trusty

« back to all changes in this revision

Viewing changes to src/hdrs/hashtab.h

  • Committer: Bazaar Package Importer
  • Author(s): Felipe Augusto van de Wiel (faw)
  • Date: 2007-05-23 23:49:53 UTC
  • mfrom: (3.1.3 edgy)
  • Revision ID: james.westby@ubuntu.com-20070523234953-ogno9rnbmth61i7p
Tags: 3.0.50-2etch1
* Changing docs/ll-reportmanual.xml and docs/ll-userguide.xml to fix
  documentation build problems (Closes: #418347).

* lifelines-reports
  - Adding a dependency to lifelines >= 3.0.50 to prevent file conflict.
    (Closes: #405500).

* Updating French translation. Thanks to Bernard Adrian. (Closes: #356671).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef hashtab_h_included
 
2
#define hashtab_h_included
 
3
 
 
4
/*
 
5
 A simple hash table whose keys are strings and values are HVALUE (void *)
 
6
 Hash table copies & manages its own copies of keys
 
7
*/
 
8
 
 
9
typedef void * HVALUE;
 
10
typedef struct tag_hashtab *HASHTAB;
 
11
typedef struct tag_hashtab_iter * HASHTAB_ITER;
 
12
 
 
13
typedef void (*DELFUNC)(HVALUE val);
 
14
 
 
15
/* create and destroy hash table */
 
16
HASHTAB create_hashtab(void);
 
17
void destroy_hashtab(HASHTAB tab, DELFUNC func);
 
18
 
 
19
/* add and remove elements */
 
20
HVALUE insert_hashtab(HASHTAB tab, CNSTRING key, HVALUE val);
 
21
HVALUE remove_hashtab(HASHTAB tab, CNSTRING key);
 
22
 
 
23
/* count of elements */
 
24
INT get_hashtab_count(HASHTAB tab);
 
25
 
 
26
/* find elements */
 
27
HVALUE find_hashtab(HASHTAB tab, CNSTRING key, BOOLEAN * present);
 
28
BOOLEAN in_hashtab(HASHTAB tab, CNSTRING key);
 
29
 
 
30
/* iterate */
 
31
HASHTAB_ITER begin_hashtab(HASHTAB tab);
 
32
BOOLEAN next_hashtab(HASHTAB_ITER tabit, CNSTRING *pkey, HVALUE *pval);
 
33
HVALUE change_hashtab(HASHTAB_ITER tabit, HVALUE newval);
 
34
void end_hashtab(HASHTAB_ITER * ptabit);
 
35
 
 
36
 
 
37
#endif /* hashtab_h_included */