aboutsummaryrefslogtreecommitdiff
path: root/iconv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-27 17:26:26 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-27 17:26:26 +0000
commit97b0f3d3a715c8486d48a26933260af9028a8bdb (patch)
treeeb19a6a42fbfe816c7dee944fd56734b628547ed /iconv
parentac61ed310de12330be91ef3f7ffc8566bb6285b8 (diff)
downloadglibc-97b0f3d3a715c8486d48a26933260af9028a8bdb.tar
glibc-97b0f3d3a715c8486d48a26933260af9028a8bdb.tar.gz
glibc-97b0f3d3a715c8486d48a26933260af9028a8bdb.tar.bz2
glibc-97b0f3d3a715c8486d48a26933260af9028a8bdb.zip
(__gconv_compare_alias_cache): New function.
Diffstat (limited to 'iconv')
-rw-r--r--iconv/gconv_cache.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/iconv/gconv_cache.c b/iconv/gconv_cache.c
index c6640759ec..ffec34d2ec 100644
--- a/iconv/gconv_cache.c
+++ b/iconv/gconv_cache.c
@@ -203,6 +203,26 @@ find_module (const char *directory, const char *filename,
int
internal_function
+__gconv_compare_alias_cache (const char *name1, const char *name2, int *result)
+{
+ size_t name1_idx;
+ size_t name2_idx;
+
+ if (cache == NULL)
+ return -1;
+
+ if (find_module_idx (name1, &name1_idx) != 0
+ || find_module_idx (name2, &name2_idx) != 0)
+ *result = strcmp (name1, name2);
+ else
+ *result = (int) (name1_idx - name2_idx);
+
+ return 0;
+}
+
+
+int
+internal_function
__gconv_lookup_cache (const char *toset, const char *fromset,
struct __gconv_step **handle, size_t *nsteps, int flags)
{