ghash.h: Fix GH_HASHSTR64*.
[u/mdw/catacomb] / key-flags.c
index 605eb06..bf5b70f 100644 (file)
@@ -1,13 +1,13 @@
 /* -*-c-*-
  *
- * $Id: key-flags.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
+ * $Id$
  *
  * Reading and writing key flag strings
  *
  * (c) 1999 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Catacomb.
  *
  * it under the terms of the GNU Library General Public License as
  * published by the Free Software Foundation; either version 2 of the
  * License, or (at your option) any later version.
- * 
+ *
  * Catacomb is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Library General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Library General Public
  * License along with Catacomb; if not, write to the Free
  * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
@@ -185,16 +185,17 @@ void key_writeflags(unsigned f, dstr *d)
 
 int key_match(key_data *k, const key_filter *kf)
 {
-  sym_iter i;
-  key_struct *ks;
+  key_subkeyiter i;
+  const char *tag;
+  key_data *kd;
 
   if (!kf)
     return (1);
   if ((k->e & KF_ENCMASK) != KENC_STRUCT)
     return ((k->e & kf->m) == kf->f);
 
-  for (sym_mkiter(&i, &k->u.s); (ks = sym_next(&i)) != 0; ) {
-    if (key_match(&ks->k, kf))
+  for (key_mksubkeyiter(&i, k); key_nextsubkey(&i, &tag, &kd); ) {
+    if (key_match(kd, kf))
       return (1);
   }
   return (0);