Commit Graph

12 Commits

Author SHA1 Message Date
David Chisnall
3c87aa1d3d Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter.  Also
adds support for per-thread locales.  This work was funded by the FreeBSD
Foundation.

Please test any code you have that uses the C standard locale functions!

Reviewed by:    das (gdtoa changes)
Approved by:    dim (mentor)
2011-11-20 14:45:42 +00:00
Alexey Zelkin
bcbeac34ae * style(9)'fy
* declare prototype for __time_load_locale() in timelocal.h
2002-01-24 15:07:44 +00:00
Andrey A. Chernov
faeb1b822a Relax local FreeBSD restrictions on 3 chars abbrev. name length and %c format
since they not allows POSIXly legal locale data. Currently, if relaxed form
POSIXly legal locale data will be used right now, some programs will be broken,
but it means that either locale data or programs must be fixed, not the library.

Introduce non-standard md_order (month/day order) locale field to be used later
via nl_langinfo(). Currently %EF and %Ef emulated using this field, but they
planned for remove in future in favour of nl_langinfo() test field.

Implement %F per POSIX
2001-03-18 11:58:15 +00:00
Andrey A. Chernov
50bab1e6fb Implement ampm_fmt (%r) per POSIX 2001-03-02 22:10:04 +00:00
Andrey A. Chernov
740972dc72 Hardcode c_fmt in a different way since used in nl_langinfo now 2001-02-08 20:55:38 +00:00
Alexey Zelkin
18f3e1e400 Export internal data structures in same manner as numeric/monetary/messages
structures exported.
Protect timelocal.h from multiple inclusions.
2001-02-08 17:06:37 +00:00
Andrey A. Chernov
aabf7d45a4 Treat c_fmt field as compatibility placeholder 2000-10-26 16:20:57 +00:00
Andrey A. Chernov
c63a4303ab %Ex -> %Ef to not conflict with POSIX
Add %EF (long months name / day order)
Check that O and E not intermixed
Add missing POSIX extension to example
1999-11-30 19:24:07 +00:00
Andrey A. Chernov
11cd0d3241 Add %Ex extension to determine "%e %b" or "%b %e" order
Separate alternative for O and E cases
1999-11-30 07:33:37 +00:00
Dmitrij Tejblum
da3785ef12 Implement new format specifier for strftime: %OB, alternative national
representation of the full month name. In the Russian locale, this alternative
will be "nominative case", useful when the date designate month as a whole.
E.g. month heading in a calendar. I hope it can be useful for some other
locales too.

Discussed with:	wollman, ache
1999-09-11 21:35:21 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Joerg Wunsch
37486f035f Import strptime(3) into libc. We've got permission by Kevin Ruddy to
modify the original `no modifications' copyright message, and i've
included his mail into the source file.

The common localization functions between strptime(3) and strftime(3)
have been broken out into timelocal.[ch].
1997-08-09 15:43:59 +00:00