Commit Graph

78 Commits

Author SHA1 Message Date
Alexandre Julliard d8ed47ec21 msvcrt: Use the standard va_list instead of __ms_va_list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-22 11:12:09 +02:00
Eric Pouech 74a42c5401 msvcrt: Support I width modifier in *scanf* family.
Despite what msdn states, I and I32 are supported width modifiers.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 20:11:28 +02:00
Piotr Caban 5d5f11c002 msvcrt: Support z length modifier in scanf.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 11:43:12 +02:00
Piotr Caban 1913affb7b msvcrt: Remove MSVCRT_ prefix from file.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 21:00:22 +01:00
Piotr Caban 6ad42ee7f4 msvcrt: Remove MSVCRT_ prefix from wcs.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 21:00:22 +01:00
Piotr Caban a1662e3f7d msvcrt: Remove MSVCRT_ prefix from scanf.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-02 15:37:21 +01:00
Piotr Caban 176aebb0c5 msvcrt: Remove MSVCRT_ prefix from ctype.c functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 14:02:58 +01:00
Piotr Caban 9261799383 msvcrt: Use FILE from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 14:01:08 +01:00
Piotr Caban 8180f4001a msvcrt: Use EOF from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 21:36:12 +01:00
Piotr Caban 7acfe8fb73 msvcrt: Use WEOF from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 21:36:12 +01:00
Piotr Caban fa272adaeb msvcrt: Use simple type definitions from public header.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 21:59:39 +01:00
Piotr Caban c302397c73 msvcrt: Remove MSVCRT_wchar_t type.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 21:59:39 +01:00
Piotr Caban 5114c85a03 msvcrt: Remove MSVCRT__locale_t type.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Piotr Caban d5c0458bd1 msvcrt: Remove MSVCRT_pthreadlocinfo type.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +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
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 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 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 287dabd9b6 msvcrt: Fix floating point numbers scanning when null-byte is preceding the number.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48452
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-13 22:20:36 +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 1366dd69d5 msvcrt: Update consumed in all scanf variants on end of input.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-03 21:40:59 +01:00
Erich E. Hoover f99d307a3e msvcrt: Use parse_double for scanf floats.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-02 19:16:02 +01:00
Piotr Caban 7695433c05 msvcrt: Support mixing length and width in scanf format.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45967
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Erich E. Hoover 925a88d1f7 msvcrt: Fix scanf file locking when returning EOF.
Fixes regression introduced in 0a89a69913.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48087
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 15:44:22 +01:00
Erich E. Hoover 0a89a69913 msvcrt: Fix fscanf return when EOF is immediately after an end of line.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Zebediah Figura 9445bed298 ucrtbase: Write the %hh prefix as a single char.
This fixes a crash in Planet Coaster on startup.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:19:32 +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
Michał Janiszewski 32e65acc00 msvcrt: Don't forget to free the buffer in scanf.
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 13:51:53 +02: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 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
Nikolay Sivov 7e86ab3df6 msvcrt: Fix cwscanf* prototypes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-23 16:32:09 +01:00
Nikolay Sivov d99727bcb3 msvcrt: Fix char to int promotion that breaks pattern lookup.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-23 16:31:53 +01:00
Michael Stefaniuc e67a65c59e msvcrt: Avoid identical if and else bodies (PVS-Studio). 2015-02-18 16:08:48 +09:00
Piotr Caban 638c8e3847 msvcrt: Don't overwrite unmatched string in scanf. 2014-01-16 21:04:19 +01:00
Piotr Caban 74ec93bab7 msvcrt: Improved scanf precision. 2012-11-05 17:44:32 +01:00
Piotr Caban a9c6113c28 msvcrt: Improved parsing precision of doubles in scanf.
This code is based on doubles parsing in jscript lexer.
2012-11-01 15:43:21 +01:00
Piotr Caban bab686e7d1 msvcrt: Fixed %Lf format handling in scanf. 2012-11-01 15:43:14 +01:00
Piotr Caban 7240170cee msvcrt: Added more length modifiers in scanf function. 2012-04-16 18:56:15 +02:00
Daniel Lehman 5a3695ccee msvcrt: Make WEOF returned from swscanf signed. 2012-01-06 19:24:16 +01:00
Piotr Caban 6991ac0331 msvcrt: Use get_locinfo instead of get_locale. 2011-05-25 11:45:42 +02:00
Piotr Caban 73b9acf273 msvcrt: Make scanf functions thread safe. 2011-05-19 19:37:26 +02:00
Piotr Caban 405e6eb309 msvcrt: Added _snscanf implementation. 2011-04-05 17:38:21 +02:00
Piotr Caban 59c1139f05 msvcrt: Fix debug message in scanf. 2010-04-26 09:07:51 -05:00
Piotr Caban f36671c57f msvcrt: Added _cwscanf* implementation. 2010-04-22 18:11:11 +02:00
Piotr Caban 17f486baa4 msvcrt: Added support for secure functions to scanf helper functions. 2010-04-22 18:09:40 +02:00
Piotr Caban 231fc11457 msvcrt: Add support for locales in scanf helper functions. 2010-04-22 15:10:27 +02:00
Gregor Schneider 2043035e17 msvcrt: Calculate floating point decimals in internally used long double precision. 2009-11-24 15:53:36 +01:00
Alexandre Julliard 3a195139c2 msvcrt: Fix scanf to correctly parse pointers on 64-bit. 2009-04-06 20:58:10 +02:00
Francois Gouget 96848a0605 Remove spaces before '\n's. 2009-03-09 12:05:58 +01:00