summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/nlsfuncs.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* * nlsfuncs.cc (has_modifier): MOve up in file to use inCorinna Vinschen2010-02-061-27/+50
| | | | | | | | | | __get_lcid_from_locale as well. (__get_lcid_from_locale): Handle no_NO locale as alias for nn_NO. Default all sr_XY locales to Cyrillic script. Change lcid to Latin script if "@latin" modifier has been specified. (__set_charset_from_locale): Handle Serbian in codepage 1251 case as well. Also check for sr_BA lcid. Restrict "@euro" modifier to locales otherwise defaulting to ISO-8859-1.
* * nlsfuncs.cc (__set_charset_from_locale): Set default charset forCorinna Vinschen2010-02-061-0/+4
| | | | "ka_GE" locale to GEORGIAN-PS, for "kk_KZ" to PT154.
* * nlsfuncs.cc (__set_charset_from_locale): Set default locale forCorinna Vinschen2010-02-051-2/+3
| | | | "uz_UZ" locale to ISO-8859-1, with the "@cyrillic" modifier to UTF-8.
* Replace regex files with multibyte-aware version from FreeBSD.Corinna Vinschen2010-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (install-headers): Remove extra command to install regex.h. (uninstall-headers): Remove extra command to uninstall regex.h. * nlsfuncs.cc (collate_lcid): Make externally available to allow access to collation internals from regex functions. (collate_charset): Ditto. * wchar.h: Add __cplusplus guards to make C-clean. * include/regex.h: New file, replacing regex/regex.h. Remove UCB advertising clause. * regex/COPYRIGHT: Accommodate BSD license. Remove UCB advertising clause. * regex/cclass.h: Remove. * regex/cname.h: New file from FreeBSD. * regex/engine.c: Ditto. (NONCHAR): Tweak for Cygwin. * regex/engine.ih: Remove. * regex/mkh: Remove. * regex/regcomp.c: New file from FreeBSD. Tweak slightly for Cygwin. Import required collate internals from nlsfunc.cc. (p_ere_exp): Add GNU-specific \< and \> handling for word boundaries. (p_simp_re): Ditto. (__collate_range_cmp): Define. (p_b_term): Use Cygwin-specific collate internals. (findmust): Ditto. * regex/regcomp.ih: Remove. * regex/regerror.c: New file from FreeBSD. Fix a few compiler warnings. * regex/regerror.ih: Remove. * regex/regex.7: New file from FreeBSD. Remove UCB advertising clause. * regex/regex.h: Remove. Replaced by include/regex.h. * regex/regexec.c: New file from FreeBSD. Fix a few compiler warnings. * regex/regfree.c: New file from FreeBSD. * regex/tests: Remove. * regex/utils.h: New file from FreeBSD.
* * nlsfuncs.cc (__get_lcid_from_locale): Add comments. Fix typos inCorinna Vinschen2010-01-251-12/+26
| | | | | | | | comments. Make sure to set last_lcid every time. Return locale without territory part as invalid. Handle modern serbian territory names per ISO 3166 on older systems as well. Add appropriate comment. (__set_charset_from_locale): Handle LCID for sr_CS as well to make older systems happy.
* * nlsfuncs.cc (__set_charset_from_locale): Rearrange to set charsetCorinna Vinschen2010-01-251-28/+89
| | | | more closely aligned to Glibc.
* * nlsfuncs.cc (__get_lcid_from_locale): Fix a comment. Handle specialCorinna Vinschen2010-01-251-3/+63
| | | | language/TERRITORY combinations explicitely. Explain why.
* * nlsfuncs.cc (__set_charset_from_locale): Fix comment.Corinna Vinschen2010-01-241-3/+1
|
* * nlsfuncs.cc (check_codepage): Move from syscalls.cc here.Corinna Vinschen2010-01-241-1/+109
| | | | | | | | | (internal_setlocale): Ditto. (initial_setlocale): Ditto. (setlocale): Ditto. * strfuncs.cc (__sjis_wctomb): Revert previous patch. (__sjis_mbtowc): Ditto. * syscalls.cc: Move setlocale-related functions to nlsfuncs.cc.
* * nlsfuncs.cc (wcsxfrm): Call LCMapStringW with LCMAP_BYTEREV flag toCorinna Vinschen2010-01-231-1/+1
| | | | allow correct comparison using wcscmp.
* * Makefile.in (DLL_OFILES): Add nlsfunc.o and strfmon.o.Corinna Vinschen2010-01-221-0/+764
* autoload.cc (LocaleNameToLCID): Define. * cygwin.din (strfmon): Export. * nlsfuncs.cc: New file. Define a lot of internal functions called from setlocale. (wcscoll): Implement locale-aware here, using CompareStringW function. (strcoll): Ditto. (wcsxfrm): Implement locale-aware here, usingLCMapStringW function. (strxfrm): Ditto. (__set_charset_from_locale): Replace __set_charset_from_codepage. Return Linux-compatible charset. * strfuncs.cc (__set_charset_from_codepage): Remove. * wchar.h (__set_charset_from_codepage): Drop definition. * wincap.h (wincaps::has_localenames): New element. * wincap.cc: Implement above element throughout. * libc/strfmon.c: New file. * libc/strptime.cc: Remove locale constant strings in favor of access to locale-specifc data. (strptime): Point _CurrentTimeLocale to locale-specific data. Throughout use correct locale-specific format fields for all locale-specific formats. * include/monetary.h: New file. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.