+2001-01-04 Ulrich Drepper <drepper@redhat.com>
+
+ * plural.y (yylex): Minimal improvement in number scanner.
+
+2001-01-02 Ulrich Drepper <drepper@redhat.com>
+
+ * dcigettext.c (guess_category_value): Rewrite so that LANGUAGE value
+ is ignored if the selected locale is the C locale.
+
+2000-11-20 Ulrich Drepper <drepper@redhat.com>
+
+ * dcigettext.c (transcmp): Make s1 and s2 const.
+ * loadmsgcat.c (_nl_load_domain): Rearrange domain initialization to
+ avoid warning.
+
+2000-11-09 Ulrich Drepper <drepper@redhat.com>
+
+ * locale.alias: Add thai.
+ Patch by Chanop Silpa-Anan <chanop@syseng.anu.edu.au>.
+
2001-01-05 Bruno Haible <haible@clisp.cons.org>
* Makefile.in (INCLUDES): Remove reference to $(top_srcdir)/lib.
const void *p1;
const void *p2;
{
- struct known_translation_t *s1 = (struct known_translation_t *) p1;
- struct known_translation_t *s2 = (struct known_translation_t *) p2;
+ const struct known_translation_t *s1;
+ const struct known_translation_t *s2;
int result;
+ s1 = (const struct known_translation_t *) p1;
+ s2 = (const struct known_translation_t *) p2;
+
result = strcmp (s1->msgid, s2->msgid);
if (result == 0)
{
int category;
const char *categoryname;
{
+ const char *language;
const char *retval;
/* The highest priority value is the `LANGUAGE' environment
- variable. This is a GNU extension. */
- retval = getenv ("LANGUAGE");
- if (retval != NULL && retval[0] != '\0')
- return retval;
-
- /* `LANGUAGE' is not set. So we have to proceed with the POSIX
- methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
- systems this can be done by the `setlocale' function itself. */
+ variable. But we don't use the value if the currently selected
+ locale is the C locale. This is a GNU extension. */
+ language = getenv ("LANGUAGE");
+ if (language != NULL && language[0] == '\0')
+ language = NULL;
+
+ /* We have to proceed with the POSIX methods of looking to `LC_ALL',
+ `LC_xxx', and `LANG'. On some systems this can be done by the
+ `setlocale' function itself. */
#if defined _LIBC || (defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL)
- return setlocale (category, NULL);
+ retval = setlocale (category, NULL);
#else
/* Setting of LC_ALL overwrites all other. */
retval = getenv ("LC_ALL");
- if (retval != NULL && retval[0] != '\0')
- return retval;
-
- /* Next comes the name of the desired category. */
- retval = getenv (categoryname);
- if (retval != NULL && retval[0] != '\0')
- return retval;
-
- /* Last possibility is the LANG environment variable. */
- retval = getenv ("LANG");
- if (retval != NULL && retval[0] != '\0')
- return retval;
-
- /* We use C as the default domain. POSIX says this is implementation
- defined. */
- return "C";
+ if (retval == NULL || retval[0] == '\0')
+ {
+ /* Next comes the name of the desired category. */
+ retval = getenv (categoryname);
+ if (retval == NULL || retval[0] == '\0')
+ {
+ /* Last possibility is the LANG environment variable. */
+ retval = getenv ("LANG");
+ if (retval == NULL || retval[0] == '\0')
+ /* We use C as the default domain. POSIX says this is
+ implementation defined. */
+ return "C";
+ }
+ }
#endif
+
+ return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
}
/* @@ begin of epilog @@ */
.operation = not_equal,
.val =
{
- .args2 = {
+ .args2 =
+ {
.left = (struct expression *) &plvar,
.right = (struct expression *) &plone
}
}
};
-#define INIT_GERMANIC_PLURAL()
+# define INIT_GERMANIC_PLURAL()
#else
}
}
-#define INIT_GERMANIC_PLURAL() init_germanic_plural ()
+# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
#endif
return;
}
- domain_file->data
- = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
- if (domain_file->data == NULL)
+ domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
+ if (domain == NULL)
return;
+ domain_file->data = domain;
- domain = (struct loaded_domain *) domain_file->data;
domain->data = (char *) data;
domain->use_mmap = use_mmap;
domain->mmap_size = size;