From a13492cef8a221e561ce1aa61865f03585e23799 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 30 Jul 2003 08:57:34 +0000 Subject: [PATCH] OPAC record fixes --- debian/changelog | 6 ++++++ zutil/opacdisp.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2e1348b..9bb71e2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +yaz (2.0.3-5) unstable; urgency=low + + * OPAC record fixes. + + -- Adam Dickmeiss Wed, 30 Jul 2003 10:56:34 +0200 + yaz (2.0.3-4) unstable; urgency=low * More ZOOM logging. diff --git a/zutil/opacdisp.c b/zutil/opacdisp.c index aefe98d..8f29c33 100644 --- a/zutil/opacdisp.c +++ b/zutil/opacdisp.c @@ -2,7 +2,7 @@ * Copyright (c) 2003, Index Data. * See the file LICENSE for details. * - * $Id: opacdisp.c,v 1.2 2003-07-14 12:59:23 adam Exp $ + * $Id: opacdisp.c,v 1.3 2003-07-30 08:57:35 adam Exp $ */ #include @@ -31,12 +31,16 @@ static void opac_element_str(WRBUF wrbuf, int l, const char *elem, static void opac_element_bool(WRBUF wrbuf, int l, const char *elem, int *data) { - if (data && *data) + if (data) { while (--l >= 0) wrbuf_puts(wrbuf, " "); wrbuf_puts(wrbuf, "<"); wrbuf_puts(wrbuf, elem); + if (*data) + wrbuf_puts(wrbuf, " value=\"1\""); + else + wrbuf_puts(wrbuf, " value=\"0\""); wrbuf_puts(wrbuf, "/>\n"); } } @@ -110,9 +114,9 @@ void yaz_display_OPAC(WRBUF wrbuf, Z_OPACRecord *r, int flags) d->circulationData[j]->restrictions); opac_element_str (wrbuf, 4, "itemId", d->circulationData[j]->itemId); - opac_element_bool (wrbuf, 4, "renewable: %d\n", + opac_element_bool (wrbuf, 4, "renewable", d->circulationData[j]->renewable); - opac_element_bool (wrbuf, 4, "onHold: %d\n", + opac_element_bool (wrbuf, 4, "onHold", d->circulationData[j]->onHold); opac_element_str (wrbuf, 4, "enumAndChron", d->circulationData[j]->enumAndChron); -- 1.7.10.4