Updated information about YAZ.
[yaz-moved-to-github.git] / retrieval / d1_doespec.c
index b37607e..6c583da 100644 (file)
@@ -1,10 +1,19 @@
 /*
- * Copyright (c) 1995, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_doespec.c,v $
- * Revision 1.11  1997-11-06 11:36:44  adam
+ * Revision 1.14  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.13  1999/08/27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.12  1999/04/23 13:34:33  adam
+ * Fixed bug in match_triple. Thanks to Franck Falcoz <franck@dtv.dk>.
+ *
+ * Revision 1.11  1997/11/06 11:36:44  adam
  * Implemented variant match on simple elements -data1 tree and Espec-1.
  *
  * Revision 1.10  1997/10/02 12:10:24  quinn
 
 
 #include <assert.h>
-#include <oid.h>
-#include <log.h>
-#include <proto.h>
-#include <data1.h>
+
+#include <yaz/oid.h>
+#include <yaz/log.h>
+#include <yaz/proto.h>
+#include <yaz/data1.h>
 
 static int match_children(data1_handle dh, data1_node *n,
                          Z_Espec1 *e, int i, Z_ETagUnit **t,
@@ -129,7 +139,8 @@ static void match_triple (data1_handle dh, Z_Variant *vreq,
 {
     data1_node **c;
 
-    n = n->child;
+    if (!(n = n->child))
+        return;
     if (n->which != DATA1N_variant)
        return;
     c = &n->child;
@@ -215,7 +226,7 @@ static int match_children_here (data1_handle dh, data1_node *n,
        counter++;
        if (occur && occur->which == Z_Occurrences_last)
        {
-           logf(LOG_WARN, "Can't do occurrences=last (yet)");
+           yaz_log(LOG_WARN, "Can't do occurrences=last (yet)");
            return 0;
        }
        if (!occur || occur->which == Z_Occurrences_all ||