cups/cups-locale.patch

40 lines
1.1 KiB
Diff
Raw Normal View History

2006-03-17 12:10:57 +00:00
--- cups-1.2svn-r5137/cups/language.c.locale 2006-02-15 20:11:10.000000000 +0000
+++ cups-1.2svn-r5137/cups/language.c 2006-02-23 14:43:59.000000000 +0000
@@ -276,6 +276,7 @@
#endif /* CODESET */
*ptr, /* Pointer into language/charset */
real[48], /* Real language name */
+ ll_cc[48], /* Language + Country name */
2006-03-17 12:10:57 +00:00
filename[1024]; /* Filename for language locale file */
cups_encoding_t encoding; /* Encoding to use */
2006-03-17 12:10:57 +00:00
cups_lang_t *lang; /* Current language... */
@@ -445,8 +446,10 @@
country[0] = '\0';
2006-03-17 12:10:57 +00:00
if (language == NULL || !language[0] ||
- !strcmp(language, "POSIX"))
+ !strcmp(language, "POSIX")) {
strcpy(langname, "C");
+ strcpy(ll_cc, langname);
+ }
else
{
/*
@@ -476,6 +479,7 @@
*ptr = '\0';
}
2006-03-17 12:10:57 +00:00
+ snprintf(ll_cc, sizeof(ll_cc), "%s_%s", langname, country);
if (*language == '.' && !charset[0])
{
/*
@@ -617,7 +621,7 @@
*/
lang->used ++;
- strlcpy(lang->language, real, sizeof(lang->language));
+ strlcpy(lang->language, ll_cc, sizeof(lang->language));
2006-03-17 12:10:57 +00:00
if (encoding != CUPS_AUTO_ENCODING)
lang->encoding = encoding;