mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
1999-01-22 Ulrich Drepper <drepper@cygnus.com> * iconv/gconv_conf.c (add_alias): Convert names to uppercase before adding into search tree. (add_module): Likewise. * iconv/iconv_open.c: Likewise. * iconv/gconv_db.c: Change all __strcasecmp to strcmp. * iconv/skeleton.c (gconv_init): Likewise.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
1999-01-22 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* iconv/gconv_conf.c (add_alias): Convert names to uppercase before
|
||||||
|
adding into search tree.
|
||||||
|
(add_module): Likewise.
|
||||||
|
* iconv/iconv_open.c: Likewise.
|
||||||
|
* iconv/gconv_db.c: Change all __strcasecmp to strcmp.
|
||||||
|
* iconv/skeleton.c (gconv_init): Likewise.
|
||||||
|
|
||||||
1999-01-20 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
1999-01-20 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||||
|
|
||||||
* elf/Makefile: Make dependencies between test modules explicit.
|
* elf/Makefile: Make dependencies between test modules explicit.
|
||||||
|
@ -177,7 +177,7 @@ add_alias (char *rp, void *modules)
|
|||||||
++rp;
|
++rp;
|
||||||
from = wp = rp;
|
from = wp = rp;
|
||||||
while (*rp != '\0' && !isspace (*rp))
|
while (*rp != '\0' && !isspace (*rp))
|
||||||
++rp;
|
*wp = toupper (*rp++);
|
||||||
if (*rp == '\0')
|
if (*rp == '\0')
|
||||||
/* There is no `to' string on the line. Ignore it. */
|
/* There is no `to' string on the line. Ignore it. */
|
||||||
return;
|
return;
|
||||||
@ -186,7 +186,7 @@ add_alias (char *rp, void *modules)
|
|||||||
while (isspace (*rp))
|
while (isspace (*rp))
|
||||||
++rp;
|
++rp;
|
||||||
while (*rp != '\0' && !isspace (*rp))
|
while (*rp != '\0' && !isspace (*rp))
|
||||||
*wp++ = *rp++;
|
*wp++ = toupper (*rp++);
|
||||||
if (to == wp)
|
if (to == wp)
|
||||||
/* No `to' string, ignore the line. */
|
/* No `to' string, ignore the line. */
|
||||||
return;
|
return;
|
||||||
@ -307,6 +307,7 @@ add_module (char *rp, const char *directory, size_t dir_len, void **modules,
|
|||||||
if (!isalnum (*rp) && *rp != '-' && *rp != '/' && *rp != '.'
|
if (!isalnum (*rp) && *rp != '-' && *rp != '/' && *rp != '.'
|
||||||
&& *rp != '_' && *rp != '(' && *rp != ')')
|
&& *rp != '_' && *rp != '(' && *rp != ')')
|
||||||
from_is_regex = 1;
|
from_is_regex = 1;
|
||||||
|
*rp = toupper (*rp);
|
||||||
++rp;
|
++rp;
|
||||||
}
|
}
|
||||||
if (*rp == '\0')
|
if (*rp == '\0')
|
||||||
@ -316,7 +317,7 @@ add_module (char *rp, const char *directory, size_t dir_len, void **modules,
|
|||||||
while (isspace (*rp))
|
while (isspace (*rp))
|
||||||
++rp;
|
++rp;
|
||||||
while (*rp != '\0' && !isspace (*rp))
|
while (*rp != '\0' && !isspace (*rp))
|
||||||
*wp++ = *rp++;
|
*wp++ = toupper (*rp++);
|
||||||
if (*rp == '\0')
|
if (*rp == '\0')
|
||||||
return;
|
return;
|
||||||
*wp++ = '\0';
|
*wp++ = '\0';
|
||||||
|
@ -46,7 +46,7 @@ __gconv_alias_compare (const void *p1, const void *p2)
|
|||||||
{
|
{
|
||||||
struct gconv_alias *s1 = (struct gconv_alias *) p1;
|
struct gconv_alias *s1 = (struct gconv_alias *) p1;
|
||||||
struct gconv_alias *s2 = (struct gconv_alias *) p2;
|
struct gconv_alias *s2 = (struct gconv_alias *) p2;
|
||||||
return __strcasecmp (s1->fromname, s2->fromname);
|
return strcmp (s1->fromname, s2->fromname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -473,9 +473,9 @@ find_derivation (const char *toset, const char *toset_expand,
|
|||||||
|
|
||||||
/* We managed to find a derivation. First see whether
|
/* We managed to find a derivation. First see whether
|
||||||
this is what we are looking for. */
|
this is what we are looking for. */
|
||||||
if (__strcasecmp (result_set, toset) == 0
|
if (strcmp (result_set, toset) == 0
|
||||||
|| (toset_expand != NULL
|
|| (toset_expand != NULL
|
||||||
&& __strcasecmp (result_set, toset_expand) == 0))
|
&& strcmp (result_set, toset_expand) == 0))
|
||||||
{
|
{
|
||||||
if (solution == NULL || cost_hi < best_cost_hi
|
if (solution == NULL || cost_hi < best_cost_hi
|
||||||
|| (cost_hi == best_cost_hi
|
|| (cost_hi == best_cost_hi
|
||||||
@ -505,8 +505,7 @@ find_derivation (const char *toset, const char *toset_expand,
|
|||||||
/* Append at the end if there is no entry with
|
/* Append at the end if there is no entry with
|
||||||
this name. */
|
this name. */
|
||||||
for (step = first; step != NULL; step = step->next)
|
for (step = first; step != NULL; step = step->next)
|
||||||
if (__strcasecmp (result_set, step->result_set)
|
if (strcmp (result_set, step->result_set) == 0)
|
||||||
== 0)
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (step == NULL)
|
if (step == NULL)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Get descriptor for character set conversion.
|
/* Get descriptor for character set conversion.
|
||||||
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ strip (char *wp, const char *s)
|
|||||||
while (*s != '\0')
|
while (*s != '\0')
|
||||||
{
|
{
|
||||||
if (isalnum (*s) || *s == '_' || *s == '-' || *s == '.')
|
if (isalnum (*s) || *s == '_' || *s == '-' || *s == '.')
|
||||||
*wp++ = *s;
|
*wp++ = toupper (*s);
|
||||||
else if (*s == '/')
|
else if (*s == '/')
|
||||||
{
|
{
|
||||||
if (++slash_count == 3)
|
if (++slash_count == 3)
|
||||||
@ -52,6 +52,16 @@ strip (char *wp, const char *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static char *
|
||||||
|
upstr (char *str)
|
||||||
|
{
|
||||||
|
char *cp = str;
|
||||||
|
while ((*cp = toupper (*cp)) != '\0')
|
||||||
|
++cp;
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
iconv_t
|
iconv_t
|
||||||
iconv_open (const char *tocode, const char *fromcode)
|
iconv_open (const char *tocode, const char *fromcode)
|
||||||
{
|
{
|
||||||
@ -67,14 +77,14 @@ iconv_open (const char *tocode, const char *fromcode)
|
|||||||
tocode_len = strlen (tocode);
|
tocode_len = strlen (tocode);
|
||||||
tocode_conv = alloca (tocode_len + 3);
|
tocode_conv = alloca (tocode_len + 3);
|
||||||
strip (tocode_conv, tocode);
|
strip (tocode_conv, tocode);
|
||||||
|
tocode = tocode_conv[2] == '\0' ? upstr (tocode) : tocode_conv;
|
||||||
|
|
||||||
fromcode_len = strlen (fromcode);
|
fromcode_len = strlen (fromcode);
|
||||||
fromcode_conv = alloca (fromcode_len + 3);
|
fromcode_conv = alloca (fromcode_len + 3);
|
||||||
strip (fromcode_conv, fromcode);
|
strip (fromcode_conv, fromcode);
|
||||||
|
fromcode = romcode_conv[2] == '\0' ? upstr (fromcode) : fromcode_conv;
|
||||||
|
|
||||||
res = __gconv_open (tocode_conv[2] == '\0' ? tocode : tocode_conv,
|
res = __gconv_open (tocode, fromcode, &cd);
|
||||||
fromcode_conv[2] == '\0' ? fromcode : fromcode_conv,
|
|
||||||
&cd);
|
|
||||||
|
|
||||||
if (res != GCONV_OK)
|
if (res != GCONV_OK)
|
||||||
{
|
{
|
||||||
|
@ -143,7 +143,7 @@ int
|
|||||||
gconv_init (struct gconv_step *step)
|
gconv_init (struct gconv_step *step)
|
||||||
{
|
{
|
||||||
/* Determine which direction. */
|
/* Determine which direction. */
|
||||||
if (__strcasecmp (step->from_name, CHARSET_NAME) == 0)
|
if (strcmp (step->from_name, CHARSET_NAME) == 0)
|
||||||
{
|
{
|
||||||
step->data = &from_object;
|
step->data = &from_object;
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ gconv_init (struct gconv_step *step)
|
|||||||
step->min_needed_to = MIN_NEEDED_TO;
|
step->min_needed_to = MIN_NEEDED_TO;
|
||||||
step->max_needed_to = MAX_NEEDED_TO;
|
step->max_needed_to = MAX_NEEDED_TO;
|
||||||
}
|
}
|
||||||
else if (__strcasecmp (step->to_name, CHARSET_NAME) == 0)
|
else if (strcmp (step->to_name, CHARSET_NAME) == 0)
|
||||||
{
|
{
|
||||||
step->data = &to_object;
|
step->data = &to_object;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user