OSDN Git Service

* lc_era.h: Redefine lc_era_t to keep
authorcorinna <corinna>
Mon, 22 Feb 2010 20:01:44 +0000 (20:01 +0000)
committercorinna <corinna>
Mon, 22 Feb 2010 20:01:44 +0000 (20:01 +0000)
default date and time formats as well to workaround YA Windows
shortcoming.  Refresh with latest data.
* lc_msg.h: Refresh with latest data.
* nlsfuncs.cc (__eval_datetimefmt): Revert latest change.
(__set_lc_time_from_win): Rename res to era.  Prefer default date and
time formats from era array if available.
(__set_lc_messages_from_win): Rename res to msg.

winsup/cygwin/ChangeLog
winsup/cygwin/lc_era.h
winsup/cygwin/lc_msg.h
winsup/cygwin/nlsfuncs.cc

index a38c863..2029c2a 100644 (file)
@@ -1,3 +1,14 @@
+2010-02-22  Corinna Vinschen  <corinna@vinschen.de>
+
+       * lc_era.h: Redefine lc_era_t to keep
+       default date and time formats as well to workaround YA Windows
+       shortcoming.  Refresh with latest data.
+       * lc_msg.h: Refresh with latest data.
+       * nlsfuncs.cc (__eval_datetimefmt): Revert latest change.
+       (__set_lc_time_from_win): Rename res to era.  Prefer default date and
+       time formats from era array if available.
+       (__set_lc_messages_from_win): Rename res to msg.
+
 2010-02-20  Corinna Vinschen  <corinna@vinschen.de>
 
        * lc_era.h (lc_era): Fix "ja_JP" era_t_fmt entry to use traditional
index d48e1b6..1fa731d 100644 (file)
@@ -1,9 +1,14 @@
 /* This struct of LC_TIME ERA data has been generated by fetching locale
-   data from a Linux system using glibc-2.10.2-1.i686 on 2010-02-19. */
+   data from a Linux system using glibc-2.11-2.i686 on 2010-02-22. */
 
 struct lc_era_t
 {
   const char    *locale;
+  const wchar_t *date_fmt;
+  const wchar_t *d_fmt;
+  const wchar_t *d_t_fmt;
+  const wchar_t *t_fmt;
+  const wchar_t *t_fmt_ampm;
   const wchar_t *era;
   const wchar_t *era_d_fmt;
   const wchar_t *era_d_t_fmt;
@@ -13,10 +18,11 @@ struct lc_era_t
 
 static struct lc_era_t lc_era[] =
 {
-  { "fa_IR", L"", L"", L"", L"", L"\x06f0\x06f0;\x06f0\x06f1;\x06f0\x06f2;\x06f0\x06f3;\x06f0\x06f4;\x06f0\x06f5;\x06f0\x06f6;\x06f0\x06f7;\x06f0\x06f8;\x06f0\x06f9;\x06f1\x06f0;\x06f1\x06f1;\x06f1\x06f2;\x06f1\x06f3;\x06f1\x06f4;\x06f1\x06f5;\x06f1\x06f6;\x06f1\x06f7;\x06f1\x06f8;\x06f1\x06f9;\x06f2\x06f0;\x06f2\x06f1;\x06f2\x06f2;\x06f2\x06f3;\x06f2\x06f4;\x06f2\x06f5;\x06f2\x06f6;\x06f2\x06f7;\x06f2\x06f8;\x06f2\x06f9;\x06f3\x06f0;\x06f3\x06f1;\x06f3\x06f2;\x06f3\x06f3;\x06f3\x06f4;\x06f3\x06f5;\x06f3\x06f6;\x06f3\x06f7;\x06f3\x06f8;\x06f3\x06f9;\x06f4\x06f0;\x06f4\x06f1;\x06f4\x06f2;\x06f4\x06f3;\x06f4\x06f4;\x06f4\x06f5;\x06f4\x06f6;\x06f4\x06f7;\x06f4\x06f8;\x06f4\x06f9;\x06f5\x06f0;\x06f5\x06f1;\x06f5\x06f2;\x06f5\x06f3;\x06f5\x06f4;\x06f5\x06f5;\x06f5\x06f6;\x06f5\x06f7;\x06f5\x06f8;\x06f5\x06f9;\x06f6\x06f0;\x06f6\x06f1;\x06f6\x06f2;\x06f6\x06f3;\x06f6\x06f4;\x06f6\x06f5;\x06f6\x06f6;\x06f6\x06f7;\x06f6\x06f8;\x06f6\x06f9;\x06f7\x06f0;\x06f7\x06f1;\x06f7\x06f2;\x06f7\x06f3;\x06f7\x06f4;\x06f7\x06f5;\x06f7\x06f6;\x06f7\x06f7;\x06f7\x06f8;\x06f7\x06f9;\x06f8\x06f0;\x06f8\x06f1;\x06f8\x06f2;\x06f8\x06f3;\x06f8\x06f4;\x06f8\x06f5;\x06f8\x06f6;\x06f8\x06f7;\x06f8\x06f8;\x06f8\x06f9;\x06f9\x06f0;\x06f9\x06f1;\x06f9\x06f2;\x06f9\x06f3;\x06f9\x06f4;\x06f9\x06f5;\x06f9\x06f6;\x06f9\x06f7;\x06f9\x06f8;\x06f9\x06f9" },
-  { "ja_JP", L"+:2:1990/01/01:+*:\x5e73\x6210:%EC%Ey\x5e74;+:1:1989/01/08:1989/12/31:\x5e73\x6210:%EC\x5143\x5e74;+:2:1927/01/01:1989/01/07:\x662d\x548c:%EC%Ey\x5e74;+:1:1926/12/25:1926/12/31:\x662d\x548c:%EC\x5143\x5e74;+:2:1913/01/01:1926/12/24:\x5927\x6b63:%EC%Ey\x5e74;+:2:1912/07/30:1912/12/31:\x5927\x6b63:%EC\x5143\x5e74;+:6:1873/01/01:1912/07/29:\x660e\x6cbb:%EC%Ey\x5e74;+:1:0001/01/01:1872/12/31:\x897f\x66a6:%EC%Ey\x5e74;+:1:-0001/12/31:-*:\x7d00\x5143\x524d:%EC%Ey\x5e74", L"%EY%m\x6708%d\x65e5", L"%EY%m\x6708%d\x65e5 %H\x6642%M\x5206%S\x79d2", L"%H\x6642%M\x5206%S\x79d2", L"\x3007;\x4e00;\x4e8c;\x4e09;\x56db;\x4e94;\x516d;\x4e03;\x516b;\x4e5d;\x5341;\x5341\x4e00;\x5341\x4e8c;\x5341\x4e09;\x5341\x56db;\x5341\x4e94;\x5341\x516d;\x5341\x4e03;\x5341\x516b;\x5341\x4e5d;\x4e8c\x5341;\x4e8c\x5341\x4e00;\x4e8c\x5341\x4e8c;\x4e8c\x5341\x4e09;\x4e8c\x5341\x56db;\x4e8c\x5341\x4e94;\x4e8c\x5341\x516d;\x4e8c\x5341\x4e03;\x4e8c\x5341\x516b;\x4e8c\x5341\x4e5d;\x4e09\x5341;\x4e09\x5341\x4e00;\x4e09\x5341\x4e8c;\x4e09\x5341\x4e09;\x4e09\x5341\x56db;\x4e09\x5341\x4e94;\x4e09\x5341\x516d;\x4e09\x5341\x4e03;\x4e09\x5341\x516b;\x4e09\x5341\x4e5d;\x56db\x5341;\x56db\x5341\x4e00;\x56db\x5341\x4e8c;\x56db\x5341\x4e09;\x56db\x5341\x56db;\x56db\x5341\x4e94;\x56db\x5341\x516d;\x56db\x5341\x4e03;\x56db\x5341\x516b;\x56db\x5341\x4e5d;\x4e94\x5341;\x4e94\x5341\x4e00;\x4e94\x5341\x4e8c;\x4e94\x5341\x4e09;\x4e94\x5341\x56db;\x4e94\x5341\x4e94;\x4e94\x5341\x516d;\x4e94\x5341\x4e03;\x4e94\x5341\x516b;\x4e94\x5341\x4e5d;\x516d\x5341;\x516d\x5341\x4e00;\x516d\x5341\x4e8c;\x516d\x5341\x4e09;\x516d\x5341\x56db;\x516d\x5341\x4e94;\x516d\x5341\x516d;\x516d\x5341\x4e03;\x516d\x5341\x516b;\x516d\x5341\x4e5d;\x4e03\x5341;\x4e03\x5341\x4e00;\x4e03\x5341\x4e8c;\x4e03\x5341\x4e09;\x4e03\x5341\x56db;\x4e03\x5341\x4e94;\x4e03\x5341\x516d;\x4e03\x5341\x4e03;\x4e03\x5341\x516b;\x4e03\x5341\x4e5d;\x516b\x5341;\x516b\x5341\x4e00;\x516b\x5341\x4e8c;\x516b\x5341\x4e09;\x516b\x5341\x56db;\x516b\x5341\x4e94;\x516b\x5341\x516d;\x516b\x5341\x4e03;\x516b\x5341\x516b;\x516b\x5341\x4e5d;\x4e5d\x5341;\x4e5d\x5341\x4e00;\x4e5d\x5341\x4e8c;\x4e5d\x5341\x4e09;\x4e5d\x5341\x56db;\x4e5d\x5341\x4e94;\x4e5d\x5341\x516d;\x4e5d\x5341\x4e03;\x4e5d\x5341\x516b;\x4e5d\x5341\x4e5d" },
-  { "lo_LA", L"+:1:-543/01/01:+*:\x0e9e.\x0eaa.:%EC %Ey", L"%e %b %Ey", L"\x0ea7\x0eb1\x0e99%A\x0e97\x0eb5\x0ec8 %e %B %EC %Ey, %H.%M.%S \x0e99.", L"%H.%M.%S \x0e99.", L"" },
-  { "or_IN", L"", L"", L"", L"", L"\x0b66;\x0b67;\x0b68;\x0b69;\x0b6a;\x0b6b;\x0b6c;\x0b6d;\x0b6e;\x0b6f;\x0b67\x0b66;\x0b67\x0b67;\x0b67\x0b68;\x0b67\x0b69;\x0b67\x0b6a;\x0b67\x0b6b;\x0b67\x0b6c;\x0b67\x0b6d;\x0b67\x0b6e;\x0b67\x0b6f;\x0b68\x0b66;\x0b68\x0b67;\x0b68\x0b68;\x0b68\x0b69;\x0b68\x0b6a;\x0b68\x0b6b;\x0b68\x0b6c;\x0b68\x0b6d;\x0b68\x0b6e;\x0b68\x0b6f;\x0b69\x0b66;\x0b69\x0b67;\x0b69\x0b68;\x0b69\x0b69;\x0b69\x0b6a;\x0b69\x0b6b;\x0b69\x0b6c;\x0b69\x0b6d;\x0b69\x0b6e;\x0b69\x0b6f;\x0b6a\x0b66;\x0b6a\x0b67;\x0b6a\x0b68;\x0b6a\x0b69;\x0b6a\x0b6a;\x0b6a\x0b6b;\x0b6a\x0b6c;\x0b6a\x0b6d;\x0b6a\x0b6e;\x0b6a\x0b6f;\x0b6b\x0b66;\x0b6b\x0b67;\x0b6b\x0b68;\x0b6b\x0b69;\x0b6b\x0b6a;\x0b6b\x0b6b;\x0b6b\x0b6c;\x0b6b\x0b6d;\x0b6b\x0b6e;\x0b6b\x0b6f;\x0b6c\x0b66;\x0b6c\x0b67;\x0b6c\x0b68;\x0b6c\x0b69;\x0b6c\x0b6a;\x0b6c\x0b6b;\x0b6c\x0b6c;\x0b6c\x0b6d;\x0b6c\x0b6e;\x0b6c\x0b6f;\x0b6d\x0b66;\x0b6d\x0b67;\x0b6d\x0b68;\x0b6d\x0b69;\x0b6d\x0b6a;\x0b6d\x0b6b;\x0b6d\x0b6c;\x0b6d\x0b6d;\x0b6d\x0b6e;\x0b6d\x0b6f;\x0b6e\x0b66;\x0b6e\x0b67;\x0b6e\x0b68;\x0b6e\x0b69;\x0b6e\x0b6a;\x0b6e\x0b6b;\x0b6e\x0b6c;\x0b6e\x0b6d;\x0b6e\x0b6e;\x0b6e\x0b6f;\x0b6f\x0b66;\x0b6f\x0b67;\x0b6f\x0b68;\x0b6f\x0b69;\x0b6f\x0b6a;\x0b6f\x0b6b;\x0b6f\x0b6c;\x0b6f\x0b6d;\x0b6f\x0b6e;\x0b6f\x0b6f" },
-  { "th_TH", L"+:1:-543/01/01:+*:\x0e1e.\x0e28.:%EC %Ey", L"%e %b %Ey", L"\x0e27\x0e31\x0e19%A\x0e17\x0e35\x0e48 %e %B %EC %Ey, %H.%M.%S \x0e19.", L"%H.%M.%S \x0e19.", L"" },
-  { "uk_UA", L"", L"", L"", L"", L"0;\x0441\x0456\x0447\x043d\x044f;\x043b\x044e\x0442\x043e\x0433\x043e;\x0431\x0435\x0440\x0435\x0437\x043d\x044f;\x043a\x0432\x0456\x0442\x043d\x044f;\x0442\x0440\x0430\x0432\x043d\x044f;\x0447\x0435\x0440\x0432\x043d\x044f;\x043b\x0438\x043f\x043d\x044f;\x0441\x0435\x0440\x043f\x043d\x044f;\x0432\x0435\x0440\x0435\x0441\x043d\x044f;\x0436\x043e\x0432\x0442\x043d\x044f;\x043b\x0438\x0441\x0442\x043e\x043f\x0430\x0434\x0430;\x0433\x0440\x0443\x0434\x043d\x044f" },
+  { "fa_IR", L"\x202b%A %Oe %B %Oy\x060c \x0633\x0627\x0639\x062a %OH:%OM:%OS (%Z)\x202c", L"%Oy/%Om/%Od", L"\x202b%A %Oe %B %Oy\x060c %OH:%OM:%OS\x202c", L"%OH:%OM:%OS", L"", L"", L"", L"", L"", L"\x06f0\x06f0;\x06f0\x06f1;\x06f0\x06f2;\x06f0\x06f3;\x06f0\x06f4;\x06f0\x06f5;\x06f0\x06f6;\x06f0\x06f7;\x06f0\x06f8;\x06f0\x06f9;\x06f1\x06f0;\x06f1\x06f1;\x06f1\x06f2;\x06f1\x06f3;\x06f1\x06f4;\x06f1\x06f5;\x06f1\x06f6;\x06f1\x06f7;\x06f1\x06f8;\x06f1\x06f9;\x06f2\x06f0;\x06f2\x06f1;\x06f2\x06f2;\x06f2\x06f3;\x06f2\x06f4;\x06f2\x06f5;\x06f2\x06f6;\x06f2\x06f7;\x06f2\x06f8;\x06f2\x06f9;\x06f3\x06f0;\x06f3\x06f1;\x06f3\x06f2;\x06f3\x06f3;\x06f3\x06f4;\x06f3\x06f5;\x06f3\x06f6;\x06f3\x06f7;\x06f3\x06f8;\x06f3\x06f9;\x06f4\x06f0;\x06f4\x06f1;\x06f4\x06f2;\x06f4\x06f3;\x06f4\x06f4;\x06f4\x06f5;\x06f4\x06f6;\x06f4\x06f7;\x06f4\x06f8;\x06f4\x06f9;\x06f5\x06f0;\x06f5\x06f1;\x06f5\x06f2;\x06f5\x06f3;\x06f5\x06f4;\x06f5\x06f5;\x06f5\x06f6;\x06f5\x06f7;\x06f5\x06f8;\x06f5\x06f9;\x06f6\x06f0;\x06f6\x06f1;\x06f6\x06f2;\x06f6\x06f3;\x06f6\x06f4;\x06f6\x06f5;\x06f6\x06f6;\x06f6\x06f7;\x06f6\x06f8;\x06f6\x06f9;\x06f7\x06f0;\x06f7\x06f1;\x06f7\x06f2;\x06f7\x06f3;\x06f7\x06f4;\x06f7\x06f5;\x06f7\x06f6;\x06f7\x06f7;\x06f7\x06f8;\x06f7\x06f9;\x06f8\x06f0;\x06f8\x06f1;\x06f8\x06f2;\x06f8\x06f3;\x06f8\x06f4;\x06f8\x06f5;\x06f8\x06f6;\x06f8\x06f7;\x06f8\x06f8;\x06f8\x06f9;\x06f9\x06f0;\x06f9\x06f1;\x06f9\x06f2;\x06f9\x06f3;\x06f9\x06f4;\x06f9\x06f5;\x06f9\x06f6;\x06f9\x06f7;\x06f9\x06f8;\x06f9\x06f9" },
+  { "ja_JP", L"%Y\x5e74 %b %e\x65e5 %A %H:%M:%S %Z", L"%Y\x5e74%m\x6708%d\x65e5", L"%Y\x5e74%m\x6708%d\x65e5 %H\x6642%M\x5206%S\x79d2", L"%H\x6642%M\x5206%S\x79d2", L"%p%I\x6642%M\x5206%S\x79d2", L"+:2:1990/01/01:+*:\x5e73\x6210:%EC%Ey\x5e74;+:1:1989/01/08:1989/12/31:\x5e73\x6210:%EC\x5143\x5e74;+:2:1927/01/01:1989/01/07:\x662d\x548c:%EC%Ey\x5e74;+:1:1926/12/25:1926/12/31:\x662d\x548c:%EC\x5143\x5e74;+:2:1913/01/01:1926/12/24:\x5927\x6b63:%EC%Ey\x5e74;+:2:1912/07/30:1912/12/31:\x5927\x6b63:%EC\x5143\x5e74;+:6:1873/01/01:1912/07/29:\x660e\x6cbb:%EC%Ey\x5e74;+:1:0001/01/01:1872/12/31:\x897f\x66a6:%EC%Ey\x5e74;+:1:-0001/12/31:-*:\x7d00\x5143\x524d:%EC%Ey\x5e74", L"%EY%m\x6708%d\x65e5", L"%EY%m\x6708%d\x65e5 %H\x6642%M\x5206%S\x79d2", L"", L"\x3007;\x4e00;\x4e8c;\x4e09;\x56db;\x4e94;\x516d;\x4e03;\x516b;\x4e5d;\x5341;\x5341\x4e00;\x5341\x4e8c;\x5341\x4e09;\x5341\x56db;\x5341\x4e94;\x5341\x516d;\x5341\x4e03;\x5341\x516b;\x5341\x4e5d;\x4e8c\x5341;\x4e8c\x5341\x4e00;\x4e8c\x5341\x4e8c;\x4e8c\x5341\x4e09;\x4e8c\x5341\x56db;\x4e8c\x5341\x4e94;\x4e8c\x5341\x516d;\x4e8c\x5341\x4e03;\x4e8c\x5341\x516b;\x4e8c\x5341\x4e5d;\x4e09\x5341;\x4e09\x5341\x4e00;\x4e09\x5341\x4e8c;\x4e09\x5341\x4e09;\x4e09\x5341\x56db;\x4e09\x5341\x4e94;\x4e09\x5341\x516d;\x4e09\x5341\x4e03;\x4e09\x5341\x516b;\x4e09\x5341\x4e5d;\x56db\x5341;\x56db\x5341\x4e00;\x56db\x5341\x4e8c;\x56db\x5341\x4e09;\x56db\x5341\x56db;\x56db\x5341\x4e94;\x56db\x5341\x516d;\x56db\x5341\x4e03;\x56db\x5341\x516b;\x56db\x5341\x4e5d;\x4e94\x5341;\x4e94\x5341\x4e00;\x4e94\x5341\x4e8c;\x4e94\x5341\x4e09;\x4e94\x5341\x56db;\x4e94\x5341\x4e94;\x4e94\x5341\x516d;\x4e94\x5341\x4e03;\x4e94\x5341\x516b;\x4e94\x5341\x4e5d;\x516d\x5341;\x516d\x5341\x4e00;\x516d\x5341\x4e8c;\x516d\x5341\x4e09;\x516d\x5341\x56db;\x516d\x5341\x4e94;\x516d\x5341\x516d;\x516d\x5341\x4e03;\x516d\x5341\x516b;\x516d\x5341\x4e5d;\x4e03\x5341;\x4e03\x5341\x4e00;\x4e03\x5341\x4e8c;\x4e03\x5341\x4e09;\x4e03\x5341\x56db;\x4e03\x5341\x4e94;\x4e03\x5341\x516d;\x4e03\x5341\x4e03;\x4e03\x5341\x516b;\x4e03\x5341\x4e5d;\x516b\x5341;\x516b\x5341\x4e00;\x516b\x5341\x4e8c;\x516b\x5341\x4e09;\x516b\x5341\x56db;\x516b\x5341\x4e94;\x516b\x5341\x516d;\x516b\x5341\x4e03;\x516b\x5341\x516b;\x516b\x5341\x4e5d;\x4e5d\x5341;\x4e5d\x5341\x4e00;\x4e5d\x5341\x4e8c;\x4e5d\x5341\x4e09;\x4e5d\x5341\x56db;\x4e5d\x5341\x4e94;\x4e5d\x5341\x516d;\x4e5d\x5341\x4e03;\x4e5d\x5341\x516b;\x4e5d\x5341\x4e5d" },
+  { "lo_LA", L"%a %e %b %Ey %H:%M:%S %Z", L"%d/%m/%Ey", L"%a %e %b %Ey, %H:%M:%S", L"%H:%M:%S", L"%I:%M:%S %p", L"+:1:-543/01/01:+*:\x0e9e.\x0eaa.:%EC %Ey", L"%e %b %Ey", L"\x0ea7\x0eb1\x0e99%A\x0e97\x0eb5\x0ec8 %e %B %EC %Ey, %H.%M.%S \x0e99.", L"%H.%M.%S \x0e99.", L"" },
+  { "my_MM", L"%a %b %e %H:%M:%S %Z %Y", L"%OC%Oy %b %Od %A", L"%OC%Oy %b %Od %A %OI:%OM:%OS %Op %Z", L"%OI:%OM:%OS %p", L"%OI:%OM:%OS %p", L"", L"", L"", L"", L"\x1040\x1040;\x1040\x1041;\x1040\x1042;\x1040\x1043;\x1040\x1044;\x1040\x1045;\x1040\x1046;\x1040\x1047;\x1040\x1048;\x1040\x1049;\x1041\x1040;\x1041\x1041;\x1041\x1042;\x1041\x1043;\x1041\x1044;\x1041\x1045;\x1041\x1046;\x1041\x1047;\x1041\x1048;\x1041\x1049;\x1042\x1040;\x1042\x1041;\x1042\x1042;\x1042\x1043;\x1042\x1044;\x1042\x1045;\x1042\x1046;\x1042\x1047;\x1042\x1048;\x1042\x1049;\x1043\x1040;\x1043\x1041;\x1043\x1042;\x1043\x1043;\x1043\x1044;\x1043\x1045;\x1043\x1046;\x1043\x1047;\x1043\x1048;\x1043\x1049;\x1044\x1040;\x1044\x1041;\x1044\x1042;\x1044\x1043;\x1044\x1044;\x1044\x1045;\x1044\x1046;\x1044\x1047;\x1044\x1048;\x1044\x1049;\x1045\x1040;\x1045\x1041;\x1045\x1042;\x1045\x1043;\x1045\x1044;\x1045\x1045;\x1045\x1046;\x1045\x1047;\x1045\x1048;\x1045\x1049;\x1046\x1040;\x1046\x1041;\x1046\x1042;\x1046\x1043;\x1046\x1044;\x1046\x1045;\x1046\x1046;\x1046\x1047;\x1046\x1048;\x1046\x1049;\x1047\x1040;\x1047\x1041;\x1047\x1042;\x1047\x1043;\x1047\x1044;\x1047\x1045;\x1047\x1046;\x1047\x1047;\x1047\x1048;\x1047\x1049;\x1048\x1040;\x1048\x1041;\x1048\x1042;\x1048\x1043;\x1048\x1044;\x1048\x1045;\x1048\x1046;\x1048\x1047;\x1048\x1048;\x1048\x1049;\x1049\x1040;\x1049\x1041;\x1049\x1042;\x1049\x1043;\x1049\x1044;\x1049\x1045;\x1049\x1046;\x1049\x1047;\x1049\x1048;\x1049\x1049" },
+  { "or_IN", L"%a %b %e %H:%M:%S %Z %Y", L"%Od-%Om-%Oy", L"%Oe %B %Oy %OI:%OM:%OS %p %Z", L"%OI:%OM:%OS %p", L"%OI:%OM:%OS %p", L"", L"", L"", L"", L"\x0b66;\x0b67;\x0b68;\x0b69;\x0b6a;\x0b6b;\x0b6c;\x0b6d;\x0b6e;\x0b6f;\x0b67\x0b66;\x0b67\x0b67;\x0b67\x0b68;\x0b67\x0b69;\x0b67\x0b6a;\x0b67\x0b6b;\x0b67\x0b6c;\x0b67\x0b6d;\x0b67\x0b6e;\x0b67\x0b6f;\x0b68\x0b66;\x0b68\x0b67;\x0b68\x0b68;\x0b68\x0b69;\x0b68\x0b6a;\x0b68\x0b6b;\x0b68\x0b6c;\x0b68\x0b6d;\x0b68\x0b6e;\x0b68\x0b6f;\x0b69\x0b66;\x0b69\x0b67;\x0b69\x0b68;\x0b69\x0b69;\x0b69\x0b6a;\x0b69\x0b6b;\x0b69\x0b6c;\x0b69\x0b6d;\x0b69\x0b6e;\x0b69\x0b6f;\x0b6a\x0b66;\x0b6a\x0b67;\x0b6a\x0b68;\x0b6a\x0b69;\x0b6a\x0b6a;\x0b6a\x0b6b;\x0b6a\x0b6c;\x0b6a\x0b6d;\x0b6a\x0b6e;\x0b6a\x0b6f;\x0b6b\x0b66;\x0b6b\x0b67;\x0b6b\x0b68;\x0b6b\x0b69;\x0b6b\x0b6a;\x0b6b\x0b6b;\x0b6b\x0b6c;\x0b6b\x0b6d;\x0b6b\x0b6e;\x0b6b\x0b6f;\x0b6c\x0b66;\x0b6c\x0b67;\x0b6c\x0b68;\x0b6c\x0b69;\x0b6c\x0b6a;\x0b6c\x0b6b;\x0b6c\x0b6c;\x0b6c\x0b6d;\x0b6c\x0b6e;\x0b6c\x0b6f;\x0b6d\x0b66;\x0b6d\x0b67;\x0b6d\x0b68;\x0b6d\x0b69;\x0b6d\x0b6a;\x0b6d\x0b6b;\x0b6d\x0b6c;\x0b6d\x0b6d;\x0b6d\x0b6e;\x0b6d\x0b6f;\x0b6e\x0b66;\x0b6e\x0b67;\x0b6e\x0b68;\x0b6e\x0b69;\x0b6e\x0b6a;\x0b6e\x0b6b;\x0b6e\x0b6c;\x0b6e\x0b6d;\x0b6e\x0b6e;\x0b6e\x0b6f;\x0b6f\x0b66;\x0b6f\x0b67;\x0b6f\x0b68;\x0b6f\x0b69;\x0b6f\x0b6a;\x0b6f\x0b6b;\x0b6f\x0b6c;\x0b6f\x0b6d;\x0b6f\x0b6e;\x0b6f\x0b6f" },
+  { "th_TH", L"%a %e %b %Ey %H:%M:%S %Z", L"%d/%m/%Ey", L"%a %e %b %Ey, %H:%M:%S", L"%H:%M:%S", L"%I:%M:%S %p", L"+:1:-543/01/01:+*:\x0e1e.\x0e28.:%EC %Ey", L"%e %b %Ey", L"\x0e27\x0e31\x0e19%A\x0e17\x0e35\x0e48 %e %B %EC %Ey, %H.%M.%S \x0e19.", L"%H.%M.%S \x0e19.", L"" },
+  { "uk_UA", L"%A, %-d %Om %Y %X %z", L"%d.%m.%y", L"%a, %d-%b-%Y %X %z", L"%T", L"", L"", L"", L"", L"", L"0;\x0441\x0456\x0447\x043d\x044f;\x043b\x044e\x0442\x043e\x0433\x043e;\x0431\x0435\x0440\x0435\x0437\x043d\x044f;\x043a\x0432\x0456\x0442\x043d\x044f;\x0442\x0440\x0430\x0432\x043d\x044f;\x0447\x0435\x0440\x0432\x043d\x044f;\x043b\x0438\x043f\x043d\x044f;\x0441\x0435\x0440\x043f\x043d\x044f;\x0432\x0435\x0440\x0435\x0441\x043d\x044f;\x0436\x043e\x0432\x0442\x043d\x044f;\x043b\x0438\x0441\x0442\x043e\x043f\x0430\x0434\x0430;\x0433\x0440\x0443\x0434\x043d\x044f" },
 };
index a579e0b..c8c32d3 100644 (file)
@@ -1,5 +1,5 @@
 /* This struct of LC_MESSAGES data has been generated by fetching locale
-   data from a Linux system using glibc-2.10.2-1.i686 on 2010-02-09. */
+   data from a Linux system using glibc-2.11-2.i686 on 2010-02-22. */
 
 struct lc_msg_t
 {
@@ -56,7 +56,7 @@ static struct lc_msg_t lc_msg[] =
   { "ca_ES@euro", L"^[sSyY].*", L"^[nN].*", L"", L"" },
   { "ca_FR", L"^[sSyY].*", L"^[nN].*", L"", L"" },
   { "ca_IT", L"^[sSyY].*", L"^[nN].*", L"", L"" },
-  { "crh_UA", L"^[Ee].*", L"^[YyNn].*", L"ebet", L"yoq" },
+  { "crh_UA", L"^[yYeE]", L"^[nNhH]", L"ebet", L"hay\x0131r" },
   { "cs_CZ", L"^[aAyY].*", L"^[nN].*", L"ano", L"ne" },
   { "csb_PL", L"^[JjTtYy].*", L"^[nN].*", L"", L"" },
   { "cy_GB", L"^[iItTyY].*", L"^[nN].*", L"ie", L"na" },
@@ -70,6 +70,7 @@ static struct lc_msg_t lc_msg[] =
   { "de_DE@euro", L"^[jJyY].*", L"^[nN].*", L"", L"" },
   { "de_LU", L"^[jJyY].*", L"^[nN].*", L"", L"" },
   { "de_LU@euro", L"^[jJyY].*", L"^[nN].*", L"", L"" },
+  { "dv_MV", L"^[yY].*", L"^[nN].*", L"", L"" },
   { "dz_BT", L"^[\x0f68Yy].*", L"^[\x0f58Nn].*", L"\x0f68\x0f72\x0f53", L"\x0f58\x0f7a\x0f53" },
   { "el_CY", L"^[\x03bd\x039dyY].*", L"^[\x03bf\x039fnN].*", L"", L"" },
   { "el_GR", L"^[\x03bd\x039dyY].*", L"^[\x03bf\x039fnN].*", L"", L"" },
@@ -87,7 +88,7 @@ static struct lc_msg_t lc_msg[] =
   { "en_NZ", L"^[yY].*", L"^[nN].*", L"", L"" },
   { "en_PH", L"^[yY]", L"^[nN]", L"Yes", L"No" },
   { "en_SG", L"^[yY]", L"^[nN]", L"Yes", L"No" },
-  { "en_US", L"^[yY].*", L"^[nN].*", L"", L"" },
+  { "en_US", L"^[yY].*", L"^[nN].*", L"Yes", L"No" },
   { "en_ZA", L"^[yY]", L"^[nN]", L"", L"" },
   { "en_ZW", L"^[yY]", L"^[nN]", L"", L"" },
   { "es_AR", L"^[sSyY].*", L"^[nN].*", L"", L"" },
@@ -186,6 +187,7 @@ static struct lc_msg_t lc_msg[] =
   { "mr_IN", L"^(Yes|[yY])", L"^(No|[nN])", L"", L"" },
   { "ms_MY", L"^[yY]", L"^[tT]", L"Ya", L"Tidak" },
   { "mt_MT", L"^(Yes|[yY])", L"^(No|[nN])", L"", L"" },
+  { "my_MM", L"^[yY\x101f].*", L"^[nN\x1019].*", L"\x101f\x102f\x1010\x103a\x1010\x101a\x103a", L"\x1019\x101f\x102f\x1010\x103a\x1018\x1030\x1038" },
   { "nan_TW@latin", L"^[sS].*", L"^[mM].*", L"S\x012b", L"M\x0304-S\x012b" },
   { "nb_NO", L"^[JjYy].*", L"^[Nn].*", L"", L"" },
   { "nds_DE", L"^[jJyY].*", L"^[nN].*", L"", L"" },
@@ -208,6 +210,7 @@ static struct lc_msg_t lc_msg[] =
   { "pa_PK", L"^[yY\x0647\x0628\x0066].*", L"^[nN\x0646o].*", L"\x0628\x0644\x0643\x0644", L"\x0646\x0647\x064a\x06ba" },
   { "pap_AN", L"^[jJyY].*", L"^[nN].*", L"", L"" },
   { "pl_PL", L"^[TtYy].*", L"^[nN].*", L"", L"" },
+  { "ps_AF", L"^[yY\x0628\x0066].*", L"^[nN\x062e\x0646o].*", L"", L"" },
   { "pt_BR", L"^[SsyY].*", L"^[nN].*", L"", L"" },
   { "pt_PT", L"^[SsyY].*", L"^[nN].*", L"", L"" },
   { "pt_PT@euro", L"^[SsyY].*", L"^[nN].*", L"", L"" },
@@ -251,7 +254,7 @@ static struct lc_msg_t lc_msg[] =
   { "ti_ET", L"^[yY].*", L"^[nN].*", L"", L"" },
   { "tig_ER", L"^[yY].*", L"^[nN].*", L"", L"" },
   { "tk_TM", L"^[hH].*", L"^[\x00fd\x00ddnN].*", L"hawa", L"\x00fdok" },
-  { "tl_PH", L"^[yY].*", L"^[nN].*", L"", L"" },
+  { "tl_PH", L"^[yY].*", L"^[nN].*", L"Yes", L"No" },
   { "tn_ZA", L"^[yYeE]", L"^[nN]", L"", L"" },
   { "tr_CY", L"^[yYeE]", L"^[nNhH]", L"evet", L"hay\x0131r" },
   { "tr_TR", L"^[yYeE]", L"^[nNhH]", L"evet", L"hay\x0131r" },
index 93c2c34..51cc465 100644 (file)
@@ -360,7 +360,6 @@ __eval_datetimefmt (LCID lcid, LCTYPE type, dt_flags flags, char **ptr,
   wchar_t buf[80];
   wchar_t fc;
   size_t num;
-  DWORD cal;
   mbstate_t mb;
   size_t idx;
   const char *day_str = "edaA";
@@ -400,17 +399,6 @@ __eval_datetimefmt (LCID lcid, LCTYPE type, dt_flags flags, char **ptr,
        if ((flags & DT_ABBREV) && fc != L'y' && idx == 3)
          idx = 2;
        *p++ = '%';
-       /* Check for default calender with offset to gregorian calendar.
-          If so, make era representation the default. */
-       if (fc == L'y'
-           && GetLocaleInfoW (lcid, LOCALE_ICALENDARTYPE
-                                    | LOCALE_RETURN_NUMBER,
-                              (PWCHAR) &cal, sizeof cal / sizeof (WCHAR))
-           && cal > CAL_GREGORIAN_US)
-         {
-           *p++ = 'E';
-           idx = 2;
-         }
        *p++ = t_str[idx];
        break;
       case L'g':
@@ -504,6 +492,29 @@ __set_lc_time_from_win (const char *name, struct lc_time_T *_time_locale,
   if (!new_lc_time_buf)
     return -1;
   char *lc_time_ptr = new_lc_time_buf;
+
+  char locale[ENCODING_LEN + 1];
+  strcpy (locale, name);
+  /* Removes the charset from the locale and attach the modifer to the
+     language_TERRITORY part. */
+  char *c = strchr (locale, '.');
+  if (c)
+    {
+      *c = '\0';
+      char *c2 = strchr (c + 1, '@');
+      /* Ignore @cjknarrow modifier since it's a very personal thing between
+        Cygwin and newlib... */
+      if (c2 && strcmp (c2, "@cjknarrow"))
+       memmove (c, c2, strlen (c2) + 1);
+    }
+  /* Now search in the alphabetically order lc_era array for the
+     locale. */
+  lc_era_t locale_key = { locale, NULL, NULL, NULL, NULL, NULL ,
+                                 NULL, NULL, NULL, NULL, NULL };
+  lc_era_t *era = (lc_era_t *) bsearch ((void *) &locale_key, (void *) lc_era,
+                                       sizeof lc_era / sizeof *lc_era,
+                                       sizeof *lc_era, locale_cmp);
+
   /* mon */
   for (int i = 0; i < 12; ++i)
     _time_locale->mon[i] = getlocaleinfo (time, LOCALE_SABBREVMONTHNAME1 + i);
@@ -520,25 +531,63 @@ __set_lc_time_from_win (const char *name, struct lc_time_T *_time_locale,
   _time_locale->weekday[0] = getlocaleinfo (time, LOCALE_SDAYNAME7);
   for (int i = 0; i < 6; ++i)
     _time_locale->weekday[i + 1] = getlocaleinfo (time, LOCALE_SDAYNAME1 + i);
+
+  size_t len;
   /* X_fmt */
-  _time_locale->X_fmt = eval_datetimefmt (LOCALE_STIMEFORMAT, DT_DEFAULT);
+  if (era && *era->t_fmt)
+    {
+      _time_locale->X_fmt = (const char *) lc_time_ptr;
+      len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, era->t_fmt,
+                        lc_time_end - lc_time_ptr) + 1;
+      lc_time_ptr += len;
+    }
+  else
+    _time_locale->X_fmt = eval_datetimefmt (LOCALE_STIMEFORMAT, DT_DEFAULT);
   /* x_fmt */
-  _time_locale->x_fmt = eval_datetimefmt (LOCALE_SSHORTDATE, DT_DEFAULT);
+  if (era && *era->d_fmt)
+    {
+      _time_locale->x_fmt = (const char *) lc_time_ptr;
+      len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, era->d_fmt,
+                        lc_time_end - lc_time_ptr) + 1;
+      lc_time_ptr += len;
+    }
+  else
+    _time_locale->x_fmt = eval_datetimefmt (LOCALE_SSHORTDATE, DT_DEFAULT);
   /* c_fmt */
-  _time_locale->c_fmt = eval_datetimefmt (LOCALE_SLONGDATE, DT_ABBREV);
-  --lc_time_ptr;
-  *lc_time_ptr++ = ' ';
-  eval_datetimefmt (LOCALE_STIMEFORMAT, DT_DEFAULT);
+  if (era && *era->d_t_fmt)
+    {
+      _time_locale->c_fmt = (const char *) lc_time_ptr;
+      len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, era->d_t_fmt,
+                        lc_time_end - lc_time_ptr) + 1;
+      lc_time_ptr += len;
+    }
+  else
+    {
+      _time_locale->c_fmt = eval_datetimefmt (LOCALE_SLONGDATE, DT_ABBREV);
+      --lc_time_ptr;
+      *lc_time_ptr++ = ' ';
+      eval_datetimefmt (LOCALE_STIMEFORMAT, DT_DEFAULT);
+    }
   /* AM/PM */
   _time_locale->am_pm[0] = getlocaleinfo (time, LOCALE_S1159);
   _time_locale->am_pm[1] = getlocaleinfo (time, LOCALE_S2359);
   /* date_fmt */
-  _time_locale->date_fmt = eval_datetimefmt (LOCALE_SLONGDATE, DT_ABBREV);
-  --lc_time_ptr;
-  *lc_time_ptr++ = ' ';
-  eval_datetimefmt (LOCALE_STIMEFORMAT, DT_DEFAULT);
-  --lc_time_ptr;
-  lc_time_ptr = stpcpy (lc_time_ptr, " %Z") + 1;
+  if (era && *era->date_fmt)
+    {
+      _time_locale->date_fmt = (const char *) lc_time_ptr;
+      len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, era->date_fmt,
+                        lc_time_end - lc_time_ptr) + 1;
+      lc_time_ptr += len;
+    }
+  else
+    {
+      _time_locale->date_fmt = eval_datetimefmt (LOCALE_SLONGDATE, DT_ABBREV);
+      --lc_time_ptr;
+      *lc_time_ptr++ = ' ';
+      eval_datetimefmt (LOCALE_STIMEFORMAT, DT_DEFAULT);
+      --lc_time_ptr;
+      lc_time_ptr = stpcpy (lc_time_ptr, " %Z") + 1;
+    }
   /* md */
   {
     wchar_t buf[80];
@@ -546,41 +595,26 @@ __set_lc_time_from_win (const char *name, struct lc_time_T *_time_locale,
     lc_time_ptr = stpcpy (lc_time_ptr, *buf == L'1' ? "dm" : "md") + 1;
   }
   /* ampm_fmt */
-  _time_locale->ampm_fmt = eval_datetimefmt (LOCALE_STIMEFORMAT, DT_AMPM);
-
-  /* TODO */
-  char locale[ENCODING_LEN + 1];
-  char *c, *c2;
-
-  strcpy (locale, name);
-  /* Removes the charset from the locale and attach the modifer to the
-     language_TERRITORY part. */
-  c = strchr (locale, '.');
-  if (c)
+  if (era)
     {
-      *c = '\0';
-      c2 = strchr (c + 1, '@');
-      /* Ignore @cjknarrow modifier since it's a very personal thing between
-        Cygwin and newlib... */
-      if (c2 && strcmp (c2, "@cjknarrow"))
-       memmove (c, c2, strlen (c2) + 1);
+      _time_locale->ampm_fmt = (const char *) lc_time_ptr;
+      len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, era->t_fmt_ampm,
+                        lc_time_end - lc_time_ptr) + 1;
+      lc_time_ptr += len;
     }
-  /* Now search in the alphabetically order lc_era array for the
-     locale. */
-  lc_era_t locale_key = { locale, NULL, NULL, NULL, NULL, NULL };
-  lc_era_t *res = (lc_era_t *) bsearch ((void *) &locale_key, (void *) lc_era,
-                                       sizeof lc_era / sizeof *lc_era,
-                                       sizeof *lc_era, locale_cmp);
-  if (res)
+  else
+    _time_locale->ampm_fmt = eval_datetimefmt (LOCALE_STIMEFORMAT, DT_AMPM);
+
+  if (era)
     {
       /* Evaluate string length in target charset.  Characters invalid in the
         target charset are simply ignored, as on Linux. */
-      size_t len = 0;
-      len += lc_wcstombs (f_wctomb, charset, NULL, res->era, 0) + 1;
-      len += lc_wcstombs (f_wctomb, charset, NULL, res->era_d_fmt, 0) + 1;
-      len += lc_wcstombs (f_wctomb, charset, NULL, res->era_d_t_fmt, 0) + 1;
-      len += lc_wcstombs (f_wctomb, charset, NULL, res->era_t_fmt, 0) + 1;
-      len += lc_wcstombs (f_wctomb, charset, NULL, res->alt_digits, 0) + 1;
+      len = 0;
+      len += lc_wcstombs (f_wctomb, charset, NULL, era->era, 0) + 1;
+      len += lc_wcstombs (f_wctomb, charset, NULL, era->era_d_fmt, 0) + 1;
+      len += lc_wcstombs (f_wctomb, charset, NULL, era->era_d_t_fmt, 0) + 1;
+      len += lc_wcstombs (f_wctomb, charset, NULL, era->era_t_fmt, 0) + 1;
+      len += lc_wcstombs (f_wctomb, charset, NULL, era->alt_digits, 0) + 1;
 
       /* Make sure data fits into the buffer */
       if (lc_time_ptr + len > lc_time_end)
@@ -588,7 +622,7 @@ __set_lc_time_from_win (const char *name, struct lc_time_T *_time_locale,
          len = lc_time_ptr + len - new_lc_time_buf;
          char *tmp = (char *) realloc (new_lc_time_buf, len);
          if (!tmp)
-           res = NULL;
+           era = NULL;
          else
            {
              lc_time_ptr = tmp + (lc_time_ptr - new_lc_time_buf);
@@ -597,32 +631,32 @@ __set_lc_time_from_win (const char *name, struct lc_time_T *_time_locale,
            }
        }
       /* Copy over */
-      if (res)
+      if (era)
        {
          /* era */
          _time_locale->era = (const char *) lc_time_ptr;
-         len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, res->era,
+         len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, era->era,
                             lc_time_end - lc_time_ptr) + 1;
          /* era_d_fmt */
          _time_locale->era_d_fmt = (const char *) (lc_time_ptr += len);
-         len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, res->era_d_fmt,
+         len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, era->era_d_fmt,
                             lc_time_end - lc_time_ptr) + 1;
          /* era_d_t_fmt */
          _time_locale->era_d_t_fmt = (const char *) (lc_time_ptr += len);
-         len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, res->era_d_t_fmt,
+         len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, era->era_d_t_fmt,
                             lc_time_end - lc_time_ptr) + 1;
          /* era_t_fmt */
          _time_locale->era_t_fmt = (const char *) (lc_time_ptr += len);
-         len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, res->era_t_fmt,
+         len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, era->era_t_fmt,
                             lc_time_end - lc_time_ptr) + 1;
          /* alt_digits */
          _time_locale->alt_digits = (const char *) (lc_time_ptr += len);
-         len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, res->alt_digits,
+         len = lc_wcstombs (f_wctomb, charset, lc_time_ptr, era->alt_digits,
                             lc_time_end - lc_time_ptr) + 1;
          lc_time_ptr += len;
        }
     }
-  if (!res)
+  if (!era)
     {
       _time_locale->era =
       _time_locale->era_d_fmt = 
@@ -817,19 +851,19 @@ __set_lc_messages_from_win (const char *name,
   /* Now search in the alphabetically order lc_msg array for the
      locale. */
   lc_msg_t locale_key = { locale, NULL, NULL, NULL, NULL };
-  lc_msg_t *res = (lc_msg_t *) bsearch ((void *) &locale_key, (void *) lc_msg,
+  lc_msg_t *msg = (lc_msg_t *) bsearch ((void *) &locale_key, (void *) lc_msg,
                                        sizeof lc_msg / sizeof *lc_msg,
                                        sizeof *lc_msg, locale_cmp);
-  if (!res)
+  if (!msg)
     return 0;
 
   /* Evaluate string length in target charset.  Characters invalid in the
      target charset are simply ignored, as on Linux. */
   size_t len = 0;
-  len += lc_wcstombs (f_wctomb, charset, NULL, res->yesexpr, 0) + 1;
-  len += lc_wcstombs (f_wctomb, charset, NULL, res->noexpr, 0) + 1;
-  len += lc_wcstombs (f_wctomb, charset, NULL, res->yesstr, 0) + 1;
-  len += lc_wcstombs (f_wctomb, charset, NULL, res->nostr, 0) + 1;
+  len += lc_wcstombs (f_wctomb, charset, NULL, msg->yesexpr, 0) + 1;
+  len += lc_wcstombs (f_wctomb, charset, NULL, msg->noexpr, 0) + 1;
+  len += lc_wcstombs (f_wctomb, charset, NULL, msg->yesstr, 0) + 1;
+  len += lc_wcstombs (f_wctomb, charset, NULL, msg->nostr, 0) + 1;
   /* Allocate. */
   char *new_lc_messages_buf = (char *) malloc (len);
   const char *lc_messages_end = new_lc_messages_buf + len;
@@ -839,13 +873,13 @@ __set_lc_messages_from_win (const char *name,
   /* Copy over. */
   c = new_lc_messages_buf;
   _messages_locale->yesexpr = (const char *) c;
-  len = lc_wcstombs (f_wctomb, charset, c, res->yesexpr, lc_messages_end - c);
+  len = lc_wcstombs (f_wctomb, charset, c, msg->yesexpr, lc_messages_end - c);
   _messages_locale->noexpr = (const char *) (c += len + 1);
-  len = lc_wcstombs (f_wctomb, charset, c, res->noexpr, lc_messages_end - c);
+  len = lc_wcstombs (f_wctomb, charset, c, msg->noexpr, lc_messages_end - c);
   _messages_locale->yesstr = (const char *) (c += len + 1);
-  len = lc_wcstombs (f_wctomb, charset, c, res->yesstr, lc_messages_end - c);
+  len = lc_wcstombs (f_wctomb, charset, c, msg->yesstr, lc_messages_end - c);
   _messages_locale->nostr = (const char *) (c += len + 1);
-  lc_wcstombs (f_wctomb, charset, c, res->nostr, lc_messages_end - c);
+  lc_wcstombs (f_wctomb, charset, c, msg->nostr, lc_messages_end - c);
   /* Aftermath. */
   if (*lc_messages_buf)
     free (*lc_messages_buf);