Piotr Caban
aa88917830
msvcrt: Update lc_category.wrefcount in __get_current_locale.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50163
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 12:36:40 +01:00
Alexandre Julliard
0edef50dfa
msvcrt: Use the public standard type definitions where possible in msvcrt.h.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Alexandre Julliard
34422eb56c
msvcrt: Move the fenv_t definition to the public header.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:01 +01:00
Alexandre Julliard
1f11f41f61
msvcrt: Remove some duplicate definitions from msvcrt.h.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 13:17:10 +01:00
Alexandre Julliard
8ecd9afc89
msvcrt: Avoid msvcrt-specific types in the Unix library interface.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 12:36:16 +01:00
Alexandre Julliard
86b0a633c6
msvcrt/tests: Remove the headers test.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 12:36:16 +01:00
Gerald Pfeifer
9cc4263d98
msvcrt: #include <stdarg.h> from unixlib.c.
...
Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 10:07:12 +01:00
Piotr Caban
35a8f15361
msvcrt: Don't overwrite threadmbcinfostruct structure in _setmbcp.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-19 21:24:09 +01:00
Alexandre Julliard
191bdeaff3
msvcrt: Build with msvcrt headers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-19 21:23:22 +01:00
Alexandre Julliard
6482ce7666
msvcrt: Enable multi-thread locking by default.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-19 21:23:21 +01:00
Piotr Caban
216b9cb080
msvcrt: Lock global locale in _get_current_locale.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 22:27:51 +01:00
Chip Davis
df2b13fa77
msvcrt: Increment refcounts for all locale data in _get_current_locale().
...
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-11-18 22:27:51 +01:00
Piotr Caban
16598c2af6
msvcrt: Simplify category checks in create_locinfo.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 22:27:51 +01:00
Chip Davis
f248221870
msvcrt: Swap the threadlocinfo pointers in setlocale().
...
Do this instead of swapping their contents. This way, the result of
_get_current_locale(), which references the current threadlocinfo, won't
change after a setlocale() call.
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-11-18 22:27:51 +01:00
Chip Davis
5d07f809a0
ucrtbase: Sync __lc_time_data definitions.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 22:27:51 +01:00
Chip Davis
898abfc18f
msvcrt: Share __lc_time_data between threadlocinfo instances.
...
My testing shows that unk[1] is some sort of refcount.
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-11-18 22:27:51 +01:00
Chip Davis
10cac0a08f
msvcrt: Share lconv data between threadlocinfo instances.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 22:27:50 +01:00
Chip Davis
5ec7cb5a7f
msvcrt: Share ctype tables between threadlocinfo instances.
...
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-11-18 22:27:50 +01:00
Chip Davis
3e3f6396d2
msvcrt: Copy LC_COLLATE codepage between threadlocinfo instances.
...
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-11-18 22:27:50 +01:00
Chip Davis
9cb112ca25
msvcrt: Share locale names between threadlocinfo instances.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 22:27:50 +01:00
Piotr Caban
8455926662
msvcrt: locinfo->lc_name should be guarded by lc_category->wrefcount.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 22:27:48 +01:00
Piotr Caban
3ecede0c61
msvcrt: Call set_lc_locale_name in update_threadlocinfo_category.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:29:32 +01:00
Charles Davis
db55e07016
msvcrt: Make locale name string refcounted for C locale.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:29:24 +01:00
Piotr Caban
b0622bb49a
msvcrt: Mark old_locinfo as const in create_locinfo.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:29:09 +01:00
Paul Gofman
3acd68b241
msvcrt: Save and restore rounding mode in fegetenv() / fesetenv().
...
Fixes Serious Sam 4 flickering in Vulkan mode.
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-11-18 20:28:14 +01:00
Alexandre Julliard
c72e1b096d
msvcrt: Move math functions to a new Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:28:05 +01:00
Alexandre Julliard
2fb08bed46
msvcrt: Use the msvcrt string functions internally.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:28:05 +01:00
Alexandre Julliard
f48648aeec
msvcrt: Use the msvcrt atoi() function internally.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:28:05 +01:00
Alexandre Julliard
b7fe06d0fa
msvcrt: Use the msvcrt ctype functions internally.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:28:05 +01:00
Alexandre Julliard
871d9863bc
msvcrt: Use the msvcrt allocation functions internally.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:28:05 +01:00
Alexandre Julliard
1be5e83859
msvcrt: Use the msvcrt math functions internally.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:28:05 +01:00
Alexandre Julliard
1f27361894
msvcrt: Avoid long double type in $I10_OUTPUT().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 13:46:26 +01:00
Alexandre Julliard
b9002cc8c7
msvcrt: Add floating point classification macros.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 13:46:26 +01:00
Alexandre Julliard
9fa7b779f8
msvcrt: Use the global musl copyright notice.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 13:46:26 +01:00
Alexandre Julliard
48028c64ea
msvcrt: Import ilogb() from musl.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 09:59:54 +01:00
Alexandre Julliard
44e122e04e
msvcrt: Import fabs() from musl.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 09:58:19 +01:00
Alexandre Julliard
b1bc99f025
msvcrt: Import _copysign() from musl.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 09:57:52 +01:00
Alexandre Julliard
dbda71f74d
msvcrt: Reimplement _chgsign().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 17:51:30 +01:00
Alexandre Julliard
4619140b1c
msvcrt: Reimplement _dsign().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 17:51:30 +01:00
Alexandre Julliard
d6476e0097
msvcrt: Reimplement _isnan().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 17:51:30 +01:00
Alexandre Julliard
9f088d019b
msvcrt: Reimplement _finite().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 17:51:30 +01:00
Alexandre Julliard
fd51f229f6
msvcrt: Reimplement _fpclass().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 17:51:30 +01:00
Alexandre Julliard
23008a0f27
msvcrt: Reimplement _dclass() using musl code.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 17:51:30 +01:00
Piotr Caban
e460b37a25
ucrtbase: Add support for utf8 codepage in setlocale.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-11 21:14:58 +01:00
Rémi Bernon
35886486d4
msvcrt: Pass temporary locale to MSVCRT__towupper_l.
...
When not provided, instead of calling get_locinfo on every character.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Rémi Bernon
0a2635611a
msvcrt: Pass temporary locale to MSVCRT__towlower_l.
...
When not provided, instead of calling get_locinfo on every character.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Rémi Bernon
faf92fdedb
msvcrt: Introduce noalloc current locale lookup helpers.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Rémi Bernon
a24ad51e3f
msvcrt: Make locale and thread helper functions CDECL.
...
This prevent callers from having to save SSE registers to the stack.
It is for instance the case in MSVCRT__towlower_l, which is called on
every character by MSVCRT__wcsicmp_l.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Daniel Lehman
a29f606e08
msvcr110: Add _Context::_CurrentContext.
...
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-11-03 14:53:34 +01:00
Will Mainio
e0812be876
msvcrt/tests: Add scanf tests for dashes in scanset.
...
Signed-off-by: Will Mainio <will.mainio@fastmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 22:06:52 +01:00
Will Mainio
c38102b9b4
msvcrt: Fix scanf with dashes in scanset.
...
Signed-off-by: Will Mainio <will.mainio@fastmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 22:06:52 +01:00
Piotr Caban
5fcc377168
ucrtbase: Support UTF8 codepage in wctomb.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 22:19:04 +02:00
Piotr Caban
69b701a4a0
ucrtbase: Support UTF8 codepage in _wctomb_s_l.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 22:18:59 +02:00
Piotr Caban
6180c2fc83
ucrtbase: Support UTF8 codepage in _wcstombs_l.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50025
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 22:18:52 +02:00
Nikolay Sivov
d29f424416
msvcrt: Correct spec entries for _wcstod_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>
2020-10-06 21:47:56 +02:00
Piotr Caban
8468a3ed77
msvcrt: Terminate on noexcept function trying to propagate exception (x86_64).
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 10:55:13 +02:00
Piotr Caban
26c1f8fb07
msvcrt: Terminate on noexcept function trying to propagate exception (i386).
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 10:55:08 +02:00
Martin Storsjo
0e66993507
msvcrt: Hook up __C_specific_handler for arm64.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 12:02:57 +02: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
Piotr Caban
155e2b2c3e
msvcrt: Fix console detection in _write.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-18 22:08:12 +02:00
Paul Gofman
e6a42874a2
msvcrt/tests: Test .{O|A}CP locale string.
...
Used by Marvel's Avengers.
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-18 22:07:50 +02:00
Piotr Caban
dc11755390
msvcrt: Use default user locale when only codepage is passed to setlocale.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-18 22:07:43 +02:00
Gijs Vermeulen
390b885c74
msvcrt: Add _snprintf_s_l.
...
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-09-16 21:09:58 +02:00
Gijs Vermeulen
6a81e9a436
msvcrt: Fix _snprintf_l function signature.
...
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-09-16 21:09:58 +02:00
Gijs Vermeulen
b4ab5d3acc
msvcrt: Add _s[w|n]printf_c[_l].
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49765
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-09-16 21:09:58 +02:00
Piotr Caban
68ca61a555
msvcrt: Fix count parameter type in printf functions family.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-16 21:09:58 +02:00
Piotr Caban
8b7eedc180
msvcrt: Fix _vs{w,n}printf_c function when terminating character doesn't fit into buffer.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-15 21:43:45 +02:00
Piotr Caban
427e2bb609
msvcrt: Fix buffer overflow in _write function.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49770
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-15 21:43:45 +02:00
Myah Caron
1bb193238f
msvcr120: Add imaxabs.
...
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:40 +02:00
Paul Gofman
f65fb09dff
msvcrt: Handle rethrowing from nested try blocks on x64.
...
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-09 20:31:46 +02:00
Fabian Maurer
9a9319b058
msvcrt/math: In _fcvt/_fcvt_s handle locale decimal separator properly.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49730
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Piotr Caban
dd90fdda0e
msvcrt: Optimize memmove implementation.
...
Based on Torbjorn Granlund code from Glibc.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49663
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:39 +02:00
Piotr Caban
cb7b23a3f0
msvcrt: Fix acosf implementation when returning Pi or Pi/2.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49718
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:42:23 +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
Martin Storsjo
342c5da7c1
configure, msvcrt: Check for the finite() function just like finitef().
...
If missing, fall back on the C99 isfinite() macro, just like
the existing finitef() fallback.
The finite() function is deprecated in macOS 10.9 and is
removed (from the SDK) since macOS 11.0.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:04:03 +02:00
Piotr Caban
8cbbb4f394
msvcrt: Import atan from musl.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 22:12:29 +02:00
Piotr Caban
18fa9cf624
msvcrt: Import atanf from musl.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 22:12:29 +02:00
Piotr Caban
d9456a8cea
msvcrt: Import atan2 from musl.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 22:12:29 +02:00
Piotr Caban
5eaa4c56b1
msvcrt: Import atan2f from musl.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 22:12:29 +02:00
Piotr Caban
2cb6a1780c
msvcrt: Import asin from musl.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 19:34:47 +02:00
Piotr Caban
d37e76a9a7
msvcrt: Import asinf from musl.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 19:34:45 +02:00
Piotr Caban
25cc6ff62d
ucrtbase: Support _CRT_INTERNAL_PRINTF_STANDARD_ROUNDING flag in printf.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 19:34:41 +02:00
Piotr Caban
04de6fe37e
ucrtbase: Fix away from 0 rounding in %a format.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 19:34:39 +02:00
Piotr Caban
e475d04591
ucrtbase: Fix precision handling in %#g when printing 0.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 19:34:37 +02:00
Piotr Caban
8034d4179c
msvcrt: Import acos from musl.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 22:51:44 +02:00
Piotr Caban
d53d42f1ae
msvcrt: Import acosf from musl.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 22:51:41 +02:00
Piotr Caban
081d25d4b9
msvcrt: Use correct code page in _write when outputing to console.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 15:20:37 +02:00
Piotr Caban
e0555a742f
msvcrt: Avoid allocations in _write implementation.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 15:20:35 +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
Piotr Caban
a6ae2b5c11
msvcrt: Import sqrt from musl.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 20:22:38 +02:00
Piotr Caban
bfc23bbd5f
msvcrt: Import sqrtf from musl.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 20:22:38 +02:00
Piotr Caban
2833a10ba1
ucrtbase: Support overriding return value in _matherr.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 20:22:38 +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
29288c0bc0
msvcrt: Fix rounding of numbers smaller than minimal subnormal.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:49 +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
Piotr Caban
a22adf1893
msvcrt: Don't use strtold in __STRINGTOLD_L.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Piotr Caban
b22ffa5891
msvcrt: Don't depend on additional mantissa bits when rounding.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Piotr Caban
8fc48e8bc2
msvcrt: Create 64-bit mantissa in fpnum_parse.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Piotr Caban
450015781e
msvcrt: Introduce fpnum structure that can be used to represent 64 and 80-bit double.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Piotr Caban
7495821974
msvcrt: Support arbitrary buffer size in bnum.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Piotr Caban
413e34df58
msvcrt: Add __STRINGTOLD_L and _atoldbl_l partial stubs.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Piotr Caban
a511c0937c
msvcrt: Copy strrchr implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
d9c9d21d66
msvcrt: Copy strpbrk implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
3b0fb2b175
msvcrt: Copy strncat implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
770d3b8623
msvcrt: Copy strlen implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
45be36130f
msvcrt: Copy strchr implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
f676355366
msvcrt: Copy strcat implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
41a5da9b76
msvcrt: Copy memset implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
f02193738c
msvcrt: Copy memmove implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
773f0a835b
msvcrt: Copy memcmp implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
9d4eeaeb77
msvcrt: Copy memchr implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
75cdc3b605
msvcrt: Don't use div and ldiv function.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:22:16 +02:00
Piotr Caban
536be09b84
msvcrt: Don't use wine/unicode.h header.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:17:51 +02:00
Piotr Caban
b34b7e171e
msvcrt: Copy wcsrchr implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:17:48 +02:00
Piotr Caban
5d9d0b8465
msvcrt: Copy wcschr implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:17:45 +02:00
Piotr Caban
2c5bf68a5e
msvcrt: Copy wcscat implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:17:43 +02:00
Piotr Caban
cf580265e3
msvcrt: Copy wcscpy implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:17:39 +02:00
Piotr Caban
a88d75f4f6
msvcrt: Copy wcslen implementation from ntdll.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:17:35 +02:00
Piotr Caban
068a419e42
msvcrt: Don't use get_char_typeW in _iswctype_l.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:17:30 +02:00
Piotr Caban
d0c795596b
msvcrt: Export _pwctype table.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:17:28 +02:00
Piotr Caban
144803a545
msvcrt: Add _wctype table.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:17:24 +02:00
Francois Gouget
f16a631c2a
msvcrt: Fix the spelling of a TRACE() message.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:52 +02:00
Piotr Caban
986aa52fc4
msvcrt: Add _ismbcpunct_l implementation.
...
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
1750a6969b
msvcrt: Add _ismbcprint_l implementation.
...
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
4bca5b9f51
msvcrt: Add _ismbcspace_l implementation.
...
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
95b3ff9f74
msvcrt: Add _ismbcupper_l implementation.
...
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
1ad2094284
msvcrt: Add _ismbclower_l implementation.
...
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
5f294e34d6
msvcrt: Add _ismbcalpha_l implementation.
...
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
71cd3d5e8c
msvcrt: Add _ismbcgraph_l implementation.
...
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
fd74aeb726
msvcrt: Add _ismbcdigit_l implementation.
...
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
19c05e60a3
msvcrt: Add _ismbcalnum_l implementation.
...
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
fbbcd3f8f8
msvcrt: Add _ismbbkana_l implementation.
...
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
a81f55093e
msvcrt: Don't use toupperW.
...
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
2a0569bbdf
msvcrt: Don't use toupperW in _toupper_l.
...
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
55c1a16259
msvcrt: Don't use toupperW in _towupper_l.
...
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
bc47bff4a8
msvcrt: Don't use tolowerW.
...
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
4f5a4b83b6
msvcrt: Don't use tolowerW and toupperW in _setmbcp_l.
...
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
0b35b77915
msvcrt: Don't use tolowerW in _tolower_l.
...
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
7d2fafc0f8
msvcrt: Don't use tolowerW in _towlower_l.
...
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
59ee87877c
msvcrt: Improve __crtLCMapStringA implementation.
...
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
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
a2a3537200
msvcrt: Don't use isxdigitW.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 16:33:02 +02:00
Piotr Caban
da164d19e8
msvcrt: Don't use isupperW.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 16:33:02 +02:00
Piotr Caban
ab678ee097
msvcrt: Don't use ispunctW.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 16:33:02 +02:00
Piotr Caban
f6576c76d9
msvcrt: Don't use isprintW.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 16:33:02 +02:00
Piotr Caban
badc282cf7
msvcrt: Don't use islowerW.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 16:33:02 +02:00