Commit Graph

611 Commits

Author SHA1 Message Date
Jacek Caban 055ca5e4d9 msvcrt: Use memmove to copy memory in memcpy_s.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-05 10:48:19 -05:00
Daniel Lehman 3467d71c27 msvcrt/tests: Add tests for _strnicoll/_wcsnicoll.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-19 17:47:56 +02:00
Daniel Lehman 9aa7a42a9f msvcrt/tests: Add tests for _strncoll/_wcsncoll.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-19 17:47:49 +02:00
Michał Janiszewski 08d98f0ff8 msvcrt: Update size checks for secure scanf versions.
Signed-off-by: Michał Janiszewski <janisozaur@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-09 18:04:17 +02:00
Michael Stefaniuc 3624b7c60c msvcrt/tests: Use the available 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-06-21 14:20:57 +02:00
Michael Stefaniuc ee8acc381d msvcrt: Rename a macro to ARRAY_SIZE().
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-06-21 14:20:57 +02:00
Daniel Lehman 642e0917d5 msvcrt/tests: Add setlocale test.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-02 20:02:13 +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
André Hentschel 4e5e56c822 msvcrt: Accept Czechia as locale name.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-28 19:37:27 +02:00
Piotr Caban 9a7cb34d0f msvcrt/tests: Add _strupr tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-22 20:15:35 +01:00
Kirill Erofeev e0f7fbfa59 msvcrt/tests: Add tests for _searchenv, _searchenv_s, _wsearchenv, _wsearchenv_s.
Signed-off-by: Kirill Erofeev <erofeev.info@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 16:57:54 +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
André Hentschel 9f561f0089 msvcrt/tests: Don't test function directly when reporting GetLastError().
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-02 13:25:17 +01:00
Piotr Caban 7aa67f1e5f msvcrt: Fix buffer size checks in swscanf_s.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-01 15:57:12 +01:00
Piotr Caban 96584d858a msvcrt: Don't report error in fclose on already closed stream.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 20:44:33 +01:00
Piotr Caban 1899eadf3e msvcrt: Change how fread splits reading into chunks.
It affects fd stream position and buffer content on unsuccessul reads.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 20:44:33 +01:00
Piotr Caban 67926ec8c3 msvcrt: Set errno when close() is called on already closed fd.
Based on a patch by Olly Betts.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-28 20:39:29 +01:00
Piotr Caban 7aa4b6d170 msvcrt: Fix write() behaviour on "no console" file descriptors.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 10:50:22 +01:00
Piotr Caban 9b2397d5c8 msvcrt: Fix read() behaviour on "no console" file descriptors.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 10:50:20 +01:00
Piotr Caban 677301a29c msvcrt: Fix close() behaviour on "no console" file descriptors.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 10:50:18 +01:00
Piotr Caban 31bf13e92b msvcrt: Fix IO initialization when invalid handles are passed.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 10:50:10 +01:00
Piotr Caban 20a11fd6cc msvcrt/tests: Rewrite clock() tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-13 17:09:37 +01:00
Nikolay Sivov d045a5ea29 msvcrt: Implement _memicmp_l().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 20:21:10 +01:00
Alexandre Julliard 7726157e19 msvcrt: Use WINAPIV calling convention for variadic functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-02 10:20:02 +01:00
Piotr Caban 6d0d955ac0 msvcrt/tests: Add _mbccpy_s tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-06 21:48:49 +02:00
Piotr Caban f38c958ed4 msvcrt/tests: Add _mbsnlen tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-05 20:32:10 +02:00
Nikolay Sivov 1a6e50ce97 msvcrt: Added _ismbcl0().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-12 11:11:43 +09:00
Piotr Caban 395a65bdc6 msvcrt: Fix strcpy implementation so it works on overlapping buffers.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-06 10:34:11 +09:00
Akihiro Sagawa 967fb744e4 msvcrt: Fix mbstowcs with empty strings.
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>
2017-08-06 10:32:36 +09:00
Akihiro Sagawa 82bf4edf36 msvcrt/tests: Add tests for mbstowcs and wcstombs with empty strings.
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>
2017-08-06 10:32:29 +09:00
Alistair Leslie-Hughes d379dc4cb0 msvcrt/tests: Use standard wine_dbgstr_longlong.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-02 13:55:34 +02:00
Francois Gouget 2dada69909 msvcrt/tests: A couple of spelling fixes in ok() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:49:39 +02:00
Piotr Caban e7f9b562b9 msvcrt: Fix wide characters handling in wscanf functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-03 13:08:57 +02:00
Piotr Caban 32bb8d9068 msvcrt: Fix handling of unsigned chars in scanf format.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-31 15:53:21 +02:00
Lauri Kenttä cabf96512a msvcrt/tests: Add tests for _creat.
Signed-off-by: Lauri Kenttä <lauri.kentta@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-07 22:05:31 +01:00
Michael Stefaniuc 6fadcca527 msvcrt/tests: Use NULL instead of casting 0.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-01 16:26:49 +01:00
Lauri Kenttä 96a48efeea msvcrt: Fix space-only inputs in wcstoi64.
wcstoi64 sets endpos past the beginning only if some digits are found.

Signed-off-by: Lauri Kenttä <lauri.kentta@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 19:49:41 +01:00
Lauri Kenttä 5b6e1cf2de msvcrt: Make wcstoi64 support various Unicode digits.
Signed-off-by: Lauri Kenttä <lauri.kentta@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 19:49:31 +01:00
Lauri Kenttä b0ccba4b33 msvcrt/tests: Test wcstoi64 with various Unicode digits.
Test all Unicode digits which Windows seems to support.

Signed-off-by: Lauri Kenttä <lauri.kentta@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 19:48:33 +01:00
Piotr Caban da071d939f msvcrt/tests: Correctly declare base class to avoid a compiler warning.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-22 15:08:00 +01:00
Daniel Lehman cada88a64b msvcrt: Add _lfind_s.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-29 12:14:44 +01:00
Piotr Caban 1680e98427 msvcrt: Improve multibyte characters support in printf.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-15 16:06:30 -06:00
Piotr Caban d6948bf356 msvcrt: Add support for multibyte characters in _Strftime.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 12:07:29 +09:00
Piotr Caban acba871d53 msvcrt: Add mbsrtowcs_s tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-16 21:16:51 +09:00
Nikolay Sivov 1b072058ac msvcrt/tests: Fix a test failure on early XP versions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-16 21:16:35 +09:00
André Hentschel a313c9b7f9 msvcrt/tests: Don't test function directly when reporting errno.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-05 01:27:52 +09:00
Nikolay Sivov 50dd4b8928 msvcrt: Handle overflow in calloc().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-27 20:49:42 +09:00
Nikolay Sivov 21fd1d3729 msvcrt: Fix calloc() prototype.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-26 14:48:47 +09:00
Frédéric Delanoy 0da6cca13c msvcrt/tests: Use todo_wine_if() in tests.
Signed-off-by: Frédéric Delanoy <frederic.delanoy@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-22 19:54:49 +09:00
Piotr Caban 96d476584e msvcrt/tests: Add close tests on file descriptors that use the same HANDLE.
Based on Qian Hong patch.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-20 12:09:22 +09:00