X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=4f8ccae275389c531ddeba82d79900a953cf7f0c;hb=78f8391d48d53549d01c002629deb00c7cf388cf;hp=2888d17cb25e8b955159d683d7a18ee888508f6e;hpb=c2641d280328e9bc114ca8c7b4585842c0acb05c;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 2888d17..4f8ccae 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.315 2006-09-22 14:09:25 adam Exp $ + * $Id: client.c,v 1.317 2006-10-04 07:26:00 adam Exp $ */ /** \file client.c * \brief yaz-client program @@ -180,7 +180,7 @@ int cmd_register_tab(const char* arg); static void close_session (void); -ODR getODROutputStream() +ODR getODROutputStream(void) { return out; } @@ -766,7 +766,7 @@ int cmd_open(const char *arg) return session_connect(cur_host); } -void try_reconnect() +void try_reconnect(void) { char* open_command; @@ -1891,7 +1891,7 @@ const char *get_ill_element (void *clientData, const char *element) return 0; } -static Z_External *create_external_itemRequest() +static Z_External *create_external_itemRequest(void) { struct ill_get_ctl ctl; ILL_ItemRequest *req; @@ -2102,7 +2102,7 @@ static int send_itemorder(const char *type, int itemno) return 0; } -static int only_z3950() +static int only_z3950(void) { if (!conn) { @@ -2294,6 +2294,7 @@ static int cmd_xmles(const char *arg) return 1; else { + char *asn_buf = 0; int noread = 0; char oid_str[51]; int oid_value_xmles = VAL_XMLES; @@ -2322,10 +2323,13 @@ static int cmd_xmles(const char *arg) printf("Bad OID: %s\n", oid_str); return 0; } - - if (parse_cmd_doc(&arg, out, (char **) &ext->u.single_ASN1_type->buf, + + if (parse_cmd_doc(&arg, out, &asn_buf, &ext->u.single_ASN1_type->len, 0) == 0) return 0; + + ext->u.single_ASN1_type->buf = (unsigned char *) asn_buf; + req->packageType = yaz_oidval_to_z3950oid(out, CLASS_EXTSERV, oid_value_xmles); @@ -3638,7 +3642,7 @@ int cmd_push_command(const char* arg) return 1; } -void source_rcfile() +void source_rcfile(void) { /* Look for a $HOME/.yazclientrc and source it if it exists */ struct stat statbuf;