X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fzget.c;h=1d55972b0c160837c142afe011508e83be8cc0d9;hb=3c287bc1d48ee6a1f300054c2cebd0ba312bd5b9;hp=03066a85931fc585caf4bd3d14ba4f608f2ed2af;hpb=604f5efb41a53b29bad89178873572110a90c645;p=yaz-moved-to-github.git diff --git a/src/zget.c b/src/zget.c index 03066a8..1d55972 100644 --- a/src/zget.c +++ b/src/zget.c @@ -1,11 +1,14 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ /** * \file zget.c * \brief Implements Z39.50 package creator utilities */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -496,7 +499,7 @@ Z_DefaultDiagFormat *zget_DefaultDiagFormat(ODR o, int error, const char *addinfo) { Z_DefaultDiagFormat *dr = (Z_DefaultDiagFormat *) - odr_malloc (o, sizeof(*dr)); + odr_malloc(o, sizeof(*dr)); dr->diagnosticSetId = odr_oiddup(o, yaz_oid_diagset_bib_1); dr->condition = odr_intdup(o, error); @@ -526,8 +529,8 @@ Z_DiagRecs *zget_DiagRecs(ODR o, int error, const char *addinfo) Z_NamePlusRecord *zget_surrogateDiagRec(ODR o, const char *dbname, int error, const char *addinfo) { - Z_NamePlusRecord *rec = (Z_NamePlusRecord *) odr_malloc (o, sizeof(*rec)); - Z_DiagRec *drec = (Z_DiagRec *)odr_malloc (o, sizeof(*drec)); + Z_NamePlusRecord *rec = (Z_NamePlusRecord *) odr_malloc(o, sizeof(*rec)); + Z_DiagRec *drec = (Z_DiagRec *)odr_malloc(o, sizeof(*drec)); if (dbname) rec->databaseName = odr_strdup(o, dbname); @@ -573,8 +576,8 @@ Z_External *zget_init_diagnostics(ODR odr, int error, const char *addinfo) d = (Z_DiagnosticFormat*) odr_malloc(odr, sizeof *d); x2->u.diag1 = d; d->num = 1; - d->elements = (Z_DiagnosticFormat_s**) odr_malloc (odr, sizeof *d->elements); - d->elements[0] = (Z_DiagnosticFormat_s*) odr_malloc (odr, sizeof *d->elements[0]); + d->elements = (Z_DiagnosticFormat_s**) odr_malloc(odr, sizeof *d->elements); + d->elements[0] = (Z_DiagnosticFormat_s*) odr_malloc(odr, sizeof *d->elements[0]); e = d->elements[0]; e->which = Z_DiagnosticFormat_s_defaultDiagRec; @@ -614,8 +617,8 @@ Z_External *zget_init_diagnostics_octet(ODR odr, int error, d = (Z_DiagnosticFormat*) odr_malloc(odr, sizeof *d); x2->u.diag1 = d; d->num = 1; - d->elements = (Z_DiagnosticFormat_s**) odr_malloc (odr, sizeof *d->elements); - d->elements[0] = (Z_DiagnosticFormat_s*) odr_malloc (odr, sizeof *d->elements[0]); + d->elements = (Z_DiagnosticFormat_s**) odr_malloc(odr, sizeof *d->elements); + d->elements[0] = (Z_DiagnosticFormat_s*) odr_malloc(odr, sizeof *d->elements[0]); e = d->elements[0]; e->which = Z_DiagnosticFormat_s_defaultDiagRec;