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
Bump year. Change Aps->ApS
[idzebra-moved-to-github.git]
/
index
/
zebraapi.c
diff --git
a/index/zebraapi.c
b/index/zebraapi.c
index
3389125
..
72b4b69
100644
(file)
--- a/
index/zebraapi.c
+++ b/
index/zebraapi.c
@@
-1,6
+1,6
@@
-/* $Id: zebraapi.c,v 1.144 2004-12-10 12:37:07 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
- Index Data Aps
+/* $Id: zebraapi.c,v 1.146 2005-01-15 19:38:28 adam Exp $
+ Copyright (C) 1995-2005
+ Index Data ApS
This file is part of the Zebra server.
This file is part of the Zebra server.
@@
-49,7
+49,6
@@
static int log_level_initialized=0;
static Res zebra_open_res (ZebraHandle zh);
static void zebra_close_res (ZebraHandle zh);
static Res zebra_open_res (ZebraHandle zh);
static void zebra_close_res (ZebraHandle zh);
-
static void zebra_chdir (ZebraService zs)
{
const char *dir ;
static void zebra_chdir (ZebraService zs)
{
const char *dir ;
@@
-125,7
+124,6
@@
ZebraHandle zebra_open (ZebraService zs)
zh->shadow_enable = 1;
default_encoding = res_get_def(zs->global_res, "encoding", "ISO-8859-1");
zh->shadow_enable = 1;
default_encoding = res_get_def(zs->global_res, "encoding", "ISO-8859-1");
- zh->record_encoding = xstrdup (default_encoding);
zh->iconv_to_utf8 =
yaz_iconv_open ("UTF-8", default_encoding);
zh->iconv_to_utf8 =
yaz_iconv_open ("UTF-8", default_encoding);
@@
-138,6
+136,8
@@
ZebraHandle zebra_open (ZebraService zs)
yaz_log (YLOG_WARN, "iconv: UTF-8 to %s unsupported",
default_encoding);
yaz_log (YLOG_WARN, "iconv: UTF-8 to %s unsupported",
default_encoding);
+ zh->record_encoding = 0;
+
zebra_mutex_cond_lock (&zs->session_lock);
zh->next = zs->sessions;
zebra_mutex_cond_lock (&zs->session_lock);
zh->next = zs->sessions;
@@
-1870,28
+1870,18
@@
int zebra_shadow_enable (ZebraHandle zh, int value)
return 0;
}
return 0;
}
-int zebra_record_encoding (ZebraHandle zh, const char *encoding)
+int zebra_octet_term_encoding(ZebraHandle zh, const char *encoding)
{
ASSERTZH;
assert(encoding);
{
ASSERTZH;
assert(encoding);
- yaz_log(log_level,"zebra_record_encoding");
- zh->errCode=0;
- xfree (zh->record_encoding);
-
- /*
- * Fixme!
- * Something about charset aliases. Oleg???
- */
+ yaz_log(log_level,"zebra_octet_term_encoding");
+ zh->errCode = 0;
if (zh->iconv_to_utf8 != 0)
yaz_iconv_close(zh->iconv_to_utf8);
if (zh->iconv_from_utf8 != 0)
yaz_iconv_close(zh->iconv_from_utf8);
if (zh->iconv_to_utf8 != 0)
yaz_iconv_close(zh->iconv_to_utf8);
if (zh->iconv_from_utf8 != 0)
yaz_iconv_close(zh->iconv_from_utf8);
- zh->record_encoding = xstrdup (encoding);
-
- yaz_log(YLOG_DEBUG, "Reset record encoding: %s", encoding);
-
zh->iconv_to_utf8 =
yaz_iconv_open ("UTF-8", encoding);
if (zh->iconv_to_utf8 == 0)
zh->iconv_to_utf8 =
yaz_iconv_open ("UTF-8", encoding);
if (zh->iconv_to_utf8 == 0)
@@
-1904,6
+1894,18
@@
int zebra_record_encoding (ZebraHandle zh, const char *encoding)
return 0;
}
return 0;
}
+int zebra_record_encoding (ZebraHandle zh, const char *encoding)
+{
+ ASSERTZH;
+ yaz_log(log_level,"zebra_record_encoding");
+ zh->errCode = 0;
+ xfree (zh->record_encoding);
+ zh->record_encoding = 0;
+ if (encoding)
+ zh->record_encoding = xstrdup (encoding);
+ return 0;
+}
+
int zebra_set_resource(ZebraHandle zh, const char *name, const char *value)
{
ASSERTZH;
int zebra_set_resource(ZebraHandle zh, const char *name, const char *value)
{
ASSERTZH;