1 /* $NetBSD: src/lib/libc/locale/nl_langinfo.c,v 1.10 2004/07/21 20:27:46 tshiozak Exp $ */
2 /* $DragonFly: src/lib/libc/locale/nl_langinfo.c,v 1.4 2005/04/21 16:36:34 joerg Exp $ */
5 * Written by J.T. Conklin <jtc@NetBSD.org>.
9 #include <sys/localedef.h>
17 nl_langinfo(nl_item item
)
23 s
= _CurrentTimeLocale
->d_t_fmt
;
26 s
= _CurrentTimeLocale
->d_fmt
;
29 s
= _CurrentTimeLocale
->t_fmt
;
32 s
= _CurrentTimeLocale
->t_fmt_ampm
;
36 s
= _CurrentTimeLocale
->am_pm
[(size_t)(item
- AM_STR
)];
45 s
= _CurrentTimeLocale
->day
[(size_t)(item
- DAY_1
)];
54 s
= _CurrentTimeLocale
->abday
[(size_t)(item
- ABDAY_1
)];
68 s
= _CurrentTimeLocale
->mon
[(size_t)(item
- MON_1
)];
82 s
= _CurrentTimeLocale
->abmon
[(size_t)(item
- ABMON_1
)];
85 s
= _CurrentNumericLocale
->decimal_point
;
88 s
= _CurrentNumericLocale
->thousands_sep
;
91 s
= _CurrentMessagesLocale
->yesstr
;
94 s
= _CurrentMessagesLocale
->yesexpr
;
97 s
= _CurrentMessagesLocale
->nostr
;
100 s
= _CurrentMessagesLocale
->noexpr
;
102 case CRNCYSTR
: /* XXX */
106 s
= _CurrentRuneLocale
->rl_codeset
;
110 case _DATE_FMT
: /* local extension */
111 s
= _CurrentTimeLocale
->date_fmt
;
118 /* The return value should be really const, but the interface says OW */
119 /* LINTED const castaway. */