Commit Graph

280 Commits

Author SHA1 Message Date
Nikolay Sivov 5b9323400d ucrtbase: Add _query_new_handler() and _query_new_mode().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 14:23:28 +01:00
Chip Davis dfd9196f7c msvcrt: Implement _ispunct_l().
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-27 14:41:33 +01:00
Daniel Lehman 31c57484ab ucrtbase: Use given context in wcstok.
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-01-24 19:53:09 +01:00
Matteo Bruni 904a238ba0 ucrtbase/tests: Add tests for the various tolower() and toupper() variants.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-10 18:40:51 +01:00
Matteo Bruni b85f5efa43 ucrtbase: Add _o_fmod() and _o_fmodf().
Together with the previous patch this fixes some crashes reproduced
with Heroes of the Storm.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-10 18:40:47 +01:00
Matteo Bruni 4688a57fd3 ucrtbase: Export _o_to{lower, upper}() as to{lower, upper}().
As opposed to _to{lower,upper}() i.e. the broken-by-design version.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-10 18:40:40 +01:00
Piotr Caban 3fc3d24c3c ucrtbase: Fix end pointer setting in parse_double on partial nan/infinity match.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-07 22:26:08 +01:00
Piotr Caban c4ad739195 msvcrt: Don't use ungetc when reading double in scanf.
It may not work on unbuffered streams.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-03 21:40:59 +01:00
Piotr Caban 5034d109e0 msvcrt: Improve strtod precision.
This fixes strtod precision regression. It also removes floating
point operations.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-30 21:11:45 +01:00
Jeff Smith 0b78dd17ae ucrtbase: Correct behavior of strftime formats %c %r.
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:31 +01:00
Jeff Smith a1ce35cfda ucrtbase: Improve strftime special test cases for %c %r formats.
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:44 +01:00
Jeff Smith c6bafaa6d9 ucrtbase: Add support for strftime format %r.
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-11-28 20:45:46 +01:00
Jeff Smith 4f5342fff0 ucrtbase: Add support for strftime format %V.
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-11-27 22:04:57 +01:00
Jeff Smith cdcbb9f369 ucrtbase: Use correct type for year with strftime format %g.
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-11-27 22:04:55 +01:00
Jeff Smith d0319e20eb ucrtbase: Expand tests for strftime format %g.
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-11-27 22:04:52 +01:00
Jeff Smith 8fe3d7c913 msvcrt: Call invalid parameter handler for out-of-range integer.
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-11-25 20:47:43 +01:00
Piotr Caban c953c36d11 ucrtbase: Fix hexadecimal floats parsing in strtod.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 18:02:59 +01:00
Jeff Smith bb3c3e8fec ucrtbase: Correct day-of-week range for strftime.
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-11-22 15:29:45 +01:00
Jeff Smith bcb1aee8c7 msvcrt: Correct hour range for strftime.
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-11-22 15:29:41 +01:00
Jeff Smith cdb09ed279 msvcrt: Correct day-of-month range for strftime.
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-11-22 15:29:39 +01:00
Jeff Smith 15bbe64609 ucrtbase: Extend range for seconds to allow for leap-second.
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-11-22 15:29:37 +01:00
Jeff Smith a0be8d49f2 ucrtbase: Treat year more consistently in strftime.
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-11-22 15:29:35 +01:00
Jeff Smith 6f13ac30b9 msvcrt: Correct behavior of time in strftime formats %X %c.
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-11-21 19:01:10 +01:00
Jeff Smith 96b6e1d77c msvcrt: Range-check fields used as array indices in _Strftime.
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-11-21 19:01:10 +01:00
Jeff Smith 23ee25435e ucrtbase: Add strftime format range tests.
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-11-21 19:01:10 +01:00
Jeff Smith e25962553f ucrtbase: Add _Strftime tests for seconds.
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-11-21 19:01:10 +01:00
Jeff Smith 8bee5d85d8 msvcrt: Correct behavior of strftime formats %c %x.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 09:08:54 +01:00
Piotr Caban 21a2fde621 ucrtbase: Add _Strftime tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 09:08:49 +01:00
Jeff Smith 959fe2fd10 msvcrt: Add additional strftime tests.
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-11-18 22:12:30 +01:00
Jeff Smith 5725ed3b46 ucrtbase: Strftime %y works for years 0 to 9999.
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-11-13 22:37:39 +01:00
Piotr Caban 7b60dcbefa ucrtbase: Clean up strftime tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 22:37:25 +01:00
Jeff Smith d4e2b0584b ucrtbase: Strftime returns 4-digit timezone for %z.
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-11-13 22:37:05 +01:00
Piotr Caban f63138d049 ucrtbase: Set invalid parameter handler for all misc tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 22:37:02 +01:00
Alexandre Julliard f282b49802 ucrtbase/tests: Avoid C99 for loop.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-02 09:22:57 +01:00
Ambrož Bizjak 3b6b28bce5 ucrtbase: Implement t and j printf length modifiers.
Signed-off-by: Ambroz Bizjak <abizjak.pro@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-01 20:31:14 +01:00
Vijay Kiran Kamuju ea1398382c ucrtbase/tests: Add tests for strftime formats %r and %V.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-01 20:29:38 +01:00
Vijay Kiran Kamuju 54f4bfb06d ucrtbase: Implement %g format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 00:33:46 +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 de8e6b6a28 msvcrt: Add _mbsspn_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 f65c426776 ucrtbase: Implement %G format for strftime.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 19:19:33 +01:00
Vijay Kiran Kamuju 679cdc4010 msvcrt: Implement %u format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:05:32 +02:00
Piotr Caban d3675fd611 msvcrt: Return time since CRT initialization in clock function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 14:38:13 +02:00
Alexandre Julliard 2199be1c0f msvcrt: Export some functions on all architecture except i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 14:38:13 +02:00
Vijay Kiran Kamuju c583c4afaa msvcrt: Implement %n and %t formats for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 12:30:59 +02:00
Sven Baars f6ec5d1819 ucrtbase: Don't differentiate for 64-bit in __fpe_flt_rounds.
The previous behavior was only present on w1064v1507, and not on
any other version of Windows (both older and newer).

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 23:38:39 +02:00
Vijay Kiran Kamuju 8e1435ef81 msvcrt: Implement %h format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 23:38:33 +02:00
Jacek Caban b2082df02f ucrtbase: Use -norelay for __stdio_common_vsprintf.
Fixes debug traces.

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-10-04 22:11:20 +02:00
Vijay Kiran Kamuju 0bdaecd2d7 msvcrt: Implement %e format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:06 +02:00
Vijay Kiran Kamuju 3762402779 msvcrt: Implement %C format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 12:16:34 +02:00
Vijay Kiran Kamuju 5da8af40dd msvcrt: Implement %F format for strftime.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:09 +02:00