Imported from ../bash-2.05.tar.gz.
This commit is contained in:
parent
bb70624e96
commit
28ef6c316f
251 changed files with 22319 additions and 12413 deletions
7
locale.c
7
locale.c
|
@ -234,12 +234,10 @@ localetrans (string, len, lenp)
|
|||
if (string == 0 || *string == 0)
|
||||
{
|
||||
if (lenp)
|
||||
*lenp = 0;
|
||||
*lenp = 0;
|
||||
return ((char *)NULL);
|
||||
}
|
||||
|
||||
t = xmalloc (len + 1);
|
||||
|
||||
locale = get_locale_var ("LC_MESSAGES");
|
||||
|
||||
/* If we don't have setlocale() or the current locale is `C' or `POSIX',
|
||||
|
@ -250,6 +248,7 @@ localetrans (string, len, lenp)
|
|||
(locale[0] == 'C' && locale[1] == '\0') || STREQ (locale, "POSIX"))
|
||||
#endif
|
||||
{
|
||||
t = xmalloc (len + 1);
|
||||
strcpy (t, string);
|
||||
if (lenp)
|
||||
*lenp = len;
|
||||
|
@ -261,13 +260,13 @@ localetrans (string, len, lenp)
|
|||
translated = gettext (string);
|
||||
if (translated == string) /* gettext returns its argument if untranslatable */
|
||||
{
|
||||
t = xmalloc (len + 1);
|
||||
strcpy (t, string);
|
||||
if (lenp)
|
||||
*lenp = len;
|
||||
}
|
||||
else
|
||||
{
|
||||
free (t);
|
||||
tlen = strlen (translated);
|
||||
t = xmalloc (tlen + 1);
|
||||
strcpy (t, translated);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue