From af1d725908fed3da0afa5d4a20c6e3359effe643 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 30 Jan 2008 19:59:02 +0000 Subject: [PATCH] Added yaz_marc_get_iconv --- include/yaz/marcdisp.h | 9 ++++++--- src/marcdisp.c | 7 ++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/yaz/marcdisp.h b/include/yaz/marcdisp.h index 75820ce..3cd5529 100644 --- a/include/yaz/marcdisp.h +++ b/include/yaz/marcdisp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995-2007, Index Data + * Copyright (c) 1995-2008, Index Data * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: marcdisp.h,v 1.30 2007-12-17 20:59:30 adam Exp $ */ +/* $Id: marcdisp.h,v 1.31 2008-01-30 19:59:02 adam Exp $ */ /** * \file marcdisp.h @@ -71,9 +71,12 @@ YAZ_EXPORT void yaz_marc_xml(yaz_marc_t mt, int xmlmode); /** \brief Output format: check only (no marc output) */ #define YAZ_MARC_CHECK 6 -/** \brief supply iconv handle for character set conversion .. */ +/** \brief set iconv handle for character set conversion .. */ YAZ_EXPORT void yaz_marc_iconv(yaz_marc_t mt, yaz_iconv_t cd); +/** \brief supply iconv handle for character set conversion .. */ +YAZ_EXPORT yaz_iconv_t yaz_marc_get_iconv(yaz_marc_t mt); + /** \brief set debug level \param mt handle \param level level, where 0=lowest, 1 more debug, 2 even more diff --git a/src/marcdisp.c b/src/marcdisp.c index ebac3fa..d3c6c92 100644 --- a/src/marcdisp.c +++ b/src/marcdisp.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: marcdisp.c,v 1.53 2007-12-18 12:46:02 adam Exp $ + * $Id: marcdisp.c,v 1.54 2008-01-30 19:59:02 adam Exp $ */ /** @@ -1010,6 +1010,11 @@ void yaz_marc_iconv(yaz_marc_t mt, yaz_iconv_t cd) mt->iconv_cd = cd; } +yaz_iconv_t yaz_marc_get_iconv(yaz_marc_t mt) +{ + return mt->iconv_cd; +} + void yaz_marc_modify_leader(yaz_marc_t mt, size_t off, const char *str) { struct yaz_marc_node *n; -- 1.7.10.4