Commit Graph

203 Commits

Author SHA1 Message Date
Piotr Caban 4a4621f42f msvcrt/tests: Use wide-char string literals.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 21:59:39 +01:00
Paul Gofman ebe3fe536c msvcrt: Implement _mbbtype_l().
Fixes Midnight Castle Succubus.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:44:51 +02:00
Paul Gofman 12106c214b msvcrt: Implement _mbscmp_l().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:44:47 +02:00
Paul Gofman 082de781f0 msvcrt: Implement _mbsnextc_l().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:44:44 +02:00
Daniel Lehman 5458eea5b3 msvcrt/tests: Add tests for SpecialCasing.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:36:14 +02:00
Piotr Caban 5983fcfec9 msvcrt: Return error on invalid character in mbstowcs.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 15:20:33 +02:00
Zebediah Figura 3f5066b12e msvcrt/tests: Fix some tests on Windows 2003 and earlier.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-03 10:22:50 +02:00
Piotr Caban 4fe481db95 msvcrt: Add __STRINGTOLD tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:49 +02:00
Daniel Lehman ee65859b7f msvcrt: Treat large exponent as overflow in strtod.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Daniel Lehman 0945ba00fb msvcrt: Set errno in strtod.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Daniel Lehman 3f8b0891e7 msvcrt/tests: Check errno in strtod test.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Piotr Caban 841fbd5b14 msvcrt: Don't use strcmpW in wcscmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 22:31:55 +02:00
Piotr Caban ab5e48f4fc msvcrt: Fix 0 parsing in parse_double helper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Piotr Caban 19bff79da8 msvcrt/tests: Cleanup strtod tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Alexandre Julliard bf48e86add msvcrt/tests: Add tests for Unicode spaces in wcstol().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 09:29:56 +01:00
Daniel Lehman e9737e1738 msvcrt: Set return value on all paths in wcstombs_s_l.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:29:14 +01:00
Daniel Lehman 4178972487 msvcrt: Don't set error in wcstombs_s_l if no characters to convert.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:29:04 +01:00
Daniel Lehman 05e335c103 msvcrt/tests: Add some wcstombs_s_l tests.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:26 +01:00
Chip Davis 0216290675 msvcrt: Fix the btowc() function.
This function returns WEOF on conversion failure. It should only operate
on single-byte characters in the C locale. Finally, it should use the
current locale's codepage, instead of the current locale itself, to do
conversions.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:31:43 +01:00
Zhiyi Zhang 84f2ce5139 msvcrt/tests: Fix some test failures.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-22 21:30:19 +01:00
Alexandre Julliard 4e2da207d7 msvcrt: Use unsigned comparisons in strcmp and strncmp.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48454
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-16 12:21:11 +01:00
Piotr Caban 9b6c9b0881 msvcrt/tests: Improve doubles comparison in strtod and atodbl tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 21:56:04 +01:00
Erich E. Hoover 27b9a420ea msvcrt: Fix [str|wcs]tod result being compared against FLT_MAX.
Also a more straightforward way of fixing the tests on i386 Linux.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48324
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-23 20:13:23 +01:00
Erich E. Hoover c22af971c2 msvcrt: Implement strtod without using 'long double'.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48160
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-19 16:20:39 +01:00
Alexandre Julliard 7638682433 msvcrt: Fix wcstoul() to behave identically to strtoul().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48261
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Alexandre Julliard d1444cb12a msvcrt/tests: Add some tests for wcstoi64().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Gijs Vermeulen e44d935cc6 msvcrt: Optimize _strlwr implementation in C locale.
Tests by Ambrož Bizjak.

Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:44:06 +01:00
Piotr Caban 47217f5979 msvcrt: Fix _mbstowcs_s_l return value on truncate.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 09:08:32 +01:00
Jacek Caban 1edda7a302 msvcrt/tests: Add iswdigit tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00
Alexandre Julliard 79052f5890 msvcrt/tests: Fix more signed char issues.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 09:14:17 +01:00
Alexandre Julliard 43d24ffbe7 msvcrt/tests: Fix signed char issues.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-29 17:41:41 +01:00
Piotr Caban df60573653 msvcrt: Don't use strstr from C-library.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 19:19:33 +01:00
Piotr Caban 225dad5d0d msvcrt: Add _mbscspn_l implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 19:19:33 +01:00
Piotr Caban 69ea905674 msvcrt: Don't use strcspn from C-library.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 19:19:33 +01:00
Piotr Caban 127d9932d9 msvcrt: Add wcrtomb_s tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:27 +02:00
Piotr Caban 702b1e29d5 msvcrt: Match broken multi-byte character with everything in _mbsspn.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:43:52 +02:00
Akihiro Sagawa ab525d3f6f msvcrt: Reimplement _mbsspnp using _mbsspn.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47693
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:43:52 +02:00
Akihiro Sagawa f0f93c791f msvcrt: Fix _mbsspn implementation.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:43:52 +02:00
Akihiro Sagawa c62c51c04a msvcrt/tests: Add more tests for _mbsspn and _mbsspnp.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:43:52 +02:00
Akihiro Sagawa 996cb72c8e msvcrt/tests: Restore the multibyte codepage after the tests.
N.B. _setmbcp() doesn't return the previous codepage.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:43:52 +02:00
Dmitry Timoshkov 9ade30d0ce msvcrt: Fix handling of dst == src in wcscpy_s.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 20:43:37 +02:00
Alexandre Julliard 9a4b596ed9 msvcrt/tests: Add some function pointers to bypass gcc builtin functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 21:01:46 +02:00
Gijs Vermeulen 92ba9e7b6d msvcrt: Implement _wcsnset_s.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46902
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-04-02 19:21:57 +02:00
Gijs Vermeulen e49a937ae3 msvcrt/tests: Add missing return value check.
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-04-02 19:21:45 +02:00
Piotr Caban 8c1684a50a msvcrt: Don't detect overflow in atol implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46845
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 10:10:44 +01:00
Nikolay Sivov cebb947027 msvcrt: Add _ismbcl2().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:06:54 +01:00
Nikolay Sivov 698b26a432 msvcrt: Add _ismbcl1().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46644
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 17:57:09 +01:00
Piotr Caban 622c218cb2 msvcrt: Validate character in _ismbcl0.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 17:57:09 +01:00
Daniel Lehman 2c308c9fa2 msvcrt: _towupper_l only uppercase a-z in C locale.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-28 18:35:46 +01:00
Daniel Lehman 6a71e7c9ee msvcrt: _towlower_l only lowercase A-Z in C locale.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-28 18:35:46 +01:00