X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=ztest%2Fdummy-opac.c;h=eeab43d29b970396fb2f005c5bb7bc05454abafa;hp=e7b227945045cbf1964168eb75d3d0619f6d781c;hb=935b1ba0c2c3dc480b0afcb3673abe2ef2dd893f;hpb=bf95c509245f5cb4025ef2db348d5f7ace3b5994 diff --git a/ztest/dummy-opac.c b/ztest/dummy-opac.c index e7b2279..eeab43d 100644 --- a/ztest/dummy-opac.c +++ b/ztest/dummy-opac.c @@ -1,13 +1,14 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ - /** \file * \brief Little toy-thing to genearate an OPAC record with some values */ +#if HAVE_CONFIG_H +#include +#endif -#include #include #include #include @@ -30,11 +31,11 @@ Z_OPACRecord *dummy_opac(int num, ODR odr, const char *marc_input) odr_malloc(odr, sizeof(*hr)); Z_HoldingsAndCircData *hc = (Z_HoldingsAndCircData *) odr_malloc(odr, sizeof(*hc)); - + rec->holdingsData[i] = hr; hr->which = Z_HoldingsRecord_holdingsAndCirc; hr->u.holdingsAndCirc = hc; - + hc->typeOfRecord = "u"; hc->encodingLevel = "u"; @@ -45,7 +46,7 @@ Z_OPACRecord *dummy_opac(int num, ODR odr, const char *marc_input) hc->completeness = 0; /* OPT */ hc->dateOfReport = "000000"; hc->nucCode = "s-FM/GC"; - hc->localLocation = + hc->localLocation = "Main or Science/Business Reading Rms - STORED OFFSITE"; hc->shelvingLocation = 0; /* OPT */ hc->callNumber = "MLCM 89/00602 (N)"; @@ -65,13 +66,13 @@ Z_OPACRecord *dummy_opac(int num, ODR odr, const char *marc_input) hc->circulationData[0] = (Z_CircRecord *) odr_malloc(odr, sizeof(**hc->circulationData)); - hc->circulationData[0]->availableNow = odr_intdup(odr, 1); + hc->circulationData[0]->availableNow = odr_booldup(odr, 1); hc->circulationData[0]->availablityDate = 0; hc->circulationData[0]->availableThru = 0; hc->circulationData[0]->restrictions = 0; hc->circulationData[0]->itemId = "1226176"; - hc->circulationData[0]->renewable = odr_intdup(odr, 0); - hc->circulationData[0]->onHold = odr_intdup(odr, 0); + hc->circulationData[0]->renewable = odr_booldup(odr, 0); + hc->circulationData[0]->onHold = odr_booldup(odr, 0); hc->circulationData[0]->enumAndChron = 0; hc->circulationData[0]->midspine = 0; hc->circulationData[0]->temporaryLocation = 0; @@ -81,6 +82,7 @@ Z_OPACRecord *dummy_opac(int num, ODR odr, const char *marc_input) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab