]> sourceware.org Git - newlib-cygwin.git/commitdiff
* libc/locale/timelocal.h (struct lc_time_T): Add missing ERA-related
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 18 Feb 2010 17:35:15 +0000 (17:35 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 18 Feb 2010 17:35:15 +0000 (17:35 +0000)
members.
* libc/locale/timelocal.c (_C_time_local): Set new members to empty
strings.
* libc/locale/nl_langinfo.c (nl_langinfo): Return values from
__get_current_time_locale() for ERA related requests.

newlib/ChangeLog
newlib/libc/locale/nl_langinfo.c
newlib/libc/locale/timelocal.c
newlib/libc/locale/timelocal.h

index f2554c3c4a208c61335e7e3128eb98900b675fbd..c2064598cab76a10a3e2e063e90ac7e8e1b03ed4 100644 (file)
@@ -1,3 +1,12 @@
+2010-02-18  Corinna Vinschen  <corinna@vinschen.de>
+
+       * libc/locale/timelocal.h (struct lc_time_T): Add missing ERA-related
+       members.
+       * libc/locale/timelocal.c (_C_time_local): Set new members to empty
+       strings.
+       * libc/locale/nl_langinfo.c (nl_langinfo): Return values from
+       __get_current_time_locale() for ERA related requests.
+
 2010-02-16  Corinna Vinschen  <corinna@vinschen.de>
 
        * libc/ctype/iswblank.c (iswblank): Remove Unicode characters
index 8e8856de7fe03a0ad73c0bf2f376be21422c0d54..2f47c8735252d05e68e3463f89a7c71cab7d6ad1 100644 (file)
@@ -175,24 +175,19 @@ _DEFUN(nl_langinfo, (item),
                ret = (char*) __get_current_time_locale()->mon[_REL(ABMON_1)];
                break;
        case ERA:
-               /* XXX: need to be implemented  */
-               ret = "";
+               ret = (char*) __get_current_time_locale()->era;
                break;
        case ERA_D_FMT:
-               /* XXX: need to be implemented  */
-               ret = "";
+               ret = (char*) __get_current_time_locale()->era_d_fmt;
                break;
        case ERA_D_T_FMT:
-               /* XXX: need to be implemented  */
-               ret = "";
+               ret = (char*) __get_current_time_locale()->era_d_t_fmt;
                break;
        case ERA_T_FMT:
-               /* XXX: need to be implemented  */
-               ret = "";
+               ret = (char*) __get_current_time_locale()->era_t_fmt;
                break;
        case ALT_DIGITS:
-               /* XXX: need to be implemented  */
-               ret = "";
+               ret = (char*) __get_current_time_locale()->alt_digits;
                break;
        case RADIXCHAR:
                ret = (char*) __get_current_numeric_locale()->decimal_point;
index 17b9a2350ee5eff93f610cc7549ef8d103b55ebc..4c0f50c76654eb5782e57f7980019471126a0522 100644 (file)
@@ -92,7 +92,33 @@ static const struct lc_time_T        _C_time_locale = {
        /* ampm_fmt
         * To determine 12-hour clock format time (empty, if N/A)
         */
-       "%I:%M:%S %p"
+       "%I:%M:%S %p",
+
+       /* era
+        * Era.  This and the following entries are used if the alternative
+        * date format is specified in strftime
+        */
+       "",
+
+       /* era_d_fmt
+        * Era date format used with the %Ex
+        */
+       "",
+
+       /* era_d_t_fmt
+        * Era date/time format (%Ec)
+        */
+       "",
+
+       /* era_t_fmt
+        * Era time format (%EX)
+        */
+       "",
+
+       /* alt_digits
+        * Alternate digits used if %O format prefix is specified
+        */
+       ""
 };
 
 struct lc_time_T *
index e232a7304638d302854e02abe3511b8eea3f9f97..80f72b66e82982c6308a2c4458e9780d88195006 100644 (file)
@@ -50,6 +50,11 @@ struct lc_time_T {
        const char      *alt_month[12];
        const char      *md_order;
        const char      *ampm_fmt;
+       const char      *era;
+       const char      *era_d_fmt;
+       const char      *era_d_t_fmt;
+       const char      *era_t_fmt;
+       const char      *alt_digits;
 };
 
 struct lc_time_T *__get_current_time_locale(void);
This page took 0.053927 seconds and 5 git commands to generate.