3 * (c) Copyright 1988 by the Massachusetts Institute of Technology.
4 * For copying and distribution information, please see the file
8 #include <mit-copyright.h>
14 empty_list_check(id, l, hint)
18 if (l->members == 0 && l->list_id != 0)
19 printf("Warning: List %s is empty\n", l->name);
23 /* Used by other parts of the program to check that a string_id is good.
24 * This returns TRUE if it is, or FALSE if it is not, and as a side effect
25 * increments the string reference count.
31 register struct string *s;
33 s = (struct string *) hash_lookup(strings, id);
41 unref_string_check(id, s, hint)
46 printf("Unreferenced string %s id %d\n", s->name, id);
47 if (single_fix("Delete", 1))
48 single_delete("strings", "string_id", id);
53 noclu_mach_check(id, m, hint)
58 printf("Warning: machine %s is not in any clusters\n", m->name);
64 printf("Phase 3 - Finding unused objects\n");
66 dprintf("Checking machines...\n");
67 hash_step(machines, noclu_mach_check, NULL);
69 dprintf("Checking lists...\n");
70 hash_step(lists, empty_list_check, NULL);
72 dprintf("Checking strings...\n");
73 hash_step(strings, unref_string_check, NULL);