X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_grs.c;h=1a9d3133be776a7641913b24c72053a6923f010a;hb=a00dfa73d5d3796f8048f2134fec2685b62e2658;hp=a819d210346e013f35355b2fc92b7fa55175840e;hpb=e6a55188366477082cb2446e7065d0f624dabcfb;p=yaz-moved-to-github.git diff --git a/retrieval/d1_grs.c b/retrieval/d1_grs.c index a819d21..1a9d313 100644 --- a/retrieval/d1_grs.c +++ b/retrieval/d1_grs.c @@ -4,7 +4,13 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: d1_grs.c,v $ - * Revision 1.7 1996-10-11 11:57:23 quinn + * Revision 1.9 1997-05-14 06:54:03 adam + * C++ support. + * + * Revision 1.8 1996/12/05 13:17:49 quinn + * Fixed GRS-1 null-ref + * + * Revision 1.7 1996/10/11 11:57:23 quinn * Smallish * * Revision 1.6 1996/07/06 19:58:34 quinn @@ -86,8 +92,8 @@ static Z_Variant *make_variant(data1_node *n, int num, ODR o) assert(p->which == DATA1N_variant); t = v->triples[num] = odr_malloc(o, sizeof(*t)); t->variantSetId = 0; - t->class = odr_malloc(o, sizeof(int)); - *t->class = p->u.variant.type->class->class; + t->zclass = odr_malloc(o, sizeof(int)); + *t->zclass = p->u.variant.type->zclass->zclass; t->type = odr_malloc(o, sizeof(int)); *t->type = p->u.variant.type->type; @@ -143,10 +149,6 @@ static Z_ElementData *nodetoelementdata(data1_node *n, int select, int leaf, ODR o, int *len) { Z_ElementData *res = odr_malloc(o, sizeof(*res)); - data1_node *p; - - for (p = n->parent; p && p->which != DATA1N_tag; p = p->parent) - ; if (!n) { @@ -157,6 +159,10 @@ static Z_ElementData *nodetoelementdata(data1_node *n, int select, int leaf, { char str[512]; int toget; + data1_node *p; + + for (p = n->parent; p && p->which != DATA1N_tag; p = p->parent) + ; switch (n->u.data.what) {