1DELHTITEM(3) MBK HASH TABLE MANAGEMENT FUNCTIONS DELHTITEM(3)
2
3
4
6 delhtitem - removes an item in an hash table
7
9 #include "mut.h"
10 int delhtitem(table, key)
11 ht ∗table;
12 void ∗key;
13
15 table Hash table pointer
16
17 key Key used by the hash coding function indicating the
18 item to be deleted
19
21 delhtitem() removes an item in the hash table pointed to by table.
22
24 If the key doesn't exist, the function returns EMPTYHT, if it does,
25 then its associated value is returned.
26
28 #include "mut.h"
29 checksigname(p, h)
30 lofig_list ∗p;
31 ht ∗h;
32 {
33 int i;
34 char ∗amatla;
35 /∗ check for signal and connector name unicity ∗/
36 for (ptcon = p->LOCON; ptcon; ptcon = ptcon->NEXT)
37 addhtitem(h, ptcon->NAME, 0);
38 for (ptsig = p->LOSIG; ptsig; ptsig = ptsig->NEXT) {
39 if (ptsig->TYPE == INTERNAL) {
40 amatla = getsigname(ptsig);
41 if (!sethtitem(h, amatla, 0)) {
42 printf("N %s;\n", amatla);
43 }
44 }
45 }
46 /∗ keep only internal signal names in the hash table ∗/
47 for (ptcon = p->LOCON; ptcon; ptcon = ptcon->NEXT)
48 (void)delhtitem(h, ptcon->NAME);
49 }
50
52 mbk(1), addth(3), delht(3), addhtitem(3), gethtitem(3), sethtitem(3),
53 viewht(3).
54
55
56
57
58
59
60ASIM/LIP6 October 1, 1997 DELHTITEM(3)