Commit Graph

304 Commits

Author SHA1 Message Date
Martin Storsjo fcf9ec8080 ucrtbase: Add defines for the printf/scanf options constants.
Avoid using hardcoded magic numbers for these options.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-02 23:02:24 +09:00
Carlo Bramini 21a14e9612 msvcrt: SEEK_* macros from GLIBC should be replaced with safer MSVCRT_SEEK_* macros. 2015-08-19 08:39:02 +09:00
Piotr Caban cf20731447 msvcrt: Add _mbscat_s_l implementation. 2015-07-07 16:52:20 +09:00
Piotr Caban e9eec98d5c msvcrt: Cache locale string to LCID conversion results. 2015-06-24 22:57:00 +09:00
Piotr Caban f55192aabc msvcr120: Add ___lc_locale_name_func implementation. 2015-06-17 20:01:17 +09:00
Daniel Lehman bc1eaf7a0f msvcrt: Add _W_Getdays. 2015-06-10 15:26:10 +09:00
Orion Poplawski 8bf1732962 msvcrt: Bump MSVCRT_MB_LEN_MAX to 5 and use it in MSVCRT__wctomb_l for default buffer lengthSet MB_LEN_MAX to 5 to match MSVCRT_MB_LEN_MAX. 2015-02-03 14:38:40 +09:00
Martin Storsjo 5f395ee8e6 msvcr120: Implement the _dclass/_fdclass/_ldclass functions. 2014-12-09 18:48:49 +01:00
Yifu Wang 08d0508993 msvcr120: Added wchar_t* fields to struct MSVCRT_lconv. 2014-12-03 21:34:27 +01:00
Iván Matellanes bcbd83d154 msvcrt: Added _fread_nolock_s implementation. 2014-11-10 19:25:15 +09:00
Iván Matellanes 4f807d9ae9 msvcrt: Added _ungetwc_nolock implementation. 2014-11-05 13:15:44 +09:00
Iván Matellanes 6f24dd9677 msvcrt: Added _ungetc_nolock implementation. 2014-11-05 13:15:20 +09:00
Iván Matellanes b536ff62ef msvcrt: Added _fputwc_nolock implementation. 2014-11-05 13:14:35 +09:00
Iván Matellanes 975a95a25b msvcrt: Added _fputc_nolock implementation. 2014-11-05 13:14:03 +09:00
Iván Matellanes 156684ba91 msvcrt: Added _fgetwc_nolock implementation. 2014-10-31 15:35:36 +09:00
Iván Matellanes 878b4a9280 msvcrt: Added _fgetc_nolock implementation. 2014-10-31 15:35:24 +09:00
Iván Matellanes 4bb80afedc msvcrt: Added _fflush_nolock implementation.
Thanks to Piotr Caban for the test.
2014-10-27 19:03:57 +09:00
Iván Matellanes 5077d8c137 msvcrt: Added _fseeki64_nolock implementation. 2014-10-16 13:02:16 +09:00
Iván Matellanes 7cf0c877b3 msvcrt: Added _ftelli64_nolock implementation. 2014-10-16 13:01:59 +09:00
Iván Matellanes 25d7a1bbbf msvcrt: Added _fwrite_nolock() implementation. 2014-10-13 18:09:06 +09:00
Iván Matellanes 206ea48f20 msvcrt: Added _fread_nolock() implementation. 2014-10-13 18:08:54 +09:00
Iván Matellanes 9fda14a9d6 msvcrt: Added _fclose_nolock() implementation. 2014-10-08 14:47:46 +02:00
Piotr Caban 43be238331 msvcr80: Throw bad_alloc exception when operator new fails. 2014-09-02 20:54:47 +02:00
Nikolay Sivov 60de49770c msvcrt: Implement llabs(). 2014-08-29 20:38:42 +02:00
Piotr Caban 18a416f7d5 msvcrt: Support NULL buffer in setvbuf. 2014-06-26 19:00:41 +02:00
Piotr Caban 7f23c57d09 msvcr100: Add critical_section class implementation. 2014-06-24 13:31:28 +02:00
Piotr Caban cda83f9c33 msvcr100: Add _SpinWait implementation. 2014-06-23 10:07:01 +02:00
Piotr Caban d48314c8a5 msvcrt: Don't use default process heap. 2014-04-22 14:46:43 +02:00
Piotr Caban a6e53eaed2 msvcr90: Share the source code with msvcrt. 2014-04-16 18:05:41 +02:00
Piotr Caban e70bf5f8c6 msvcrt: Fix compilation errors on Mingw. 2014-04-16 18:00:01 +02:00
Piotr Caban b01f888129 msvcrt: Fix internal LONG_MAX and ULONG_MAX definitions. 2013-09-25 19:30:23 +02:00
Piotr Caban 33d697c001 msvcrt: Add _wsetlocale implementation. 2013-08-29 19:56:17 +02:00
Piotr Caban ff7388ca3f msvcrt: Added _mbstok_s_l implementation. 2013-04-30 18:44:46 +02:00
Jactry Zeng 7cd91b6452 msvcrt: Fixed typo of _strncoll and _strncoll_l. 2013-04-29 20:30:55 +02:00
Piotr Caban 280f8237b5 msvcrt: Move fread_s function to msvcrt. 2013-03-28 18:54:42 +01:00
Piotr Caban 06c6773844 msvcrt: Added _wtol_l implementation. 2013-03-27 20:12:29 +01:00
Piotr Caban 9c4be83a78 msvcrt: Added _set_output_format implementation. 2013-03-27 12:13:20 +01:00
Piotr Caban 6eeb000c90 msvcrt: Fixed fgetwc behavior on multibyte characters and Unicode files. 2013-03-25 16:24:13 +01:00
Piotr Caban 14a81773c7 msvcrt: Added __pxcptinfoptrs implementation. 2013-03-05 12:44:30 +01:00
André Hentschel 874d077ca6 msvcrt: Add a new file for the ARM exception handling. 2013-02-27 19:23:45 +01:00
Nikolay Sivov eab914b968 msvcrt: Move demangler flags to a header and use them. 2013-02-25 10:40:36 +01:00
Piotr Caban a968a1ad6d msvcrt: Return child exit code in _pclose function.
Based on a patch by Borut Ražem.
2013-01-18 13:28:59 +01:00
Piotr Caban 7f4e1c65b1 msvcrt: Added support for commit flag in fopen. 2013-01-18 13:28:58 +01:00
Alexandre Julliard afee133b65 msvcrt: Fix incorrect use of the system wctomb function. 2013-01-14 13:47:00 +01:00
Piotr Caban ebfa653618 msvcrt: Make fputwc encoding aware. 2013-01-11 12:04:08 +01:00
Piotr Caban 4ffa9364eb msvcrt: Simplify fseek implementation. 2013-01-10 12:28:39 +01:00
Piotr Caban 96be6eb570 msvcrt: Added support for unicode open mode in msvcrt_get_flags function. 2013-01-10 12:26:53 +01:00
Piotr Caban dbec250635 msvcrt: Added _stricmp_l implementation. 2012-12-24 13:34:04 +01:00
Piotr Caban 7afc98a7f7 msvcrt: Fixed codepage setting code in create_locale. 2012-12-18 12:38:12 +01:00
Piotr Caban 3b5ab1b48f msvcrt: Added _atodbl_l implementation. 2012-12-17 20:31:25 +01:00
Piotr Caban f5c8647919 msvcrt: Added _mbsnbcoll_l implementation. 2012-12-12 12:01:36 +01:00
Piotr Caban a2b71b732a msvcrt: Added _mbsnbicoll_l implementation. 2012-12-12 12:01:22 +01:00
Piotr Caban a3035679d5 msvcrt: Improved _atoflt_l precision. 2012-11-06 16:02:35 +01:00
Piotr Caban 8060752c09 msvcrt: Fixed RTTI structure on 64-bit systems. 2012-09-07 11:55:32 +02:00
Alexandre Julliard 06989a0483 msvcrt: Make sure that errno is always set when calling the invalid parameter handler. 2012-07-26 11:05:32 +02:00
Thomas Faber bf5c7d4546 msvcrt: Fix malloc_func_t/free_func_t calling convention. 2012-05-07 11:37:19 +02:00
Piotr Caban b58cfb40b9 msvcrt: Added field names to MSVCRT___lc_time_data structure. 2012-04-11 18:21:00 +02:00
Piotr Caban 0f7c834bd1 msvcrt: Rewrite asctime function. 2012-04-11 18:20:14 +02:00
Akihiro Sagawa c9f1489cab msvcrt: Implement _mbcjmstojis. 2012-03-16 11:11:07 +01:00
Marcus Meissner b057a3e898 msvcrt: Mark various internal functions as hidden. 2012-01-03 12:37:32 +01:00
Piotr Caban 283c07b8ce msvcp90: Added ctype<char>::tolower functions implementation. 2011-12-21 18:05:47 +01:00
Piotr Caban 344883fb85 msvcrt: Initialize lc_time_curr inside create_locale. 2011-12-07 17:50:04 +01:00
Thomas Faber 5402827329 msvcrt: Fix MSVC build in exit.c and msvcrt.h. 2011-11-07 11:29:43 +01:00
Piotr Caban 698afdca98 msvcrt: Don't search for LCID in _setmbcp_l if it was already done. 2011-10-26 17:07:05 +02:00
Piotr Caban fea69b2305 msvcrt: Don't duplicate _setmbcp functionality inside _create_locale function. 2011-10-13 19:57:19 +02:00
Piotr Caban 99579ca42a msvcrt: Added _mbtowc_l implementation. 2011-10-12 17:09:34 +02:00
Piotr Caban 0f53100ade msvcrt: Move _pctype definition to locale.c. 2011-10-12 17:09:30 +02:00
Piotr Caban cfca12e486 msvcrt: Use ismbcodepage instead of mb_cur_max in mbcodepage dependent functions. 2011-10-12 17:09:20 +02:00
Piotr Caban cf27cb4927 msvcrt: Don't overwrite mbcinfo inside setlocale. 2011-10-12 17:09:07 +02:00
Piotr Caban f9de4eef75 msvcrt: Fix mingw compilation issues. 2011-06-03 17:44:06 +02:00
Piotr Caban 27ff2ae967 msvcrt: Improved locale initialization. 2011-05-26 13:38:22 +02:00
Piotr Caban 197826b12d msvcr90/tests: Added _getptd tests. 2011-05-25 11:48:02 +02:00
Piotr Caban abb3db5c57 msvcrt: Improved tmpnam/wtmpnam implementation. 2011-05-25 11:46:29 +02:00
Piotr Caban 12229aeeb2 msvcrt: Change the way how localtime/gmtime buffer is stored in __thread_data. 2011-05-25 11:46:16 +02:00
Piotr Caban e15ac98cbc msvcrt: Change the way locale information is stored in __thread_data. 2011-05-25 11:46:07 +02:00
Piotr Caban 6991ac0331 msvcrt: Use get_locinfo instead of get_locale. 2011-05-25 11:45:42 +02:00
Piotr Caban 11bfced55d msvcrt: Use _create_locale instead of setlocale during initialization. 2011-05-25 11:45:14 +02:00
Piotr Caban 093909cf88 msvcrt: Reorder fields of __thread_data structure. 2011-05-25 11:44:51 +02:00
Piotr Caban 2bcc9d452a msvcrt: Close thread handle when _beginthread is used. 2011-05-25 11:44:28 +02:00
Piotr Caban 38f476399c msvcrt: Fix __pctype_func implementation. 2011-05-20 12:36:24 +02:00
Piotr Caban 73b9acf273 msvcrt: Make scanf functions thread safe. 2011-05-19 19:37:26 +02:00
Piotr Caban 504231ff5a msvcrt: Added _strlwr_s_l implementation. 2011-05-12 14:27:08 +02:00
Piotr Caban 64cf208040 msvcrt: Don't pass NULL as __ms_va_list in printf implementation. 2011-05-11 17:49:16 +02:00
Francois Gouget ca268b199a msvcrt: Make printf_arg arg_clbk_positional() and MSVCRT_wcsrtombs_s_l() static. 2011-05-03 14:38:06 +02:00
Piotr Caban 168909283c msvcrt: Added wcsrtombs implementation. 2011-04-28 11:07:46 +02:00
Piotr Caban 00182ca6d9 msvcrt: Added sprintf_p_l implementation. 2011-04-27 13:18:59 +02:00
Piotr Caban c09f9ef498 msvcrt: Removed pf_vnsprintf internal function. 2011-04-25 14:36:42 +02:00
Piotr Caban 7303b8c4db msvcrt: Use callback based printf in cprintf functions family. 2011-04-25 14:36:26 +02:00
Piotr Caban 056dfb26ce msvcrt: Copy and reorganize printf implementation. 2011-04-25 14:36:19 +02:00
Piotr Caban 220b6ab37f msvcrt: Added _wassert implementation. 2011-04-05 17:38:09 +02:00
Hans Leidekker b25e0068ac msvcrt: Implement _set_security_error_handler. 2011-03-16 16:31:55 +01:00
Nikolay Sivov 0512829a27 msvcrt: Add _get_output_format() and return default value. 2011-03-09 12:30:30 +01:00
Jörg Höhle c6d67fad8f msvcrt: sizeof(long double) is 12 with MS, but not necessarily so on UNIX. 2011-02-17 18:33:43 +01:00
Alexandre Julliard 37af4c371b msvcrt: Implement longjmp for x86_64. 2011-02-01 18:14:09 +01:00
Detlef Riekenberg 58786dc8ea msvcrt: Add private define and header tests for _set_error_mode options. 2011-01-28 17:41:51 +01:00
Alexandre Julliard a8d8e4a367 msvcrt: Implemented __control87_2. 2011-01-26 14:57:15 +01:00
Nikolay Sivov 03ca06e791 msvcrt: Partially implement _set_abort_behavior. 2011-01-20 12:54:50 +01:00
Nikolay Sivov ad6bc94491 msvcrt: Add _atoflt and _atoflt_l implementations. 2011-01-19 12:22:27 +01:00
Alexandre Julliard 1ae23af85b include/msvcrt: Define more CPU control word flags. 2010-11-26 14:58:39 +01:00
Eric Pouech 7d384d23f8 msvcrt: For internal msvcrt use, added ability to grow automatically the size of the buffer in printf core engine. 2010-11-08 18:12:57 +01:00
Eric Pouech 71200a9818 msvcrt: Implemented (_)wcserror. 2010-11-03 11:08:56 +01:00
Eric Pouech fd3ad8cd2a msvcrt: Added macro to ease implementation of so called secure (_s postfix) APIs. 2010-11-01 12:31:19 +01:00
Damjan Jovanovic c7536ef868 msvcrt: Define STRUNCATE. 2010-10-19 10:15:35 +02:00
Andrew Nguyen e245cb52c6 msvcrt: Implement _localtime64_s. 2010-10-11 17:11:37 +02:00
Piotr Caban 899d9a042b msvcrt: Added _splitpath_s implementation. 2010-08-30 11:26:30 +02:00
Piotr Caban 3a25d7d9aa msvcrt: Added _gcvt_s implementation. 2010-08-27 12:06:43 +02:00
Piotr Caban 898e17f2af msvcrt: Added _set_purecall_handler implementation. 2010-08-25 17:37:48 +02:00
Alexander Scott-Johns 2663079c60 msvcrt: Rename _TRUNCATE to MSVCRT__TRUNCATE. 2010-06-07 13:51:34 +02:00
Piotr Caban 4134c57a91 msvcrt: Fix compilation error (x86_64-pc-mingw32). 2010-05-20 13:47:52 +02:00
Piotr Caban 117faee955 msvcrt: Fix strtod and wcstod implementation. 2010-05-10 10:08:57 +02:00
Piotr Caban 743e6ba688 msvcrt: Added _vsnwprintf* implementation. 2010-04-19 15:10:44 +02:00
Piotr Caban 85fa2ee53c msvcrt: Added _vsnprintf* implementation. 2010-04-19 15:10:26 +02:00
Piotr Caban 20b77f4428 msvcrt: Added _configthreadlocale implementation. 2010-04-15 16:51:45 +02:00
Piotr Caban 59c2201a9c msvcrt: Add helper function that returns current locale. 2010-04-15 16:51:45 +02:00
Piotr Caban d58b385b38 msvcrt: Change implementation of setlocale. 2010-04-15 16:51:45 +02:00
Alexandre Julliard 4f3b7f8445 msvcrt: Implement _invalid_parameter and fix the handler definitions. 2010-04-14 18:00:46 +02:00
Piotr Caban 7a1ff50ddc msvcrt: Added implemenatation of _create_locale and _free_locale. 2010-04-08 12:38:49 +02:00
Piotr Caban 585ea9cdd8 msvcrt: Added _strtoi64 implementation. 2010-03-29 15:50:20 +02:00
Piotr Caban b90320652d msvcrt: Rename functions conflicting with mingw headers. 2010-03-29 15:50:19 +02:00
Piotr Caban 254eab3827 msvcr90: Added _get/set_invalid_parameter_handler implementation. 2010-03-25 16:46:56 +01:00
Alexandre Julliard 7f69436ea8 include: Specify explicit alignment for __int64 types. 2009-11-21 14:31:45 +01:00
Alexandre Julliard 7c15ae127c msvcrt: Add an MSVCRT prefix to _wenviron. 2009-10-05 14:55:09 +02:00
Eric Pouech 9eca2f81dc msvcrt: Correctly handle the error cases in strtol and strtoul. 2009-09-01 12:43:24 +02:00
Alexandre Julliard 82f175e9b5 msvcrt: Replace long by MSVCRT_long. 2009-05-23 11:57:39 +02:00
Alexandre Julliard ac760a47f3 msvcrt: Fix the stat and finddata structures for 64-bit. 2009-05-23 11:57:12 +02:00
Alexandre Julliard 4a7b3460ef msvcrt: Add explicit 32- and 64-bit versions of the utime functions. 2009-05-23 11:12:17 +02:00
Alexandre Julliard 8408e3a955 msvcrt: Add explicit 32- and 64-bit versions of the time functions. 2009-05-23 11:12:12 +02:00
Alexandre Julliard f1b363e27d msvcrt: Fix the time_t definition for the msvcrt build. 2009-01-05 15:07:53 +01:00
Alexandre Julliard 558732ef09 msvcrt: Add missing __cdecl on some function pointers. 2009-01-03 18:43:00 +01:00
Alexandre Julliard 07ca8f4f8f msvcrt: Convert all the printf functions to use MS ABI varargs. 2009-01-03 11:38:25 +01:00
Alexandre Julliard 8a658d7d51 msvcrt: Rename _ftime to avoid conflicts. 2008-12-15 20:08:33 +01:00
Alexandre Julliard b19913ac70 msvcrt: Add a few more *_func functions to replace the __p_* ones. 2008-12-15 16:03:32 +01:00
Alexandre Julliard 4305e6d119 msvcrt: Use iob_func instead of p__iob on non-x86. 2008-12-12 10:19:55 +01:00
Alexandre Julliard d8ab5a14aa msvcrt: Use intptr_t or size_t instead of long where appropriate. 2008-12-12 10:19:55 +01:00
Alexandre Julliard 7a6c6747a9 msvcrt: Don't include msvcrt headers, instead duplicate the definitions in msvcrt.h. 2008-12-12 10:19:55 +01:00
Maarten Lankhorst 83045e5cc8 msvcrt: Add CDECL to all cdecl functions. 2008-11-25 12:33:39 +01:00
Eric Pouech 3a2dda11e9 msvcrt: Implemented splitpath_s. 2008-10-07 15:24:00 +02:00
Hans Leidekker 41575621c8 msvcrt: Correct search strategy for the exec/spawn functions. 2008-01-08 13:40:35 +01:00
Hans Leidekker 8d768b7713 msvcrt: Implement _wexecv{, e, p, pe}. 2008-01-08 13:39:14 +01:00
Hans Leidekker 118bee860a msvcrt: Implement _wpopen and forward _popen to it. 2008-01-08 13:34:37 +01:00
Hans Leidekker 3debf28215 msvcrt: Implement _wsystem and forward system to it. Respect COMSPEC environment variable. 2008-01-08 13:34:09 +01:00
Dmitry Timoshkov a88f03e22f msvcrt: Rename _environ to avoid a conflict on Solaris. 2008-01-08 12:54:40 +01:00
Hans Leidekker 1efae756c3 msvcrt: Implement _wspawnv{, e, p, pe}. 2007-09-24 14:38:53 +02:00
Hans Leidekker 7d3d98eb5c msvcrt: Implement _wsearchenv. 2007-09-24 14:37:39 +02:00
Tijl Coosemans 6bbd3cacb8 msvcrt: Resolve symbols clashes with FreeBSD libc. 2007-09-19 15:01:33 +02:00
Francois Gouget dd3e2be810 msvcrt: Add a prototype for _atoldbl() & co and declare _LDOUBLE & co in stdlib.h. 2007-08-30 17:02:48 +02:00
Alexandre Julliard 1f5a4a8046 msvcrt: Get rid of the now unused strndup/wstrndup functions. 2007-07-27 12:18:44 +02:00
Damjan Jovanovic cbb6da2d70 msvcrt: Added declarations for functions and structures related to stat64. 2007-02-14 12:30:58 +01:00
Eric Pouech f415b5ddeb msvcrt: Use raise(SIGABRT) for abort() and assert(). 2007-02-09 11:50:37 +01:00
Damjan Jovanovic 65d9723dc4 msvcrt: Align struct _stati64's st_size on an 8 byte boundary. 2007-02-06 13:28:36 +01:00