Commit Graph

309 Commits

Author SHA1 Message Date
Jacek Caban 37cb6cc757 ucrtbase: Use MSVCRT prefix for __stdio_common_vsprintf implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-21 20:25:50 +02:00
Martin Storsjo 7265cd17b5 ucrtbase: Extend the printf tests even further.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-20 10:48:07 +02:00
Martin Storsjo 2819fea352 ucrtbase: Add tests and fix more zero length __stdio_common_vs[w]printf cases.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-19 17:40:08 +02:00
Piotr Caban 17355c0566 ucrtbase: Add remaining _o_* functions forwards.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-19 17:40:08 +02:00
Emilio Cobos Álvarez 950dac9104 api-ms-win-crt-private-l1-1-0: Implement _o__fileno, _o__setmode, _o__wfopen.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 12:13:36 +02:00
Gijs Vermeulen 8119865d47 ucrtbase: Add more _o forwards.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49146
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 12:13:27 +02:00
Piotr Caban ed07d07bed msvcrt: Improve string to double conversion accuracy.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 22:01:33 +02:00
Piotr Caban 9b94e4c805 ucrtbase: Change ptd fields offsets to match with native.
Makes it possible to use native vcruntime140_1.dll.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:31:51 +02:00
Myah Caron 63b294a9bc ucrtbase: Export _o___stdio_common_v[fs]wprintf functions.
Signed-off-by: Myah Caron <qsniyg@mail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 16:16:21 +02:00
Piotr Caban e115d5c718 ucrtbase/tests: Set invalid_parameter_handler once.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 18:34:50 +01:00
Paul Gofman d912460ae0 ucrtbase: Add test for _strnicmp() count parameter.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 20:41:13 +01:00
Jacek Caban 0f901b8e47 ucrtbase/tests: Use more ucrtbase functions directly in misc.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 17:27:19 +01:00
Jacek Caban 02cc47c141 ucrtbase/tests: Use ucrtbase functions directly in string.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 19:36:55 +01:00
Jacek Caban 90ae76e93c ucrtbase/tests: Link to _o_* functions directly.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 15:59:19 +01:00
Jacek Caban aa16d0adf1 ucrtbase/tests: Use public onexit table declarations.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 15:59:14 +01:00
Jacek Caban 618b0736fe ucrtbase/tests: Fix clock tests.
crt_init_start no longer makes sense since ucrtbase.dll is directly
linked to test executable.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 15:59:05 +01:00
Francois Gouget a909baeb4e tests: Report all errors when failing to wait for a child process.
Report the line number where the test failed to wait for the child so
one can identify which child process did not behave as expected.
Also wait_child_process() is meant for the general case so report
all non-crash error cases as test failures so they are accounted for.
Omit the "winetest_" prefix to match the other Wine test functions and
so the underlying winetest_wait_child_process() function can be wrapped
with the usual line-capturing macros.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48651
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Jacek Caban c2ee20c95b ucrtbase/tests: Use more functions directly.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:42:53 +01:00
Jacek Caban f202beb745 ucrtbase/tests: Build with -fno-builtin.
Some of tested functions are handled as builtin compiler functions. We
always want to test our actual implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:42:50 +01:00
Jacek Caban c3165b4c96 ucrtbase/tests: Directly use ucrtbase functions in scanf.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jacek Caban d6f5afdd3d ucrtbase/tests: Directly use ucrtbase functions in printf.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jacek Caban cd030f752f ucrtbase/tests: Directly use __stdio_common_* functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jacek Caban 01bc7e09bd ucrtbase/tests: Use public _CRT_INTERNAL_PRINTF_* defines.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jacek Caban 6b52c24d2f ucrtbase/tests: Link to ucrtbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jeff Smith 89ca556ac5 msvcrt: Stop forwarding iswctype functions to ntdll.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 21:00:03 +01:00
Jacek Caban 78eca96887 ucrtbase: Add exe entry points implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 20:29:18 +01:00
Jacek Caban 18545725b1 ucrtbase: Use public headers for _vsnprintf implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 21:23:13 +01:00
Jacek Caban 0d537c854c makedep: Use msvcrt headers for objects inside importlibs.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-13 16:44:24 +01:00
Piotr Caban 87f42c3ae7 ucrtbase: Added stub for _get_FMA3_enable.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 22:39:59 +01:00
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