projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduced zebra_map_t in zebra_maps API.
[idzebra-moved-to-github.git]
/
index
/
untrans.c
diff --git
a/index/untrans.c
b/index/untrans.c
index
f17f6e2
..
d51c25c
100644
(file)
--- a/
index/untrans.c
+++ b/
index/untrans.c
@@
-1,5
+1,5
@@
-/* $Id: untrans.c,v 1.1 2006-09-21 08:39:14 adam Exp $
- Copyright (C) 1995-2006
+/* $Id: untrans.c,v 1.4 2007-10-30 19:17:15 adam Exp $
+ Copyright (C) 1995-2007
Index Data ApS
This file is part of the Zebra server.
Index Data ApS
This file is part of the Zebra server.
@@
-31,11
+31,11
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
void zebra_term_untrans(ZebraHandle zh, int reg_type,
char *dst, const char *src)
{
void zebra_term_untrans(ZebraHandle zh, int reg_type,
char *dst, const char *src)
{
+ zebra_map_t zm = zebra_map_get(zh->reg->zebra_maps, reg_type);
int len = 0;
while (*src)
{
int len = 0;
while (*src)
{
- const char *cp = zebra_maps_output(zh->reg->zebra_maps,
- reg_type, &src);
+ const char *cp = zebra_maps_output(zm, &src);
if (!cp)
{
if (len < IT_MAX_WORD-1)
if (!cp)
{
if (len < IT_MAX_WORD-1)
@@
-71,7
+71,10
@@
void zebra_term_untrans_iconv(ZebraHandle zh, NMEM stream, int reg_type,
if (ret == (size_t)(-1))
len = 0;
else
if (ret == (size_t)(-1))
len = 0;
else
+ {
+ yaz_iconv (zh->iconv_from_utf8, 0, 0, &outbuf, &outleft);
len = outbuf - term_dst;
len = outbuf - term_dst;
+ }
*dst = nmem_malloc(stream, len + 1);
if (len > 0)
memcpy (*dst, term_dst, len);
*dst = nmem_malloc(stream, len + 1);
if (len > 0)
memcpy (*dst, term_dst, len);