1 #include "hashmap.ih"
2 
hashmap_keys(register HashMap * map)3 void hashmap_keys(register HashMap *map)
4 {
5     size_t idx;
6 
7     fprintf(stderr, "There are %u active keys\n", (unsigned)map->d_n);
8 
9     for (idx = 0; idx < map->d_size; idx++)
10     {
11         register HashItem *atIdx = map->d_map[idx];
12 
13         switch (asHashmapValue(atIdx))
14         {
15             case FREE:
16             continue;
17 
18             case REMOVED:
19                 fprintf(stderr, "   %3u: <removed>\n", (unsigned)idx);
20             break;
21 
22             case ACTIVE:
23                 fprintf(stderr, "   %3u: `%s'\n", (unsigned)idx, atIdx->d_key);
24             break;
25         }
26     }
27     fputs("[completed]\n", stderr);
28 }
29