1ADDHTITEM(3) MBK HASH TABLE MANAGEMENT FUNCTIONS ADDHTITEM(3)
2
3
4
6 addhtitem - adds a new item in a hash table.
7
9 #include "mut.h"
10 void addhtitem(table, key, value)
11 ht ∗table;
12 void ∗key;
13 int value;
14
16 table Hash table pointer
17
18 key Key used by the hash coding function to add the
19 item
20
21 value Value associated with the key
22
24 addhtitem() adds a new item in the hash table pointed to by table. If
25 the key already exists, the old value is changed to the new one. Value
26 must be distinct from EMPTYHT and DELETEHT. The length of the table
27 increases automatically when the length given in addht() leads to a
28 performance shut down.
29
31 #include "mut.h"
32 #include "mlo.h"
33 void conHenter(h, ptfig)
34 ht ∗h;
35 lofig_list ∗ptfig;
36 {
37 locon_list ∗ptcon;
38 /∗ since connector names are unique, add them without check ∗/
39 for (ptcon = p->LOCON; ptcon; ptcon = ptcon->NEXT)
40 addhtitem(h, ptcon->NAME, 0);
41 }
42
44 "∗∗∗ mbk error ∗∗∗ addhtitem impossible : value is EMPTYHT or DELETEHT"
45 The values EMPTYHT, -1, and DELETEHT, -2, are reserved for
46 internal use, sorry.
47
49 The value must be distinct from -1 and -2.
50
52 mbk(1), addht(3), delht(3), gethtitem(3), sethtitem(3), delhtitem(3),
53 viewht(3).
54
55
56
57
58
59
60ASIM/LIP6 October 1, 1997 ADDHTITEM(3)