/* -*-c-*-
*
- * $Id: name.c,v 1.7 1998/04/23 13:23:56 mdw Exp $
+ * $Id: name.c,v 1.8 2003/10/12 00:14:55 mdw Exp $
*
* Looking up of names in symbol tables
*
/*----- Revision history --------------------------------------------------*
*
* $Log: name.c,v $
+ * Revision 1.8 2003/10/12 00:14:55 mdw
+ * Major overhaul. Now uses DSA signatures rather than the bogus symmetric
+ * encrypt-and-hope thing. Integrated with mLib and Catacomb.
+ *
* Revision 1.7 1998/04/23 13:23:56 mdw
* Fix bugs involving empty classes.
*
#include <grp.h>
#include <pwd.h>
+/* --- mLib headers --- */
+
+#include <mLib/alloc.h>
+#include <mLib/sym.h>
+
/* --- Local headers --- */
#include "config.h"
#include "class.h"
#include "name.h"
#include "netg.h"
-#include "sym.h"
#include "userdb.h"
-#include "utils.h"
/*----- Static variables --------------------------------------------------*/
{
/* --- Initialise the name table --- */
- sym_createTable(&name__table);
+ sym_create(&name__table);
/* --- Add everyone into the table --- */
sym_iter i;
name *n;
- for (sym_createIter(&i, &name__table); (n = sym_next(&i)) != 0; ) {
+ for (sym_mkiter(&i, &name__table); (n = sym_next(&i)) != 0; ) {
if (n->c)
class_dec(n->c);
}
/* --- Destroy and recreate the table --- */
- sym_destroyTable(&name__table);
+ sym_destroy(&name__table);
}
/* --- @name_find@ --- *
name *n;
trace(TRACE_DEBUG, "name: dumping names");
- for (sym_createIter(&i, &name__table); (n = sym_next(&i)) != 0; ) {
+ for (sym_mkiter(&i, &name__table); (n = sym_next(&i)) != 0; ) {
trace(TRACE_DEBUG, "name: dumping `%s'", n->base.name);
if (!n->c)
trace(TRACE_DEBUG, "name: <empty>");