Bug fix for key_match
authormdw <mdw>
Tue, 27 Sep 2005 15:50:40 +0000 (15:50 +0000)
committermdw <mdw>
Tue, 27 Sep 2005 15:50:40 +0000 (15:50 +0000)
key-flags.c

index 605eb06..36148a4 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
 /* -*-c-*-
  *
- * $Id: key-flags.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
+ * $Id$
  *
  * Reading and writing key flag strings
  *
  *
  * Reading and writing key flag strings
  *
@@ -185,16 +185,17 @@ void key_writeflags(unsigned f, dstr *d)
 
 int key_match(key_data *k, const key_filter *kf)
 {
 
 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);
 
 
   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);
       return (1);
   }
   return (0);