X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Frecord_conv.c;h=bf3c36218d728d9c05659721194b85ecc9a167ad;hp=5ef8913e0c4769cec1272c7f20712d998f441c23;hb=b0be69c0a676f1702f12b2ea17cd73f9ebb08ea2;hpb=a3e65bcd3250b107397675bc65b35b5939355025 diff --git a/src/record_conv.c b/src/record_conv.c index 5ef8913..bf3c362 100644 --- a/src/record_conv.c +++ b/src/record_conv.c @@ -97,7 +97,7 @@ void yaz_record_conv_destroy(yaz_record_conv_t p) } #if YAZ_HAVE_XSLT -static void *construct_xslt(yaz_record_conv_t p, const xmlNode *ptr, +static void *construct_xslt(const xmlNode *ptr, const char *path, WRBUF wr_error) { struct _xmlAttr *attr; @@ -241,7 +241,7 @@ static void destroy_xslt(void *info) #endif -static void *construct_marc(yaz_record_conv_t p, const xmlNode *ptr, +static void *construct_marc(const xmlNode *ptr, const char *path, WRBUF wr_error) { NMEM nmem = nmem_create(); @@ -288,7 +288,7 @@ static void *construct_marc(yaz_record_conv_t p, const xmlNode *ptr, } if (!input_format) { - wrbuf_printf(p->wr_error, "Element : " + wrbuf_printf(wr_error, "Element : " "attribute 'inputformat' required"); nmem_destroy(info->nmem); return 0; @@ -364,7 +364,7 @@ static void *construct_marc(yaz_record_conv_t p, const xmlNode *ptr, info->input_charset); if (!cd) { - wrbuf_printf(p->wr_error, + wrbuf_printf(wr_error, "Element :" " Unsupported character set mapping" " defined by attribute values", @@ -388,8 +388,8 @@ static void *construct_marc(yaz_record_conv_t p, const xmlNode *ptr, nmem_destroy(info->nmem); return 0; } - info->input_charset = nmem_strdup(p->nmem, info->input_charset); - info->output_charset = nmem_strdup(p->nmem, info->output_charset); + info->input_charset = nmem_strdup(info->nmem, info->input_charset); + info->output_charset = nmem_strdup(info->nmem, info->output_charset); return info; } @@ -491,7 +491,7 @@ int yaz_record_conv_configure_t(yaz_record_conv_t p, const xmlNode *ptr, for (t = &bt[0]; t; t = t->next) { wrbuf_rewind(p->wr_error); - info = t->construct(p, ptr, p->path, p->wr_error); + info = t->construct(ptr, p->path, p->wr_error); if (info || wrbuf_len(p->wr_error)) break;