Major overhaul. Now uses DSA signatures rather than the bogus symmetric
[become] / src / name.c
index 6599d45..bd49ab9 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-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"
@@ -83,9 +92,7 @@
 #include "class.h"
 #include "name.h"
 #include "netg.h"
-#include "sym.h"
 #include "userdb.h"
-#include "utils.h"
 
 /*----- Static variables --------------------------------------------------*/
 
@@ -349,7 +356,7 @@ void name_init(void)
 {
   /* --- Initialise the name table --- */
 
-  sym_createTable(&name__table);
+  sym_create(&name__table);
 
   /* --- Add everyone into the table --- */
 
@@ -396,7 +403,7 @@ void name_end(void)
     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);
     }
@@ -404,7 +411,7 @@ void name_end(void)
 
   /* --- Destroy and recreate the table --- */
 
-  sym_destroyTable(&name__table);
+  sym_destroy(&name__table);
 }
 
 /* --- @name_find@ --- *
@@ -444,7 +451,7 @@ void name_dump(void)
   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>");