X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fzget.c;h=0308373ffab91432267a81093952c1f7e1a9abeb;hb=47db800079d3df8e8adfd93b466795d0803dabe8;hp=b88e70af9ef3aeb97586a934624f889029ffa343;hpb=3cdfbd27dfc8dd15619f127ae78bf0f71b27dd6d;p=yaz-moved-to-github.git diff --git a/src/zget.c b/src/zget.c index b88e70a..0308373 100644 --- a/src/zget.c +++ b/src/zget.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. - * - * $Id: zget.c,v 1.14 2007-04-16 21:53:09 adam Exp $ */ /** * \file zget.c @@ -36,11 +34,8 @@ Z_InitRequest *zget_InitRequest(ODR o) r->implementationId = "81"; r->implementationName = "YAZ"; r->implementationVersion = YAZ_VERSION -#ifdef YAZ_DATE_STR - " (" YAZ_DATE_STR ")" -#endif -#ifdef YAZ_OS - " " YAZ_OS +#ifdef YAZ_VERSION_SHA1 + " " YAZ_VERSION_SHA1 #endif ; r->userInformationField = 0; @@ -63,11 +58,8 @@ Z_InitResponse *zget_InitResponse(ODR o) r->implementationId = "81"; r->implementationName = "YAZ"; r->implementationVersion = YAZ_VERSION -#ifdef YAZ_DATE_STR - " (" YAZ_DATE_STR ")" -#endif -#ifdef YAZ_OS - " " YAZ_OS +#ifdef YAZ_VERSION_SHA1 + " " YAZ_VERSION_SHA1 #endif ; r->userInformationField = 0; @@ -562,7 +554,7 @@ Z_External *zget_init_diagnostics(ODR odr, int error, const char *addinfo) x->direct_reference = odr_oiddup(odr, yaz_oid_userinfo_userinfo_1); x->which = Z_External_userInfo1; - u = odr_malloc(odr, sizeof *u); + u = (Z_OtherInformation *) odr_malloc(odr, sizeof *u); x->u.userInfo1 = u; u->num_elements = 1; u->list = (Z_OtherInformationUnit**) odr_malloc(odr, sizeof *u->list); @@ -603,7 +595,7 @@ Z_External *zget_init_diagnostics_octet(ODR odr, int error, int octet_len; ODR encode; - u = odr_malloc(odr, sizeof *u); + u = (Z_OtherInformation *) odr_malloc(odr, sizeof *u); u->num_elements = 1; u->list = (Z_OtherInformationUnit**) odr_malloc(odr, sizeof *u->list); u->list[0] = (Z_OtherInformationUnit*) odr_malloc(odr, sizeof *u->list[0]); @@ -642,7 +634,7 @@ Z_External *zget_init_diagnostics_octet(ODR odr, int error, x->direct_reference = odr_oiddup(odr, yaz_oid_userinfo_userinfo_1); x->which = Z_External_octet; x->u.octet_aligned = (Odr_oct *) odr_malloc(odr, sizeof(Odr_oct)); - x->u.octet_aligned->buf = odr_malloc(odr, octet_len); + x->u.octet_aligned->buf = (unsigned char *) odr_malloc(odr, octet_len); memcpy(x->u.octet_aligned->buf, octet_buf, octet_len); x->u.octet_aligned->len = octet_len; @@ -654,6 +646,7 @@ Z_External *zget_init_diagnostics_octet(ODR odr, int error, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab