X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=7dd97d9053b49f285841b78506eaac9f27223b77;hb=dd472005b2c12e54a0436d22e56970f48bc32704;hp=d3c91d6276e4a597c9cfd1c56d932201248aeb0c;hpb=ee8cea4c1d359ba7e46b69a418619b7f3b358c84;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index d3c91d6..7dd97d9 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.232 2004-02-19 23:37:36 adam Exp $ + * $Id: client.c,v 1.236 2004-03-17 10:59:41 adam Exp $ */ #include @@ -97,7 +97,7 @@ static char *negotiationCharset = 0; static char *outputCharset = 0; static char *marcCharset = 0; static char* yazLang = 0; -static char* http_version = "1.0"; +static char* http_version = "1.1"; static char last_cmd[32] = "?"; static FILE *marc_file = 0; @@ -308,15 +308,15 @@ static void send_initRequest(const char* type_and_host) yaz_oi_APDU(apdu, &p); if ((p0=yaz_oi_update(p, out, NULL, 0, 0))) { - ODR_MASK_SET(req->options, Z_Options_negotiationModel); - - p0->which = Z_OtherInfo_externallyDefinedInfo; - p0->information.externallyDefinedInfo = - yaz_set_proposal_charneg( - out, - (const char**)&negotiationCharset, - negotiationCharset ? 1 : 0, - (const char**)&yazLang, yazLang ? 1 : 0, 1); + ODR_MASK_SET(req->options, Z_Options_negotiationModel); + + p0->which = Z_OtherInfo_externallyDefinedInfo; + p0->information.externallyDefinedInfo = + yaz_set_proposal_charneg( + out, + (const char**)&negotiationCharset, + negotiationCharset ? 1 : 0, + (const char**)&yazLang, yazLang ? 1 : 0, 1); } } @@ -916,6 +916,8 @@ static void display_record(Z_External *r) printf ("shelvingLocation: %s\n", data->shelvingLocation); if (data->callNumber) printf ("callNumber: %s\n", data->callNumber); + if (data->shelvingData) + printf ("shelvingData: %s\n", data->shelvingData); if (data->copyNumber) printf ("copyNumber: %s\n", data->copyNumber); if (data->publicNote) @@ -1215,6 +1217,8 @@ static int send_SRW_searchRequest(const char *arg) if (record_schema) sr->u.request->recordSchema = record_schema; + if (recordsyntax == VAL_TEXT_XML) + sr->u.explain_request->recordPacking = "xml"; return send_srw(sr); } #endif @@ -2153,6 +2157,8 @@ static int cmd_explain(const char *arg) /* save this for later .. when fetching individual records */ sr = yaz_srw_get(out, Z_SRW_explain_request); + if (recordsyntax == VAL_TEXT_XML) + sr->u.explain_request->recordPacking = "xml"; send_srw(sr); return 2; } @@ -2389,6 +2395,8 @@ static int send_SRW_presentRequest(const char *arg) sr->u.request->maximumRecords = odr_intdup(out, nos); if (record_schema) sr->u.request->recordSchema = record_schema; + if (recordsyntax == VAL_TEXT_XML) + sr->u.request->recordPacking = "xml"; return send_srw(sr); } #endif