-static int match_children_here(data1_node *n, Z_Espec1 *e, int i,
- Z_ETagUnit **t, int num)
+
+static void match_triple (data1_handle dh, Z_Variant *vreq,
+ oid_value defsetval,
+ oid_value var1, data1_node *n)
+{
+ data1_node **c;
+
+ if (!(n = n->child))
+ return;
+ if (n->which != DATA1N_variant)
+ return;
+ c = &n->child;
+ while (*c)
+ {
+ int remove_flag = 0;
+ Z_Triple *r;
+
+ assert ((*c)->which == DATA1N_variant);
+
+ if ((*c)->u.variant.type->zclass->zclass == 4 &&
+ (*c)->u.variant.type->type == 1)
+ {
+ if ((r = find_triple(vreq, defsetval, var1, 4, 1)) &&
+ (r->which == Z_Triple_internationalString))
+ {
+ const char *string_value =
+ r->value.internationalString;
+ if (strcmp ((*c)->u.variant.value, string_value))
+ remove_flag = 1;
+ }
+ }
+ if (remove_flag)
+ {
+ data1_free_tree (dh, *c);
+ *c = (*c)->next;
+ }
+ else
+ {
+ match_triple (dh, vreq, defsetval, var1, *c);
+ c = &(*c)->next;
+ }
+ }
+}
+
+static int match_children_here (data1_handle dh, data1_node *n,
+ Z_Espec1 *e, int i,
+ Z_ETagUnit **t, int num)