Alexandre Julliard
0c16953336
msvcrt: Fetch locale codepage directly as an integer.
...
This avoids preloading all the codepage files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 18:28:53 +01:00
Jeff Smith
f174eb072d
msvcrt: Create global C locale __lc_time_data struct.
...
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:49:29 +01:00
Piotr Caban
c4b41fd4f1
msvcrt: Mark __lc_time_data strings const.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:47:32 +01:00
Piotr Caban
1b6eee3069
msvcrt: Don't depend on how __lc_time_data was allocated in _Gettnames.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:47:22 +01:00
Piotr Caban
9571b36241
msvcrt: Don't depend on how __lc_time_data was allocated in _W_Getmonths.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:47:17 +01:00
Piotr Caban
e4f3dea2e8
msvcrt: Don't depend on how __lc_time_data was allocated in _Getmonths.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:47:13 +01:00
Piotr Caban
2d23512da1
msvcrt: Don't depend on how __lc_time_data was allocated in _W_Getdays.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:47:08 +01:00
Piotr Caban
66d702668a
msvcrt: Don't depend on how __lc_time_data was allocated in _Getdays.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:47:04 +01:00
Jeff Smith
dba7dac458
msvcrt: Factor out code for creating lc_time_data structure.
...
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:46:53 +01:00
Piotr Caban
f48ea29726
msvcrt: Use _strnicmp instead of strncasecmp.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:36 +01:00
Piotr Caban
462caf8fbd
msvcrt: Use _stricmp instead of strcasecmp.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:34 +01:00
Gijs Vermeulen
3229074824
msvcr120: Add [to]wctrans.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46848
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 22:57:51 +01:00
Piotr Caban
e867af3bfe
msvcrt: Optimize tolower function when locale was never changed.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:41:52 +01:00
Michael Stefaniuc
af4821ca81
msvcrt: Use the ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 21:01:09 +02:00
Piotr Caban
7122c9d41d
msvcr110: Try SNAME when matching locale.
...
Based on patch by Daniel Lehman.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-09 19:47:28 +02:00
Piotr Caban
8905bd92aa
msvcrt: Support "China" country name in setlocale function.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-09 09:58:23 +02:00
Alex Henrie
f0e74961e1
msvcrt: Fix mistakes in comments.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-10 18:49:24 +01:00
Alex Henrie
6a76d027f2
msvcrt: Don't include MSVC 11.0+ function _wcreate_locale in SOs for older DLLs.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-10 18:49:05 +01:00
Alex Henrie
512c945e9a
msvcrt: Don't include MSVC 8.0+ locale functions in SOs for older DLLs.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-05 18:51:28 +01:00
Zebediah Figura
249cc1e845
msvcrt: _Gettnames() should respect user overrides.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-04 21:46:59 +01:00
Piotr Caban
ec650d88f4
msvcrt: Use charmax to initialize lconv fields.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-22 16:44:46 +01:00
Piotr Caban
dd4c9358f6
msvcrt: Add _wcreate_locale.
...
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:37 +09:00
Alexandre Julliard
1edd0f4d1d
msvcrt: Get rid of the LOCK_LOCALE macros.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 00:09:23 +09:00
Alex Henrie
c044cf410d
ucrtbase: Implement _(un)lock_locales.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-17 00:09:23 +09:00
Piotr Caban
de12cd580a
msvcr100: Add missing fields to lconv structure.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-05 01:27:53 +09:00
Piotr Caban
59ed8c593c
msvcr110: Add _W_Gettnames implementation.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-20 21:19:27 +09:00
Piotr Caban
d4450b9195
msvcr110: Fix __lc_time_data definition.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-20 21:19:21 +09:00
Piotr Caban
f9bae3e5a2
msvcrt: Only create locale categories that have changed in setlocale function.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
2015-09-25 21:04:13 +02:00
Piotr Caban
f075043273
msvcrt: Use create_locinfo helper in setlocale implementation.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
2015-09-25 21:04:12 +02:00
Piotr Caban
ca8ef840ad
msvcrt: Add create_locinfo helper function.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
2015-09-25 21:04:10 +02:00
Piotr Caban
905daf251a
msvcrt: Pass pthreadlocinfo to set_lc_locale_name function.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
2015-09-25 21:04:04 +02:00
Piotr Caban
d04c895b91
msvcrt: Pass pthreadlocinfo to update_threadlocinfo_category helper function.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
2015-09-25 21:04:00 +02:00
Piotr Caban
e9eec98d5c
msvcrt: Cache locale string to LCID conversion results.
2015-06-24 22:57:00 +09:00
Piotr Caban
d940ac2412
msvcr110: Add __crtGetLocaleInfoEx implementation.
2015-06-22 20:58:31 +09:00
Piotr Caban
f55192aabc
msvcr120: Add ___lc_locale_name_func implementation.
2015-06-17 20:01:17 +09:00
Daniel Lehman
1a4db7cdf5
msvcrt: Add _W_GetMonths.
2015-06-10 15:26:11 +09:00
Daniel Lehman
bc1eaf7a0f
msvcrt: Add _W_Getdays.
2015-06-10 15:26:10 +09:00
Yifu Wang
08d0508993
msvcr120: Added wchar_t* fields to struct MSVCRT_lconv.
2014-12-03 21:34:27 +01:00
Alexandre Julliard
0c496f0280
msvcrt: Update comments for non-exported functions.
2014-04-21 14:32:40 +02:00
Alexandre Julliard
b88630a42d
msvcrt: Return per-thread information also in lc_codepage_func and lc_handle_func.
2014-01-13 17:37:17 +01:00
Piotr Caban
33d697c001
msvcrt: Add _wsetlocale implementation.
2013-08-29 19:56:17 +02:00
Victor Martinez Calvo
f2b78d1fd0
msvcrt: Fix copy-pasta typos LOCALE_SSHORTDATE->LOCALE_SLONGDATE in _create_locale.
2013-04-04 13:28:46 +02:00
Piotr Caban
12b8c9671e
msvcrt: Update spec file with functions added in newer version of the dll.
2013-03-28 18:54:26 +01:00
Andrew Talbot
d8efcc9cb3
msvcrt: Avoid signed-unsigned integer comparisons.
2013-02-20 10:33:38 +01:00
Piotr Caban
a406d538bb
msvcrt: Fixed locale matching code.
2012-12-18 12:38:17 +01:00
Piotr Caban
7afc98a7f7
msvcrt: Fixed codepage setting code in create_locale.
2012-12-18 12:38:12 +01:00
Francois Gouget
d8ed347ab3
msvcrt: Fix the name of the Portuguese locale alias.
2012-06-13 21:35:42 +02:00
Piotr Caban
2759779990
msvcrt: Fix months and weekday names in C locale.
2012-04-13 16:10:10 +02:00
Piotr Caban
ef08e80765
msvcrt: Added _Strftime implementation.
2012-04-11 18:23:23 +02:00
Piotr Caban
b58cfb40b9
msvcrt: Added field names to MSVCRT___lc_time_data structure.
2012-04-11 18:21:00 +02:00
Piotr Caban
426e58be69
msvcrt: Set correct date and time format for C locale.
2012-04-11 18:20:52 +02:00
Piotr Caban
17f0ee4622
msvcrt: NULL terminate strings returned by _Getdays and _Getmonths.
2011-12-28 17:50:11 +01:00
Piotr Caban
283c07b8ce
msvcp90: Added ctype<char>::tolower functions implementation.
2011-12-21 18:05:47 +01:00
Piotr Caban
d82dd2a4db
msvcrt: Added _Getmonths implementation.
2011-12-07 17:50:05 +01:00
Piotr Caban
7a43f0cb8f
msvcrt: Added _Getdays implementation.
2011-12-07 17:50:05 +01:00
Piotr Caban
4bb1e9c32a
msvcrt: Added _Gettnames implementation.
2011-12-07 17:50:04 +01:00
Piotr Caban
344883fb85
msvcrt: Initialize lc_time_curr inside create_locale.
2011-12-07 17:50:04 +01:00
Piotr Caban
dbff7a1ca2
msvcrt: Fix lc_collate_cp initialization.
2011-12-06 15:51:00 +01:00
Piotr Caban
f84858ac2c
msvcrt: Added _get_current_locale implementation.
2011-12-06 15:51:00 +01:00
Thomas Faber
e374c8fe46
msvcrt: Fix MSVC build in locale.c.
2011-11-07 11:29:49 +01:00
Piotr Caban
698afdca98
msvcrt: Don't search for LCID in _setmbcp_l if it was already done.
2011-10-26 17:07:05 +02:00
Piotr Caban
0bb641ad59
msvcrt: Initialize all ctype fields.
2011-10-18 18:29:19 +02:00
Marcus Meissner
6ca6464cf3
msvcrt: Replaced bad memcpy by strcpy (Coverity).
2011-10-17 17:45:05 +02:00
Piotr Caban
922ae2e268
msvcrt: Fix handling of locales without region in MSVCRT_locale_to_LCID.
2011-10-14 13:12:28 +02:00
Piotr Caban
95f3be6573
msvcrt: Added missing calling convention specification.
2011-10-14 13:12:28 +02:00
Piotr Caban
fea69b2305
msvcrt: Don't duplicate _setmbcp functionality inside _create_locale function.
2011-10-13 19:57:19 +02:00
Piotr Caban
0f53100ade
msvcrt: Move _pctype definition to locale.c.
2011-10-12 17:09:30 +02:00
Piotr Caban
cfca12e486
msvcrt: Use ismbcodepage instead of mb_cur_max in mbcodepage dependent functions.
2011-10-12 17:09:20 +02:00
Piotr Caban
cf27cb4927
msvcrt: Don't overwrite mbcinfo inside setlocale.
2011-10-12 17:09:07 +02:00
Andrew Talbot
2df8dced84
msvcrt: Mark some fall-throughs in a switch statement.
2011-10-08 17:40:18 +02:00
Andrew Talbot
dce81b9465
msvcrt: Constify some variables.
2011-08-23 16:53:53 +02:00
Piotr Caban
2b9d946aea
msvcrt: Fix pclmap and pcumap for "C" locale.
2011-06-03 17:44:06 +02:00
Piotr Caban
f9de4eef75
msvcrt: Fix mingw compilation issues.
2011-06-03 17:44:06 +02:00
Piotr Caban
27ff2ae967
msvcrt: Improved locale initialization.
2011-05-26 13:38:22 +02:00
Piotr Caban
e15ac98cbc
msvcrt: Change the way locale information is stored in __thread_data.
2011-05-25 11:46:07 +02:00
Piotr Caban
6991ac0331
msvcrt: Use get_locinfo instead of get_locale.
2011-05-25 11:45:42 +02:00
Piotr Caban
11bfced55d
msvcrt: Use _create_locale instead of setlocale during initialization.
2011-05-25 11:45:14 +02:00
Piotr Caban
68239a620c
msvcrt: Fix locale creation for multibyte encoding.
2011-03-31 18:09:27 +02:00
Andrew Nguyen
dd1b937287
msvcrt: Null terminate the temporary locale buffer in _create_locale.
...
Spotted with Valgrind.
2011-01-17 15:57:16 +01:00
Alexandre Julliard
c5e88a3a69
msvcrt: Use the correct strdup function for locale data.
2010-06-28 11:45:01 +02:00
Piotr Caban
c0637edda2
msvcrt: Added __crtLCMapStringW partial implementation.
2010-06-22 13:51:30 +02:00
Nikolay Sivov
90013af6f9
msvcrt: Fix __lconv_init() prototype.
2010-06-11 11:36:54 +02:00
Marcus Meissner
27a28bf29f
msvcrt: Check locale for NULL before freeing.
2010-05-21 18:58:05 +02:00
Piotr Caban
4134c57a91
msvcrt: Fix compilation error (x86_64-pc-mingw32).
2010-05-20 13:47:52 +02:00
Piotr Caban
130686cbfc
msvcrt: Fix synonym handling in setlocale/create_locale.
2010-05-10 10:09:21 +02:00
Piotr Caban
0697c5dc0e
msvcrt: Partial fix for setlocale/create_locale.
2010-05-10 10:09:09 +02:00
Piotr Caban
815840e972
msvcrt: Added btowc implementation.
2010-04-26 09:06:13 -05:00
Piotr Caban
8adfd63c21
msvcrt: Return correct strings in setlocale.
2010-04-19 15:12:02 +02:00
Piotr Caban
be5a6a03a6
msvcrt: Added implementation of __crtGetStringTypeW.
2010-04-19 15:11:14 +02:00
Piotr Caban
f11dfcb7a6
msvcrt: Fix multiple locales parsing in _create_locale.
2010-04-19 15:11:00 +02:00
Piotr Caban
f2f56d563f
msvcrt: Change localeconv implementation.
2010-04-16 12:37:18 +02:00
Alexandre Julliard
d4880b7a1f
msvcrt: Initialize exported common variables to fix the build on Mac OS.
2010-04-16 12:01:35 +02:00
Piotr Caban
d1fa8b64e4
msvcrt: Use per thread locale in many functions.
2010-04-15 16:51:47 +02:00
Piotr Caban
87dee43b0a
msvcrt: Make setlocale working with per thread locales.
2010-04-15 16:51:46 +02:00
Piotr Caban
5efff16413
msvcrt: Added multiple locales parsing to _create_locale.
2010-04-15 16:51:46 +02:00
Piotr Caban
6ad7b4ff5c
msvcrt: Move locale string interpretation to MSVCRT_locale_to_LCID.
2010-04-15 16:51:46 +02:00
Piotr Caban
20b77f4428
msvcrt: Added _configthreadlocale implementation.
2010-04-15 16:51:45 +02:00
Piotr Caban
59c2201a9c
msvcrt: Add helper function that returns current locale.
2010-04-15 16:51:45 +02:00
Piotr Caban
d58b385b38
msvcrt: Change implementation of setlocale.
2010-04-15 16:51:45 +02:00
Piotr Caban
10023a15d6
msvcrt: Change _create_locale implementation so generated structure is easier to modify.
2010-04-15 16:51:44 +02:00