X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=ab6f759344c07bd0fb8846ac70a674598cca121a;hb=3bfe867a001cb4e4f88d47541f77a21027719bd5;hp=5369d52e34282e8519bed74a1b0fd17adc5a0bf2;hpb=401da56d4a26f687cd42024bdef6f29a29bb7663;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 5369d52..ab6f759 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.329 2007-03-19 14:40:06 adam Exp $ + * $Id: client.c,v 1.331 2007-03-28 16:35:47 mike Exp $ */ /** \file client.c * \brief yaz-client program @@ -158,7 +158,7 @@ typedef enum { static QueryType queryType = QueryType_Prefix; static CCL_bibset bibset; /* CCL bibset handle */ -static cql_transform_t cqltrans; /* CQL context-set handle */ +static cql_transform_t cqltrans = 0; /* CQL context-set handle */ #if HAVE_READLINE_COMPLETION_OVER @@ -1017,7 +1017,7 @@ static void display_record(Z_External *r) } w = wrbuf_alloc(); yaz_display_grs1(w, r->u.grs1, 0); - puts (wrbuf_buf(w)); + puts (wrbuf_cstr(w)); wrbuf_destroy(w); } else if (ent && ent->value == VAL_OPAC) @@ -1307,10 +1307,7 @@ static char *encode_SRW_term(ODR o, const char *q) } wrbuf_iconv_write(w, cd, q, strlen(q)); if (wrbuf_len(w)) - { - int len = wrbuf_len(w); - res = odr_strdupn(o, wrbuf_buf(w), len); - } + res = odr_strdup(o, wrbuf_cstr(w)); else res = odr_strdup(o, q); yaz_iconv_close(cd);