X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsrwutil.c;h=340ada405245d8f19e54c5cfeed535536722922d;hb=b57542eb8dfd435b7c5f2c02e4b0d9a1a8431521;hp=a04516a109d001a8c2df8a5ed561326888f9388b;hpb=d78eafbc5889e1f4602116cf6627b1f0dc1da100;p=yaz-moved-to-github.git diff --git a/src/srwutil.c b/src/srwutil.c index a04516a..340ada4 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -46,7 +46,7 @@ Z_AttributeList *yaz_use_attribute_create(ODR o, const char *name) Z_AttributeElement ** elements; attributes->num_attributes = 1; elements = (Z_AttributeElement**) - odr_malloc (o, attributes->num_attributes * sizeof(*elements)); + odr_malloc(o, attributes->num_attributes * sizeof(*elements)); elements[0] = (Z_AttributeElement*) odr_malloc(o,sizeof(**elements)); elements[0]->attributeType = odr_intdup(o, 1); elements[0]->attributeSet = odr_nullval(); @@ -177,9 +177,9 @@ void yaz_add_srw_diagnostic_uri(ODR o, Z_SRW_diagnostic **d, const char *message, const char *details) { Z_SRW_diagnostic *d_new; - d_new = (Z_SRW_diagnostic *) odr_malloc (o, (*num + 1)* sizeof(**d)); + d_new = (Z_SRW_diagnostic *) odr_malloc(o, (*num + 1)* sizeof(**d)); if (*num) - memcpy (d_new, *d, *num *sizeof(**d)); + memcpy(d_new, *d, *num *sizeof(**d)); *d = d_new; yaz_mk_srw_diagnostic(o, *d + *num, uri, message, details); @@ -767,6 +767,7 @@ Z_SRW_PDU *yaz_srw_get_pdu(ODR o, int which, const char *version) sr->u.response->nextRecordPosition = 0; sr->u.response->extra_records = 0; sr->u.response->facetList = 0; + sr->u.response->suggestions = 0; break; case Z_SRW_explain_request: sr->u.explain_request = (Z_SRW_explainRequest *) @@ -841,14 +842,13 @@ Z_SRW_PDU *yaz_srw_get_pdu(ODR o, int which, const char *version) static int bib1_srw_map[] = { 1, 1, 2, 2, - 3, 11, + 3, 48, 4, 35, 5, 12, 6, 38, 7, 30, 8, 32, 9, 29, - 108, 10, /* Malformed query : Syntax error */ 10, 10, 11, 12, 11, 23, @@ -886,6 +886,7 @@ static int bib1_srw_map[] = { 105, 3, 106, 66, 107, 11, + 108, 10, 108, 13, 108, 14, 108, 25, @@ -1013,6 +1014,7 @@ static int bib1_srw_map[] = { * the best back-translation of that SRW error. */ static int srw_bib1_map[] = { + 10, 108, 66, 238, /* No doubt there are many more */ 0