X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=client%2Fclient.c;h=c158b00acb45c749c94b037c0bda9274679e5b25;hp=f258f7611eaf78c067b37bbb46df3b2597922d24;hb=a92ea4f2be422ed5f52f0fc1c8b6416aebfe0c5a;hpb=b0af12e407d33fc35d41152e67c568f762e3b41f diff --git a/client/client.c b/client/client.c index f258f76..c158b00 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.347 2007-07-04 09:21:00 adam Exp $ + * $Id: client.c,v 1.350 2007-08-21 13:19:44 adam Exp $ */ /** \file client.c * \brief yaz-client program @@ -171,9 +171,6 @@ static cql_transform_t cqltrans = 0; /* CQL context-set handle */ int rl_attempted_completion_over = 0; #endif -/* set this one to 1, to avoid decode of unknown MARCs */ -#define AVOID_MARC_DECODE 1 - #define maxOtherInfosSupported 10 struct eoi { Odr_oid oid[OID_SIZE]; @@ -1918,6 +1915,20 @@ void process_ESResponse(Z_ExtendedServicesResponse *res) } } } + if (ext->which == Z_External_itemOrder) + { + Z_IOTaskPackage *otp = ext->u.itemOrder->u.taskPackage; + if (otp && otp->targetPart && otp->targetPart->itemRequest) + { + Z_External *ext = otp->targetPart->itemRequest; + if (ext->which == Z_External_octet) + { + Odr_oct *doc = ext->u.octet_aligned; + printf("Got itemRequest doc %.*s\n", + doc->len, doc->buf); + } + } + } } if (res->taskPackage && res->taskPackage->which == Z_External_octet) { @@ -3021,13 +3032,13 @@ void display_term(Z_TermInfo *t) if (t->displayTerm) printf("%s", t->displayTerm); else if (t->term->which == Z_Term_general) - { printf("%.*s", t->term->u.general->len, t->term->u.general->buf); - sprintf(last_scan_line, "%.*s", t->term->u.general->len, - t->term->u.general->buf); - } else printf("Term (not general)"); + if (t->term->which == Z_Term_general) + sprintf(last_scan_line, "%.*s", t->term->u.general->len, + t->term->u.general->buf); + if (t->globalOccurrences) printf (" (%d)\n", *t->globalOccurrences); else