From: Ulrich Drepper Date: Fri, 27 Jul 2001 17:26:26 +0000 (+0000) Subject: (__gconv_compare_alias_cache): New function. X-Git-Tag: cvs/glibc-2_2_4~121 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=97b0f3d3a715c8486d48a26933260af9028a8bdb;p=thirdparty%2Fglibc.git (__gconv_compare_alias_cache): New function. --- diff --git a/iconv/gconv_cache.c b/iconv/gconv_cache.c index c6640759ec4..ffec34d2ec3 100644 --- a/iconv/gconv_cache.c +++ b/iconv/gconv_cache.c @@ -201,6 +201,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,