X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_doespec.c;h=6c583daf811f34359cd8fb94f79a28f2dfe9d653;hb=3ee667935c4cac82445ecd05c8ae421888dfd40f;hp=b37607e2777bf2e1c0105e4687e19aa4dfd9f504;hpb=9989790d80d5953f51e088712cb1b9113303b694;p=yaz-moved-to-github.git diff --git a/retrieval/d1_doespec.c b/retrieval/d1_doespec.c index b37607e..6c583da 100644 --- a/retrieval/d1_doespec.c +++ b/retrieval/d1_doespec.c @@ -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 . + * + * 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 @@ -42,10 +51,11 @@ #include -#include -#include -#include -#include + +#include +#include +#include +#include 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 ||