Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
fa272ada
Commit
fa272ada
authored
Nov 27, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use simple type definitions from public header.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
758460fa
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
859 additions
and
875 deletions
+859
-875
cpp.c
dlls/msvcrt/cpp.c
+6
-5
dir.c
dlls/msvcrt/dir.c
+46
-46
environ.c
dlls/msvcrt/environ.c
+10
-10
errno.c
dlls/msvcrt/errno.c
+6
-6
except.c
dlls/msvcrt/except.c
+3
-2
file.c
dlls/msvcrt/file.c
+54
-54
heap.c
dlls/msvcrt/heap.c
+43
-43
locale.c
dlls/msvcrt/locale.c
+2
-2
lock.c
dlls/msvcrt/lock.c
+16
-15
math.c
dlls/msvcrt/math.c
+26
-26
mbcs.c
dlls/msvcrt/mbcs.c
+80
-81
misc.c
dlls/msvcrt/misc.c
+13
-14
msvcrt.h
dlls/msvcrt/msvcrt.h
+145
-156
printf.h
dlls/msvcrt/printf.h
+1
-1
process.c
dlls/msvcrt/process.c
+59
-59
scanf.c
dlls/msvcrt/scanf.c
+10
-10
scanf.h
dlls/msvcrt/scanf.h
+4
-4
scheduler.c
dlls/msvcrt/scheduler.c
+10
-9
string.c
dlls/msvcrt/string.c
+105
-105
time.c
dlls/msvcrt/time.c
+94
-94
wcs.c
dlls/msvcrt/wcs.c
+126
-133
No files found.
dlls/msvcrt/cpp.c
View file @
fa272ada
...
...
@@ -20,6 +20,7 @@
*/
#include <stdarg.h>
#include <stdbool.h>
#include "windef.h"
#include "winternl.h"
...
...
@@ -1931,7 +1932,7 @@ void __cdecl __ExceptionPtrCurrentException(exception_ptr *ep)
* ?__ExceptionPtrToBool@@YA_NPBX@Z
* ?__ExceptionPtrToBool@@YA_NPEBX@Z
*/
MSVCRT_
bool
__cdecl
__ExceptionPtrToBool
(
exception_ptr
*
ep
)
bool
__cdecl
__ExceptionPtrToBool
(
exception_ptr
*
ep
)
{
return
!!
ep
->
rec
;
}
...
...
@@ -2020,7 +2021,7 @@ void __cdecl __ExceptionPtrCopyException(exception_ptr *ep,
}
#endif
MSVCRT_
bool
__cdecl
__ExceptionPtrCompare
(
const
exception_ptr
*
ep1
,
const
exception_ptr
*
ep2
)
bool
__cdecl
__ExceptionPtrCompare
(
const
exception_ptr
*
ep1
,
const
exception_ptr
*
ep2
)
{
return
ep1
->
rec
==
ep2
->
rec
;
}
...
...
@@ -2048,7 +2049,7 @@ typedef struct
char
name
[
1
];
}
type_info_entry
;
static
void
*
CDECL
type_info_entry_malloc
(
MSVCRT_
size_t
size
)
static
void
*
CDECL
type_info_entry_malloc
(
size_t
size
)
{
type_info_entry
*
ret
=
MSVCRT_malloc
(
FIELD_OFFSET
(
type_info_entry
,
name
)
+
size
);
return
ret
->
name
;
...
...
@@ -2123,9 +2124,9 @@ void CDECL MSVCRT_type_info_destroy_list(SLIST_HEADER *header)
/******************************************************************
* __std_type_info_hash (UCRTBASE.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT_type_info_hash
(
const
type_info140
*
ti
)
size_t
CDECL
MSVCRT_type_info_hash
(
const
type_info140
*
ti
)
{
MSVCRT_
size_t
hash
,
fnv_prime
;
size_t
hash
,
fnv_prime
;
const
char
*
p
;
#ifdef _WIN64
...
...
dlls/msvcrt/dir.c
View file @
fa272ada
...
...
@@ -318,7 +318,7 @@ int CDECL MSVCRT__chdrive(int newdrive)
* NOTES
* See FindClose.
*/
int
CDECL
MSVCRT__findclose
(
MSVCRT_
intptr_t
hand
)
int
CDECL
MSVCRT__findclose
(
intptr_t
hand
)
{
TRACE
(
":handle %Iu
\n
"
,
hand
);
if
(
!
FindClose
((
HANDLE
)
hand
))
...
...
@@ -346,7 +346,7 @@ int CDECL MSVCRT__findclose(MSVCRT_intptr_t hand)
* NOTES
* See FindFirstFileA.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__findfirst
(
const
char
*
fspec
,
struct
MSVCRT__finddata_t
*
ft
)
intptr_t
CDECL
MSVCRT__findfirst
(
const
char
*
fspec
,
struct
MSVCRT__finddata_t
*
ft
)
{
WIN32_FIND_DATAA
find_data
;
HANDLE
hfind
;
...
...
@@ -359,13 +359,13 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst(const char * fspec, struct MSVCRT__findd
}
msvcrt_fttofd
(
&
find_data
,
ft
);
TRACE
(
":got handle %p
\n
"
,
hfind
);
return
(
MSVCRT_
intptr_t
)
hfind
;
return
(
intptr_t
)
hfind
;
}
/*********************************************************************
* _findfirst32 (MSVCRT.@)
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__findfirst32
(
const
char
*
fspec
,
struct
MSVCRT__finddata32_t
*
ft
)
intptr_t
CDECL
MSVCRT__findfirst32
(
const
char
*
fspec
,
struct
MSVCRT__finddata32_t
*
ft
)
{
WIN32_FIND_DATAA
find_data
;
HANDLE
hfind
;
...
...
@@ -378,7 +378,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst32(const char * fspec, struct MSVCRT__fin
}
msvcrt_fttofd32
(
&
find_data
,
ft
);
TRACE
(
":got handle %p
\n
"
,
hfind
);
return
(
MSVCRT_
intptr_t
)
hfind
;
return
(
intptr_t
)
hfind
;
}
/*********************************************************************
...
...
@@ -386,7 +386,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst32(const char * fspec, struct MSVCRT__fin
*
* Unicode version of _findfirst.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__wfindfirst
(
const
wchar_t
*
fspec
,
struct
MSVCRT__wfinddata_t
*
ft
)
intptr_t
CDECL
MSVCRT__wfindfirst
(
const
wchar_t
*
fspec
,
struct
MSVCRT__wfinddata_t
*
ft
)
{
WIN32_FIND_DATAW
find_data
;
HANDLE
hfind
;
...
...
@@ -399,7 +399,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirst(const wchar_t * fspec, struct MSVCRT__w
}
msvcrt_wfttofd
(
&
find_data
,
ft
);
TRACE
(
":got handle %p
\n
"
,
hfind
);
return
(
MSVCRT_
intptr_t
)
hfind
;
return
(
intptr_t
)
hfind
;
}
/*********************************************************************
...
...
@@ -407,7 +407,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirst(const wchar_t * fspec, struct MSVCRT__w
*
* Unicode version of _findfirst32.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__wfindfirst32
(
const
wchar_t
*
fspec
,
struct
MSVCRT__wfinddata32_t
*
ft
)
intptr_t
CDECL
MSVCRT__wfindfirst32
(
const
wchar_t
*
fspec
,
struct
MSVCRT__wfinddata32_t
*
ft
)
{
WIN32_FIND_DATAW
find_data
;
HANDLE
hfind
;
...
...
@@ -420,7 +420,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirst32(const wchar_t * fspec, struct MSVCRT_
}
msvcrt_wfttofd32
(
&
find_data
,
ft
);
TRACE
(
":got handle %p
\n
"
,
hfind
);
return
(
MSVCRT_
intptr_t
)
hfind
;
return
(
intptr_t
)
hfind
;
}
/*********************************************************************
...
...
@@ -428,7 +428,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirst32(const wchar_t * fspec, struct MSVCRT_
*
* 64-bit version of _findfirst.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__findfirsti64
(
const
char
*
fspec
,
struct
MSVCRT__finddatai64_t
*
ft
)
intptr_t
CDECL
MSVCRT__findfirsti64
(
const
char
*
fspec
,
struct
MSVCRT__finddatai64_t
*
ft
)
{
WIN32_FIND_DATAA
find_data
;
HANDLE
hfind
;
...
...
@@ -441,7 +441,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirsti64(const char * fspec, struct MSVCRT__fi
}
msvcrt_fttofdi64
(
&
find_data
,
ft
);
TRACE
(
":got handle %p
\n
"
,
hfind
);
return
(
MSVCRT_
intptr_t
)
hfind
;
return
(
intptr_t
)
hfind
;
}
/*********************************************************************
...
...
@@ -449,7 +449,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirsti64(const char * fspec, struct MSVCRT__fi
*
* 64-bit version of _findfirst.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__findfirst64
(
const
char
*
fspec
,
struct
MSVCRT__finddata64_t
*
ft
)
intptr_t
CDECL
MSVCRT__findfirst64
(
const
char
*
fspec
,
struct
MSVCRT__finddata64_t
*
ft
)
{
WIN32_FIND_DATAA
find_data
;
HANDLE
hfind
;
...
...
@@ -462,7 +462,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst64(const char * fspec, struct MSVCRT__fin
}
msvcrt_fttofd64
(
&
find_data
,
ft
);
TRACE
(
":got handle %p
\n
"
,
hfind
);
return
(
MSVCRT_
intptr_t
)
hfind
;
return
(
intptr_t
)
hfind
;
}
/*********************************************************************
...
...
@@ -470,7 +470,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst64(const char * fspec, struct MSVCRT__fin
*
* Unicode version of _findfirst64.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__wfindfirst64
(
const
wchar_t
*
fspec
,
struct
MSVCRT__wfinddata64_t
*
ft
)
intptr_t
CDECL
MSVCRT__wfindfirst64
(
const
wchar_t
*
fspec
,
struct
MSVCRT__wfinddata64_t
*
ft
)
{
WIN32_FIND_DATAW
find_data
;
HANDLE
hfind
;
...
...
@@ -483,7 +483,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirst64(const wchar_t * fspec, struct MSVCRT_
}
msvcrt_wfttofd64
(
&
find_data
,
ft
);
TRACE
(
":got handle %p
\n
"
,
hfind
);
return
(
MSVCRT_
intptr_t
)
hfind
;
return
(
intptr_t
)
hfind
;
}
/*********************************************************************
...
...
@@ -491,7 +491,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirst64(const wchar_t * fspec, struct MSVCRT_
*
* 64-bit/32-bit version of _findfirst.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__findfirst64i32
(
const
char
*
fspec
,
struct
MSVCRT__finddata64i32_t
*
ft
)
intptr_t
CDECL
MSVCRT__findfirst64i32
(
const
char
*
fspec
,
struct
MSVCRT__finddata64i32_t
*
ft
)
{
WIN32_FIND_DATAA
find_data
;
HANDLE
hfind
;
...
...
@@ -504,7 +504,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst64i32(const char * fspec, struct MSVCRT__
}
msvcrt_fttofd64i32
(
&
find_data
,
ft
);
TRACE
(
":got handle %p
\n
"
,
hfind
);
return
(
MSVCRT_
intptr_t
)
hfind
;
return
(
intptr_t
)
hfind
;
}
/*********************************************************************
...
...
@@ -512,7 +512,7 @@ MSVCRT_intptr_t CDECL MSVCRT__findfirst64i32(const char * fspec, struct MSVCRT__
*
* Unicode version of _findfirst64i32.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__wfindfirst64i32
(
const
wchar_t
*
fspec
,
struct
MSVCRT__wfinddata64i32_t
*
ft
)
intptr_t
CDECL
MSVCRT__wfindfirst64i32
(
const
wchar_t
*
fspec
,
struct
MSVCRT__wfinddata64i32_t
*
ft
)
{
WIN32_FIND_DATAW
find_data
;
HANDLE
hfind
;
...
...
@@ -525,7 +525,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirst64i32(const wchar_t * fspec, struct MSVC
}
msvcrt_wfttofd64i32
(
&
find_data
,
ft
);
TRACE
(
":got handle %p
\n
"
,
hfind
);
return
(
MSVCRT_
intptr_t
)
hfind
;
return
(
intptr_t
)
hfind
;
}
/*********************************************************************
...
...
@@ -533,7 +533,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirst64i32(const wchar_t * fspec, struct MSVC
*
* Unicode version of _findfirsti64.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__wfindfirsti64
(
const
wchar_t
*
fspec
,
struct
MSVCRT__wfinddatai64_t
*
ft
)
intptr_t
CDECL
MSVCRT__wfindfirsti64
(
const
wchar_t
*
fspec
,
struct
MSVCRT__wfinddatai64_t
*
ft
)
{
WIN32_FIND_DATAW
find_data
;
HANDLE
hfind
;
...
...
@@ -546,7 +546,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirsti64(const wchar_t * fspec, struct MSVCRT
}
msvcrt_wfttofdi64
(
&
find_data
,
ft
);
TRACE
(
":got handle %p
\n
"
,
hfind
);
return
(
MSVCRT_
intptr_t
)
hfind
;
return
(
intptr_t
)
hfind
;
}
/*********************************************************************
...
...
@@ -565,7 +565,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wfindfirsti64(const wchar_t * fspec, struct MSVCRT
* NOTES
* See FindNextFileA.
*/
int
CDECL
MSVCRT__findnext
(
MSVCRT_
intptr_t
hand
,
struct
MSVCRT__finddata_t
*
ft
)
int
CDECL
MSVCRT__findnext
(
intptr_t
hand
,
struct
MSVCRT__finddata_t
*
ft
)
{
WIN32_FIND_DATAA
find_data
;
...
...
@@ -582,7 +582,7 @@ int CDECL MSVCRT__findnext(MSVCRT_intptr_t hand, struct MSVCRT__finddata_t * ft)
/*********************************************************************
* _findnext32 (MSVCRT.@)
*/
int
CDECL
MSVCRT__findnext32
(
MSVCRT_
intptr_t
hand
,
struct
MSVCRT__finddata32_t
*
ft
)
int
CDECL
MSVCRT__findnext32
(
intptr_t
hand
,
struct
MSVCRT__finddata32_t
*
ft
)
{
WIN32_FIND_DATAA
find_data
;
...
...
@@ -599,7 +599,7 @@ int CDECL MSVCRT__findnext32(MSVCRT_intptr_t hand, struct MSVCRT__finddata32_t *
/*********************************************************************
* _wfindnext32 (MSVCRT.@)
*/
int
CDECL
MSVCRT__wfindnext32
(
MSVCRT_
intptr_t
hand
,
struct
MSVCRT__wfinddata32_t
*
ft
)
int
CDECL
MSVCRT__wfindnext32
(
intptr_t
hand
,
struct
MSVCRT__wfinddata32_t
*
ft
)
{
WIN32_FIND_DATAW
find_data
;
...
...
@@ -618,7 +618,7 @@ int CDECL MSVCRT__wfindnext32(MSVCRT_intptr_t hand, struct MSVCRT__wfinddata32_t
*
* Unicode version of _findnext.
*/
int
CDECL
MSVCRT__wfindnext
(
MSVCRT_
intptr_t
hand
,
struct
MSVCRT__wfinddata_t
*
ft
)
int
CDECL
MSVCRT__wfindnext
(
intptr_t
hand
,
struct
MSVCRT__wfinddata_t
*
ft
)
{
WIN32_FIND_DATAW
find_data
;
...
...
@@ -637,7 +637,7 @@ int CDECL MSVCRT__wfindnext(MSVCRT_intptr_t hand, struct MSVCRT__wfinddata_t * f
*
* 64-bit version of _findnext.
*/
int
CDECL
MSVCRT__findnexti64
(
MSVCRT_
intptr_t
hand
,
struct
MSVCRT__finddatai64_t
*
ft
)
int
CDECL
MSVCRT__findnexti64
(
intptr_t
hand
,
struct
MSVCRT__finddatai64_t
*
ft
)
{
WIN32_FIND_DATAA
find_data
;
...
...
@@ -656,7 +656,7 @@ int CDECL MSVCRT__findnexti64(MSVCRT_intptr_t hand, struct MSVCRT__finddatai64_t
*
* 64-bit version of _findnext.
*/
int
CDECL
MSVCRT__findnext64
(
MSVCRT_
intptr_t
hand
,
struct
MSVCRT__finddata64_t
*
ft
)
int
CDECL
MSVCRT__findnext64
(
intptr_t
hand
,
struct
MSVCRT__finddata64_t
*
ft
)
{
WIN32_FIND_DATAA
find_data
;
...
...
@@ -675,7 +675,7 @@ int CDECL MSVCRT__findnext64(MSVCRT_intptr_t hand, struct MSVCRT__finddata64_t *
*
* Unicode version of _wfindnext64.
*/
int
CDECL
MSVCRT__wfindnext64
(
MSVCRT_
intptr_t
hand
,
struct
MSVCRT__wfinddata64_t
*
ft
)
int
CDECL
MSVCRT__wfindnext64
(
intptr_t
hand
,
struct
MSVCRT__wfinddata64_t
*
ft
)
{
WIN32_FIND_DATAW
find_data
;
...
...
@@ -694,7 +694,7 @@ int CDECL MSVCRT__wfindnext64(MSVCRT_intptr_t hand, struct MSVCRT__wfinddata64_t
*
* 64-bit/32-bit version of _findnext.
*/
int
CDECL
MSVCRT__findnext64i32
(
MSVCRT_
intptr_t
hand
,
struct
MSVCRT__finddata64i32_t
*
ft
)
int
CDECL
MSVCRT__findnext64i32
(
intptr_t
hand
,
struct
MSVCRT__finddata64i32_t
*
ft
)
{
WIN32_FIND_DATAA
find_data
;
...
...
@@ -713,7 +713,7 @@ int CDECL MSVCRT__findnext64i32(MSVCRT_intptr_t hand, struct MSVCRT__finddata64i
*
* Unicode version of _findnexti64.
*/
int
CDECL
MSVCRT__wfindnexti64
(
MSVCRT_
intptr_t
hand
,
struct
MSVCRT__wfinddatai64_t
*
ft
)
int
CDECL
MSVCRT__wfindnexti64
(
intptr_t
hand
,
struct
MSVCRT__wfinddatai64_t
*
ft
)
{
WIN32_FIND_DATAW
find_data
;
...
...
@@ -732,7 +732,7 @@ int CDECL MSVCRT__wfindnexti64(MSVCRT_intptr_t hand, struct MSVCRT__wfinddatai64
*
* Unicode version of _findnext64i32.
*/
int
CDECL
MSVCRT__wfindnext64i32
(
MSVCRT_
intptr_t
hand
,
struct
MSVCRT__wfinddata64i32_t
*
ft
)
int
CDECL
MSVCRT__wfindnext64i32
(
intptr_t
hand
,
struct
MSVCRT__wfinddata64i32_t
*
ft
)
{
WIN32_FIND_DATAW
find_data
;
...
...
@@ -1039,10 +1039,10 @@ int CDECL MSVCRT__wrmdir(const wchar_t * dir)
* _splitpath_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__splitpath_s
(
const
char
*
inpath
,
char
*
drive
,
MSVCRT_
size_t
sz_drive
,
char
*
dir
,
MSVCRT_
size_t
sz_dir
,
char
*
fname
,
MSVCRT_
size_t
sz_fname
,
char
*
ext
,
MSVCRT_
size_t
sz_ext
)
char
*
drive
,
size_t
sz_drive
,
char
*
dir
,
size_t
sz_dir
,
char
*
fname
,
size_t
sz_fname
,
char
*
ext
,
size_t
sz_ext
)
{
const
char
*
p
,
*
end
;
...
...
@@ -1139,10 +1139,10 @@ void CDECL MSVCRT__splitpath(const char *inpath, char *drv, char *dir,
* Secure version of _wsplitpath
*/
int
CDECL
MSVCRT__wsplitpath_s
(
const
wchar_t
*
inpath
,
wchar_t
*
drive
,
MSVCRT_
size_t
sz_drive
,
wchar_t
*
dir
,
MSVCRT_
size_t
sz_dir
,
wchar_t
*
fname
,
MSVCRT_
size_t
sz_fname
,
wchar_t
*
ext
,
MSVCRT_
size_t
sz_ext
)
wchar_t
*
drive
,
size_t
sz_drive
,
wchar_t
*
dir
,
size_t
sz_dir
,
wchar_t
*
fname
,
size_t
sz_fname
,
wchar_t
*
ext
,
size_t
sz_ext
)
{
const
wchar_t
*
p
,
*
end
;
...
...
@@ -1232,7 +1232,7 @@ void CDECL MSVCRT__wsplitpath(const wchar_t *inpath, wchar_t *drv, wchar_t *dir,
*
* Unicode version of _fullpath.
*/
wchar_t
*
CDECL
MSVCRT__wfullpath
(
wchar_t
*
absPath
,
const
wchar_t
*
relPath
,
MSVCRT_
size_t
size
)
wchar_t
*
CDECL
MSVCRT__wfullpath
(
wchar_t
*
absPath
,
const
wchar_t
*
relPath
,
size_t
size
)
{
DWORD
rc
;
WCHAR
*
buffer
;
...
...
@@ -1435,7 +1435,7 @@ VOID CDECL MSVCRT__wmakepath(wchar_t *path, const wchar_t *drive, const wchar_t
*
* Safe version of _makepath.
*/
int
CDECL
MSVCRT__makepath_s
(
char
*
path
,
MSVCRT_
size_t
size
,
const
char
*
drive
,
int
CDECL
MSVCRT__makepath_s
(
char
*
path
,
size_t
size
,
const
char
*
drive
,
const
char
*
directory
,
const
char
*
filename
,
const
char
*
extension
)
{
...
...
@@ -1539,7 +1539,7 @@ range:
*
* Safe version of _wmakepath.
*/
int
CDECL
MSVCRT__wmakepath_s
(
wchar_t
*
path
,
MSVCRT_
size_t
size
,
const
wchar_t
*
drive
,
int
CDECL
MSVCRT__wmakepath_s
(
wchar_t
*
path
,
size_t
size
,
const
wchar_t
*
drive
,
const
wchar_t
*
directory
,
const
wchar_t
*
filename
,
const
wchar_t
*
extension
)
{
...
...
@@ -1641,11 +1641,11 @@ range:
/*********************************************************************
* _searchenv_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__searchenv_s
(
const
char
*
file
,
const
char
*
env
,
char
*
buf
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT__searchenv_s
(
const
char
*
file
,
const
char
*
env
,
char
*
buf
,
size_t
count
)
{
char
*
envVal
,
*
penv
,
*
end
;
char
path
[
MAX_PATH
];
MSVCRT_
size_t
path_len
,
fname_len
;
size_t
path_len
,
fname_len
;
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
buf
!=
NULL
))
return
MSVCRT_EINVAL
;
...
...
@@ -1735,11 +1735,11 @@ void CDECL MSVCRT__searchenv(const char* file, const char* env, char *buf)
* _wsearchenv_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__wsearchenv_s
(
const
wchar_t
*
file
,
const
wchar_t
*
env
,
wchar_t
*
buf
,
MSVCRT_
size_t
count
)
wchar_t
*
buf
,
size_t
count
)
{
wchar_t
*
envVal
,
*
penv
,
*
end
;
wchar_t
path
[
MAX_PATH
];
MSVCRT_
size_t
path_len
,
fname_len
;
size_t
path_len
,
fname_len
;
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
buf
!=
NULL
))
return
MSVCRT_EINVAL
;
...
...
dlls/msvcrt/environ.c
View file @
fa272ada
...
...
@@ -211,10 +211,10 @@ int CDECL _wputenv_s(const wchar_t *name, const wchar_t *value)
/******************************************************************
* _dupenv_s (MSVCR80.@)
*/
int
CDECL
_dupenv_s
(
char
**
buffer
,
MSVCRT_
size_t
*
numberOfElements
,
const
char
*
varname
)
int
CDECL
_dupenv_s
(
char
**
buffer
,
size_t
*
numberOfElements
,
const
char
*
varname
)
{
char
*
e
;
MSVCRT_size_t
sz
;
char
*
e
;
size_t
sz
;
if
(
!
MSVCRT_CHECK_PMT
(
buffer
!=
NULL
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
varname
!=
NULL
))
return
MSVCRT_EINVAL
;
...
...
@@ -235,11 +235,11 @@ int CDECL _dupenv_s(char **buffer, MSVCRT_size_t *numberOfElements, const char *
/******************************************************************
* _wdupenv_s (MSVCR80.@)
*/
int
CDECL
_wdupenv_s
(
wchar_t
**
buffer
,
MSVCRT_
size_t
*
numberOfElements
,
int
CDECL
_wdupenv_s
(
wchar_t
**
buffer
,
size_t
*
numberOfElements
,
const
wchar_t
*
varname
)
{
wchar_t
*
e
;
MSVCRT_size_t
sz
;
wchar_t
*
e
;
size_t
sz
;
if
(
!
MSVCRT_CHECK_PMT
(
buffer
!=
NULL
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
varname
!=
NULL
))
return
MSVCRT_EINVAL
;
...
...
@@ -262,9 +262,9 @@ int CDECL _wdupenv_s(wchar_t **buffer, MSVCRT_size_t *numberOfElements,
/******************************************************************
* getenv_s (MSVCRT.@)
*/
int
CDECL
getenv_s
(
MSVCRT_size_t
*
pReturnValue
,
char
*
buffer
,
MSVCRT_
size_t
numberOfElements
,
const
char
*
varname
)
int
CDECL
getenv_s
(
size_t
*
pReturnValue
,
char
*
buffer
,
size_t
numberOfElements
,
const
char
*
varname
)
{
char
*
e
;
char
*
e
;
if
(
!
MSVCRT_CHECK_PMT
(
pReturnValue
!=
NULL
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
!
(
buffer
==
NULL
&&
numberOfElements
>
0
)))
return
MSVCRT_EINVAL
;
...
...
@@ -287,10 +287,10 @@ int CDECL getenv_s(MSVCRT_size_t *pReturnValue, char* buffer, MSVCRT_size_t numb
/******************************************************************
* _wgetenv_s (MSVCRT.@)
*/
int
CDECL
_wgetenv_s
(
MSVCRT_size_t
*
pReturnValue
,
wchar_t
*
buffer
,
MSVCRT_
size_t
numberOfElements
,
int
CDECL
_wgetenv_s
(
size_t
*
pReturnValue
,
wchar_t
*
buffer
,
size_t
numberOfElements
,
const
wchar_t
*
varname
)
{
wchar_t
*
e
;
wchar_t
*
e
;
if
(
!
MSVCRT_CHECK_PMT
(
pReturnValue
!=
NULL
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
!
(
buffer
==
NULL
&&
numberOfElements
>
0
)))
return
MSVCRT_EINVAL
;
...
...
dlls/msvcrt/errno.c
View file @
fa272ada
...
...
@@ -131,7 +131,7 @@ static MSVCRT_invalid_parameter_handler invalid_parameter_handler = NULL;
void
msvcrt_set_errno
(
int
err
)
{
int
*
errno_ptr
=
MSVCRT__errno
();
MSVCRT
_ulong
*
doserrno
=
MSVCRT___doserrno
();
__msvcrt
_ulong
*
doserrno
=
MSVCRT___doserrno
();
*
doserrno
=
err
;
...
...
@@ -219,7 +219,7 @@ int* CDECL MSVCRT__errno(void)
/*********************************************************************
* __doserrno (MSVCRT.@)
*/
MSVCRT
_ulong
*
CDECL
MSVCRT___doserrno
(
void
)
__msvcrt
_ulong
*
CDECL
MSVCRT___doserrno
(
void
)
{
return
&
msvcrt_get_thread_data
()
->
thread_doserrno
;
}
...
...
@@ -284,7 +284,7 @@ char* CDECL MSVCRT_strerror(int err)
/**********************************************************************
* strerror_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_strerror_s
(
char
*
buffer
,
MSVCRT_
size_t
numberOfElements
,
int
errnum
)
int
CDECL
MSVCRT_strerror_s
(
char
*
buffer
,
size_t
numberOfElements
,
int
errnum
)
{
char
*
ptr
;
...
...
@@ -352,7 +352,7 @@ void CDECL MSVCRT_perror(const char* str)
*/
void
CDECL
MSVCRT__wperror
(
const
wchar_t
*
str
)
{
MSVCRT_
size_t
size
;
size_t
size
;
char
*
buffer
=
NULL
;
if
(
str
&&
*
str
)
...
...
@@ -375,7 +375,7 @@ void CDECL MSVCRT__wperror(const wchar_t* str)
/*********************************************************************
* _wcserror_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcserror_s
(
wchar_t
*
buffer
,
MSVCRT_
size_t
nc
,
int
err
)
int
CDECL
MSVCRT__wcserror_s
(
wchar_t
*
buffer
,
size_t
nc
,
int
err
)
{
if
(
!
MSVCRT_CHECK_PMT
(
buffer
!=
NULL
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
nc
>
0
))
return
MSVCRT_EINVAL
;
...
...
@@ -401,7 +401,7 @@ wchar_t* CDECL MSVCRT__wcserror(int err)
/**********************************************************************
* __wcserror_s (MSVCRT.@)
*/
int
CDECL
MSVCRT___wcserror_s
(
wchar_t
*
buffer
,
MSVCRT_
size_t
nc
,
const
wchar_t
*
str
)
int
CDECL
MSVCRT___wcserror_s
(
wchar_t
*
buffer
,
size_t
nc
,
const
wchar_t
*
str
)
{
int
err
;
size_t
len
;
...
...
dlls/msvcrt/except.c
View file @
fa272ada
...
...
@@ -22,6 +22,7 @@
*/
#include <stdarg.h>
#include <stdbool.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
...
...
@@ -470,8 +471,8 @@ void CDECL __CxxUnregisterExceptionObject(cxx_frame_info *frame_info, BOOL in_us
}
struct
__std_exception_data
{
char
*
what
;
MSVCRT_
bool
dofree
;
char
*
what
;
bool
dofree
;
};
#if _MSVCR_VER>=140
...
...
dlls/msvcrt/file.c
View file @
fa272ada
...
...
@@ -227,7 +227,7 @@ static void msvcrt_stat64_to_stat32i64(const struct MSVCRT__stat64 *buf64, struc
buf
->
st_ctime
=
buf64
->
st_ctime
;
}
static
void
time_to_filetime
(
MSVCRT_
__time64_t
time
,
FILETIME
*
ft
)
static
void
time_to_filetime
(
__time64_t
time
,
FILETIME
*
ft
)
{
/* 1601 to 1970 is 369 years plus 89 leap days */
static
const
__int64
secs_1601_to_1970
=
((
369
*
365
+
89
)
*
(
__int64
)
86400
);
...
...
@@ -1429,7 +1429,7 @@ int CDECL MSVCRT__fseeki64_nolock(MSVCRT_FILE* file, __int64 offset, int whence)
/*********************************************************************
* fseek (MSVCRT.@)
*/
int
CDECL
MSVCRT_fseek
(
MSVCRT_FILE
*
file
,
MSVCRT
_long
offset
,
int
whence
)
int
CDECL
MSVCRT_fseek
(
MSVCRT_FILE
*
file
,
__msvcrt
_long
offset
,
int
whence
)
{
return
MSVCRT__fseeki64
(
file
,
offset
,
whence
);
}
...
...
@@ -1437,7 +1437,7 @@ int CDECL MSVCRT_fseek(MSVCRT_FILE* file, MSVCRT_long offset, int whence)
/*********************************************************************
* _fseek_nolock (MSVCRT.@)
*/
int
CDECL
MSVCRT__fseek_nolock
(
MSVCRT_FILE
*
file
,
MSVCRT
_long
offset
,
int
whence
)
int
CDECL
MSVCRT__fseek_nolock
(
MSVCRT_FILE
*
file
,
__msvcrt
_long
offset
,
int
whence
)
{
return
MSVCRT__fseeki64_nolock
(
file
,
offset
,
whence
);
}
...
...
@@ -1482,7 +1482,7 @@ int CDECL MSVCRT__chsize_s(int fd, __int64 size)
/*********************************************************************
* _chsize (MSVCRT.@)
*/
int
CDECL
MSVCRT__chsize
(
int
fd
,
MSVCRT
_long
size
)
int
CDECL
MSVCRT__chsize
(
int
fd
,
__msvcrt
_long
size
)
{
/* _chsize_s returns errno on failure but _chsize should return -1 */
return
MSVCRT__chsize_s
(
fd
,
size
)
==
0
?
0
:
-
1
;
...
...
@@ -1923,20 +1923,20 @@ int CDECL _futime(int fd, struct MSVCRT___utimbuf32 *t)
/*********************************************************************
* _get_osfhandle (MSVCRT.@)
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__get_osfhandle
(
int
fd
)
intptr_t
CDECL
MSVCRT__get_osfhandle
(
int
fd
)
{
HANDLE
hand
=
get_ioinfo_nolock
(
fd
)
->
handle
;
TRACE
(
":fd (%d) handle (%p)
\n
"
,
fd
,
hand
);
if
(
hand
==
INVALID_HANDLE_VALUE
)
*
MSVCRT__errno
()
=
MSVCRT_EBADF
;
return
(
MSVCRT_
intptr_t
)
hand
;
return
(
intptr_t
)
hand
;
}
/*********************************************************************
* _mktemp_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__mktemp_s
(
char
*
pattern
,
MSVCRT_
size_t
size
)
int
CDECL
MSVCRT__mktemp_s
(
char
*
pattern
,
size_t
size
)
{
DWORD
len
,
xno
,
id
;
...
...
@@ -2011,7 +2011,7 @@ char * CDECL MSVCRT__mktemp(char *pattern)
/*********************************************************************
* _wmktemp_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__wmktemp_s
(
wchar_t
*
pattern
,
MSVCRT_
size_t
size
)
int
CDECL
MSVCRT__wmktemp_s
(
wchar_t
*
pattern
,
size_t
size
)
{
DWORD
len
,
xno
,
id
;
...
...
@@ -2493,7 +2493,7 @@ int CDECL MSVCRT__wcreat(const wchar_t *path, int pmode)
/*********************************************************************
* _open_osfhandle (MSVCRT.@)
*/
int
CDECL
MSVCRT__open_osfhandle
(
MSVCRT_
intptr_t
handle
,
int
oflags
)
int
CDECL
MSVCRT__open_osfhandle
(
intptr_t
handle
,
int
oflags
)
{
DWORD
flags
;
int
fd
;
...
...
@@ -3269,7 +3269,7 @@ int CDECL MSVCRT__wstat64i32(const wchar_t *path, struct MSVCRT__stat64i32 *buf)
/*********************************************************************
* _tell (MSVCRT.@)
*/
MSVCRT
_long
CDECL
MSVCRT__tell
(
int
fd
)
__msvcrt
_long
CDECL
MSVCRT__tell
(
int
fd
)
{
return
MSVCRT__lseek
(
fd
,
0
,
MSVCRT_SEEK_CUR
);
}
...
...
@@ -3482,7 +3482,7 @@ int CDECL MSVCRT__write(int fd, const void* buf, unsigned int count)
if
(
!
(
info
->
exflag
&
(
EF_UTF8
|
EF_UTF16
))
&&
console
)
{
char
conv
[
sizeof
(
lfbuf
)];
MSVCRT_
size_t
len
=
0
;
size_t
len
=
0
;
#if _MSVCR_VER >= 90
if
(
info
->
dbcsBufferUsed
)
...
...
@@ -3798,9 +3798,9 @@ char * CDECL MSVCRT_fgets(char *s, int size, MSVCRT_FILE* file)
/*********************************************************************
* fgetwc (MSVCRT.@)
*/
MSVCRT_
wint_t
CDECL
MSVCRT_fgetwc
(
MSVCRT_FILE
*
file
)
wint_t
CDECL
MSVCRT_fgetwc
(
MSVCRT_FILE
*
file
)
{
MSVCRT_
wint_t
ret
;
wint_t
ret
;
MSVCRT__lock_file
(
file
);
ret
=
MSVCRT__fgetwc_nolock
(
file
);
...
...
@@ -3812,16 +3812,16 @@ MSVCRT_wint_t CDECL MSVCRT_fgetwc(MSVCRT_FILE* file)
/*********************************************************************
* _fgetwc_nolock (MSVCRT.@)
*/
MSVCRT_
wint_t
CDECL
MSVCRT__fgetwc_nolock
(
MSVCRT_FILE
*
file
)
wint_t
CDECL
MSVCRT__fgetwc_nolock
(
MSVCRT_FILE
*
file
)
{
MSVCRT_
wint_t
ret
;
wint_t
ret
;
int
ch
;
if
((
get_ioinfo_nolock
(
file
->
_file
)
->
exflag
&
(
EF_UTF8
|
EF_UTF16
))
||
!
(
get_ioinfo_nolock
(
file
->
_file
)
->
wxflag
&
WX_TEXT
))
{
char
*
p
;
for
(
p
=
(
char
*
)
&
ret
;
(
MSVCRT_
wint_t
*
)
p
<&
ret
+
1
;
p
++
)
{
for
(
p
=
(
char
*
)
&
ret
;
(
wint_t
*
)
p
<&
ret
+
1
;
p
++
)
{
ch
=
MSVCRT__fgetc_nolock
(
file
);
if
(
ch
==
MSVCRT_EOF
)
{
ret
=
MSVCRT_WEOF
;
...
...
@@ -3882,7 +3882,7 @@ int CDECL MSVCRT__getw(MSVCRT_FILE* file)
/*********************************************************************
* getwc (MSVCRT.@)
*/
MSVCRT_
wint_t
CDECL
MSVCRT_getwc
(
MSVCRT_FILE
*
file
)
wint_t
CDECL
MSVCRT_getwc
(
MSVCRT_FILE
*
file
)
{
return
MSVCRT_fgetwc
(
file
);
}
...
...
@@ -3890,7 +3890,7 @@ MSVCRT_wint_t CDECL MSVCRT_getwc(MSVCRT_FILE* file)
/*********************************************************************
* _fgetwchar (MSVCRT.@)
*/
MSVCRT_
wint_t
CDECL
MSVCRT__fgetwchar
(
void
)
wint_t
CDECL
MSVCRT__fgetwchar
(
void
)
{
return
MSVCRT_fgetwc
(
MSVCRT_stdin
);
}
...
...
@@ -3898,7 +3898,7 @@ MSVCRT_wint_t CDECL MSVCRT__fgetwchar(void)
/*********************************************************************
* getwchar (MSVCRT.@)
*/
MSVCRT_
wint_t
CDECL
MSVCRT_getwchar
(
void
)
wint_t
CDECL
MSVCRT_getwchar
(
void
)
{
return
MSVCRT__fgetwchar
();
}
...
...
@@ -3908,7 +3908,7 @@ MSVCRT_wint_t CDECL MSVCRT_getwchar(void)
*/
wchar_t
*
CDECL
MSVCRT_fgetws
(
wchar_t
*
s
,
int
size
,
MSVCRT_FILE
*
file
)
{
MSVCRT_
wint_t
cc
=
MSVCRT_WEOF
;
wint_t
cc
=
MSVCRT_WEOF
;
wchar_t
*
buf_start
=
s
;
TRACE
(
":file(%p) fd (%d) str (%p) len (%d)
\n
"
,
...
...
@@ -3992,9 +3992,9 @@ int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file)
/*********************************************************************
* fwrite (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_fwrite
(
const
void
*
ptr
,
MSVCRT_size_t
size
,
MSVCRT_
size_t
nmemb
,
MSVCRT_FILE
*
file
)
size_t
CDECL
MSVCRT_fwrite
(
const
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
MSVCRT_FILE
*
file
)
{
MSVCRT_
size_t
ret
;
size_t
ret
;
MSVCRT__lock_file
(
file
);
ret
=
MSVCRT__fwrite_nolock
(
ptr
,
size
,
nmemb
,
file
);
...
...
@@ -4006,9 +4006,9 @@ MSVCRT_size_t CDECL MSVCRT_fwrite(const void *ptr, MSVCRT_size_t size, MSVCRT_si
/*********************************************************************
* _fwrite_nolock (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT__fwrite_nolock
(
const
void
*
ptr
,
MSVCRT_size_t
size
,
MSVCRT_
size_t
nmemb
,
MSVCRT_FILE
*
file
)
size_t
CDECL
MSVCRT__fwrite_nolock
(
const
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
MSVCRT_FILE
*
file
)
{
MSVCRT_
size_t
wrcnt
=
size
*
nmemb
;
size_t
wrcnt
=
size
*
nmemb
;
int
written
=
0
;
if
(
size
==
0
)
return
0
;
...
...
@@ -4029,7 +4029,7 @@ MSVCRT_size_t CDECL MSVCRT__fwrite_nolock(const void *ptr, MSVCRT_size_t size, M
}
else
if
((
file
->
_flag
&
MSVCRT__IONBF
)
||
((
file
->
_flag
&
(
MSVCRT__IOMYBUF
|
MSVCRT__USERBUF
))
&&
wrcnt
>=
file
->
_bufsiz
)
||
(
!
(
file
->
_flag
&
(
MSVCRT__IOMYBUF
|
MSVCRT__USERBUF
))
&&
wrcnt
>=
MSVCRT_INTERNAL_BUFSIZ
))
{
MSVCRT_
size_t
pcnt
;
size_t
pcnt
;
int
bufsiz
;
if
(
file
->
_flag
&
MSVCRT__IONBF
)
...
...
@@ -4066,9 +4066,9 @@ MSVCRT_size_t CDECL MSVCRT__fwrite_nolock(const void *ptr, MSVCRT_size_t size, M
/*********************************************************************
* fputwc (MSVCRT.@)
*/
MSVCRT_wint_t
CDECL
MSVCRT_fputwc
(
MSVCRT_
wint_t
wc
,
MSVCRT_FILE
*
file
)
wint_t
CDECL
MSVCRT_fputwc
(
wint_t
wc
,
MSVCRT_FILE
*
file
)
{
MSVCRT_
wint_t
ret
;
wint_t
ret
;
MSVCRT__lock_file
(
file
);
ret
=
MSVCRT__fputwc_nolock
(
wc
,
file
);
...
...
@@ -4080,11 +4080,11 @@ MSVCRT_wint_t CDECL MSVCRT_fputwc(MSVCRT_wint_t wc, MSVCRT_FILE* file)
/*********************************************************************
* _fputwc_nolock (MSVCRT.@)
*/
MSVCRT_wint_t
CDECL
MSVCRT__fputwc_nolock
(
MSVCRT_
wint_t
wc
,
MSVCRT_FILE
*
file
)
wint_t
CDECL
MSVCRT__fputwc_nolock
(
wint_t
wc
,
MSVCRT_FILE
*
file
)
{
wchar_t
mwc
=
wc
;
ioinfo
*
fdinfo
;
MSVCRT_
wint_t
ret
;
wint_t
ret
;
fdinfo
=
get_ioinfo_nolock
(
file
->
_file
);
...
...
@@ -4109,7 +4109,7 @@ MSVCRT_wint_t CDECL MSVCRT__fputwc_nolock(MSVCRT_wint_t wc, MSVCRT_FILE* file)
/*********************************************************************
* _fputwchar (MSVCRT.@)
*/
MSVCRT_wint_t
CDECL
MSVCRT__fputwchar
(
MSVCRT_
wint_t
wc
)
wint_t
CDECL
MSVCRT__fputwchar
(
wint_t
wc
)
{
return
MSVCRT_fputwc
(
wc
,
MSVCRT_stdout
);
}
...
...
@@ -4275,9 +4275,9 @@ int CDECL MSVCRT__fputchar(int c)
/*********************************************************************
* fread (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_fread
(
void
*
ptr
,
MSVCRT_size_t
size
,
MSVCRT_
size_t
nmemb
,
MSVCRT_FILE
*
file
)
size_t
CDECL
MSVCRT_fread
(
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
MSVCRT_FILE
*
file
)
{
MSVCRT_
size_t
ret
;
size_t
ret
;
MSVCRT__lock_file
(
file
);
ret
=
MSVCRT__fread_nolock
(
ptr
,
size
,
nmemb
,
file
);
...
...
@@ -4289,11 +4289,11 @@ MSVCRT_size_t CDECL MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nm
/*********************************************************************
* _fread_nolock (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT__fread_nolock
(
void
*
ptr
,
MSVCRT_size_t
size
,
MSVCRT_
size_t
nmemb
,
MSVCRT_FILE
*
file
)
size_t
CDECL
MSVCRT__fread_nolock
(
void
*
ptr
,
size_t
size
,
size_t
nmemb
,
MSVCRT_FILE
*
file
)
{
MSVCRT_
size_t
rcnt
=
size
*
nmemb
;
MSVCRT_
size_t
read
=
0
;
MSVCRT_
size_t
pread
=
0
;
size_t
rcnt
=
size
*
nmemb
;
size_t
read
=
0
;
size_t
pread
=
0
;
if
(
!
rcnt
)
return
0
;
...
...
@@ -4370,10 +4370,10 @@ MSVCRT_size_t CDECL MSVCRT__fread_nolock(void *ptr, MSVCRT_size_t size, MSVCRT_s
/*********************************************************************
* fread_s (MSVCR80.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_fread_s
(
void
*
buf
,
MSVCRT_size_t
buf_size
,
MSVCRT_
size_t
elem_size
,
MSVCRT_
size_t
count
,
MSVCRT_FILE
*
stream
)
size_t
CDECL
MSVCRT_fread_s
(
void
*
buf
,
size_t
buf_size
,
size_t
elem_size
,
size_t
count
,
MSVCRT_FILE
*
stream
)
{
MSVCRT_
size_t
ret
;
size_t
ret
;
if
(
!
MSVCRT_CHECK_PMT
(
stream
!=
NULL
))
{
if
(
buf
&&
buf_size
)
...
...
@@ -4392,8 +4392,8 @@ MSVCRT_size_t CDECL MSVCRT_fread_s(void *buf, MSVCRT_size_t buf_size, MSVCRT_siz
/*********************************************************************
* _fread_nolock_s (MSVCR80.@)
*/
MSVCRT_size_t
CDECL
MSVCRT__fread_nolock_s
(
void
*
buf
,
MSVCRT_size_t
buf_size
,
MSVCRT_
size_t
elem_size
,
MSVCRT_
size_t
count
,
MSVCRT_FILE
*
stream
)
size_t
CDECL
MSVCRT__fread_nolock_s
(
void
*
buf
,
size_t
buf_size
,
size_t
elem_size
,
size_t
count
,
MSVCRT_FILE
*
stream
)
{
size_t
bytes_left
,
buf_pos
;
...
...
@@ -4654,7 +4654,7 @@ int CDECL MSVCRT_fgetpos(MSVCRT_FILE* file, fpos_t *pos)
*/
int
CDECL
MSVCRT_fputs
(
const
char
*
s
,
MSVCRT_FILE
*
file
)
{
MSVCRT_
size_t
len
=
strlen
(
s
);
size_t
len
=
strlen
(
s
);
int
ret
;
MSVCRT__lock_file
(
file
);
...
...
@@ -4668,7 +4668,7 @@ int CDECL MSVCRT_fputs(const char *s, MSVCRT_FILE* file)
*/
int
CDECL
MSVCRT_fputws
(
const
wchar_t
*
s
,
MSVCRT_FILE
*
file
)
{
MSVCRT_
size_t
i
,
len
=
MSVCRT_wcslen
(
s
);
size_t
i
,
len
=
MSVCRT_wcslen
(
s
);
BOOL
tmp_buf
;
int
ret
;
...
...
@@ -4712,7 +4712,7 @@ int CDECL MSVCRT_getc(MSVCRT_FILE* file)
/*********************************************************************
* gets_s (MSVCR80.@)
*/
char
*
CDECL
MSVCRT_gets_s
(
char
*
buf
,
MSVCRT_
size_t
len
)
char
*
CDECL
MSVCRT_gets_s
(
char
*
buf
,
size_t
len
)
{
char
*
buf_start
=
buf
;
int
cc
;
...
...
@@ -4764,7 +4764,7 @@ char * CDECL MSVCRT_gets(char *buf)
*/
wchar_t
*
CDECL
MSVCRT__getws
(
wchar_t
*
buf
)
{
MSVCRT_
wint_t
cc
;
wint_t
cc
;
wchar_t
*
ws
=
buf
;
MSVCRT__lock_file
(
MSVCRT_stdin
);
...
...
@@ -4808,7 +4808,7 @@ int CDECL MSVCRT_putchar(int c)
*/
int
CDECL
MSVCRT_puts
(
const
char
*
s
)
{
MSVCRT_
size_t
len
=
strlen
(
s
);
size_t
len
=
strlen
(
s
);
int
ret
;
MSVCRT__lock_file
(
MSVCRT_stdout
);
...
...
@@ -4892,7 +4892,7 @@ int CDECL MSVCRT__wrename(const wchar_t *oldpath,const wchar_t *newpath)
/*********************************************************************
* setvbuf (MSVCRT.@)
*/
int
CDECL
MSVCRT_setvbuf
(
MSVCRT_FILE
*
file
,
char
*
buf
,
int
mode
,
MSVCRT_
size_t
size
)
int
CDECL
MSVCRT_setvbuf
(
MSVCRT_FILE
*
file
,
char
*
buf
,
int
mode
,
size_t
size
)
{
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
))
return
-
1
;
if
(
!
MSVCRT_CHECK_PMT
(
mode
==
MSVCRT__IONBF
||
mode
==
MSVCRT__IOFBF
||
mode
==
MSVCRT__IOLBF
))
return
-
1
;
...
...
@@ -4937,7 +4937,7 @@ void CDECL MSVCRT_setbuf(MSVCRT_FILE* file, char *buf)
MSVCRT_setvbuf
(
file
,
buf
,
buf
?
MSVCRT__IOFBF
:
MSVCRT__IONBF
,
MSVCRT_BUFSIZ
);
}
static
int
tmpnam_helper
(
char
*
s
,
MSVCRT_
size_t
size
,
int
*
tmpnam_unique
,
int
tmp_max
)
static
int
tmpnam_helper
(
char
*
s
,
size_t
size
,
int
*
tmpnam_unique
,
int
tmp_max
)
{
char
tmpstr
[
8
];
char
*
p
=
s
;
...
...
@@ -4986,7 +4986,7 @@ static int tmpnam_helper(char *s, MSVCRT_size_t size, int *tmpnam_unique, int tm
return
0
;
}
int
CDECL
MSVCRT_tmpnam_s
(
char
*
s
,
MSVCRT_
size_t
size
)
int
CDECL
MSVCRT_tmpnam_s
(
char
*
s
,
size_t
size
)
{
return
tmpnam_helper
(
s
,
size
,
&
tmpnam_s_unique
,
MSVCRT_TMP_MAX_S
);
}
...
...
@@ -5008,7 +5008,7 @@ char * CDECL MSVCRT_tmpnam(char *s)
return
tmpnam_helper
(
s
,
-
1
,
&
tmpnam_unique
,
MSVCRT_TMP_MAX
)
?
NULL
:
s
;
}
static
int
wtmpnam_helper
(
wchar_t
*
s
,
MSVCRT_
size_t
size
,
int
*
tmpnam_unique
,
int
tmp_max
)
static
int
wtmpnam_helper
(
wchar_t
*
s
,
size_t
size
,
int
*
tmpnam_unique
,
int
tmp_max
)
{
wchar_t
tmpstr
[
8
];
wchar_t
*
p
=
s
;
...
...
@@ -5060,7 +5060,7 @@ static int wtmpnam_helper(wchar_t *s, MSVCRT_size_t size, int *tmpnam_unique, in
/*********************************************************************
* _wtmpnam_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__wtmpnam_s
(
wchar_t
*
s
,
MSVCRT_
size_t
size
)
int
CDECL
MSVCRT__wtmpnam_s
(
wchar_t
*
s
,
size_t
size
)
{
return
wtmpnam_helper
(
s
,
size
,
&
tmpnam_s_unique
,
MSVCRT_TMP_MAX_S
);
}
...
...
@@ -5549,9 +5549,9 @@ int CDECL MSVCRT__ungetc_nolock(int c, MSVCRT_FILE * file)
/*********************************************************************
* ungetwc (MSVCRT.@)
*/
MSVCRT_wint_t
CDECL
MSVCRT_ungetwc
(
MSVCRT_
wint_t
wc
,
MSVCRT_FILE
*
file
)
wint_t
CDECL
MSVCRT_ungetwc
(
wint_t
wc
,
MSVCRT_FILE
*
file
)
{
MSVCRT_
wint_t
ret
;
wint_t
ret
;
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
))
return
MSVCRT_WEOF
;
...
...
@@ -5565,7 +5565,7 @@ MSVCRT_wint_t CDECL MSVCRT_ungetwc(MSVCRT_wint_t wc, MSVCRT_FILE * file)
/*********************************************************************
* _ungetwc_nolock (MSVCRT.@)
*/
MSVCRT_wint_t
CDECL
MSVCRT__ungetwc_nolock
(
MSVCRT_
wint_t
wc
,
MSVCRT_FILE
*
file
)
wint_t
CDECL
MSVCRT__ungetwc_nolock
(
wint_t
wc
,
MSVCRT_FILE
*
file
)
{
wchar_t
mwc
=
wc
;
...
...
dlls/msvcrt/heap.c
View file @
fa272ada
...
...
@@ -42,7 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
static
HANDLE
heap
,
sb_heap
;
typedef
int
(
CDECL
*
MSVCRT_new_handler_func
)(
MSVCRT_
size_t
size
);
typedef
int
(
CDECL
*
MSVCRT_new_handler_func
)(
size_t
size
);
static
MSVCRT_new_handler_func
MSVCRT_new_handler
;
static
int
MSVCRT_new_mode
;
...
...
@@ -50,9 +50,9 @@ static int MSVCRT_new_mode;
/* FIXME - According to documentation it should be 8*1024, at runtime it returns 16 */
static
unsigned
int
MSVCRT_amblksiz
=
16
;
/* FIXME - According to documentation it should be 480 bytes, at runtime default is 0 */
static
MSVCRT_
size_t
MSVCRT_sbh_threshold
=
0
;
static
size_t
MSVCRT_sbh_threshold
=
0
;
static
void
*
msvcrt_heap_alloc
(
DWORD
flags
,
MSVCRT_
size_t
size
)
static
void
*
msvcrt_heap_alloc
(
DWORD
flags
,
size_t
size
)
{
if
(
size
<
MSVCRT_sbh_threshold
)
{
...
...
@@ -70,13 +70,13 @@ static void* msvcrt_heap_alloc(DWORD flags, MSVCRT_size_t size)
return
HeapAlloc
(
heap
,
flags
,
size
);
}
static
void
*
msvcrt_heap_realloc
(
DWORD
flags
,
void
*
ptr
,
MSVCRT_
size_t
size
)
static
void
*
msvcrt_heap_realloc
(
DWORD
flags
,
void
*
ptr
,
size_t
size
)
{
if
(
sb_heap
&&
ptr
&&
!
HeapValidate
(
heap
,
0
,
ptr
))
{
/* TODO: move data to normal heap if it exceeds sbh_threshold limit */
void
*
memblock
,
*
temp
,
**
saved
;
MSVCRT_
size_t
old_padding
,
new_padding
,
old_size
;
size_t
old_padding
,
new_padding
,
old_size
;
saved
=
SAVED_PTR
(
ptr
);
old_padding
=
(
char
*
)
ptr
-
(
char
*
)
*
saved
;
...
...
@@ -113,7 +113,7 @@ static BOOL msvcrt_heap_free(void *ptr)
return
HeapFree
(
heap
,
0
,
ptr
);
}
static
MSVCRT_
size_t
msvcrt_heap_size
(
void
*
ptr
)
static
size_t
msvcrt_heap_size
(
void
*
ptr
)
{
if
(
sb_heap
&&
ptr
&&
!
HeapValidate
(
heap
,
0
,
ptr
))
{
...
...
@@ -127,7 +127,7 @@ static MSVCRT_size_t msvcrt_heap_size(void *ptr)
/*********************************************************************
* _callnewh (MSVCRT.@)
*/
int
CDECL
_callnewh
(
MSVCRT_
size_t
size
)
int
CDECL
_callnewh
(
size_t
size
)
{
int
ret
=
0
;
MSVCRT_new_handler_func
handler
=
MSVCRT_new_handler
;
...
...
@@ -139,7 +139,7 @@ int CDECL _callnewh(MSVCRT_size_t size)
/*********************************************************************
* ??2@YAPAXI@Z (MSVCRT.@)
*/
void
*
CDECL
DECLSPEC_HOTPATCH
MSVCRT_operator_new
(
MSVCRT_
size_t
size
)
void
*
CDECL
DECLSPEC_HOTPATCH
MSVCRT_operator_new
(
size_t
size
)
{
void
*
retval
;
...
...
@@ -164,7 +164,7 @@ void* CDECL DECLSPEC_HOTPATCH MSVCRT_operator_new(MSVCRT_size_t size)
/*********************************************************************
* ??2@YAPAXIHPBDH@Z (MSVCRT.@)
*/
void
*
CDECL
MSVCRT_operator_new_dbg
(
MSVCRT_
size_t
size
,
int
type
,
const
char
*
file
,
int
line
)
void
*
CDECL
MSVCRT_operator_new_dbg
(
size_t
size
,
int
type
,
const
char
*
file
,
int
line
)
{
return
MSVCRT_operator_new
(
size
);
}
...
...
@@ -232,7 +232,7 @@ int CDECL MSVCRT__set_new_mode(int mode)
/*********************************************************************
* _expand (MSVCRT.@)
*/
void
*
CDECL
_expand
(
void
*
mem
,
MSVCRT_
size_t
size
)
void
*
CDECL
_expand
(
void
*
mem
,
size_t
size
)
{
return
msvcrt_heap_realloc
(
HEAP_REALLOC_IN_PLACE_ONLY
,
mem
,
size
);
}
...
...
@@ -332,7 +332,7 @@ int CDECL _heapset(unsigned int value)
/*********************************************************************
* _heapadd (MSVCRT.@)
*/
int
CDECL
_heapadd
(
void
*
mem
,
MSVCRT_
size_t
size
)
int
CDECL
_heapadd
(
void
*
mem
,
size_t
size
)
{
TRACE
(
"(%p,%Iu) unsupported in Win32
\n
"
,
mem
,
size
);
*
MSVCRT__errno
()
=
MSVCRT_ENOSYS
;
...
...
@@ -342,18 +342,18 @@ int CDECL _heapadd(void* mem, MSVCRT_size_t size)
/*********************************************************************
* _get_heap_handle (MSVCRT.@)
*/
MSVCRT_
intptr_t
CDECL
_get_heap_handle
(
void
)
intptr_t
CDECL
_get_heap_handle
(
void
)
{
return
(
MSVCRT_
intptr_t
)
heap
;
return
(
intptr_t
)
heap
;
}
/*********************************************************************
* _msize (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_msize
(
void
*
mem
)
size_t
CDECL
_msize
(
void
*
mem
)
{
MSVCRT_
size_t
size
=
msvcrt_heap_size
(
mem
);
if
(
size
==
~
(
MSVCRT_
size_t
)
0
)
size_t
size
=
msvcrt_heap_size
(
mem
);
if
(
size
==
~
(
size_t
)
0
)
{
WARN
(
":Probably called with non wine-allocated memory, ret = -1
\n
"
);
/* At least the Win32 crtdll/msvcrt also return -1 in this case */
...
...
@@ -365,7 +365,7 @@ MSVCRT_size_t CDECL _msize(void* mem)
/*********************************************************************
* _aligned_msize (MSVCR80.@)
*/
size_t
CDECL
_aligned_msize
(
void
*
p
,
MSVCRT_size_t
alignment
,
MSVCRT_
size_t
offset
)
size_t
CDECL
_aligned_msize
(
void
*
p
,
size_t
alignment
,
size_t
offset
)
{
void
**
alloc_ptr
;
...
...
@@ -382,9 +382,9 @@ size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offs
/*********************************************************************
* calloc (MSVCRT.@)
*/
void
*
CDECL
DECLSPEC_HOTPATCH
MSVCRT_calloc
(
MSVCRT_size_t
count
,
MSVCRT_
size_t
size
)
void
*
CDECL
DECLSPEC_HOTPATCH
MSVCRT_calloc
(
size_t
count
,
size_t
size
)
{
MSVCRT_
size_t
bytes
=
count
*
size
;
size_t
bytes
=
count
*
size
;
if
(
size
&&
bytes
/
size
!=
count
)
{
...
...
@@ -399,7 +399,7 @@ void* CDECL DECLSPEC_HOTPATCH MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t s
/*********************************************************************
* _calloc_base (UCRTBASE.@)
*/
void
*
CDECL
_calloc_base
(
MSVCRT_size_t
count
,
MSVCRT_
size_t
size
)
void
*
CDECL
_calloc_base
(
size_t
count
,
size_t
size
)
{
return
MSVCRT_calloc
(
count
,
size
);
}
...
...
@@ -426,7 +426,7 @@ void CDECL _free_base(void* ptr)
/*********************************************************************
* malloc (MSVCRT.@)
*/
void
*
CDECL
MSVCRT_malloc
(
MSVCRT_
size_t
size
)
void
*
CDECL
MSVCRT_malloc
(
size_t
size
)
{
void
*
ret
;
...
...
@@ -446,7 +446,7 @@ void* CDECL MSVCRT_malloc(MSVCRT_size_t size)
/*********************************************************************
* _malloc_base (UCRTBASE.@)
*/
void
*
CDECL
_malloc_base
(
MSVCRT_
size_t
size
)
void
*
CDECL
_malloc_base
(
size_t
size
)
{
return
MSVCRT_malloc
(
size
);
}
...
...
@@ -455,7 +455,7 @@ void* CDECL _malloc_base(MSVCRT_size_t size)
/*********************************************************************
* realloc (MSVCRT.@)
*/
void
*
CDECL
DECLSPEC_HOTPATCH
MSVCRT_realloc
(
void
*
ptr
,
MSVCRT_
size_t
size
)
void
*
CDECL
DECLSPEC_HOTPATCH
MSVCRT_realloc
(
void
*
ptr
,
size_t
size
)
{
if
(
!
ptr
)
return
MSVCRT_malloc
(
size
);
if
(
size
)
return
msvcrt_heap_realloc
(
0
,
ptr
,
size
);
...
...
@@ -467,7 +467,7 @@ void* CDECL DECLSPEC_HOTPATCH MSVCRT_realloc(void* ptr, MSVCRT_size_t size)
/*********************************************************************
* _realloc_base (UCRTBASE.@)
*/
void
*
CDECL
_realloc_base
(
void
*
ptr
,
MSVCRT_
size_t
size
)
void
*
CDECL
_realloc_base
(
void
*
ptr
,
size_t
size
)
{
return
MSVCRT_realloc
(
ptr
,
size
);
}
...
...
@@ -477,9 +477,9 @@ void* CDECL _realloc_base(void* ptr, MSVCRT_size_t size)
/*********************************************************************
* _recalloc (MSVCR80.@)
*/
void
*
CDECL
_recalloc
(
void
*
mem
,
MSVCRT_size_t
num
,
MSVCRT_
size_t
size
)
void
*
CDECL
_recalloc
(
void
*
mem
,
size_t
num
,
size_t
size
)
{
MSVCRT_
size_t
old_size
;
size_t
old_size
;
void
*
ret
;
if
(
!
mem
)
...
...
@@ -511,7 +511,7 @@ unsigned int* CDECL __p__amblksiz(void)
/*********************************************************************
* _get_sbh_threshold (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_get_sbh_threshold
(
void
)
size_t
CDECL
_get_sbh_threshold
(
void
)
{
return
MSVCRT_sbh_threshold
;
}
...
...
@@ -519,7 +519,7 @@ MSVCRT_size_t CDECL _get_sbh_threshold(void)
/*********************************************************************
* _set_sbh_threshold (MSVCRT.@)
*/
int
CDECL
_set_sbh_threshold
(
MSVCRT_
size_t
threshold
)
int
CDECL
_set_sbh_threshold
(
size_t
threshold
)
{
#ifdef _WIN64
return
0
;
...
...
@@ -556,7 +556,7 @@ void CDECL _aligned_free(void *memblock)
/*********************************************************************
* _aligned_offset_malloc (MSVCRT.@)
*/
void
*
CDECL
_aligned_offset_malloc
(
MSVCRT_size_t
size
,
MSVCRT_size_t
alignment
,
MSVCRT_
size_t
offset
)
void
*
CDECL
_aligned_offset_malloc
(
size_t
size
,
size_t
alignment
,
size_t
offset
)
{
void
*
memblock
,
*
temp
,
**
saved
;
TRACE
(
"(%Iu, %Iu, %Iu)
\n
"
,
size
,
alignment
,
offset
);
...
...
@@ -599,7 +599,7 @@ void * CDECL _aligned_offset_malloc(MSVCRT_size_t size, MSVCRT_size_t alignment,
/*********************************************************************
* _aligned_malloc (MSVCRT.@)
*/
void
*
CDECL
_aligned_malloc
(
MSVCRT_size_t
size
,
MSVCRT_
size_t
alignment
)
void
*
CDECL
_aligned_malloc
(
size_t
size
,
size_t
alignment
)
{
TRACE
(
"(%Iu, %Iu)
\n
"
,
size
,
alignment
);
return
_aligned_offset_malloc
(
size
,
alignment
,
0
);
...
...
@@ -608,11 +608,11 @@ void * CDECL _aligned_malloc(MSVCRT_size_t size, MSVCRT_size_t alignment)
/*********************************************************************
* _aligned_offset_realloc (MSVCRT.@)
*/
void
*
CDECL
_aligned_offset_realloc
(
void
*
memblock
,
MSVCRT_
size_t
size
,
MSVCRT_size_t
alignment
,
MSVCRT_
size_t
offset
)
void
*
CDECL
_aligned_offset_realloc
(
void
*
memblock
,
size_t
size
,
size_t
alignment
,
size_t
offset
)
{
void
*
temp
,
**
saved
;
MSVCRT_
size_t
old_padding
,
new_padding
,
old_size
;
size_t
old_padding
,
new_padding
,
old_size
;
TRACE
(
"(%p, %Iu, %Iu, %Iu)
\n
"
,
memblock
,
size
,
alignment
,
offset
);
if
(
!
memblock
)
...
...
@@ -723,7 +723,7 @@ void * CDECL _aligned_offset_realloc(void *memblock, MSVCRT_size_t size,
/*********************************************************************
* _aligned_realloc (MSVCRT.@)
*/
void
*
CDECL
_aligned_realloc
(
void
*
memblock
,
MSVCRT_size_t
size
,
MSVCRT_
size_t
alignment
)
void
*
CDECL
_aligned_realloc
(
void
*
memblock
,
size_t
size
,
size_t
alignment
)
{
TRACE
(
"(%p, %Iu, %Iu)
\n
"
,
memblock
,
size
,
alignment
);
return
_aligned_offset_realloc
(
memblock
,
size
,
alignment
,
0
);
...
...
@@ -732,7 +732,7 @@ void * CDECL _aligned_realloc(void *memblock, MSVCRT_size_t size, MSVCRT_size_t
/*********************************************************************
* memmove_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_memmove_s
(
void
*
dest
,
MSVCRT_size_t
numberOfElements
,
const
void
*
src
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT_memmove_s
(
void
*
dest
,
size_t
numberOfElements
,
const
void
*
src
,
size_t
count
)
{
TRACE
(
"(%p %Iu %p %Iu)
\n
"
,
dest
,
numberOfElements
,
src
,
count
);
...
...
@@ -751,8 +751,8 @@ int CDECL MSVCRT_memmove_s(void *dest, MSVCRT_size_t numberOfElements, const voi
/*********************************************************************
* wmemmove_s (MSVCR100.@)
*/
int
CDECL
wmemmove_s
(
wchar_t
*
dest
,
MSVCRT_
size_t
numberOfElements
,
const
wchar_t
*
src
,
MSVCRT_
size_t
count
)
int
CDECL
wmemmove_s
(
wchar_t
*
dest
,
size_t
numberOfElements
,
const
wchar_t
*
src
,
size_t
count
)
{
TRACE
(
"(%p %Iu %p %Iu)
\n
"
,
dest
,
numberOfElements
,
src
,
count
);
...
...
@@ -775,7 +775,7 @@ int CDECL wmemmove_s(wchar_t *dest, MSVCRT_size_t numberOfElements,
/*********************************************************************
* memcpy_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_memcpy_s
(
void
*
dest
,
MSVCRT_size_t
numberOfElements
,
const
void
*
src
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT_memcpy_s
(
void
*
dest
,
size_t
numberOfElements
,
const
void
*
src
,
size_t
count
)
{
TRACE
(
"(%p %Iu %p %Iu)
\n
"
,
dest
,
numberOfElements
,
src
,
count
);
...
...
@@ -802,8 +802,8 @@ int CDECL MSVCRT_memcpy_s(void *dest, MSVCRT_size_t numberOfElements, const void
/*********************************************************************
* wmemcpy_s (MSVCR100.@)
*/
int
CDECL
wmemcpy_s
(
wchar_t
*
dest
,
MSVCRT_
size_t
numberOfElements
,
const
wchar_t
*
src
,
MSVCRT_
size_t
count
)
int
CDECL
wmemcpy_s
(
wchar_t
*
dest
,
size_t
numberOfElements
,
const
wchar_t
*
src
,
size_t
count
)
{
TRACE
(
"(%p %Iu %p %Iu)
\n
"
,
dest
,
numberOfElements
,
src
,
count
);
...
...
@@ -829,10 +829,10 @@ int CDECL wmemcpy_s(wchar_t *dest, MSVCRT_size_t numberOfElements,
/*********************************************************************
* strncpy_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_strncpy_s
(
char
*
dest
,
MSVCRT_
size_t
numberOfElements
,
const
char
*
src
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT_strncpy_s
(
char
*
dest
,
size_t
numberOfElements
,
const
char
*
src
,
size_t
count
)
{
MSVCRT_
size_t
i
,
end
;
size_t
i
,
end
;
TRACE
(
"(%p %Iu %s %Iu)
\n
"
,
dest
,
numberOfElements
,
debugstr_a
(
src
),
count
);
...
...
dlls/msvcrt/locale.c
View file @
fa272ada
...
...
@@ -1932,7 +1932,7 @@ _locale_t CDECL _create_locale(int category, const char *locale)
_locale_t
CDECL
MSVCRT__wcreate_locale
(
int
category
,
const
wchar_t
*
locale
)
{
_locale_t
loc
;
MSVCRT_
size_t
len
;
size_t
len
;
char
*
str
;
if
(
category
<
MSVCRT_LC_MIN
||
category
>
MSVCRT_LC_MAX
||
!
locale
)
...
...
@@ -2018,7 +2018,7 @@ wchar_t* CDECL MSVCRT__wsetlocale(int category, const wchar_t* wlocale)
char
*
locale
=
NULL
;
const
char
*
ret
;
MSVCRT_
size_t
len
;
size_t
len
;
if
(
wlocale
)
{
len
=
MSVCRT_wcstombs
(
NULL
,
wlocale
,
0
);
...
...
dlls/msvcrt/lock.c
View file @
fa272ada
...
...
@@ -17,6 +17,7 @@
*/
#include <stdarg.h>
#include <stdbool.h>
#include "wine/debug.h"
#include "windef.h"
...
...
@@ -243,7 +244,7 @@ void __thiscall SpinWait__Reset(SpinWait *this)
/* ?_ShouldSpinAgain@?$_SpinWait@$0A@@details@Concurrency@@IAE_NXZ */
/* ?_ShouldSpinAgain@?$_SpinWait@$0A@@details@Concurrency@@IEAA_NXZ */
DEFINE_THISCALL_WRAPPER
(
SpinWait__ShouldSpinAgain
,
4
)
MSVCRT_
bool
__thiscall
SpinWait__ShouldSpinAgain
(
SpinWait
*
this
)
bool
__thiscall
SpinWait__ShouldSpinAgain
(
SpinWait
*
this
)
{
TRACE
(
"(%p)
\n
"
,
this
);
...
...
@@ -256,7 +257,7 @@ MSVCRT_bool __thiscall SpinWait__ShouldSpinAgain(SpinWait *this)
/* ?_SpinOnce@?$_SpinWait@$0A@@details@Concurrency@@QAE_NXZ */
/* ?_SpinOnce@?$_SpinWait@$0A@@details@Concurrency@@QEAA_NXZ */
DEFINE_THISCALL_WRAPPER
(
SpinWait__SpinOnce
,
4
)
MSVCRT_
bool
__thiscall
SpinWait__SpinOnce
(
SpinWait
*
this
)
bool
__thiscall
SpinWait__SpinOnce
(
SpinWait
*
this
)
{
switch
(
this
->
state
)
{
case
SPINWAIT_INIT
:
...
...
@@ -390,7 +391,7 @@ void __thiscall critical_section_lock(critical_section *this)
/* ?try_lock@critical_section@Concurrency@@QAE_NXZ */
/* ?try_lock@critical_section@Concurrency@@QEAA_NXZ */
DEFINE_THISCALL_WRAPPER
(
critical_section_try_lock
,
4
)
MSVCRT_
bool
__thiscall
critical_section_try_lock
(
critical_section
*
this
)
bool
__thiscall
critical_section_try_lock
(
critical_section
*
this
)
{
cs_queue
q
;
...
...
@@ -459,7 +460,7 @@ critical_section* __thiscall critical_section_native_handle(critical_section *th
/* ?try_lock_for@critical_section@Concurrency@@QAE_NI@Z */
/* ?try_lock_for@critical_section@Concurrency@@QEAA_NI@Z */
DEFINE_THISCALL_WRAPPER
(
critical_section_try_lock_for
,
8
)
MSVCRT_
bool
__thiscall
critical_section_try_lock_for
(
bool
__thiscall
critical_section_try_lock_for
(
critical_section
*
this
,
unsigned
int
timeout
)
{
cs_queue
*
q
,
*
last
;
...
...
@@ -758,9 +759,9 @@ static void evt_remove_queue(thread_wait_entry **head, thread_wait_entry *entry)
if
(
entry
->
next
)
entry
->
next
->
prev
=
entry
->
prev
;
}
static
MSVCRT_
size_t
evt_end_wait
(
thread_wait
*
wait
,
event
**
events
,
int
count
)
static
size_t
evt_end_wait
(
thread_wait
*
wait
,
event
**
events
,
int
count
)
{
MSVCRT_
size_t
i
,
ret
=
COOPERATIVE_WAIT_TIMEOUT
;
size_t
i
,
ret
=
COOPERATIVE_WAIT_TIMEOUT
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
critical_section_lock
(
&
events
[
i
]
->
cs
);
...
...
@@ -777,7 +778,7 @@ static inline int evt_transition(void **state, void *from, void *to)
return
InterlockedCompareExchangePointer
(
state
,
to
,
from
)
==
from
;
}
static
MSVCRT_size_t
evt_wait
(
thread_wait
*
wait
,
event
**
events
,
int
count
,
MSVCRT_
bool
wait_all
,
unsigned
int
timeout
)
static
size_t
evt_wait
(
thread_wait
*
wait
,
event
**
events
,
int
count
,
bool
wait_all
,
unsigned
int
timeout
)
{
int
i
;
NTSTATUS
status
;
...
...
@@ -893,10 +894,10 @@ void __thiscall event_set(event *this)
/* ?wait@event@Concurrency@@QAEII@Z */
/* ?wait@event@Concurrency@@QEAA_KI@Z */
DEFINE_THISCALL_WRAPPER
(
event_wait
,
8
)
MSVCRT_
size_t
__thiscall
event_wait
(
event
*
this
,
unsigned
int
timeout
)
size_t
__thiscall
event_wait
(
event
*
this
,
unsigned
int
timeout
)
{
thread_wait
wait
;
MSVCRT_
size_t
signaled
;
size_t
signaled
;
TRACE
(
"(%p %u)
\n
"
,
this
,
timeout
);
...
...
@@ -910,10 +911,10 @@ MSVCRT_size_t __thiscall event_wait(event *this, unsigned int timeout)
/* ?wait_for_multiple@event@Concurrency@@SAIPAPAV12@I_NI@Z */
/* ?wait_for_multiple@event@Concurrency@@SA_KPEAPEAV12@_K_NI@Z */
int
__cdecl
event_wait_for_multiple
(
event
**
events
,
MSVCRT_size_t
count
,
MSVCRT_
bool
wait_all
,
unsigned
int
timeout
)
int
__cdecl
event_wait_for_multiple
(
event
**
events
,
size_t
count
,
bool
wait_all
,
unsigned
int
timeout
)
{
thread_wait
*
wait
;
MSVCRT_
size_t
ret
;
size_t
ret
;
TRACE
(
"(%p %Iu %d %u)
\n
"
,
events
,
count
,
wait_all
,
timeout
);
...
...
@@ -994,7 +995,7 @@ void __thiscall _Condition_variable_wait(_Condition_variable *this, critical_sec
/* ?wait_for@_Condition_variable@details@Concurrency@@QAE_NAAVcritical_section@3@I@Z */
/* ?wait_for@_Condition_variable@details@Concurrency@@QEAA_NAEAVcritical_section@3@I@Z */
DEFINE_THISCALL_WRAPPER
(
_Condition_variable_wait_for
,
12
)
MSVCRT_
bool
__thiscall
_Condition_variable_wait_for
(
_Condition_variable
*
this
,
bool
__thiscall
_Condition_variable_wait_for
(
_Condition_variable
*
this
,
critical_section
*
cs
,
unsigned
int
timeout
)
{
LARGE_INTEGER
to
;
...
...
@@ -1247,7 +1248,7 @@ void __thiscall reader_writer_lock_lock_read(reader_writer_lock *this)
/* ?try_lock@reader_writer_lock@Concurrency@@QAE_NXZ */
/* ?try_lock@reader_writer_lock@Concurrency@@QEAA_NXZ */
DEFINE_THISCALL_WRAPPER
(
reader_writer_lock_try_lock
,
4
)
MSVCRT_
bool
__thiscall
reader_writer_lock_try_lock
(
reader_writer_lock
*
this
)
bool
__thiscall
reader_writer_lock_try_lock
(
reader_writer_lock
*
this
)
{
rwl_queue
q
=
{
NULL
};
...
...
@@ -1286,7 +1287,7 @@ MSVCRT_bool __thiscall reader_writer_lock_try_lock(reader_writer_lock *this)
/* ?try_lock_read@reader_writer_lock@Concurrency@@QAE_NXZ */
/* ?try_lock_read@reader_writer_lock@Concurrency@@QEAA_NXZ */
DEFINE_THISCALL_WRAPPER
(
reader_writer_lock_try_lock_read
,
4
)
MSVCRT_
bool
__thiscall
reader_writer_lock_try_lock_read
(
reader_writer_lock
*
this
)
bool
__thiscall
reader_writer_lock_try_lock_read
(
reader_writer_lock
*
this
)
{
LONG
count
;
...
...
@@ -1431,7 +1432,7 @@ void __thiscall _ReentrantBlockingLock__Release(_ReentrantBlockingLock *this)
/* ?_TryAcquire@_ReentrantBlockingLock@details@Concurrency@@QAE_NXZ */
/* ?_TryAcquire@_ReentrantBlockingLock@details@Concurrency@@QEAA_NXZ */
DEFINE_THISCALL_WRAPPER
(
_ReentrantBlockingLock__TryAcquire
,
4
)
MSVCRT_
bool
__thiscall
_ReentrantBlockingLock__TryAcquire
(
_ReentrantBlockingLock
*
this
)
bool
__thiscall
_ReentrantBlockingLock__TryAcquire
(
_ReentrantBlockingLock
*
this
)
{
TRACE
(
"(%p)
\n
"
,
this
);
return
TryEnterCriticalSection
(
&
this
->
cs
);
...
...
dlls/msvcrt/math.c
View file @
fa272ada
...
...
@@ -1441,7 +1441,7 @@ unsigned int CDECL _rotl(unsigned int num, int shift)
/*********************************************************************
* _lrotl (MSVCRT.@)
*/
MSVCRT_ulong
CDECL
MSVCRT__lrotl
(
MSVCRT
_ulong
num
,
int
shift
)
__msvcrt_ulong
CDECL
MSVCRT__lrotl
(
__msvcrt
_ulong
num
,
int
shift
)
{
shift
&=
0x1f
;
return
(
num
<<
shift
)
|
(
num
>>
(
32
-
shift
));
...
...
@@ -1450,7 +1450,7 @@ MSVCRT_ulong CDECL MSVCRT__lrotl(MSVCRT_ulong num, int shift)
/*********************************************************************
* _lrotr (MSVCRT.@)
*/
MSVCRT_ulong
CDECL
MSVCRT__lrotr
(
MSVCRT
_ulong
num
,
int
shift
)
__msvcrt_ulong
CDECL
MSVCRT__lrotr
(
__msvcrt
_ulong
num
,
int
shift
)
{
shift
&=
0x1f
;
return
(
num
>>
shift
)
|
(
num
<<
(
32
-
shift
));
...
...
@@ -1494,7 +1494,7 @@ int CDECL MSVCRT_abs( int n )
/*********************************************************************
* labs (MSVCRT.@)
*/
MSVCRT_long
CDECL
MSVCRT_labs
(
MSVCRT
_long
n
)
__msvcrt_long
CDECL
MSVCRT_labs
(
__msvcrt
_long
n
)
{
return
n
>=
0
?
n
:
-
n
;
}
...
...
@@ -1503,7 +1503,7 @@ MSVCRT_long CDECL MSVCRT_labs( MSVCRT_long n )
/*********************************************************************
* llabs (MSVCR100.@)
*/
MSVCRT_longlong
CDECL
MSVCRT_llabs
(
MSVCRT_longlong
n
)
__int64
CDECL
MSVCRT_llabs
(
__int64
n
)
{
return
n
>=
0
?
n
:
-
n
;
}
...
...
@@ -1756,7 +1756,7 @@ int * CDECL __fpecode(void)
/*********************************************************************
* ldexp (MSVCRT.@)
*/
double
CDECL
MSVCRT_ldexp
(
double
num
,
MSVCRT
_long
exp
)
double
CDECL
MSVCRT_ldexp
(
double
num
,
__msvcrt
_long
exp
)
{
double
z
=
unix_funcs
->
ldexp
(
num
,
exp
);
...
...
@@ -2433,7 +2433,7 @@ char * CDECL MSVCRT__ecvt( double number, int ndigits, int *decpt, int *sign )
/*********************************************************************
* _ecvt_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__ecvt_s
(
char
*
buffer
,
MSVCRT_
size_t
length
,
double
number
,
int
ndigits
,
int
*
decpt
,
int
*
sign
)
int
CDECL
MSVCRT__ecvt_s
(
char
*
buffer
,
size_t
length
,
double
number
,
int
ndigits
,
int
*
decpt
,
int
*
sign
)
{
int
prec
,
len
;
char
*
result
;
...
...
@@ -2576,7 +2576,7 @@ char * CDECL MSVCRT__fcvt( double number, int ndigits, int *decpt, int *sign )
/***********************************************************************
* _fcvt_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__fcvt_s
(
char
*
outbuffer
,
MSVCRT_
size_t
size
,
double
number
,
int
ndigits
,
int
*
decpt
,
int
*
sign
)
int
CDECL
MSVCRT__fcvt_s
(
char
*
outbuffer
,
size_t
size
,
double
number
,
int
ndigits
,
int
*
decpt
,
int
*
sign
)
{
int
stop
,
dec1
,
dec2
;
char
*
ptr1
,
*
ptr2
,
*
first
;
...
...
@@ -2683,7 +2683,7 @@ char * CDECL MSVCRT__gcvt( double number, int ndigit, char *buff )
/***********************************************************************
* _gcvt_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__gcvt_s
(
char
*
buff
,
MSVCRT_
size_t
size
,
double
number
,
int
digits
)
int
CDECL
MSVCRT__gcvt_s
(
char
*
buff
,
size_t
size
,
double
number
,
int
digits
)
{
int
len
;
...
...
@@ -2753,7 +2753,7 @@ div_t CDECL MSVCRT_div(int num, int denom)
* [i386] Windows binary compatible - returns the struct in eax/edx.
*/
#ifdef __i386__
unsigned
__int64
CDECL
MSVCRT_ldiv
(
MSVCRT_long
num
,
MSVCRT
_long
denom
)
unsigned
__int64
CDECL
MSVCRT_ldiv
(
__msvcrt_long
num
,
__msvcrt
_long
denom
)
{
union
{
ldiv_t
ldiv
;
...
...
@@ -2770,7 +2770,7 @@ unsigned __int64 CDECL MSVCRT_ldiv(MSVCRT_long num, MSVCRT_long denom)
* VERSION
* [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
*/
ldiv_t
CDECL
MSVCRT_ldiv
(
MSVCRT_long
num
,
MSVCRT
_long
denom
)
ldiv_t
CDECL
MSVCRT_ldiv
(
__msvcrt_long
num
,
__msvcrt
_long
denom
)
{
ldiv_t
ret
;
...
...
@@ -2784,7 +2784,7 @@ ldiv_t CDECL MSVCRT_ldiv(MSVCRT_long num, MSVCRT_long denom)
/*********************************************************************
* lldiv (MSVCR100.@)
*/
lldiv_t
CDECL
MSVCRT_lldiv
(
MSVCRT_longlong
num
,
MSVCRT_longlong
denom
)
lldiv_t
CDECL
MSVCRT_lldiv
(
__int64
num
,
__int64
denom
)
{
lldiv_t
ret
;
...
...
@@ -3433,7 +3433,7 @@ LDOUBLE CDECL MSVCR120_rintl(LDOUBLE x)
/*********************************************************************
* lrint (MSVCR120.@)
*/
MSVCRT
_long
CDECL
MSVCR120_lrint
(
double
x
)
__msvcrt
_long
CDECL
MSVCR120_lrint
(
double
x
)
{
return
unix_funcs
->
lrint
(
x
);
}
...
...
@@ -3441,7 +3441,7 @@ MSVCRT_long CDECL MSVCR120_lrint(double x)
/*********************************************************************
* lrintf (MSVCR120.@)
*/
MSVCRT
_long
CDECL
MSVCR120_lrintf
(
float
x
)
__msvcrt
_long
CDECL
MSVCR120_lrintf
(
float
x
)
{
return
unix_funcs
->
lrintf
(
x
);
}
...
...
@@ -3449,7 +3449,7 @@ MSVCRT_long CDECL MSVCR120_lrintf(float x)
/*********************************************************************
* lrintl (MSVCR120.@)
*/
MSVCRT
_long
CDECL
MSVCR120_lrintl
(
LDOUBLE
x
)
__msvcrt
_long
CDECL
MSVCR120_lrintl
(
LDOUBLE
x
)
{
return
MSVCR120_lrint
(
x
);
}
...
...
@@ -3457,7 +3457,7 @@ MSVCRT_long CDECL MSVCR120_lrintl(LDOUBLE x)
/*********************************************************************
* llrint (MSVCR120.@)
*/
MSVCRT_longlong
CDECL
MSVCR120_llrint
(
double
x
)
__int64
CDECL
MSVCR120_llrint
(
double
x
)
{
return
unix_funcs
->
llrint
(
x
);
}
...
...
@@ -3465,7 +3465,7 @@ MSVCRT_longlong CDECL MSVCR120_llrint(double x)
/*********************************************************************
* llrintf (MSVCR120.@)
*/
MSVCRT_longlong
CDECL
MSVCR120_llrintf
(
float
x
)
__int64
CDECL
MSVCR120_llrintf
(
float
x
)
{
return
unix_funcs
->
llrintf
(
x
);
}
...
...
@@ -3473,7 +3473,7 @@ MSVCRT_longlong CDECL MSVCR120_llrintf(float x)
/*********************************************************************
* rintl (MSVCR120.@)
*/
MSVCRT_longlong
CDECL
MSVCR120_llrintl
(
LDOUBLE
x
)
__int64
CDECL
MSVCR120_llrintl
(
LDOUBLE
x
)
{
return
MSVCR120_llrint
(
x
);
}
...
...
@@ -3507,7 +3507,7 @@ LDOUBLE CDECL MSVCR120_roundl(LDOUBLE x)
/*********************************************************************
* lround (MSVCR120.@)
*/
MSVCRT
_long
CDECL
MSVCR120_lround
(
double
x
)
__msvcrt
_long
CDECL
MSVCR120_lround
(
double
x
)
{
return
unix_funcs
->
lround
(
x
);
}
...
...
@@ -3515,7 +3515,7 @@ MSVCRT_long CDECL MSVCR120_lround(double x)
/*********************************************************************
* lroundf (MSVCR120.@)
*/
MSVCRT
_long
CDECL
MSVCR120_lroundf
(
float
x
)
__msvcrt
_long
CDECL
MSVCR120_lroundf
(
float
x
)
{
return
unix_funcs
->
lroundf
(
x
);
}
...
...
@@ -3523,7 +3523,7 @@ MSVCRT_long CDECL MSVCR120_lroundf(float x)
/*********************************************************************
* lroundl (MSVCR120.@)
*/
MSVCRT
_long
CDECL
MSVCR120_lroundl
(
LDOUBLE
x
)
__msvcrt
_long
CDECL
MSVCR120_lroundl
(
LDOUBLE
x
)
{
return
MSVCR120_lround
(
x
);
}
...
...
@@ -3531,7 +3531,7 @@ MSVCRT_long CDECL MSVCR120_lroundl(LDOUBLE x)
/*********************************************************************
* llround (MSVCR120.@)
*/
MSVCRT_longlong
CDECL
MSVCR120_llround
(
double
x
)
__int64
CDECL
MSVCR120_llround
(
double
x
)
{
return
unix_funcs
->
llround
(
x
);
}
...
...
@@ -3539,7 +3539,7 @@ MSVCRT_longlong CDECL MSVCR120_llround(double x)
/*********************************************************************
* llroundf (MSVCR120.@)
*/
MSVCRT_longlong
CDECL
MSVCR120_llroundf
(
float
x
)
__int64
CDECL
MSVCR120_llroundf
(
float
x
)
{
return
unix_funcs
->
llroundf
(
x
);
}
...
...
@@ -3547,7 +3547,7 @@ MSVCRT_longlong CDECL MSVCR120_llroundf(float x)
/*********************************************************************
* roundl (MSVCR120.@)
*/
MSVCRT_longlong
CDECL
MSVCR120_llroundl
(
LDOUBLE
x
)
__int64
CDECL
MSVCR120_llroundl
(
LDOUBLE
x
)
{
return
MSVCR120_llround
(
x
);
}
...
...
@@ -3936,7 +3936,7 @@ LDOUBLE CDECL MSVCR120_atanhl(LDOUBLE x)
* scalbn (MSVCR120.@)
* scalbln (MSVCR120.@)
*/
double
CDECL
MSVCRT__scalb
(
double
num
,
MSVCRT
_long
power
)
double
CDECL
MSVCRT__scalb
(
double
num
,
__msvcrt
_long
power
)
{
return
MSVCRT_ldexp
(
num
,
power
);
}
...
...
@@ -3946,7 +3946,7 @@ double CDECL MSVCRT__scalb(double num, MSVCRT_long power)
* scalbnf (MSVCR120.@)
* scalblnf (MSVCR120.@)
*/
float
CDECL
MSVCRT__scalbf
(
float
num
,
MSVCRT
_long
power
)
float
CDECL
MSVCRT__scalbf
(
float
num
,
__msvcrt
_long
power
)
{
return
MSVCRT_ldexp
(
num
,
power
);
}
...
...
@@ -3957,7 +3957,7 @@ float CDECL MSVCRT__scalbf(float num, MSVCRT_long power)
* scalbnl (MSVCR120.@)
* scalblnl (MSVCR120.@)
*/
LDOUBLE
CDECL
MSVCR120_scalbnl
(
LDOUBLE
num
,
MSVCRT
_long
power
)
LDOUBLE
CDECL
MSVCR120_scalbnl
(
LDOUBLE
num
,
__msvcrt
_long
power
)
{
return
MSVCRT__scalb
(
num
,
power
);
}
...
...
dlls/msvcrt/mbcs.c
View file @
fa272ada
...
...
@@ -119,12 +119,12 @@ static wchar_t msvcrt_mbc_to_wc(unsigned int ch)
return
msvcrt_mbc_to_wc_l
(
ch
,
NULL
);
}
static
inline
MSVCRT_
size_t
u_strlen
(
const
unsigned
char
*
str
)
static
inline
size_t
u_strlen
(
const
unsigned
char
*
str
)
{
return
strlen
(
(
const
char
*
)
str
);
}
static
inline
unsigned
char
*
u_strncat
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
MSVCRT_
size_t
len
)
static
inline
unsigned
char
*
u_strncat
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
size_t
len
)
{
return
(
unsigned
char
*
)
MSVCRT_strncat
(
(
char
*
)
dst
,
(
const
char
*
)
src
,
len
);
}
...
...
@@ -139,12 +139,12 @@ static inline int u_strcasecmp( const unsigned char *s1, const unsigned char *s2
return
MSVCRT__stricmp
(
(
const
char
*
)
s1
,
(
const
char
*
)
s2
);
}
static
inline
int
u_strncmp
(
const
unsigned
char
*
s1
,
const
unsigned
char
*
s2
,
MSVCRT_
size_t
len
)
static
inline
int
u_strncmp
(
const
unsigned
char
*
s1
,
const
unsigned
char
*
s2
,
size_t
len
)
{
return
MSVCRT_strncmp
(
(
const
char
*
)
s1
,
(
const
char
*
)
s2
,
len
);
}
static
inline
int
u_strncasecmp
(
const
unsigned
char
*
s1
,
const
unsigned
char
*
s2
,
MSVCRT_
size_t
len
)
static
inline
int
u_strncasecmp
(
const
unsigned
char
*
s1
,
const
unsigned
char
*
s2
,
size_t
len
)
{
return
MSVCRT__strnicmp
(
(
const
char
*
)
s1
,
(
const
char
*
)
s2
,
len
);
}
...
...
@@ -164,7 +164,7 @@ static inline unsigned char *u__strset( unsigned char *s, unsigned char c )
return
(
unsigned
char
*
)
_strset
(
(
char
*
)
s
,
c
);
}
static
inline
unsigned
char
*
u__strnset
(
unsigned
char
*
s
,
unsigned
char
c
,
MSVCRT_
size_t
len
)
static
inline
unsigned
char
*
u__strnset
(
unsigned
char
*
s
,
unsigned
char
c
,
size_t
len
)
{
return
(
unsigned
char
*
)
MSVCRT__strnset
(
(
char
*
)
s
,
c
,
len
);
}
...
...
@@ -593,7 +593,7 @@ unsigned char* CDECL _mbsinc(const unsigned char* str)
/*********************************************************************
* _mbsninc(MSVCRT.@)
*/
unsigned
char
*
CDECL
_mbsninc
(
const
unsigned
char
*
str
,
MSVCRT_
size_t
num
)
unsigned
char
*
CDECL
_mbsninc
(
const
unsigned
char
*
str
,
size_t
num
)
{
if
(
!
str
)
return
NULL
;
...
...
@@ -616,11 +616,11 @@ unsigned char* CDECL _mbsninc(const unsigned char* str, MSVCRT_size_t num)
/*********************************************************************
* _mbsnlen_l(MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_mbsnlen_l
(
const
unsigned
char
*
str
,
MSVCRT_
size_t
maxsize
,
_locale_t
locale
)
size_t
CDECL
_mbsnlen_l
(
const
unsigned
char
*
str
,
size_t
maxsize
,
_locale_t
locale
)
{
pthreadmbcinfo
mbcinfo
;
MSVCRT_
size_t
i
=
0
,
len
=
0
;
size_t
i
=
0
,
len
=
0
;
if
(
!
locale
)
mbcinfo
=
get_mbcinfo
();
...
...
@@ -647,7 +647,7 @@ MSVCRT_size_t CDECL _mbsnlen_l(const unsigned char *str,
/*********************************************************************
* _mbslen(MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_mbslen
(
const
unsigned
char
*
str
)
size_t
CDECL
_mbslen
(
const
unsigned
char
*
str
)
{
return
_mbsnlen_l
(
str
,
-
1
,
NULL
);
}
...
...
@@ -655,7 +655,7 @@ MSVCRT_size_t CDECL _mbslen(const unsigned char* str)
/*********************************************************************
* _mbslen_l(MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_mbslen_l
(
const
unsigned
char
*
str
,
_locale_t
locale
)
size_t
CDECL
_mbslen_l
(
const
unsigned
char
*
str
,
_locale_t
locale
)
{
return
_mbsnlen_l
(
str
,
-
1
,
locale
);
}
...
...
@@ -663,7 +663,7 @@ MSVCRT_size_t CDECL _mbslen_l(const unsigned char* str, _locale_t locale)
/*********************************************************************
* _mbsnlen(MSVCRT.@)
*/
MSVCRT_size_t
CDECL
_mbsnlen
(
const
unsigned
char
*
str
,
MSVCRT_
size_t
maxsize
)
size_t
CDECL
_mbsnlen
(
const
unsigned
char
*
str
,
size_t
maxsize
)
{
return
_mbsnlen_l
(
str
,
maxsize
,
NULL
);
}
...
...
@@ -671,7 +671,7 @@ MSVCRT_size_t CDECL _mbsnlen(const unsigned char* str, MSVCRT_size_t maxsize)
/*********************************************************************
* _mbccpy_s_l(MSVCRT.@)
*/
int
CDECL
_mbccpy_s_l
(
unsigned
char
*
dest
,
MSVCRT_
size_t
maxsize
,
int
CDECL
_mbccpy_s_l
(
unsigned
char
*
dest
,
size_t
maxsize
,
int
*
copied
,
const
unsigned
char
*
src
,
_locale_t
locale
)
{
if
(
copied
)
*
copied
=
0
;
...
...
@@ -722,7 +722,7 @@ void CDECL _mbccpy_l(unsigned char* dest, const unsigned char* src,
/*********************************************************************
* _mbccpy_s(MSVCRT.@)
*/
int
CDECL
_mbccpy_s
(
unsigned
char
*
dest
,
MSVCRT_
size_t
maxsize
,
int
CDECL
_mbccpy_s
(
unsigned
char
*
dest
,
size_t
maxsize
,
int
*
copied
,
const
unsigned
char
*
src
)
{
return
_mbccpy_s_l
(
dest
,
maxsize
,
copied
,
src
,
NULL
);
...
...
@@ -734,7 +734,7 @@ int CDECL _mbccpy_s(unsigned char* dest, MSVCRT_size_t maxsize,
* The parameter n is the number or characters to copy, not the size of
* the buffer. Use _mbsnbcpy for a function analogical to strncpy
*/
unsigned
char
*
CDECL
_mbsncpy
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
MSVCRT_
size_t
n
)
unsigned
char
*
CDECL
_mbsncpy
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
size_t
n
)
{
unsigned
char
*
ret
=
dst
;
if
(
!
n
)
...
...
@@ -777,10 +777,10 @@ unsigned char* CDECL _mbsncpy(unsigned char* dst, const unsigned char* src, MSVC
* Unlike _mbsnbcpy this function does not pad the rest of the dest
* string with 0
*/
int
CDECL
_mbsnbcpy_s_l
(
unsigned
char
*
dst
,
MSVCRT_
size_t
size
,
const
unsigned
char
*
src
,
MSVCRT_
size_t
n
,
_locale_t
locale
)
int
CDECL
_mbsnbcpy_s_l
(
unsigned
char
*
dst
,
size_t
size
,
const
unsigned
char
*
src
,
size_t
n
,
_locale_t
locale
)
{
MSVCRT_
size_t
pos
=
0
;
size_t
pos
=
0
;
if
(
!
dst
||
size
==
0
)
return
MSVCRT_EINVAL
;
...
...
@@ -840,7 +840,7 @@ int CDECL _mbsnbcpy_s_l(unsigned char* dst, MSVCRT_size_t size,
/*********************************************************************
* _mbsnbcpy_s(MSVCRT.@)
*/
int
CDECL
_mbsnbcpy_s
(
unsigned
char
*
dst
,
MSVCRT_size_t
size
,
const
unsigned
char
*
src
,
MSVCRT_
size_t
n
)
int
CDECL
_mbsnbcpy_s
(
unsigned
char
*
dst
,
size_t
size
,
const
unsigned
char
*
src
,
size_t
n
)
{
return
_mbsnbcpy_s_l
(
dst
,
size
,
src
,
n
,
NULL
);
}
...
...
@@ -848,7 +848,7 @@ int CDECL _mbsnbcpy_s(unsigned char* dst, MSVCRT_size_t size, const unsigned cha
/*********************************************************************
* _mbscpy_s_l(MSVCRT.@)
*/
int
CDECL
_mbscpy_s_l
(
unsigned
char
*
dst
,
MSVCRT_
size_t
size
,
int
CDECL
_mbscpy_s_l
(
unsigned
char
*
dst
,
size_t
size
,
const
unsigned
char
*
src
,
_locale_t
locale
)
{
return
_mbsnbcpy_s_l
(
dst
,
size
,
src
,
-
1
,
locale
);
...
...
@@ -857,7 +857,7 @@ int CDECL _mbscpy_s_l(unsigned char *dst, MSVCRT_size_t size,
/*********************************************************************
* _mbscpy_s(MSVCRT.@)
*/
int
CDECL
_mbscpy_s
(
unsigned
char
*
dst
,
MSVCRT_
size_t
size
,
const
unsigned
char
*
src
)
int
CDECL
_mbscpy_s
(
unsigned
char
*
dst
,
size_t
size
,
const
unsigned
char
*
src
)
{
return
_mbscpy_s_l
(
dst
,
size
,
src
,
NULL
);
}
...
...
@@ -868,7 +868,7 @@ int CDECL _mbscpy_s(unsigned char *dst, MSVCRT_size_t size, const unsigned char
* Like strncpy this function doesn't enforce the string to be
* NUL-terminated
*/
unsigned
char
*
CDECL
_mbsnbcpy
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
MSVCRT_
size_t
n
)
unsigned
char
*
CDECL
_mbsnbcpy
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
size_t
n
)
{
unsigned
char
*
ret
=
dst
;
if
(
!
n
)
...
...
@@ -939,7 +939,7 @@ int CDECL _mbscmp(const unsigned char* str, const unsigned char* cmp)
/*********************************************************************
* _mbsnbicoll_l(MSVCRT.@)
*/
int
CDECL
_mbsnbicoll_l
(
const
unsigned
char
*
str1
,
const
unsigned
char
*
str2
,
MSVCRT_
size_t
len
,
_locale_t
locale
)
int
CDECL
_mbsnbicoll_l
(
const
unsigned
char
*
str1
,
const
unsigned
char
*
str2
,
size_t
len
,
_locale_t
locale
)
{
pthreadmbcinfo
mbcinfo
;
...
...
@@ -964,7 +964,7 @@ int CDECL _mbsicoll_l(const unsigned char *str1, const unsigned char *str2, _loc
/*********************************************************************
* _mbsnbicoll(MSVCRT.@)
*/
int
CDECL
_mbsnbicoll
(
const
unsigned
char
*
str1
,
const
unsigned
char
*
str2
,
MSVCRT_
size_t
len
)
int
CDECL
_mbsnbicoll
(
const
unsigned
char
*
str1
,
const
unsigned
char
*
str2
,
size_t
len
)
{
return
_mbsnbicoll_l
(
str1
,
str2
,
len
,
NULL
);
}
...
...
@@ -985,7 +985,7 @@ int CDECL _mbsicoll(const unsigned char* str, const unsigned char* cmp)
/*********************************************************************
* _mbsnbcoll_l(MSVCRT.@)
*/
int
CDECL
_mbsnbcoll_l
(
const
unsigned
char
*
str1
,
const
unsigned
char
*
str2
,
MSVCRT_
size_t
len
,
_locale_t
locale
)
int
CDECL
_mbsnbcoll_l
(
const
unsigned
char
*
str1
,
const
unsigned
char
*
str2
,
size_t
len
,
_locale_t
locale
)
{
pthreadmbcinfo
mbcinfo
;
...
...
@@ -1010,7 +1010,7 @@ int CDECL _mbscoll_l(const unsigned char *str1, const unsigned char *str2, _loca
/*********************************************************************
* _mbsnbcoll(MSVCRT.@)
*/
int
CDECL
_mbsnbcoll
(
const
unsigned
char
*
str1
,
const
unsigned
char
*
str2
,
MSVCRT_
size_t
len
)
int
CDECL
_mbsnbcoll
(
const
unsigned
char
*
str1
,
const
unsigned
char
*
str2
,
size_t
len
)
{
return
_mbsnbcoll_l
(
str1
,
str2
,
len
,
NULL
);
}
...
...
@@ -1055,7 +1055,7 @@ int CDECL _mbsicmp(const unsigned char* str, const unsigned char* cmp)
/*********************************************************************
* _mbsncmp(MSVCRT.@)
*/
int
CDECL
_mbsncmp
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
,
MSVCRT_
size_t
len
)
int
CDECL
_mbsncmp
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
,
size_t
len
)
{
if
(
!
len
)
return
0
;
...
...
@@ -1086,7 +1086,7 @@ int CDECL _mbsncmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_si
/*********************************************************************
* _mbsnbcmp(MSVCRT.@)
*/
int
CDECL
_mbsnbcmp
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
,
MSVCRT_
size_t
len
)
int
CDECL
_mbsnbcmp
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
,
size_t
len
)
{
if
(
!
len
)
return
0
;
...
...
@@ -1130,7 +1130,7 @@ int CDECL _mbsnbcmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_s
*
* Compare two multibyte strings case insensitively to 'len' characters.
*/
int
CDECL
_mbsnicmp
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
,
MSVCRT_
size_t
len
)
int
CDECL
_mbsnicmp
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
,
size_t
len
)
{
/* FIXME: No tolower() for mb strings yet */
if
(
get_mbcinfo
()
->
ismbcodepage
)
...
...
@@ -1157,7 +1157,7 @@ int CDECL _mbsnicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_s
/*********************************************************************
* _mbsnbicmp(MSVCRT.@)
*/
int
CDECL
_mbsnbicmp
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
,
MSVCRT_
size_t
len
)
int
CDECL
_mbsnbicmp
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
,
size_t
len
)
{
if
(
!
len
)
return
0
;
...
...
@@ -1210,10 +1210,10 @@ unsigned char * CDECL _mbscat( unsigned char *dst, const unsigned char *src )
/*********************************************************************
* _mbscat_s_l (MSVCRT.@)
*/
int
CDECL
_mbscat_s_l
(
unsigned
char
*
dst
,
MSVCRT_
size_t
size
,
int
CDECL
_mbscat_s_l
(
unsigned
char
*
dst
,
size_t
size
,
const
unsigned
char
*
src
,
_locale_t
locale
)
{
MSVCRT_
size_t
i
,
j
;
size_t
i
,
j
;
int
ret
=
0
;
if
(
!
MSVCRT_CHECK_PMT
(
dst
!=
NULL
))
return
MSVCRT_EINVAL
;
...
...
@@ -1252,7 +1252,7 @@ int CDECL _mbscat_s_l( unsigned char *dst, MSVCRT_size_t size,
/*********************************************************************
* _mbscat_s (MSVCRT.@)
*/
int
CDECL
_mbscat_s
(
unsigned
char
*
dst
,
MSVCRT_
size_t
size
,
const
unsigned
char
*
src
)
int
CDECL
_mbscat_s
(
unsigned
char
*
dst
,
size_t
size
,
const
unsigned
char
*
src
)
{
return
_mbscat_s_l
(
dst
,
size
,
src
,
NULL
);
}
...
...
@@ -1755,7 +1755,7 @@ int CDECL _mbbtype(unsigned char c, int type)
/*********************************************************************
* _mbsbtype (MSVCRT.@)
*/
int
CDECL
_mbsbtype
(
const
unsigned
char
*
str
,
MSVCRT_
size_t
count
)
int
CDECL
_mbsbtype
(
const
unsigned
char
*
str
,
size_t
count
)
{
int
lead
=
0
;
const
unsigned
char
*
end
=
str
+
count
;
...
...
@@ -1809,7 +1809,7 @@ unsigned char* CDECL _mbsset(unsigned char* str, unsigned int c)
/*********************************************************************
* _mbsnbset(MSVCRT.@)
*/
unsigned
char
*
CDECL
_mbsnbset
(
unsigned
char
*
str
,
unsigned
int
c
,
MSVCRT_
size_t
len
)
unsigned
char
*
CDECL
_mbsnbset
(
unsigned
char
*
str
,
unsigned
int
c
,
size_t
len
)
{
unsigned
char
*
ret
=
str
;
...
...
@@ -1839,7 +1839,7 @@ unsigned char* CDECL _mbsnbset(unsigned char *str, unsigned int c, MSVCRT_size_t
/*********************************************************************
* _mbsnset(MSVCRT.@)
*/
unsigned
char
*
CDECL
_mbsnset
(
unsigned
char
*
str
,
unsigned
int
c
,
MSVCRT_
size_t
len
)
unsigned
char
*
CDECL
_mbsnset
(
unsigned
char
*
str
,
unsigned
int
c
,
size_t
len
)
{
unsigned
char
*
ret
=
str
;
...
...
@@ -1866,9 +1866,9 @@ unsigned char* CDECL _mbsnset(unsigned char* str, unsigned int c, MSVCRT_size_t
* _mbsnccnt(MSVCRT.@)
* 'c' is for 'character'.
*/
MSVCRT_size_t
CDECL
_mbsnccnt
(
const
unsigned
char
*
str
,
MSVCRT_
size_t
len
)
size_t
CDECL
_mbsnccnt
(
const
unsigned
char
*
str
,
size_t
len
)
{
MSVCRT_
size_t
ret
;
size_t
ret
;
if
(
get_mbcinfo
()
->
ismbcodepage
)
{
ret
=
0
;
...
...
@@ -1894,9 +1894,9 @@ MSVCRT_size_t CDECL _mbsnccnt(const unsigned char* str, MSVCRT_size_t len)
* _mbsnbcnt(MSVCRT.@)
* 'b' is for byte count.
*/
MSVCRT_size_t
CDECL
_mbsnbcnt
(
const
unsigned
char
*
str
,
MSVCRT_
size_t
len
)
size_t
CDECL
_mbsnbcnt
(
const
unsigned
char
*
str
,
size_t
len
)
{
MSVCRT_
size_t
ret
;
size_t
ret
;
if
(
get_mbcinfo
()
->
ismbcodepage
)
{
const
unsigned
char
*
xstr
=
str
;
...
...
@@ -1914,7 +1914,7 @@ MSVCRT_size_t CDECL _mbsnbcnt(const unsigned char* str, MSVCRT_size_t len)
/*********************************************************************
* _mbsnbcat(MSVCRT.@)
*/
unsigned
char
*
CDECL
_mbsnbcat
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
MSVCRT_
size_t
len
)
unsigned
char
*
CDECL
_mbsnbcat
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
size_t
len
)
{
if
(
get_mbcinfo
()
->
ismbcodepage
)
{
...
...
@@ -1937,10 +1937,10 @@ unsigned char* CDECL _mbsnbcat(unsigned char* dst, const unsigned char* src, MSV
return
u_strncat
(
dst
,
src
,
len
);
/* ASCII CP */
}
int
CDECL
_mbsnbcat_s
(
unsigned
char
*
dst
,
MSVCRT_size_t
size
,
const
unsigned
char
*
src
,
MSVCRT_
size_t
len
)
int
CDECL
_mbsnbcat_s
(
unsigned
char
*
dst
,
size_t
size
,
const
unsigned
char
*
src
,
size_t
len
)
{
unsigned
char
*
ptr
=
dst
;
MSVCRT_
size_t
i
;
size_t
i
;
if
(
!
dst
&&
!
size
&&
!
src
&&
!
len
)
return
0
;
...
...
@@ -1990,7 +1990,7 @@ int CDECL _mbsnbcat_s(unsigned char *dst, MSVCRT_size_t size, const unsigned cha
/*********************************************************************
* _mbsncat(MSVCRT.@)
*/
unsigned
char
*
CDECL
_mbsncat
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
MSVCRT_
size_t
len
)
unsigned
char
*
CDECL
_mbsncat
(
unsigned
char
*
dst
,
const
unsigned
char
*
src
,
size_t
len
)
{
if
(
get_mbcinfo
()
->
ismbcodepage
)
{
...
...
@@ -2044,7 +2044,7 @@ unsigned char* CDECL _mbslwr(unsigned char* s)
/*********************************************************************
* _mbslwr_s(MSVCRT.@)
*/
int
CDECL
_mbslwr_s
(
unsigned
char
*
s
,
MSVCRT_
size_t
len
)
int
CDECL
_mbslwr_s
(
unsigned
char
*
s
,
size_t
len
)
{
if
(
!
s
&&
!
len
)
{
...
...
@@ -2112,7 +2112,7 @@ unsigned char* CDECL _mbsupr(unsigned char* s)
/*********************************************************************
* _mbsupr_s(MSVCRT.@)
*/
int
CDECL
_mbsupr_s
(
unsigned
char
*
s
,
MSVCRT_
size_t
len
)
int
CDECL
_mbsupr_s
(
unsigned
char
*
s
,
size_t
len
)
{
if
(
!
s
&&
!
len
)
{
...
...
@@ -2151,7 +2151,7 @@ int CDECL _mbsupr_s(unsigned char* s, MSVCRT_size_t len)
/*********************************************************************
* _mbsspn_l (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_mbsspn_l
(
const
unsigned
char
*
string
,
size_t
CDECL
_mbsspn_l
(
const
unsigned
char
*
string
,
const
unsigned
char
*
set
,
_locale_t
locale
)
{
const
unsigned
char
*
p
,
*
q
;
...
...
@@ -2185,7 +2185,7 @@ MSVCRT_size_t CDECL _mbsspn_l(const unsigned char* string,
/*********************************************************************
* _mbsspn (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_mbsspn
(
const
unsigned
char
*
string
,
const
unsigned
char
*
set
)
size_t
CDECL
_mbsspn
(
const
unsigned
char
*
string
,
const
unsigned
char
*
set
)
{
return
_mbsspn_l
(
string
,
set
,
NULL
);
}
...
...
@@ -2202,7 +2202,7 @@ unsigned char* CDECL _mbsspnp(const unsigned char* string, const unsigned char*
/*********************************************************************
* _mbscspn_l (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_mbscspn_l
(
const
unsigned
char
*
str
,
size_t
CDECL
_mbscspn_l
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
,
_locale_t
locale
)
{
const
unsigned
char
*
p
,
*
q
;
...
...
@@ -2230,7 +2230,7 @@ MSVCRT_size_t CDECL _mbscspn_l(const unsigned char* str,
/*********************************************************************
* _mbscspn (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_mbscspn
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
)
size_t
CDECL
_mbscspn
(
const
unsigned
char
*
str
,
const
unsigned
char
*
cmp
)
{
return
_mbscspn_l
(
str
,
cmp
,
NULL
);
}
...
...
@@ -2313,7 +2313,7 @@ unsigned char* CDECL _mbspbrk(const unsigned char* str, const unsigned char* acc
* Unlike most of the multibyte string functions this function uses
* the locale codepage, not the codepage set by _setmbcp
*/
int
CDECL
MSVCRT_mblen
(
const
char
*
str
,
MSVCRT_
size_t
size
)
int
CDECL
MSVCRT_mblen
(
const
char
*
str
,
size_t
size
)
{
if
(
str
&&
*
str
&&
size
)
{
...
...
@@ -2328,10 +2328,10 @@ int CDECL MSVCRT_mblen(const char* str, MSVCRT_size_t size)
/*********************************************************************
* mbrlen(MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_mbrlen
(
const
char
*
str
,
MSVCRT_size_t
len
,
MSVCRT_
mbstate_t
*
state
)
size_t
CDECL
MSVCRT_mbrlen
(
const
char
*
str
,
size_t
len
,
mbstate_t
*
state
)
{
MSVCRT_
mbstate_t
s
=
(
state
?
*
state
:
0
);
MSVCRT_
size_t
ret
;
mbstate_t
s
=
(
state
?
*
state
:
0
);
size_t
ret
;
if
(
!
len
||
!
str
||
!*
str
)
return
0
;
...
...
@@ -2360,7 +2360,7 @@ MSVCRT_size_t CDECL MSVCRT_mbrlen(const char *str, MSVCRT_size_t len, MSVCRT_mbs
/*********************************************************************
* _mbstrlen_l(MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_mbstrlen_l
(
const
char
*
str
,
_locale_t
locale
)
size_t
CDECL
_mbstrlen_l
(
const
char
*
str
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
...
...
@@ -2370,7 +2370,7 @@ MSVCRT_size_t CDECL _mbstrlen_l(const char* str, _locale_t locale)
locinfo
=
locale
->
locinfo
;
if
(
locinfo
->
mb_cur_max
>
1
)
{
MSVCRT_
size_t
len
;
size_t
len
;
len
=
MultiByteToWideChar
(
locinfo
->
lc_codepage
,
MB_ERR_INVALID_CHARS
,
str
,
-
1
,
NULL
,
0
);
if
(
!
len
)
{
...
...
@@ -2386,7 +2386,7 @@ MSVCRT_size_t CDECL _mbstrlen_l(const char* str, _locale_t locale)
/*********************************************************************
* _mbstrlen(MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
_mbstrlen
(
const
char
*
str
)
size_t
CDECL
_mbstrlen
(
const
char
*
str
)
{
return
_mbstrlen_l
(
str
,
NULL
);
}
...
...
@@ -2394,7 +2394,7 @@ MSVCRT_size_t CDECL _mbstrlen(const char* str)
/*********************************************************************
* _mbtowc_l(MSVCRT.@)
*/
int
CDECL
MSVCRT_mbtowc_l
(
wchar_t
*
dst
,
const
char
*
str
,
MSVCRT_
size_t
n
,
_locale_t
locale
)
int
CDECL
MSVCRT_mbtowc_l
(
wchar_t
*
dst
,
const
char
*
str
,
size_t
n
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
wchar_t
tmpdst
;
...
...
@@ -2431,7 +2431,7 @@ int CDECL MSVCRT_mbtowc_l(wchar_t *dst, const char* str, MSVCRT_size_t n, _local
/*********************************************************************
* mbtowc(MSVCRT.@)
*/
int
CDECL
MSVCRT_mbtowc
(
wchar_t
*
dst
,
const
char
*
str
,
MSVCRT_
size_t
n
)
int
CDECL
MSVCRT_mbtowc
(
wchar_t
*
dst
,
const
char
*
str
,
size_t
n
)
{
return
MSVCRT_mbtowc_l
(
dst
,
str
,
n
,
NULL
);
}
...
...
@@ -2439,7 +2439,7 @@ int CDECL MSVCRT_mbtowc(wchar_t *dst, const char* str, MSVCRT_size_t n)
/*********************************************************************
* btowc(MSVCRT.@)
*/
MSVCRT_
wint_t
CDECL
btowc
(
int
c
)
wint_t
CDECL
btowc
(
int
c
)
{
unsigned
char
letter
=
c
;
wchar_t
ret
;
...
...
@@ -2458,11 +2458,11 @@ MSVCRT_wint_t CDECL btowc(int c)
/*********************************************************************
* mbrtowc(MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT_mbrtowc
(
wchar_t
*
dst
,
const
char
*
str
,
MSVCRT_size_t
n
,
MSVCRT_
mbstate_t
*
state
)
size_t
CDECL
MSVCRT_mbrtowc
(
wchar_t
*
dst
,
const
char
*
str
,
size_t
n
,
mbstate_t
*
state
)
{
pthreadlocinfo
locinfo
=
get_locinfo
();
MSVCRT_
mbstate_t
s
=
(
state
?
*
state
:
0
);
mbstate_t
s
=
(
state
?
*
state
:
0
);
char
tmpstr
[
2
];
int
len
=
0
;
...
...
@@ -2505,11 +2505,11 @@ MSVCRT_size_t CDECL MSVCRT_mbrtowc(wchar_t *dst, const char *str,
/*********************************************************************
* _mbstowcs_l(MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT__mbstowcs_l
(
wchar_t
*
wcstr
,
const
char
*
mbstr
,
MSVCRT_
size_t
count
,
_locale_t
locale
)
size_t
CDECL
MSVCRT__mbstowcs_l
(
wchar_t
*
wcstr
,
const
char
*
mbstr
,
size_t
count
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
MSVCRT_
size_t
i
,
size
;
size_t
i
,
size
;
if
(
!
mbstr
)
{
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
...
...
@@ -2569,8 +2569,8 @@ MSVCRT_size_t CDECL MSVCRT__mbstowcs_l(wchar_t *wcstr, const char *mbstr,
/*********************************************************************
* mbstowcs(MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT_mbstowcs
(
wchar_t
*
wcstr
,
const
char
*
mbstr
,
MSVCRT_
size_t
count
)
size_t
CDECL
MSVCRT_mbstowcs
(
wchar_t
*
wcstr
,
const
char
*
mbstr
,
size_t
count
)
{
return
MSVCRT__mbstowcs_l
(
wcstr
,
mbstr
,
count
,
NULL
);
}
...
...
@@ -2578,11 +2578,10 @@ MSVCRT_size_t CDECL MSVCRT_mbstowcs(wchar_t *wcstr,
/*********************************************************************
* _mbstowcs_s_l(MSVCRT.@)
*/
int
CDECL
MSVCRT__mbstowcs_s_l
(
MSVCRT_size_t
*
ret
,
wchar_t
*
wcstr
,
MSVCRT_size_t
size
,
const
char
*
mbstr
,
MSVCRT_size_t
count
,
_locale_t
locale
)
int
CDECL
MSVCRT__mbstowcs_s_l
(
size_t
*
ret
,
wchar_t
*
wcstr
,
size_t
size
,
const
char
*
mbstr
,
size_t
count
,
_locale_t
locale
)
{
MSVCRT_
size_t
conv
;
size_t
conv
;
int
err
=
0
;
if
(
!
wcstr
&&
!
size
)
{
...
...
@@ -2624,8 +2623,8 @@ int CDECL MSVCRT__mbstowcs_s_l(MSVCRT_size_t *ret, wchar_t *wcstr,
/*********************************************************************
* mbstowcs_s(MSVCRT.@)
*/
int
CDECL
MSVCRT__mbstowcs_s
(
MSVCRT_
size_t
*
ret
,
wchar_t
*
wcstr
,
MSVCRT_size_t
size
,
const
char
*
mbstr
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT__mbstowcs_s
(
size_t
*
ret
,
wchar_t
*
wcstr
,
size_t
size
,
const
char
*
mbstr
,
size_t
count
)
{
return
MSVCRT__mbstowcs_s_l
(
ret
,
wcstr
,
size
,
mbstr
,
count
,
NULL
);
}
...
...
@@ -2633,12 +2632,12 @@ int CDECL MSVCRT__mbstowcs_s(MSVCRT_size_t *ret, wchar_t *wcstr,
/*********************************************************************
* mbsrtowcs(MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT_mbsrtowcs
(
wchar_t
*
wcstr
,
const
char
**
pmbstr
,
MSVCRT_size_t
count
,
MSVCRT_
mbstate_t
*
state
)
size_t
CDECL
MSVCRT_mbsrtowcs
(
wchar_t
*
wcstr
,
const
char
**
pmbstr
,
size_t
count
,
mbstate_t
*
state
)
{
MSVCRT_
mbstate_t
s
=
(
state
?
*
state
:
0
);
mbstate_t
s
=
(
state
?
*
state
:
0
);
wchar_t
tmpdst
;
MSVCRT_
size_t
ret
=
0
;
size_t
ret
=
0
;
const
char
*
p
;
if
(
!
MSVCRT_CHECK_PMT
(
pmbstr
!=
NULL
))
...
...
@@ -2668,10 +2667,10 @@ MSVCRT_size_t CDECL MSVCRT_mbsrtowcs(wchar_t *wcstr,
/*********************************************************************
* mbsrtowcs_s(MSVCRT.@)
*/
int
CDECL
MSVCRT_mbsrtowcs_s
(
MSVCRT_size_t
*
ret
,
wchar_t
*
wcstr
,
MSVCRT_
size_t
len
,
const
char
**
mbstr
,
MSVCRT_size_t
count
,
MSVCRT_
mbstate_t
*
state
)
int
CDECL
MSVCRT_mbsrtowcs_s
(
size_t
*
ret
,
wchar_t
*
wcstr
,
size_t
len
,
const
char
**
mbstr
,
size_t
count
,
mbstate_t
*
state
)
{
MSVCRT_
size_t
tmp
;
size_t
tmp
;
if
(
!
ret
)
ret
=
&
tmp
;
if
(
!
MSVCRT_CHECK_PMT
(
!!
wcstr
==
!!
len
))
{
...
...
dlls/msvcrt/misc.c
View file @
fa272ada
...
...
@@ -78,7 +78,7 @@ int CDECL MSVCRT_rand_s(unsigned int *pval)
/*********************************************************************
* _sleep (MSVCRT.@)
*/
void
CDECL
MSVCRT__sleep
(
MSVCRT
_ulong
timeout
)
void
CDECL
MSVCRT__sleep
(
__msvcrt
_ulong
timeout
)
{
TRACE
(
"_sleep for %ld milliseconds
\n
"
,
timeout
);
Sleep
((
timeout
)
?
timeout
:
1
);
...
...
@@ -153,8 +153,7 @@ void* CDECL _lsearch(const void* match, void* start,
/*********************************************************************
* bsearch_s (msvcrt.@)
*/
void
*
CDECL
MSVCRT_bsearch_s
(
const
void
*
key
,
const
void
*
base
,
MSVCRT_size_t
nmemb
,
MSVCRT_size_t
size
,
void
*
CDECL
MSVCRT_bsearch_s
(
const
void
*
key
,
const
void
*
base
,
size_t
nmemb
,
size_t
size
,
int
(
__cdecl
*
compare
)(
void
*
,
const
void
*
,
const
void
*
),
void
*
ctx
)
{
ssize_t
min
=
0
;
...
...
@@ -186,8 +185,8 @@ static int CDECL compare_wrapper(void *ctx, const void *e1, const void *e2)
/*********************************************************************
* bsearch (msvcrt.@)
*/
void
*
CDECL
MSVCRT_bsearch
(
const
void
*
key
,
const
void
*
base
,
MSVCRT_
size_t
nmemb
,
MSVCRT_
size_t
size
,
int
(
__cdecl
*
compar
)(
const
void
*
,
const
void
*
))
void
*
CDECL
MSVCRT_bsearch
(
const
void
*
key
,
const
void
*
base
,
size_t
nmemb
,
size_t
size
,
int
(
__cdecl
*
compar
)(
const
void
*
,
const
void
*
))
{
return
MSVCRT_bsearch_s
(
key
,
base
,
nmemb
,
size
,
compare_wrapper
,
compar
);
}
...
...
@@ -255,7 +254,7 @@ void CDECL _chkesp(void)
#endif
/* __i386__ */
static
inline
void
swap
(
char
*
l
,
char
*
r
,
MSVCRT_
size_t
size
)
static
inline
void
swap
(
char
*
l
,
char
*
r
,
size_t
size
)
{
char
tmp
;
...
...
@@ -266,10 +265,10 @@ static inline void swap(char *l, char *r, MSVCRT_size_t size)
}
}
static
void
small_sort
(
void
*
base
,
MSVCRT_size_t
nmemb
,
MSVCRT_
size_t
size
,
static
void
small_sort
(
void
*
base
,
size_t
nmemb
,
size_t
size
,
int
(
CDECL
*
compar
)(
void
*
,
const
void
*
,
const
void
*
),
void
*
context
)
{
MSVCRT_
size_t
e
,
i
;
size_t
e
,
i
;
char
*
max
,
*
p
;
for
(
e
=
nmemb
;
e
>
1
;
e
--
)
{
...
...
@@ -285,11 +284,11 @@ static void small_sort(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
}
}
static
void
quick_sort
(
void
*
base
,
MSVCRT_size_t
nmemb
,
MSVCRT_
size_t
size
,
static
void
quick_sort
(
void
*
base
,
size_t
nmemb
,
size_t
size
,
int
(
CDECL
*
compar
)(
void
*
,
const
void
*
,
const
void
*
),
void
*
context
)
{
MSVCRT_size_t
stack_lo
[
8
*
sizeof
(
MSVCRT_size_t
)],
stack_hi
[
8
*
sizeof
(
MSVCRT_
size_t
)];
MSVCRT_
size_t
beg
,
end
,
lo
,
hi
,
med
;
size_t
stack_lo
[
8
*
sizeof
(
size_t
)],
stack_hi
[
8
*
sizeof
(
size_t
)];
size_t
beg
,
end
,
lo
,
hi
,
med
;
int
stack_pos
;
stack_pos
=
0
;
...
...
@@ -368,10 +367,10 @@ static void quick_sort(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
* This function is trying to sort data doing identical comparisons
* as native does. There are still cases where it behaves differently.
*/
void
CDECL
MSVCRT_qsort_s
(
void
*
base
,
MSVCRT_size_t
nmemb
,
MSVCRT_
size_t
size
,
void
CDECL
MSVCRT_qsort_s
(
void
*
base
,
size_t
nmemb
,
size_t
size
,
int
(
CDECL
*
compar
)(
void
*
,
const
void
*
,
const
void
*
),
void
*
context
)
{
const
MSVCRT_
size_t
total_size
=
nmemb
*
size
;
const
size_t
total_size
=
nmemb
*
size
;
if
(
!
MSVCRT_CHECK_PMT
(
base
!=
NULL
||
(
base
==
NULL
&&
nmemb
==
0
)))
return
;
if
(
!
MSVCRT_CHECK_PMT
(
size
>
0
))
return
;
...
...
@@ -386,7 +385,7 @@ void CDECL MSVCRT_qsort_s(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
/*********************************************************************
* qsort (MSVCRT.@)
*/
void
CDECL
MSVCRT_qsort
(
void
*
base
,
MSVCRT_size_t
nmemb
,
MSVCRT_
size_t
size
,
void
CDECL
MSVCRT_qsort
(
void
*
base
,
size_t
nmemb
,
size_t
size
,
int
(
CDECL
*
compar
)(
const
void
*
,
const
void
*
))
{
MSVCRT_qsort_s
(
base
,
nmemb
,
size
,
compare_wrapper
,
compar
);
...
...
dlls/msvcrt/msvcrt.h
View file @
fa272ada
...
...
@@ -30,17 +30,6 @@
#define DBL80_MAX_10_EXP 4932
#define DBL80_MIN_10_EXP -4951
typedef
unsigned
char
MSVCRT_bool
;
typedef
wint_t
MSVCRT_wint_t
;
typedef
__msvcrt_long
MSVCRT_long
;
typedef
__msvcrt_ulong
MSVCRT_ulong
;
typedef
__int64
MSVCRT_longlong
;
typedef
size_t
MSVCRT_size_t
;
typedef
intptr_t
MSVCRT_intptr_t
;
typedef
__time32_t
MSVCRT___time32_t
;
typedef
__time64_t
MSVCRT___time64_t
;
typedef
mbstate_t
MSVCRT_mbstate_t
;
typedef
void
(
__cdecl
*
MSVCRT_terminate_handler
)(
void
);
typedef
void
(
__cdecl
*
MSVCRT_terminate_function
)(
void
);
typedef
void
(
__cdecl
*
MSVCRT_unexpected_handler
)(
void
);
...
...
@@ -143,7 +132,7 @@ struct __thread_data {
DWORD
tid
;
HANDLE
handle
;
int
thread_errno
;
MSVCRT_ulong
thread_doserrno
;
__msvcrt_ulong
thread_doserrno
;
int
unk1
;
unsigned
int
random_seed
;
/* seed for rand() */
char
*
strtok_next
;
/* next ptr for strtok() */
...
...
@@ -234,10 +223,10 @@ extern unsigned int MSVCRT__commode;
*/
int
__cdecl
MSVCRT__set_new_mode
(
int
mode
);
void
*
__cdecl
MSVCRT_operator_new
(
MSVCRT_
size_t
);
void
*
__cdecl
MSVCRT_operator_new
(
size_t
);
void
__cdecl
MSVCRT_operator_delete
(
void
*
);
typedef
void
*
(
__cdecl
*
malloc_func_t
)(
MSVCRT_
size_t
);
typedef
void
*
(
__cdecl
*
malloc_func_t
)(
size_t
);
typedef
void
(
__cdecl
*
free_func_t
)(
void
*
);
/* Setup and teardown multi threaded locks */
...
...
@@ -320,7 +309,7 @@ typedef struct _complex _Dcomplex;
struct
MSVCRT__heapinfo
{
int
*
_pentry
;
MSVCRT_size_t
_size
;
size_t
_size
;
int
_useflag
;
};
...
...
@@ -411,143 +400,143 @@ struct MSVCRT___JUMP_BUFFER
#endif
/* __i386__ */
struct
MSVCRT__finddata32_t
{
unsigned
int
attrib
;
MSVCRT_
__time32_t
time_create
;
MSVCRT_
__time32_t
time_access
;
MSVCRT_
__time32_t
time_write
;
_fsize_t
size
;
char
name
[
260
];
unsigned
int
attrib
;
__time32_t
time_create
;
__time32_t
time_access
;
__time32_t
time_write
;
_fsize_t
size
;
char
name
[
260
];
};
struct
MSVCRT__finddata32i64_t
{
unsigned
int
attrib
;
MSVCRT_
__time32_t
time_create
;
MSVCRT_
__time32_t
time_access
;
MSVCRT_
__time32_t
time_write
;
unsigned
int
attrib
;
__time32_t
time_create
;
__time32_t
time_access
;
__time32_t
time_write
;
__int64
DECLSPEC_ALIGN
(
8
)
size
;
char
name
[
260
];
char
name
[
260
];
};
struct
MSVCRT__finddata64i32_t
{
unsigned
int
attrib
;
MSVCRT_
__time64_t
time_create
;
MSVCRT_
__time64_t
time_access
;
MSVCRT_
__time64_t
time_write
;
_fsize_t
size
;
char
name
[
260
];
unsigned
int
attrib
;
__time64_t
time_create
;
__time64_t
time_access
;
__time64_t
time_write
;
_fsize_t
size
;
char
name
[
260
];
};
struct
MSVCRT__finddata64_t
{
unsigned
int
attrib
;
MSVCRT_
__time64_t
time_create
;
MSVCRT_
__time64_t
time_access
;
MSVCRT_
__time64_t
time_write
;
unsigned
int
attrib
;
__time64_t
time_create
;
__time64_t
time_access
;
__time64_t
time_write
;
__int64
DECLSPEC_ALIGN
(
8
)
size
;
char
name
[
260
];
};
struct
MSVCRT__wfinddata32_t
{
unsigned
int
attrib
;
MSVCRT_
__time32_t
time_create
;
MSVCRT_
__time32_t
time_access
;
MSVCRT_
__time32_t
time_write
;
_fsize_t
size
;
wchar_t
name
[
260
];
unsigned
int
attrib
;
__time32_t
time_create
;
__time32_t
time_access
;
__time32_t
time_write
;
_fsize_t
size
;
wchar_t
name
[
260
];
};
struct
MSVCRT__wfinddata32i64_t
{
unsigned
int
attrib
;
MSVCRT_
__time32_t
time_create
;
MSVCRT_
__time32_t
time_access
;
MSVCRT_
__time32_t
time_write
;
unsigned
int
attrib
;
__time32_t
time_create
;
__time32_t
time_access
;
__time32_t
time_write
;
__int64
DECLSPEC_ALIGN
(
8
)
size
;
wchar_t
name
[
260
];
wchar_t
name
[
260
];
};
struct
MSVCRT__wfinddata64i32_t
{
unsigned
int
attrib
;
MSVCRT_
__time64_t
time_create
;
MSVCRT_
__time64_t
time_access
;
MSVCRT_
__time64_t
time_write
;
_fsize_t
size
;
wchar_t
name
[
260
];
unsigned
int
attrib
;
__time64_t
time_create
;
__time64_t
time_access
;
__time64_t
time_write
;
_fsize_t
size
;
wchar_t
name
[
260
];
};
struct
MSVCRT__wfinddata64_t
{
unsigned
int
attrib
;
MSVCRT_
__time64_t
time_create
;
MSVCRT_
__time64_t
time_access
;
MSVCRT_
__time64_t
time_write
;
unsigned
int
attrib
;
__time64_t
time_create
;
__time64_t
time_access
;
__time64_t
time_write
;
__int64
DECLSPEC_ALIGN
(
8
)
size
;
wchar_t
name
[
260
];
wchar_t
name
[
260
];
};
struct
MSVCRT___utimbuf32
{
MSVCRT_
__time32_t
actime
;
MSVCRT_
__time32_t
modtime
;
__time32_t
actime
;
__time32_t
modtime
;
};
struct
MSVCRT___utimbuf64
{
MSVCRT_
__time64_t
actime
;
MSVCRT_
__time64_t
modtime
;
__time64_t
actime
;
__time64_t
modtime
;
};
struct
MSVCRT__stat32
{
_dev_t
st_dev
;
_ino_t
st_ino
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_uid
;
short
st_gid
;
_dev_t
st_rdev
;
_off_t
st_size
;
MSVCRT_
__time32_t
st_atime
;
MSVCRT_
__time32_t
st_mtime
;
MSVCRT_
__time32_t
st_ctime
;
_dev_t
st_dev
;
_ino_t
st_ino
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_uid
;
short
st_gid
;
_dev_t
st_rdev
;
_off_t
st_size
;
__time32_t
st_atime
;
__time32_t
st_mtime
;
__time32_t
st_ctime
;
};
struct
MSVCRT__stat32i64
{
_dev_t
st_dev
;
_ino_t
st_ino
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_uid
;
short
st_gid
;
_dev_t
st_rdev
;
_dev_t
st_dev
;
_ino_t
st_ino
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_uid
;
short
st_gid
;
_dev_t
st_rdev
;
__int64
DECLSPEC_ALIGN
(
8
)
st_size
;
MSVCRT_
__time32_t
st_atime
;
MSVCRT_
__time32_t
st_mtime
;
MSVCRT_
__time32_t
st_ctime
;
__time32_t
st_atime
;
__time32_t
st_mtime
;
__time32_t
st_ctime
;
};
struct
MSVCRT__stat64i32
{
_dev_t
st_dev
;
_ino_t
st_ino
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_uid
;
short
st_gid
;
_dev_t
st_rdev
;
_off_t
st_size
;
MSVCRT_
__time64_t
st_atime
;
MSVCRT_
__time64_t
st_mtime
;
MSVCRT_
__time64_t
st_ctime
;
_dev_t
st_dev
;
_ino_t
st_ino
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_uid
;
short
st_gid
;
_dev_t
st_rdev
;
_off_t
st_size
;
__time64_t
st_atime
;
__time64_t
st_mtime
;
__time64_t
st_ctime
;
};
struct
MSVCRT__stat64
{
_dev_t
st_dev
;
_ino_t
st_ino
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_uid
;
short
st_gid
;
_dev_t
st_rdev
;
_dev_t
st_dev
;
_ino_t
st_ino
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_uid
;
short
st_gid
;
_dev_t
st_rdev
;
__int64
DECLSPEC_ALIGN
(
8
)
st_size
;
MSVCRT_
__time64_t
st_atime
;
MSVCRT_
__time64_t
st_mtime
;
MSVCRT_
__time64_t
st_ctime
;
__time64_t
st_atime
;
__time64_t
st_mtime
;
__time64_t
st_ctime
;
};
#ifdef _WIN64
...
...
@@ -566,7 +555,7 @@ struct MSVCRT__stat64 {
#define MSVCRT__stati64 MSVCRT__stat32i64
#endif
#define MSVCRT_WEOF (
MSVCRT_
wint_t)(0xFFFF)
#define MSVCRT_WEOF (wint_t)(0xFFFF)
#define MSVCRT_EOF (-1)
#define MSVCRT_TMP_MAX 0x7fff
#define MSVCRT_TMP_MAX_S 0x7fffffff
...
...
@@ -823,9 +812,9 @@ typedef void (__cdecl *MSVCRT___sighandler_t)(int);
#define MSVCRT__FPE_STACKUNDERFLOW 0x8b
#define MSVCRT__FPE_EXPLICITGEN 0x8c
#define MSVCRT__TRUNCATE ((
MSVCRT_
size_t)-1)
#define MSVCRT__TRUNCATE ((size_t)-1)
#define _MAX__TIME64_T (((
MSVCRT_
__time64_t)0x00000007 << 32) | 0x93406FFF)
#define _MAX__TIME64_T (((__time64_t)0x00000007 << 32) | 0x93406FFF)
/* _set_abort_behavior codes */
#define MSVCRT__WRITE_ABORT_MSG 1
...
...
@@ -837,17 +826,17 @@ typedef void (__cdecl *MSVCRT___sighandler_t)(int);
#define MSVCRT__NLSCMPERROR ((unsigned int)0x7fffffff)
void
__cdecl
MSVCRT_free
(
void
*
);
void
*
__cdecl
MSVCRT_malloc
(
MSVCRT_
size_t
);
void
*
__cdecl
MSVCRT_calloc
(
MSVCRT_size_t
,
MSVCRT_
size_t
);
void
*
__cdecl
MSVCRT_realloc
(
void
*
,
MSVCRT_
size_t
);
void
*
__cdecl
MSVCRT_malloc
(
size_t
);
void
*
__cdecl
MSVCRT_calloc
(
size_t
,
size_t
);
void
*
__cdecl
MSVCRT_realloc
(
void
*
,
size_t
);
int
__cdecl
MSVCRT_atoi
(
const
char
*
str
);
int
__cdecl
MSVCRT_isalpha
(
int
c
);
int
__cdecl
MSVCRT_isdigit
(
int
c
);
int
__cdecl
MSVCRT_isspace
(
int
c
);
int
__cdecl
MSVCRT_iswalpha
(
MSVCRT_
wint_t
);
int
__cdecl
MSVCRT_iswspace
(
MSVCRT_
wint_t
);
int
__cdecl
MSVCRT_iswdigit
(
MSVCRT_
wint_t
);
int
__cdecl
MSVCRT_iswalpha
(
wint_t
);
int
__cdecl
MSVCRT_iswspace
(
wint_t
);
int
__cdecl
MSVCRT_iswdigit
(
wint_t
);
int
__cdecl
MSVCRT_isleadbyte
(
int
);
int
__cdecl
MSVCRT__isleadbyte_l
(
int
,
_locale_t
);
int
__cdecl
MSVCRT__isspace_l
(
int
,
_locale_t
);
...
...
@@ -860,37 +849,37 @@ int __cdecl MSVCRT__fgetc_nolock(MSVCRT_FILE*);
int
__cdecl
MSVCRT__fputc_nolock
(
int
,
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT_ungetc
(
int
,
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT__ungetc_nolock
(
int
,
MSVCRT_FILE
*
);
MSVCRT_
wint_t
__cdecl
MSVCRT_fgetwc
(
MSVCRT_FILE
*
);
MSVCRT_
wint_t
__cdecl
MSVCRT__fgetwc_nolock
(
MSVCRT_FILE
*
);
MSVCRT_wint_t
__cdecl
MSVCRT__fputwc_nolock
(
MSVCRT_
wint_t
,
MSVCRT_FILE
*
);
MSVCRT_wint_t
__cdecl
MSVCRT_ungetwc
(
MSVCRT_
wint_t
,
MSVCRT_FILE
*
);
MSVCRT_wint_t
__cdecl
MSVCRT__ungetwc_nolock
(
MSVCRT_
wint_t
,
MSVCRT_FILE
*
);
wint_t
__cdecl
MSVCRT_fgetwc
(
MSVCRT_FILE
*
);
wint_t
__cdecl
MSVCRT__fgetwc_nolock
(
MSVCRT_FILE
*
);
wint_t
__cdecl
MSVCRT__fputwc_nolock
(
wint_t
,
MSVCRT_FILE
*
);
wint_t
__cdecl
MSVCRT_ungetwc
(
wint_t
,
MSVCRT_FILE
*
);
wint_t
__cdecl
MSVCRT__ungetwc_nolock
(
wint_t
,
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT__fseeki64_nolock
(
MSVCRT_FILE
*
,
__int64
,
int
);
__int64
__cdecl
MSVCRT__ftelli64
(
MSVCRT_FILE
*
file
);
__int64
__cdecl
MSVCRT__ftelli64_nolock
(
MSVCRT_FILE
*
);
void
__cdecl
MSVCRT__exit
(
int
);
void
__cdecl
MSVCRT_abort
(
void
);
MSVCRT
_ulong
*
__cdecl
MSVCRT___doserrno
(
void
);
__msvcrt
_ulong
*
__cdecl
MSVCRT___doserrno
(
void
);
int
*
__cdecl
MSVCRT__errno
(
void
);
char
*
__cdecl
MSVCRT_getenv
(
const
char
*
);
MSVCRT_size_t
__cdecl
MSVCRT__fread_nolock
(
void
*
,
MSVCRT_size_t
,
MSVCRT_
size_t
,
MSVCRT_FILE
*
);
MSVCRT_size_t
__cdecl
MSVCRT__fread_nolock_s
(
void
*
,
MSVCRT_size_t
,
MSVCRT_size_t
,
MSVCRT_
size_t
,
MSVCRT_FILE
*
);
MSVCRT_size_t
__cdecl
MSVCRT__fwrite_nolock
(
const
void
*
,
MSVCRT_size_t
,
MSVCRT_
size_t
,
MSVCRT_FILE
*
);
size_t
__cdecl
MSVCRT__fread_nolock
(
void
*
,
size_t
,
size_t
,
MSVCRT_FILE
*
);
size_t
__cdecl
MSVCRT__fread_nolock_s
(
void
*
,
size_t
,
size_t
,
size_t
,
MSVCRT_FILE
*
);
size_t
__cdecl
MSVCRT__fwrite_nolock
(
const
void
*
,
size_t
,
size_t
,
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT_fclose
(
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT__fclose_nolock
(
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT__fflush_nolock
(
MSVCRT_FILE
*
);
void
__cdecl
MSVCRT_terminate
(
void
);
MSVCRT_FILE
*
__cdecl
MSVCRT__iob_func
(
void
);
MSVCRT___time32_t
__cdecl
MSVCRT__time32
(
MSVCRT_
__time32_t
*
);
MSVCRT___time64_t
__cdecl
MSVCRT__time64
(
MSVCRT_
__time64_t
*
);
__time32_t
__cdecl
MSVCRT__time32
(
__time32_t
*
);
__time64_t
__cdecl
MSVCRT__time64
(
__time64_t
*
);
MSVCRT_FILE
*
__cdecl
MSVCRT__fdopen
(
int
,
const
char
*
);
MSVCRT_FILE
*
__cdecl
MSVCRT__wfdopen
(
int
,
const
wchar_t
*
);
int
WINAPIV
MSVCRT_fwprintf
(
MSVCRT_FILE
*
file
,
const
wchar_t
*
format
,
...);
int
__cdecl
MSVCRT_vsnwprintf
(
wchar_t
*
str
,
MSVCRT_
size_t
len
,
int
__cdecl
MSVCRT_vsnwprintf
(
wchar_t
*
str
,
size_t
len
,
const
wchar_t
*
format
,
__ms_va_list
valist
);
int
WINAPIV
MSVCRT__snwprintf
(
wchar_t
*
,
MSVCRT_
size_t
,
const
wchar_t
*
,
...);
int
WINAPIV
MSVCRT__snwprintf
(
wchar_t
*
,
size_t
,
const
wchar_t
*
,
...);
int
WINAPIV
MSVCRT_sprintf
(
char
*
,
const
char
*
,...);
int
WINAPIV
MSVCRT__snprintf
(
char
*
,
MSVCRT_
size_t
,
const
char
*
,...);
int
WINAPIV
MSVCRT__snprintf
(
char
*
,
size_t
,
const
char
*
,...);
int
WINAPIV
MSVCRT__scprintf
(
const
char
*
,...);
int
__cdecl
MSVCRT_raise
(
int
sig
);
int
__cdecl
MSVCRT__set_printf_count_output
(
int
);
...
...
@@ -913,22 +902,22 @@ int __cdecl _ismbblead(unsigned int);
int
__cdecl
_ismbblead_l
(
unsigned
int
,
_locale_t
);
int
__cdecl
_ismbclegal
(
unsigned
int
c
);
int
__cdecl
_ismbstrail
(
const
unsigned
char
*
start
,
const
unsigned
char
*
str
);
int
__cdecl
MSVCRT_mbtowc
(
wchar_t
*
,
const
char
*
,
MSVCRT_
size_t
);
int
__cdecl
MSVCRT_mbtowc_l
(
wchar_t
*
,
const
char
*
,
MSVCRT_
size_t
,
_locale_t
);
MSVCRT_size_t
__cdecl
MSVCRT_mbstowcs
(
wchar_t
*
,
const
char
*
,
MSVCRT_
size_t
);
MSVCRT_size_t
__cdecl
MSVCRT__mbstowcs_l
(
wchar_t
*
,
const
char
*
,
MSVCRT_
size_t
,
_locale_t
);
int
__cdecl
MSVCRT__mbstowcs_s_l
(
MSVCRT_
size_t
*
,
wchar_t
*
,
MSVCRT_size_t
,
const
char
*
,
MSVCRT_
size_t
,
_locale_t
);
MSVCRT_size_t
__cdecl
MSVCRT_wcstombs
(
char
*
,
const
wchar_t
*
,
MSVCRT_
size_t
);
MSVCRT_size_t
__cdecl
MSVCRT__wcstombs_l
(
char
*
,
const
wchar_t
*
,
MSVCRT_
size_t
,
_locale_t
);
MSVCRT_
intptr_t
__cdecl
MSVCRT__spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
MSVCRT_
intptr_t
__cdecl
MSVRT__spawnvpe
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
MSVCRT_
intptr_t
__cdecl
MSVCRT__wspawnve
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
MSVCRT_
intptr_t
__cdecl
MSVCRT__wspawnvpe
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
int
__cdecl
MSVCRT_mbtowc
(
wchar_t
*
,
const
char
*
,
size_t
);
int
__cdecl
MSVCRT_mbtowc_l
(
wchar_t
*
,
const
char
*
,
size_t
,
_locale_t
);
size_t
__cdecl
MSVCRT_mbstowcs
(
wchar_t
*
,
const
char
*
,
size_t
);
size_t
__cdecl
MSVCRT__mbstowcs_l
(
wchar_t
*
,
const
char
*
,
size_t
,
_locale_t
);
int
__cdecl
MSVCRT__mbstowcs_s_l
(
size_t
*
,
wchar_t
*
,
size_t
,
const
char
*
,
size_t
,
_locale_t
);
size_t
__cdecl
MSVCRT_wcstombs
(
char
*
,
const
wchar_t
*
,
size_t
);
size_t
__cdecl
MSVCRT__wcstombs_l
(
char
*
,
const
wchar_t
*
,
size_t
,
_locale_t
);
intptr_t
__cdecl
MSVCRT__spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
intptr_t
__cdecl
MSVRT__spawnvpe
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
intptr_t
__cdecl
MSVCRT__wspawnve
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
intptr_t
__cdecl
MSVCRT__wspawnvpe
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
void
__cdecl
MSVCRT__searchenv
(
const
char
*
,
const
char
*
,
char
*
);
int
__cdecl
MSVCRT__getdrive
(
void
);
char
*
__cdecl
MSVCRT__strdup
(
const
char
*
);
char
*
__cdecl
MSVCRT__strnset
(
char
*
,
int
,
MSVCRT_
size_t
);
char
*
__cdecl
MSVCRT__strnset
(
char
*
,
int
,
size_t
);
char
*
__cdecl
_strset
(
char
*
,
int
);
int
__cdecl
_ungetch
(
int
);
int
__cdecl
_cputs
(
const
char
*
);
...
...
@@ -939,8 +928,8 @@ char*** __cdecl MSVCRT___p__environ(void);
int
*
__cdecl
__p___mb_cur_max
(
void
);
int
*
__cdecl
MSVCRT___p__fmode
(
void
);
wchar_t
*
__cdecl
MSVCRT__wcsdup
(
const
wchar_t
*
);
MSVCRT_size_t
__cdecl
MSVCRT_strnlen
(
const
char
*
,
MSVCRT_
size_t
);
MSVCRT_size_t
__cdecl
MSVCRT_wcsnlen
(
const
wchar_t
*
,
MSVCRT_
size_t
);
size_t
__cdecl
MSVCRT_strnlen
(
const
char
*
,
size_t
);
size_t
__cdecl
MSVCRT_wcsnlen
(
const
wchar_t
*
,
size_t
);
wchar_t
***
__cdecl
MSVCRT___p__wenviron
(
void
);
INT
__cdecl
MSVCRT_wctomb
(
char
*
,
wchar_t
);
int
__cdecl
MSVCRT__wctomb_l
(
char
*
,
wchar_t
,
_locale_t
);
...
...
@@ -953,31 +942,31 @@ int __cdecl MSVCRT__dup2(int, int);
int
__cdecl
MSVCRT__pipe
(
int
*
,
unsigned
int
,
int
);
wchar_t
*
__cdecl
MSVCRT__wgetenv
(
const
wchar_t
*
);
void
__cdecl
MSVCRT__wsearchenv
(
const
wchar_t
*
,
const
wchar_t
*
,
wchar_t
*
);
MSVCRT_
intptr_t
__cdecl
MSVCRT__spawnvpe
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
intptr_t
__cdecl
MSVCRT__spawnvpe
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
void
__cdecl
MSVCRT__invalid_parameter
(
const
wchar_t
*
expr
,
const
wchar_t
*
func
,
const
wchar_t
*
file
,
unsigned
int
line
,
uintptr_t
arg
);
int
__cdecl
MSVCRT__toupper_l
(
int
,
_locale_t
);
int
__cdecl
MSVCRT__tolower_l
(
int
,
_locale_t
);
int
__cdecl
MSVCRT__towupper_l
(
MSVCRT_
wint_t
,
_locale_t
);
int
__cdecl
MSVCRT__towlower_l
(
MSVCRT_
wint_t
,
_locale_t
);
int
__cdecl
MSVCRT__towupper_l
(
wint_t
,
_locale_t
);
int
__cdecl
MSVCRT__towlower_l
(
wint_t
,
_locale_t
);
int
__cdecl
MSVCRT__toupper
(
int
);
/* only use on lower-case ASCII characters */
int
__cdecl
MSVCRT__stricmp
(
const
char
*
,
const
char
*
);
int
__cdecl
MSVCRT__strnicmp
(
const
char
*
,
const
char
*
,
MSVCRT_
size_t
);
int
__cdecl
MSVCRT__strnicoll_l
(
const
char
*
,
const
char
*
,
MSVCRT_
size_t
,
_locale_t
);
int
__cdecl
MSVCRT__strncoll_l
(
const
char
*
,
const
char
*
,
MSVCRT_
size_t
,
_locale_t
);
char
*
__cdecl
MSVCRT_strncat
(
char
*
,
const
char
*
,
MSVCRT_
size_t
);
int
__cdecl
MSVCRT_strncmp
(
const
char
*
,
const
char
*
,
MSVCRT_
size_t
);
int
__cdecl
MSVCRT__strnicmp
(
const
char
*
,
const
char
*
,
size_t
);
int
__cdecl
MSVCRT__strnicoll_l
(
const
char
*
,
const
char
*
,
size_t
,
_locale_t
);
int
__cdecl
MSVCRT__strncoll_l
(
const
char
*
,
const
char
*
,
size_t
,
_locale_t
);
char
*
__cdecl
MSVCRT_strncat
(
char
*
,
const
char
*
,
size_t
);
int
__cdecl
MSVCRT_strncmp
(
const
char
*
,
const
char
*
,
size_t
);
int
__cdecl
MSVCRT_strcmp
(
const
char
*
,
const
char
*
);
char
*
__cdecl
MSVCRT_strrchr
(
const
char
*
,
int
);
char
*
__cdecl
MSVCRT_strstr
(
const
char
*
,
const
char
*
);
MSVCRT
_long
__cdecl
MSVCRT_strtol
(
const
char
*
,
char
**
,
int
);
__msvcrt
_long
__cdecl
MSVCRT_strtol
(
const
char
*
,
char
**
,
int
);
unsigned
int
__cdecl
MSVCRT__get_output_format
(
void
);
char
*
__cdecl
MSVCRT_strtok_s
(
char
*
,
const
char
*
,
char
**
);
char
*
__cdecl
MSVCRT__itoa
(
int
,
char
*
,
int
);
int
__cdecl
MSVCRT_wcsncmp
(
const
wchar_t
*
,
const
wchar_t
*
,
MSVCRT_
size_t
);
int
__cdecl
MSVCRT__wcsnicmp
(
const
wchar_t
*
,
const
wchar_t
*
,
MSVCRT_
size_t
);
int
__cdecl
MSVCRT_towlower
(
MSVCRT_
wint_t
);
int
__cdecl
MSVCRT_towupper
(
MSVCRT_
wint_t
);
int
__cdecl
MSVCRT_wcsncmp
(
const
wchar_t
*
,
const
wchar_t
*
,
size_t
);
int
__cdecl
MSVCRT__wcsnicmp
(
const
wchar_t
*
,
const
wchar_t
*
,
size_t
);
int
__cdecl
MSVCRT_towlower
(
wint_t
);
int
__cdecl
MSVCRT_towupper
(
wint_t
);
int
__cdecl
MSVCRT__isprint_l
(
int
c
,
_locale_t
locale
);
int
__cdecl
MSVCRT__iswalnum_l
(
wchar_t
,
_locale_t
);
int
__cdecl
MSVCRT__iswdigit_l
(
wchar_t
,
_locale_t
);
...
...
@@ -987,7 +976,7 @@ int __cdecl MSVCRT__iswlower_l(wchar_t, _locale_t);
int
__cdecl
MSVCRT__iswupper_l
(
wchar_t
,
_locale_t
);
int
__cdecl
MSVCRT__iswprint_l
(
wchar_t
,
_locale_t
);
int
__cdecl
MSVCRT__iswpunct_l
(
wchar_t
,
_locale_t
);
MSVCRT_
size_t
__cdecl
MSVCRT_wcslen
(
const
wchar_t
*
);
size_t
__cdecl
MSVCRT_wcslen
(
const
wchar_t
*
);
wchar_t
*
__cdecl
MSVCRT_wcscpy
(
wchar_t
*
,
const
wchar_t
*
);
wchar_t
*
__cdecl
MSVCRT_wcschr
(
const
wchar_t
*
,
wchar_t
);
wchar_t
*
__cdecl
MSVCRT_wcscat
(
wchar_t
*
,
const
wchar_t
*
);
...
...
dlls/msvcrt/printf.h
View file @
fa272ada
...
...
@@ -29,7 +29,7 @@
#endif
struct
FUNC_NAME
(
_str_ctx
)
{
MSVCRT_
size_t
len
;
size_t
len
;
APICHAR
*
buf
;
};
...
...
dlls/msvcrt/process.c
View file @
fa272ada
...
...
@@ -127,7 +127,7 @@ static void msvcrt_search_executable(const wchar_t *name, wchar_t *fullname, int
}
while
(
1
);
}
static
MSVCRT_
intptr_t
msvcrt_spawn
(
int
flags
,
const
wchar_t
*
exe
,
wchar_t
*
cmdline
,
static
intptr_t
msvcrt_spawn
(
int
flags
,
const
wchar_t
*
exe
,
wchar_t
*
cmdline
,
wchar_t
*
env
,
int
use_path
)
{
STARTUPINFOW
si
;
...
...
@@ -173,7 +173,7 @@ static MSVCRT_intptr_t msvcrt_spawn(int flags, const wchar_t* exe, wchar_t* cmdl
case
MSVCRT__P_NOWAIT
:
case
MSVCRT__P_NOWAITO
:
CloseHandle
(
pi
.
hThread
);
return
(
MSVCRT_
intptr_t
)
pi
.
hProcess
;
return
(
intptr_t
)
pi
.
hProcess
;
case
MSVCRT__P_OVERLAY
:
MSVCRT__exit
(
0
);
}
...
...
@@ -353,7 +353,7 @@ static wchar_t *msvcrt_get_comspec(void)
/*********************************************************************
* _cwait (MSVCRT.@)
*/
MSVCRT_intptr_t
CDECL
_cwait
(
int
*
status
,
MSVCRT_
intptr_t
pid
,
int
action
)
intptr_t
CDECL
_cwait
(
int
*
status
,
intptr_t
pid
,
int
action
)
{
HANDLE
hPid
=
(
HANDLE
)
pid
;
int
doserrno
;
...
...
@@ -386,11 +386,11 @@ MSVCRT_intptr_t CDECL _cwait(int *status, MSVCRT_intptr_t pid, int action)
*
* Unicode version of _execl
*/
MSVCRT_
intptr_t
WINAPIV
_wexecl
(
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
intptr_t
WINAPIV
_wexecl
(
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
args
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
__ms_va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -408,11 +408,11 @@ MSVCRT_intptr_t WINAPIV _wexecl(const wchar_t* name, const wchar_t* arg0, ...)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
WINAPIV
_execl
(
const
char
*
name
,
const
char
*
arg0
,
...)
intptr_t
WINAPIV
_execl
(
const
char
*
name
,
const
char
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
nameW
,
*
args
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
if
(
!
(
nameW
=
msvcrt_wstrdupa
(
name
)))
return
-
1
;
...
...
@@ -432,12 +432,12 @@ MSVCRT_intptr_t WINAPIV _execl(const char* name, const char* arg0, ...)
*
* Unicode version of _execle
*/
MSVCRT_
intptr_t
WINAPIV
_wexecle
(
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
intptr_t
WINAPIV
_wexecle
(
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
args
,
*
envs
=
NULL
;
const
wchar_t
*
const
*
envp
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
__ms_va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -459,12 +459,12 @@ MSVCRT_intptr_t WINAPIV _wexecle(const wchar_t* name, const wchar_t* arg0, ...)
/*********************************************************************
* _execle (MSVCRT.@)
*/
MSVCRT_
intptr_t
WINAPIV
_execle
(
const
char
*
name
,
const
char
*
arg0
,
...)
intptr_t
WINAPIV
_execle
(
const
char
*
name
,
const
char
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
nameW
,
*
args
,
*
envs
=
NULL
;
const
char
*
const
*
envp
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
if
(
!
(
nameW
=
msvcrt_wstrdupa
(
name
)))
return
-
1
;
...
...
@@ -491,11 +491,11 @@ MSVCRT_intptr_t WINAPIV _execle(const char* name, const char* arg0, ...)
*
* Unicode version of _execlp
*/
MSVCRT_
intptr_t
WINAPIV
_wexeclp
(
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
intptr_t
WINAPIV
_wexeclp
(
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
args
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
__ms_va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -513,11 +513,11 @@ MSVCRT_intptr_t WINAPIV _wexeclp(const wchar_t* name, const wchar_t* arg0, ...)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
WINAPIV
_execlp
(
const
char
*
name
,
const
char
*
arg0
,
...)
intptr_t
WINAPIV
_execlp
(
const
char
*
name
,
const
char
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
nameW
,
*
args
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
if
(
!
(
nameW
=
msvcrt_wstrdupa
(
name
)))
return
-
1
;
...
...
@@ -537,12 +537,12 @@ MSVCRT_intptr_t WINAPIV _execlp(const char* name, const char* arg0, ...)
*
* Unicode version of _execlpe
*/
MSVCRT_
intptr_t
WINAPIV
_wexeclpe
(
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
intptr_t
WINAPIV
_wexeclpe
(
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
args
,
*
envs
=
NULL
;
const
wchar_t
*
const
*
envp
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
__ms_va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -564,12 +564,12 @@ MSVCRT_intptr_t WINAPIV _wexeclpe(const wchar_t* name, const wchar_t* arg0, ...)
/*********************************************************************
* _execlpe (MSVCRT.@)
*/
MSVCRT_
intptr_t
WINAPIV
_execlpe
(
const
char
*
name
,
const
char
*
arg0
,
...)
intptr_t
WINAPIV
_execlpe
(
const
char
*
name
,
const
char
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
nameW
,
*
args
,
*
envs
=
NULL
;
const
char
*
const
*
envp
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
if
(
!
(
nameW
=
msvcrt_wstrdupa
(
name
)))
return
-
1
;
...
...
@@ -596,7 +596,7 @@ MSVCRT_intptr_t WINAPIV _execlpe(const char* name, const char* arg0, ...)
*
* Unicode version of _execv
*/
MSVCRT_
intptr_t
CDECL
_wexecv
(
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
)
intptr_t
CDECL
_wexecv
(
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
)
{
return
MSVCRT__wspawnve
(
MSVCRT__P_OVERLAY
,
name
,
argv
,
NULL
);
}
...
...
@@ -607,7 +607,7 @@ MSVCRT_intptr_t CDECL _wexecv(const wchar_t* name, const wchar_t* const* argv)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
CDECL
_execv
(
const
char
*
name
,
const
char
*
const
*
argv
)
intptr_t
CDECL
_execv
(
const
char
*
name
,
const
char
*
const
*
argv
)
{
return
MSVCRT__spawnve
(
MSVCRT__P_OVERLAY
,
name
,
argv
,
NULL
);
}
...
...
@@ -617,7 +617,7 @@ MSVCRT_intptr_t CDECL _execv(const char* name, const char* const* argv)
*
* Unicode version of _execve
*/
MSVCRT_
intptr_t
CDECL
_wexecve
(
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
,
const
wchar_t
*
const
*
envv
)
intptr_t
CDECL
_wexecve
(
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
,
const
wchar_t
*
const
*
envv
)
{
return
MSVCRT__wspawnve
(
MSVCRT__P_OVERLAY
,
name
,
argv
,
envv
);
}
...
...
@@ -628,7 +628,7 @@ MSVCRT_intptr_t CDECL _wexecve(const wchar_t* name, const wchar_t* const* argv,
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__execve
(
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
intptr_t
CDECL
MSVCRT__execve
(
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
MSVCRT__spawnve
(
MSVCRT__P_OVERLAY
,
name
,
argv
,
envv
);
}
...
...
@@ -638,7 +638,7 @@ MSVCRT_intptr_t CDECL MSVCRT__execve(const char* name, const char* const* argv,
*
* Unicode version of _execvpe
*/
MSVCRT_
intptr_t
CDECL
_wexecvpe
(
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
,
const
wchar_t
*
const
*
envv
)
intptr_t
CDECL
_wexecvpe
(
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
,
const
wchar_t
*
const
*
envv
)
{
return
MSVCRT__wspawnvpe
(
MSVCRT__P_OVERLAY
,
name
,
argv
,
envv
);
}
...
...
@@ -649,7 +649,7 @@ MSVCRT_intptr_t CDECL _wexecvpe(const wchar_t* name, const wchar_t* const* argv,
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
CDECL
_execvpe
(
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
intptr_t
CDECL
_execvpe
(
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
MSVCRT__spawnvpe
(
MSVCRT__P_OVERLAY
,
name
,
argv
,
envv
);
}
...
...
@@ -659,7 +659,7 @@ MSVCRT_intptr_t CDECL _execvpe(const char* name, const char* const* argv, const
*
* Unicode version of _execvp
*/
MSVCRT_
intptr_t
CDECL
_wexecvp
(
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
)
intptr_t
CDECL
_wexecvp
(
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
)
{
return
_wexecvpe
(
name
,
argv
,
NULL
);
}
...
...
@@ -670,7 +670,7 @@ MSVCRT_intptr_t CDECL _wexecvp(const wchar_t* name, const wchar_t* const* argv)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
CDECL
_execvp
(
const
char
*
name
,
const
char
*
const
*
argv
)
intptr_t
CDECL
_execvp
(
const
char
*
name
,
const
char
*
const
*
argv
)
{
return
_execvpe
(
name
,
argv
,
NULL
);
}
...
...
@@ -680,11 +680,11 @@ MSVCRT_intptr_t CDECL _execvp(const char* name, const char* const* argv)
*
* Unicode version of _spawnl
*/
MSVCRT_
intptr_t
WINAPIV
MSVCRT__wspawnl
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
intptr_t
WINAPIV
MSVCRT__wspawnl
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
args
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
__ms_va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -702,11 +702,11 @@ MSVCRT_intptr_t WINAPIV MSVCRT__wspawnl(int flags, const wchar_t* name, const wc
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
WINAPIV
MSVCRT__spawnl
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
intptr_t
WINAPIV
MSVCRT__spawnl
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
nameW
,
*
args
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
if
(
!
(
nameW
=
msvcrt_wstrdupa
(
name
)))
return
-
1
;
...
...
@@ -726,12 +726,12 @@ MSVCRT_intptr_t WINAPIV MSVCRT__spawnl(int flags, const char* name, const char*
*
* Unicode version of _spawnle
*/
MSVCRT_
intptr_t
WINAPIV
MSVCRT__wspawnle
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
intptr_t
WINAPIV
MSVCRT__wspawnle
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
args
,
*
envs
=
NULL
;
const
wchar_t
*
const
*
envp
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
__ms_va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -753,12 +753,12 @@ MSVCRT_intptr_t WINAPIV MSVCRT__wspawnle(int flags, const wchar_t* name, const w
/*********************************************************************
* _spawnle (MSVCRT.@)
*/
MSVCRT_
intptr_t
WINAPIV
MSVCRT__spawnle
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
intptr_t
WINAPIV
MSVCRT__spawnle
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
nameW
,
*
args
,
*
envs
=
NULL
;
const
char
*
const
*
envp
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
if
(
!
(
nameW
=
msvcrt_wstrdupa
(
name
)))
return
-
1
;
...
...
@@ -785,11 +785,11 @@ MSVCRT_intptr_t WINAPIV MSVCRT__spawnle(int flags, const char* name, const char*
*
* Unicode version of _spawnlp
*/
MSVCRT_
intptr_t
WINAPIV
MSVCRT__wspawnlp
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
intptr_t
WINAPIV
MSVCRT__wspawnlp
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
args
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
__ms_va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -807,11 +807,11 @@ MSVCRT_intptr_t WINAPIV MSVCRT__wspawnlp(int flags, const wchar_t* name, const w
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
WINAPIV
MSVCRT__spawnlp
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
intptr_t
WINAPIV
MSVCRT__spawnlp
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
nameW
,
*
args
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
if
(
!
(
nameW
=
msvcrt_wstrdupa
(
name
)))
return
-
1
;
...
...
@@ -831,12 +831,12 @@ MSVCRT_intptr_t WINAPIV MSVCRT__spawnlp(int flags, const char* name, const char*
*
* Unicode version of _spawnlpe
*/
MSVCRT_
intptr_t
WINAPIV
MSVCRT__wspawnlpe
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
intptr_t
WINAPIV
MSVCRT__wspawnlpe
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
args
,
*
envs
=
NULL
;
const
wchar_t
*
const
*
envp
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
__ms_va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -858,12 +858,12 @@ MSVCRT_intptr_t WINAPIV MSVCRT__wspawnlpe(int flags, const wchar_t* name, const
/*********************************************************************
* _spawnlpe (MSVCRT.@)
*/
MSVCRT_
intptr_t
WINAPIV
MSVCRT__spawnlpe
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
intptr_t
WINAPIV
MSVCRT__spawnlpe
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
{
__ms_va_list
ap
;
wchar_t
*
nameW
,
*
args
,
*
envs
=
NULL
;
const
char
*
const
*
envp
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
if
(
!
(
nameW
=
msvcrt_wstrdupa
(
name
)))
return
-
1
;
...
...
@@ -891,11 +891,11 @@ MSVCRT_intptr_t WINAPIV MSVCRT__spawnlpe(int flags, const char* name, const char
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__spawnve
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
intptr_t
CDECL
MSVCRT__spawnve
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
wchar_t
*
nameW
,
*
args
,
*
envs
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
if
(
!
(
nameW
=
msvcrt_wstrdupa
(
name
)))
return
-
1
;
...
...
@@ -915,11 +915,11 @@ MSVCRT_intptr_t CDECL MSVCRT__spawnve(int flags, const char* name, const char* c
*
* Unicode version of _spawnve
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__wspawnve
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
,
intptr_t
CDECL
MSVCRT__wspawnve
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
,
const
wchar_t
*
const
*
envv
)
{
wchar_t
*
args
,
*
envs
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
args
=
msvcrt_argvtos
(
argv
,
' '
);
envs
=
msvcrt_argvtos
(
envv
,
0
);
...
...
@@ -937,7 +937,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wspawnve(int flags, const wchar_t* name, const wch
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__spawnv
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
intptr_t
CDECL
MSVCRT__spawnv
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
{
return
MSVCRT__spawnve
(
flags
,
name
,
argv
,
NULL
);
}
...
...
@@ -947,7 +947,7 @@ MSVCRT_intptr_t CDECL MSVCRT__spawnv(int flags, const char* name, const char* co
*
* Unicode version of _spawnv
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__wspawnv
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
)
intptr_t
CDECL
MSVCRT__wspawnv
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
)
{
return
MSVCRT__wspawnve
(
flags
,
name
,
argv
,
NULL
);
}
...
...
@@ -958,11 +958,11 @@ MSVCRT_intptr_t CDECL MSVCRT__wspawnv(int flags, const wchar_t* name, const wcha
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__spawnvpe
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
intptr_t
CDECL
MSVCRT__spawnvpe
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
wchar_t
*
nameW
,
*
args
,
*
envs
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
if
(
!
(
nameW
=
msvcrt_wstrdupa
(
name
)))
return
-
1
;
...
...
@@ -982,11 +982,11 @@ MSVCRT_intptr_t CDECL MSVCRT__spawnvpe(int flags, const char* name, const char*
*
* Unicode version of _spawnvpe
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__wspawnvpe
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
,
intptr_t
CDECL
MSVCRT__wspawnvpe
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
,
const
wchar_t
*
const
*
envv
)
{
wchar_t
*
args
,
*
envs
;
MSVCRT_
intptr_t
ret
;
intptr_t
ret
;
args
=
msvcrt_argvtos
(
argv
,
' '
);
envs
=
msvcrt_argvtos
(
envv
,
0
);
...
...
@@ -1004,7 +1004,7 @@ MSVCRT_intptr_t CDECL MSVCRT__wspawnvpe(int flags, const wchar_t* name, const wc
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__spawnvp
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
intptr_t
CDECL
MSVCRT__spawnvp
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
{
return
MSVCRT__spawnvpe
(
flags
,
name
,
argv
,
NULL
);
}
...
...
@@ -1014,7 +1014,7 @@ MSVCRT_intptr_t CDECL MSVCRT__spawnvp(int flags, const char* name, const char* c
*
* Unicode version of _spawnvp
*/
MSVCRT_
intptr_t
CDECL
MSVCRT__wspawnvp
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
)
intptr_t
CDECL
MSVCRT__wspawnvp
(
int
flags
,
const
wchar_t
*
name
,
const
wchar_t
*
const
*
argv
)
{
return
MSVCRT__wspawnvpe
(
flags
,
name
,
argv
,
NULL
);
}
...
...
@@ -1278,15 +1278,15 @@ int CDECL MSVCRT_system(const char* cmd)
/*********************************************************************
* _loaddll (MSVCRT.@)
*/
MSVCRT_
intptr_t
CDECL
_loaddll
(
const
char
*
dllname
)
intptr_t
CDECL
_loaddll
(
const
char
*
dllname
)
{
return
(
MSVCRT_
intptr_t
)
LoadLibraryA
(
dllname
);
return
(
intptr_t
)
LoadLibraryA
(
dllname
);
}
/*********************************************************************
* _unloaddll (MSVCRT.@)
*/
int
CDECL
_unloaddll
(
MSVCRT_
intptr_t
dll
)
int
CDECL
_unloaddll
(
intptr_t
dll
)
{
if
(
FreeLibrary
((
HMODULE
)
dll
))
return
0
;
...
...
@@ -1301,7 +1301,7 @@ int CDECL _unloaddll(MSVCRT_intptr_t dll)
/*********************************************************************
* _getdllprocaddr (MSVCRT.@)
*/
void
*
CDECL
_getdllprocaddr
(
MSVCRT_
intptr_t
dll
,
const
char
*
name
,
int
ordinal
)
void
*
CDECL
_getdllprocaddr
(
intptr_t
dll
,
const
char
*
name
,
int
ordinal
)
{
if
(
name
)
{
...
...
dlls/msvcrt/scanf.c
View file @
fa272ada
...
...
@@ -604,7 +604,7 @@ int WINAPIV _cwscanf_s_l(const wchar_t *format, _locale_t locale, ...)
/*********************************************************************
* _snscanf (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snscanf
(
char
*
input
,
MSVCRT_
size_t
length
,
const
char
*
format
,
...)
int
WINAPIV
MSVCRT__snscanf
(
char
*
input
,
size_t
length
,
const
char
*
format
,
...)
{
__ms_va_list
valist
;
int
res
;
...
...
@@ -618,7 +618,7 @@ int WINAPIV MSVCRT__snscanf(char *input, MSVCRT_size_t length, const char *forma
/*********************************************************************
* _snscanf_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snscanf_l
(
char
*
input
,
MSVCRT_
size_t
length
,
int
WINAPIV
MSVCRT__snscanf_l
(
char
*
input
,
size_t
length
,
const
char
*
format
,
_locale_t
locale
,
...)
{
__ms_va_list
valist
;
...
...
@@ -633,7 +633,7 @@ int WINAPIV MSVCRT__snscanf_l(char *input, MSVCRT_size_t length,
/*********************************************************************
* _snscanf_s (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snscanf_s
(
char
*
input
,
MSVCRT_
size_t
length
,
const
char
*
format
,
...)
int
WINAPIV
MSVCRT__snscanf_s
(
char
*
input
,
size_t
length
,
const
char
*
format
,
...)
{
__ms_va_list
valist
;
int
res
;
...
...
@@ -647,7 +647,7 @@ int WINAPIV MSVCRT__snscanf_s(char *input, MSVCRT_size_t length, const char *for
/*********************************************************************
* _snscanf_s_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snscanf_s_l
(
char
*
input
,
MSVCRT_
size_t
length
,
int
WINAPIV
MSVCRT__snscanf_s_l
(
char
*
input
,
size_t
length
,
const
char
*
format
,
_locale_t
locale
,
...)
{
__ms_va_list
valist
;
...
...
@@ -664,7 +664,7 @@ int WINAPIV MSVCRT__snscanf_s_l(char *input, MSVCRT_size_t length,
* __stdio_common_vsscanf (UCRTBASE.@)
*/
int
CDECL
MSVCRT__stdio_common_vsscanf
(
unsigned
__int64
options
,
const
char
*
input
,
MSVCRT_
size_t
length
,
const
char
*
input
,
size_t
length
,
const
char
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
...
...
@@ -684,7 +684,7 @@ int CDECL MSVCRT__stdio_common_vsscanf(unsigned __int64 options,
* __stdio_common_vswscanf (UCRTBASE.@)
*/
int
CDECL
MSVCRT__stdio_common_vswscanf
(
unsigned
__int64
options
,
const
wchar_t
*
input
,
MSVCRT_
size_t
length
,
const
wchar_t
*
input
,
size_t
length
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
...
...
@@ -737,7 +737,7 @@ int CDECL MSVCRT__stdio_common_vfwscanf(unsigned __int64 options,
/*********************************************************************
* _snwscanf (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snwscanf
(
wchar_t
*
input
,
MSVCRT_
size_t
length
,
int
WINAPIV
MSVCRT__snwscanf
(
wchar_t
*
input
,
size_t
length
,
const
wchar_t
*
format
,
...)
{
__ms_va_list
valist
;
...
...
@@ -752,7 +752,7 @@ int WINAPIV MSVCRT__snwscanf(wchar_t *input, MSVCRT_size_t length,
/*********************************************************************
* _snwscanf_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snwscanf_l
(
wchar_t
*
input
,
MSVCRT_
size_t
length
,
int
WINAPIV
MSVCRT__snwscanf_l
(
wchar_t
*
input
,
size_t
length
,
const
wchar_t
*
format
,
_locale_t
locale
,
...)
{
__ms_va_list
valist
;
...
...
@@ -767,7 +767,7 @@ int WINAPIV MSVCRT__snwscanf_l(wchar_t *input, MSVCRT_size_t length,
/*********************************************************************
* _snwscanf_s (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snwscanf_s
(
wchar_t
*
input
,
MSVCRT_
size_t
length
,
int
WINAPIV
MSVCRT__snwscanf_s
(
wchar_t
*
input
,
size_t
length
,
const
wchar_t
*
format
,
...)
{
__ms_va_list
valist
;
...
...
@@ -782,7 +782,7 @@ int WINAPIV MSVCRT__snwscanf_s(wchar_t *input, MSVCRT_size_t length,
/*********************************************************************
* _snscanf_s_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snwscanf_s_l
(
wchar_t
*
input
,
MSVCRT_
size_t
length
,
int
WINAPIV
MSVCRT__snwscanf_s_l
(
wchar_t
*
input
,
size_t
length
,
const
wchar_t
*
format
,
_locale_t
locale
,
...)
{
__ms_va_list
valist
;
...
...
dlls/msvcrt/scanf.h
View file @
fa272ada
...
...
@@ -84,15 +84,15 @@
#define _UNLOCK_FILE_(file) do {} while(0)
#ifdef WIDE_SCANF
#ifdef SECURE
#define _FUNCTION_ static int MSVCRT_vsnwscanf_s_l(const wchar_t *file,
MSVCRT_
size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap)
#define _FUNCTION_ static int MSVCRT_vsnwscanf_s_l(const wchar_t *file, size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap)
#else
/* SECURE */
#define _FUNCTION_ static int MSVCRT_vsnwscanf_l(const wchar_t *file,
MSVCRT_
size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap)
#define _FUNCTION_ static int MSVCRT_vsnwscanf_l(const wchar_t *file, size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap)
#endif
/* SECURE */
#else
/* WIDE_SCANF */
#ifdef SECURE
#define _FUNCTION_ static int MSVCRT_vsnscanf_s_l(const char *file,
MSVCRT_
size_t length, const char *format, _locale_t locale, __ms_va_list ap)
#define _FUNCTION_ static int MSVCRT_vsnscanf_s_l(const char *file, size_t length, const char *format, _locale_t locale, __ms_va_list ap)
#else
/* SECURE */
#define _FUNCTION_ static int MSVCRT_vsnscanf_l(const char *file,
MSVCRT_
size_t length, const char *format, _locale_t locale, __ms_va_list ap)
#define _FUNCTION_ static int MSVCRT_vsnscanf_l(const char *file, size_t length, const char *format, _locale_t locale, __ms_va_list ap)
#endif
/* SECURE */
#endif
/* WIDE_SCANF */
#else
/* STRING_LEN */
...
...
dlls/msvcrt/scheduler.c
View file @
fa272ada
...
...
@@ -19,6 +19,7 @@
*/
#include <stdarg.h>
#include <stdbool.h>
#include "windef.h"
#include "winternl.h"
...
...
@@ -115,7 +116,7 @@ typedef struct Scheduler {
#define call_Scheduler_ScheduleTask(this,proc,data) CALL_VTBL_FUNC(this, 44, \
void, (Scheduler*,void (__cdecl*)(void*),void*), (this,proc,data))
#define call_Scheduler_IsAvailableLocation(this,placement) CALL_VTBL_FUNC(this, 48, \
MSVCRT_
bool, (Scheduler*,const
/*location*/
void*), (this,placement))
bool, (Scheduler*,const
/*location*/
void*), (this,placement))
#else
#define call_Scheduler_CreateScheduleGroup(this) CALL_VTBL_FUNC(this, 32,
/*ScheduleGroup*/
void*, (Scheduler*), (this))
#define call_Scheduler_ScheduleTask(this,proc,data) CALL_VTBL_FUNC(this, 36, \
...
...
@@ -252,14 +253,14 @@ void __cdecl Context__SpinYield(void)
}
/* ?IsCurrentTaskCollectionCanceling@Context@Concurrency@@SA_NXZ */
MSVCRT_
bool
__cdecl
Context_IsCurrentTaskCollectionCanceling
(
void
)
bool
__cdecl
Context_IsCurrentTaskCollectionCanceling
(
void
)
{
FIXME
(
"()
\n
"
);
return
FALSE
;
}
/* ?Oversubscribe@Context@Concurrency@@SAX_N@Z */
void
__cdecl
Context_Oversubscribe
(
MSVCRT_
bool
begin
)
void
__cdecl
Context_Oversubscribe
(
bool
begin
)
{
FIXME
(
"(%x)
\n
"
,
begin
);
}
...
...
@@ -318,7 +319,7 @@ void __thiscall ExternalContextBase_Unblock(ExternalContextBase *this)
}
DEFINE_THISCALL_WRAPPER
(
ExternalContextBase_IsSynchronouslyBlocked
,
4
)
MSVCRT_
bool
__thiscall
ExternalContextBase_IsSynchronouslyBlocked
(
const
ExternalContextBase
*
this
)
bool
__thiscall
ExternalContextBase_IsSynchronouslyBlocked
(
const
ExternalContextBase
*
this
)
{
FIXME
(
"(%p)->() stub
\n
"
,
this
);
return
FALSE
;
...
...
@@ -384,7 +385,7 @@ static void ExternalContextBase_ctor(ExternalContextBase *this)
/* ?Alloc@Concurrency@@YAPAXI@Z */
/* ?Alloc@Concurrency@@YAPEAX_K@Z */
void
*
CDECL
Concurrency_Alloc
(
MSVCRT_
size_t
size
)
void
*
CDECL
Concurrency_Alloc
(
size_t
size
)
{
ExternalContextBase
*
context
=
(
ExternalContextBase
*
)
get_current_context
();
union
allocator_cache_entry
*
p
;
...
...
@@ -548,11 +549,11 @@ SchedulerPolicy* __thiscall SchedulerPolicy_ctor(SchedulerPolicy *this)
/* ??0SchedulerPolicy@Concurrency@@QEAA@_KZZ */
/* TODO: don't leak policy_container on exception */
SchedulerPolicy
*
WINAPIV
SchedulerPolicy_ctor_policies
(
SchedulerPolicy
*
this
,
MSVCRT_
size_t
n
,
...)
SchedulerPolicy
*
this
,
size_t
n
,
...)
{
unsigned
int
min_concurrency
,
max_concurrency
;
__ms_va_list
valist
;
MSVCRT_
size_t
i
;
size_t
i
;
TRACE
(
"(%p %Iu)
\n
"
,
this
,
n
);
...
...
@@ -744,7 +745,7 @@ void __thiscall ThreadScheduler_ScheduleTask(ThreadScheduler *this,
}
DEFINE_THISCALL_WRAPPER
(
ThreadScheduler_IsAvailableLocation
,
8
)
MSVCRT_
bool
__thiscall
ThreadScheduler_IsAvailableLocation
(
bool
__thiscall
ThreadScheduler_IsAvailableLocation
(
const
ThreadScheduler
*
this
,
const
/*location*/
void
*
placement
)
{
FIXME
(
"(%p %p) stub
\n
"
,
this
,
placement
);
...
...
@@ -954,7 +955,7 @@ unsigned int __cdecl CurrentScheduler_Id(void)
#if _MSVCR_VER > 100
/* ?IsAvailableLocation@CurrentScheduler@Concurrency@@SA_NABVlocation@2@@Z */
/* ?IsAvailableLocation@CurrentScheduler@Concurrency@@SA_NAEBVlocation@2@@Z */
MSVCRT_
bool
__cdecl
CurrentScheduler_IsAvailableLocation
(
const
/*location*/
void
*
placement
)
bool
__cdecl
CurrentScheduler_IsAvailableLocation
(
const
/*location*/
void
*
placement
)
{
Scheduler
*
scheduler
=
try_get_current_scheduler
();
...
...
dlls/msvcrt/string.c
View file @
fa272ada
...
...
@@ -54,7 +54,7 @@ char* CDECL MSVCRT__strdup(const char* str)
/*********************************************************************
* _strlwr_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__strlwr_s_l
(
char
*
str
,
MSVCRT_
size_t
len
,
_locale_t
locale
)
int
CDECL
MSVCRT__strlwr_s_l
(
char
*
str
,
size_t
len
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
char
*
ptr
=
str
;
...
...
@@ -107,7 +107,7 @@ int CDECL MSVCRT__strlwr_s_l(char *str, MSVCRT_size_t len, _locale_t locale)
/*********************************************************************
* _strlwr_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__strlwr_s
(
char
*
str
,
MSVCRT_
size_t
len
)
int
CDECL
MSVCRT__strlwr_s
(
char
*
str
,
size_t
len
)
{
return
MSVCRT__strlwr_s_l
(
str
,
len
,
NULL
);
}
...
...
@@ -133,7 +133,7 @@ char* CDECL MSVCRT__strlwr(char *str)
/*********************************************************************
* _strupr_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__strupr_s_l
(
char
*
str
,
MSVCRT_
size_t
len
,
_locale_t
locale
)
int
CDECL
MSVCRT__strupr_s_l
(
char
*
str
,
size_t
len
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
char
*
ptr
=
str
;
...
...
@@ -186,7 +186,7 @@ int CDECL MSVCRT__strupr_s_l(char *str, MSVCRT_size_t len, _locale_t locale)
/*********************************************************************
* _strupr_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__strupr_s
(
char
*
str
,
MSVCRT_
size_t
len
)
int
CDECL
MSVCRT__strupr_s
(
char
*
str
,
size_t
len
)
{
return
MSVCRT__strupr_s_l
(
str
,
len
,
NULL
);
}
...
...
@@ -212,9 +212,9 @@ char* CDECL MSVCRT__strupr(char *str)
/*********************************************************************
* _strnset_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__strnset_s
(
char
*
str
,
MSVCRT_size_t
size
,
int
c
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT__strnset_s
(
char
*
str
,
size_t
size
,
int
c
,
size_t
count
)
{
MSVCRT_
size_t
i
;
size_t
i
;
if
(
!
str
&&
!
size
&&
!
count
)
return
0
;
if
(
!
MSVCRT_CHECK_PMT
(
str
!=
NULL
))
return
MSVCRT_EINVAL
;
...
...
@@ -236,7 +236,7 @@ int CDECL MSVCRT__strnset_s(char *str, MSVCRT_size_t size, int c, MSVCRT_size_t
/*********************************************************************
* _strnset (MSVCRT.@)
*/
char
*
CDECL
MSVCRT__strnset
(
char
*
str
,
int
value
,
MSVCRT_
size_t
len
)
char
*
CDECL
MSVCRT__strnset
(
char
*
str
,
int
value
,
size_t
len
)
{
if
(
len
>
0
&&
str
)
while
(
*
str
&&
len
--
)
...
...
@@ -1192,7 +1192,7 @@ int CDECL MSVCRT__stricoll( const char* str1, const char* str2 )
/*********************************************************************
* _strncoll_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__strncoll_l
(
const
char
*
str1
,
const
char
*
str2
,
MSVCRT_
size_t
count
,
_locale_t
locale
)
int
CDECL
MSVCRT__strncoll_l
(
const
char
*
str1
,
const
char
*
str2
,
size_t
count
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
...
...
@@ -1211,7 +1211,7 @@ int CDECL MSVCRT__strncoll_l( const char* str1, const char* str2, MSVCRT_size_t
/*********************************************************************
* _strncoll (MSVCRT.@)
*/
int
CDECL
MSVCRT__strncoll
(
const
char
*
str1
,
const
char
*
str2
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT__strncoll
(
const
char
*
str1
,
const
char
*
str2
,
size_t
count
)
{
return
MSVCRT__strncoll_l
(
str1
,
str2
,
count
,
NULL
);
}
...
...
@@ -1219,7 +1219,7 @@ int CDECL MSVCRT__strncoll( const char* str1, const char* str2, MSVCRT_size_t co
/*********************************************************************
* _strnicoll_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__strnicoll_l
(
const
char
*
str1
,
const
char
*
str2
,
MSVCRT_
size_t
count
,
_locale_t
locale
)
int
CDECL
MSVCRT__strnicoll_l
(
const
char
*
str1
,
const
char
*
str2
,
size_t
count
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
...
...
@@ -1238,7 +1238,7 @@ int CDECL MSVCRT__strnicoll_l( const char* str1, const char* str2, MSVCRT_size_t
/*********************************************************************
* _strnicoll (MSVCRT.@)
*/
int
CDECL
MSVCRT__strnicoll
(
const
char
*
str1
,
const
char
*
str2
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT__strnicoll
(
const
char
*
str1
,
const
char
*
str2
,
size_t
count
)
{
return
MSVCRT__strnicoll_l
(
str1
,
str2
,
count
,
NULL
);
}
...
...
@@ -1246,9 +1246,9 @@ int CDECL MSVCRT__strnicoll( const char* str1, const char* str2, MSVCRT_size_t c
/*********************************************************************
* strncpy (MSVCRT.@)
*/
char
*
__cdecl
MSVCRT_strncpy
(
char
*
dst
,
const
char
*
src
,
MSVCRT_
size_t
len
)
char
*
__cdecl
MSVCRT_strncpy
(
char
*
dst
,
const
char
*
src
,
size_t
len
)
{
MSVCRT_
size_t
i
;
size_t
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
if
((
dst
[
i
]
=
src
[
i
])
==
'\0'
)
break
;
...
...
@@ -1271,9 +1271,9 @@ char* CDECL strcpy(char *dst, const char *src)
/*********************************************************************
* strcpy_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_strcpy_s
(
char
*
dst
,
MSVCRT_
size_t
elem
,
const
char
*
src
)
int
CDECL
MSVCRT_strcpy_s
(
char
*
dst
,
size_t
elem
,
const
char
*
src
)
{
MSVCRT_
size_t
i
;
size_t
i
;
if
(
!
elem
)
return
MSVCRT_EINVAL
;
if
(
!
dst
)
return
MSVCRT_EINVAL
;
if
(
!
src
)
...
...
@@ -1293,9 +1293,9 @@ int CDECL MSVCRT_strcpy_s( char* dst, MSVCRT_size_t elem, const char* src )
/*********************************************************************
* strcat_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_strcat_s
(
char
*
dst
,
MSVCRT_
size_t
elem
,
const
char
*
src
)
int
CDECL
MSVCRT_strcat_s
(
char
*
dst
,
size_t
elem
,
const
char
*
src
)
{
MSVCRT_
size_t
i
,
j
;
size_t
i
,
j
;
if
(
!
dst
)
return
MSVCRT_EINVAL
;
if
(
elem
==
0
)
return
MSVCRT_EINVAL
;
if
(
!
src
)
...
...
@@ -1333,9 +1333,9 @@ char* __cdecl strcat( char *dst, const char *src )
/*********************************************************************
* strncat_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_strncat_s
(
char
*
dst
,
MSVCRT_size_t
elem
,
const
char
*
src
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT_strncat_s
(
char
*
dst
,
size_t
elem
,
const
char
*
src
,
size_t
count
)
{
MSVCRT_
size_t
i
,
j
;
size_t
i
,
j
;
if
(
!
MSVCRT_CHECK_PMT
(
dst
!=
0
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
elem
!=
0
))
return
MSVCRT_EINVAL
;
...
...
@@ -1372,7 +1372,7 @@ int CDECL MSVCRT_strncat_s( char* dst, MSVCRT_size_t elem, const char* src, MSVC
/*********************************************************************
* strncat (MSVCRT.@)
*/
char
*
__cdecl
MSVCRT_strncat
(
char
*
dst
,
const
char
*
src
,
MSVCRT_
size_t
len
)
char
*
__cdecl
MSVCRT_strncat
(
char
*
dst
,
const
char
*
src
,
size_t
len
)
{
char
*
d
=
dst
;
while
(
*
d
)
d
++
;
...
...
@@ -1384,8 +1384,8 @@ char* __cdecl MSVCRT_strncat(char *dst, const char *src, MSVCRT_size_t len)
/*********************************************************************
* _strxfrm_l (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT__strxfrm_l
(
char
*
dest
,
const
char
*
src
,
MSVCRT_
size_t
len
,
_locale_t
locale
)
size_t
CDECL
MSVCRT__strxfrm_l
(
char
*
dest
,
const
char
*
src
,
size_t
len
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
int
ret
;
...
...
@@ -1430,7 +1430,7 @@ MSVCRT_size_t CDECL MSVCRT__strxfrm_l( char *dest, const char *src,
/*********************************************************************
* strxfrm (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_strxfrm
(
char
*
dest
,
const
char
*
src
,
MSVCRT_
size_t
len
)
size_t
CDECL
MSVCRT_strxfrm
(
char
*
dest
,
const
char
*
src
,
size_t
len
)
{
return
MSVCRT__strxfrm_l
(
dest
,
src
,
len
,
NULL
);
}
...
...
@@ -1510,9 +1510,9 @@ size_t __cdecl strlen(const char *str)
/******************************************************************
* strnlen (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_strnlen
(
const
char
*
s
,
MSVCRT_
size_t
maxlen
)
size_t
CDECL
MSVCRT_strnlen
(
const
char
*
s
,
size_t
maxlen
)
{
MSVCRT_
size_t
i
;
size_t
i
;
for
(
i
=
0
;
i
<
maxlen
;
i
++
)
if
(
!
s
[
i
])
break
;
...
...
@@ -1673,7 +1673,7 @@ __int64 CDECL MSVCRT__atoi64(const char *str)
/******************************************************************
* _atol_l (MSVCRT.@)
*/
MSVCRT
_long
CDECL
MSVCRT__atol_l
(
const
char
*
str
,
_locale_t
locale
)
__msvcrt
_long
CDECL
MSVCRT__atol_l
(
const
char
*
str
,
_locale_t
locale
)
{
__int64
ret
=
MSVCRT_strtoi64_l
(
str
,
NULL
,
10
,
locale
);
...
...
@@ -1690,7 +1690,7 @@ MSVCRT_long CDECL MSVCRT__atol_l(const char *str, _locale_t locale)
/******************************************************************
* atol (MSVCRT.@)
*/
MSVCRT
_long
CDECL
MSVCRT_atol
(
const
char
*
str
)
__msvcrt
_long
CDECL
MSVCRT_atol
(
const
char
*
str
)
{
#if _MSVCR_VER == 0
return
MSVCRT_atoi
(
str
);
...
...
@@ -1704,7 +1704,7 @@ MSVCRT_long CDECL MSVCRT_atol(const char *str)
/******************************************************************
* _atoll_l (MSVCR120.@)
*/
MSVCRT_longlong
CDECL
MSVCRT__atoll_l
(
const
char
*
str
,
_locale_t
locale
)
__int64
CDECL
MSVCRT__atoll_l
(
const
char
*
str
,
_locale_t
locale
)
{
return
MSVCRT_strtoi64_l
(
str
,
NULL
,
10
,
locale
);
}
...
...
@@ -1712,7 +1712,7 @@ MSVCRT_longlong CDECL MSVCRT__atoll_l(const char* str, _locale_t locale)
/******************************************************************
* atoll (MSVCR120.@)
*/
MSVCRT_longlong
CDECL
MSVCRT_atoll
(
const
char
*
str
)
__int64
CDECL
MSVCRT_atoll
(
const
char
*
str
)
{
return
MSVCRT__atoll_l
(
str
,
NULL
);
}
...
...
@@ -1722,7 +1722,7 @@ MSVCRT_longlong CDECL MSVCRT_atoll(const char* str)
/******************************************************************
* _strtol_l (MSVCRT.@)
*/
MSVCRT
_long
CDECL
MSVCRT__strtol_l
(
const
char
*
nptr
,
__msvcrt
_long
CDECL
MSVCRT__strtol_l
(
const
char
*
nptr
,
char
**
end
,
int
base
,
_locale_t
locale
)
{
__int64
ret
=
MSVCRT_strtoi64_l
(
nptr
,
end
,
base
,
locale
);
...
...
@@ -1741,7 +1741,7 @@ MSVCRT_long CDECL MSVCRT__strtol_l(const char* nptr,
/******************************************************************
* strtol (MSVCRT.@)
*/
MSVCRT
_long
CDECL
MSVCRT_strtol
(
const
char
*
nptr
,
char
**
end
,
int
base
)
__msvcrt
_long
CDECL
MSVCRT_strtol
(
const
char
*
nptr
,
char
**
end
,
int
base
)
{
return
MSVCRT__strtol_l
(
nptr
,
end
,
base
,
NULL
);
}
...
...
@@ -1749,7 +1749,7 @@ MSVCRT_long CDECL MSVCRT_strtol(const char* nptr, char** end, int base)
/******************************************************************
* _strtoul_l (MSVCRT.@)
*/
MSVCRT
_ulong
CDECL
MSVCRT_strtoul_l
(
const
char
*
nptr
,
char
**
end
,
int
base
,
_locale_t
locale
)
__msvcrt
_ulong
CDECL
MSVCRT_strtoul_l
(
const
char
*
nptr
,
char
**
end
,
int
base
,
_locale_t
locale
)
{
__int64
ret
=
MSVCRT_strtoi64_l
(
nptr
,
end
,
base
,
locale
);
...
...
@@ -1767,7 +1767,7 @@ MSVCRT_ulong CDECL MSVCRT_strtoul_l(const char* nptr, char** end, int base, _loc
/******************************************************************
* strtoul (MSVCRT.@)
*/
MSVCRT
_ulong
CDECL
MSVCRT_strtoul
(
const
char
*
nptr
,
char
**
end
,
int
base
)
__msvcrt
_ulong
CDECL
MSVCRT_strtoul
(
const
char
*
nptr
,
char
**
end
,
int
base
)
{
return
MSVCRT_strtoul_l
(
nptr
,
end
,
base
,
NULL
);
}
...
...
@@ -1848,9 +1848,9 @@ unsigned __int64 CDECL MSVCRT_strtoui64(const char *nptr, char **endptr, int bas
return
MSVCRT_strtoui64_l
(
nptr
,
endptr
,
base
,
NULL
);
}
static
int
ltoa_helper
(
MSVCRT_long
value
,
char
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
static
int
ltoa_helper
(
__msvcrt_long
value
,
char
*
str
,
size_t
size
,
int
radix
)
{
MSVCRT
_ulong
val
;
__msvcrt
_ulong
val
;
unsigned
int
digit
;
BOOL
is_negative
;
char
buffer
[
33
],
*
pos
;
...
...
@@ -1915,7 +1915,7 @@ static int ltoa_helper(MSVCRT_long value, char *str, MSVCRT_size_t size, int rad
/*********************************************************************
* _ltoa_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__ltoa_s
(
MSVCRT_long
value
,
char
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
int
CDECL
MSVCRT__ltoa_s
(
__msvcrt_long
value
,
char
*
str
,
size_t
size
,
int
radix
)
{
if
(
!
MSVCRT_CHECK_PMT
(
str
!=
NULL
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
size
>
0
))
return
MSVCRT_EINVAL
;
...
...
@@ -1931,9 +1931,9 @@ int CDECL MSVCRT__ltoa_s(MSVCRT_long value, char *str, MSVCRT_size_t size, int r
/*********************************************************************
* _ltow_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__ltow_s
(
MSVCRT_long
value
,
wchar_t
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
int
CDECL
MSVCRT__ltow_s
(
__msvcrt_long
value
,
wchar_t
*
str
,
size_t
size
,
int
radix
)
{
MSVCRT
_ulong
val
;
__msvcrt
_ulong
val
;
unsigned
int
digit
;
BOOL
is_negative
;
wchar_t
buffer
[
33
],
*
pos
;
...
...
@@ -2006,7 +2006,7 @@ int CDECL MSVCRT__ltow_s(MSVCRT_long value, wchar_t *str, MSVCRT_size_t size, in
/*********************************************************************
* _itoa_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__itoa_s
(
int
value
,
char
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
int
CDECL
MSVCRT__itoa_s
(
int
value
,
char
*
str
,
size_t
size
,
int
radix
)
{
return
MSVCRT__ltoa_s
(
value
,
str
,
size
,
radix
);
}
...
...
@@ -2022,7 +2022,7 @@ char* CDECL MSVCRT__itoa(int value, char *str, int radix)
/*********************************************************************
* _itow_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__itow_s
(
int
value
,
wchar_t
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
int
CDECL
MSVCRT__itow_s
(
int
value
,
wchar_t
*
str
,
size_t
size
,
int
radix
)
{
return
MSVCRT__ltow_s
(
value
,
str
,
size
,
radix
);
}
...
...
@@ -2031,7 +2031,7 @@ int CDECL MSVCRT__itow_s(int value, wchar_t *str, MSVCRT_size_t size, int radix)
* _ui64toa_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__ui64toa_s
(
unsigned
__int64
value
,
char
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
size_t
size
,
int
radix
)
{
char
buffer
[
65
],
*
pos
;
int
digit
;
...
...
@@ -2070,7 +2070,7 @@ int CDECL MSVCRT__ui64toa_s(unsigned __int64 value, char *str,
* _ui64tow_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__ui64tow_s
(
unsigned
__int64
value
,
wchar_t
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
size_t
size
,
int
radix
)
{
wchar_t
buffer
[
65
],
*
pos
;
int
digit
;
...
...
@@ -2107,9 +2107,9 @@ int CDECL MSVCRT__ui64tow_s( unsigned __int64 value, wchar_t *str,
/*********************************************************************
* _ultoa_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__ultoa_s
(
MSVCRT_ulong
value
,
char
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
int
CDECL
MSVCRT__ultoa_s
(
__msvcrt_ulong
value
,
char
*
str
,
size_t
size
,
int
radix
)
{
MSVCRT
_ulong
digit
;
__msvcrt
_ulong
digit
;
char
buffer
[
33
],
*
pos
;
size_t
len
;
...
...
@@ -2161,9 +2161,9 @@ int CDECL MSVCRT__ultoa_s(MSVCRT_ulong value, char *str, MSVCRT_size_t size, int
/*********************************************************************
* _ultow_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__ultow_s
(
MSVCRT_ulong
value
,
wchar_t
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
int
CDECL
MSVCRT__ultow_s
(
__msvcrt_ulong
value
,
wchar_t
*
str
,
size_t
size
,
int
radix
)
{
MSVCRT
_ulong
digit
;
__msvcrt
_ulong
digit
;
WCHAR
buffer
[
33
],
*
pos
;
size_t
len
;
...
...
@@ -2215,7 +2215,7 @@ int CDECL MSVCRT__ultow_s(MSVCRT_ulong value, wchar_t *str, MSVCRT_size_t size,
/*********************************************************************
* _i64toa_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__i64toa_s
(
__int64
value
,
char
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
int
CDECL
MSVCRT__i64toa_s
(
__int64
value
,
char
*
str
,
size_t
size
,
int
radix
)
{
unsigned
__int64
val
;
unsigned
int
digit
;
...
...
@@ -2290,7 +2290,7 @@ int CDECL MSVCRT__i64toa_s(__int64 value, char *str, MSVCRT_size_t size, int rad
/*********************************************************************
* _i64tow_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__i64tow_s
(
__int64
value
,
wchar_t
*
str
,
MSVCRT_
size_t
size
,
int
radix
)
int
CDECL
MSVCRT__i64tow_s
(
__int64
value
,
wchar_t
*
str
,
size_t
size
,
int
radix
)
{
unsigned
__int64
val
;
unsigned
int
digit
;
...
...
@@ -2487,42 +2487,42 @@ void * __cdecl memmove(void *dst, const void *src, size_t n)
if
(
!
n
)
return
dst
;
if
((
MSVCRT_size_t
)
dst
-
(
MSVCRT_
size_t
)
src
>=
n
)
if
((
size_t
)
dst
-
(
size_t
)
src
>=
n
)
{
for
(;
(
MSVCRT_size_t
)
d
%
sizeof
(
MSVCRT_
size_t
)
&&
n
;
n
--
)
*
d
++
=
*
s
++
;
for
(;
(
size_t
)
d
%
sizeof
(
size_t
)
&&
n
;
n
--
)
*
d
++
=
*
s
++
;
sh1
=
8
*
((
MSVCRT_size_t
)
s
%
sizeof
(
MSVCRT_
size_t
));
sh1
=
8
*
((
size_t
)
s
%
sizeof
(
size_t
));
if
(
!
sh1
)
{
while
(
n
>=
sizeof
(
MSVCRT_
size_t
))
while
(
n
>=
sizeof
(
size_t
))
{
*
(
MSVCRT_size_t
*
)
d
=
*
(
MSVCRT_
size_t
*
)
s
;
s
+=
sizeof
(
MSVCRT_
size_t
);
d
+=
sizeof
(
MSVCRT_
size_t
);
n
-=
sizeof
(
MSVCRT_
size_t
);
*
(
size_t
*
)
d
=
*
(
size_t
*
)
s
;
s
+=
sizeof
(
size_t
);
d
+=
sizeof
(
size_t
);
n
-=
sizeof
(
size_t
);
}
}
else
if
(
n
>=
2
*
sizeof
(
MSVCRT_
size_t
))
else
if
(
n
>=
2
*
sizeof
(
size_t
))
{
int
sh2
=
8
*
sizeof
(
MSVCRT_
size_t
)
-
sh1
;
MSVCRT_
size_t
x
,
y
;
int
sh2
=
8
*
sizeof
(
size_t
)
-
sh1
;
size_t
x
,
y
;
s
-=
sh1
/
8
;
x
=
*
(
MSVCRT_
size_t
*
)
s
;
x
=
*
(
size_t
*
)
s
;
do
{
s
+=
sizeof
(
MSVCRT_
size_t
);
y
=
*
(
MSVCRT_
size_t
*
)
s
;
*
(
MSVCRT_
size_t
*
)
d
=
MERGE
(
x
,
sh1
,
y
,
sh2
);
d
+=
sizeof
(
MSVCRT_
size_t
);
s
+=
sizeof
(
MSVCRT_
size_t
);
x
=
*
(
MSVCRT_
size_t
*
)
s
;
*
(
MSVCRT_
size_t
*
)
d
=
MERGE
(
y
,
sh1
,
x
,
sh2
);
d
+=
sizeof
(
MSVCRT_
size_t
);
n
-=
2
*
sizeof
(
MSVCRT_
size_t
);
}
while
(
n
>=
2
*
sizeof
(
MSVCRT_
size_t
));
s
+=
sizeof
(
size_t
);
y
=
*
(
size_t
*
)
s
;
*
(
size_t
*
)
d
=
MERGE
(
x
,
sh1
,
y
,
sh2
);
d
+=
sizeof
(
size_t
);
s
+=
sizeof
(
size_t
);
x
=
*
(
size_t
*
)
s
;
*
(
size_t
*
)
d
=
MERGE
(
y
,
sh1
,
x
,
sh2
);
d
+=
sizeof
(
size_t
);
n
-=
2
*
sizeof
(
size_t
);
}
while
(
n
>=
2
*
sizeof
(
size_t
));
s
+=
sh1
/
8
;
}
while
(
n
--
)
*
d
++
=
*
s
++
;
...
...
@@ -2533,40 +2533,40 @@ void * __cdecl memmove(void *dst, const void *src, size_t n)
d
+=
n
;
s
+=
n
;
for
(;
(
MSVCRT_size_t
)
d
%
sizeof
(
MSVCRT_
size_t
)
&&
n
;
n
--
)
*--
d
=
*--
s
;
for
(;
(
size_t
)
d
%
sizeof
(
size_t
)
&&
n
;
n
--
)
*--
d
=
*--
s
;
sh1
=
8
*
((
MSVCRT_size_t
)
s
%
sizeof
(
MSVCRT_
size_t
));
sh1
=
8
*
((
size_t
)
s
%
sizeof
(
size_t
));
if
(
!
sh1
)
{
while
(
n
>=
sizeof
(
MSVCRT_
size_t
))
while
(
n
>=
sizeof
(
size_t
))
{
s
-=
sizeof
(
MSVCRT_
size_t
);
d
-=
sizeof
(
MSVCRT_
size_t
);
*
(
MSVCRT_size_t
*
)
d
=
*
(
MSVCRT_
size_t
*
)
s
;
n
-=
sizeof
(
MSVCRT_
size_t
);
s
-=
sizeof
(
size_t
);
d
-=
sizeof
(
size_t
);
*
(
size_t
*
)
d
=
*
(
size_t
*
)
s
;
n
-=
sizeof
(
size_t
);
}
}
else
if
(
n
>=
2
*
sizeof
(
MSVCRT_
size_t
))
else
if
(
n
>=
2
*
sizeof
(
size_t
))
{
int
sh2
=
8
*
sizeof
(
MSVCRT_
size_t
)
-
sh1
;
MSVCRT_
size_t
x
,
y
;
int
sh2
=
8
*
sizeof
(
size_t
)
-
sh1
;
size_t
x
,
y
;
s
-=
sh1
/
8
;
x
=
*
(
MSVCRT_
size_t
*
)
s
;
x
=
*
(
size_t
*
)
s
;
do
{
s
-=
sizeof
(
MSVCRT_
size_t
);
y
=
*
(
MSVCRT_
size_t
*
)
s
;
d
-=
sizeof
(
MSVCRT_
size_t
);
*
(
MSVCRT_
size_t
*
)
d
=
MERGE
(
y
,
sh1
,
x
,
sh2
);
s
-=
sizeof
(
MSVCRT_
size_t
);
x
=
*
(
MSVCRT_
size_t
*
)
s
;
d
-=
sizeof
(
MSVCRT_
size_t
);
*
(
MSVCRT_
size_t
*
)
d
=
MERGE
(
x
,
sh1
,
y
,
sh2
);
n
-=
2
*
sizeof
(
MSVCRT_
size_t
);
}
while
(
n
>=
2
*
sizeof
(
MSVCRT_
size_t
));
s
-=
sizeof
(
size_t
);
y
=
*
(
size_t
*
)
s
;
d
-=
sizeof
(
size_t
);
*
(
size_t
*
)
d
=
MERGE
(
y
,
sh1
,
x
,
sh2
);
s
-=
sizeof
(
size_t
);
x
=
*
(
size_t
*
)
s
;
d
-=
sizeof
(
size_t
);
*
(
size_t
*
)
d
=
MERGE
(
x
,
sh1
,
y
,
sh2
);
n
-=
2
*
sizeof
(
size_t
);
}
while
(
n
>=
2
*
sizeof
(
size_t
));
s
+=
sh1
/
8
;
}
while
(
n
--
)
*--
d
=
*--
s
;
...
...
@@ -2618,7 +2618,7 @@ char* __cdecl MSVCRT_strrchr(const char *str, int c)
/*********************************************************************
* memchr (MSVCRT.@)
*/
void
*
__cdecl
MSVCRT_memchr
(
const
void
*
ptr
,
int
c
,
MSVCRT_
size_t
n
)
void
*
__cdecl
MSVCRT_memchr
(
const
void
*
ptr
,
int
c
,
size_t
n
)
{
const
unsigned
char
*
p
=
ptr
;
...
...
@@ -2640,7 +2640,7 @@ int __cdecl strcmp(const char *str1, const char *str2)
/*********************************************************************
* strncmp (MSVCRT.@)
*/
int
__cdecl
MSVCRT_strncmp
(
const
char
*
str1
,
const
char
*
str2
,
MSVCRT_
size_t
len
)
int
__cdecl
MSVCRT_strncmp
(
const
char
*
str1
,
const
char
*
str2
,
size_t
len
)
{
if
(
!
len
)
return
0
;
while
(
--
len
&&
*
str1
&&
*
str1
==
*
str2
)
{
str1
++
;
str2
++
;
}
...
...
@@ -2651,7 +2651,7 @@ int __cdecl MSVCRT_strncmp(const char *str1, const char *str2, MSVCRT_size_t len
* _strnicmp_l (MSVCRT.@)
*/
int
__cdecl
MSVCRT__strnicmp_l
(
const
char
*
s1
,
const
char
*
s2
,
MSVCRT_
size_t
count
,
_locale_t
locale
)
size_t
count
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
int
c1
,
c2
;
...
...
@@ -2698,7 +2698,7 @@ int __cdecl MSVCRT__stricmp_l(const char *s1, const char *s2, _locale_t locale)
/*********************************************************************
* _strnicmp (MSVCRT.@)
*/
int
__cdecl
MSVCRT__strnicmp
(
const
char
*
s1
,
const
char
*
s2
,
MSVCRT_
size_t
count
)
int
__cdecl
MSVCRT__strnicmp
(
const
char
*
s1
,
const
char
*
s2
,
size_t
count
)
{
return
MSVCRT__strnicmp_l
(
s1
,
s2
,
count
,
NULL
);
}
...
...
@@ -2716,7 +2716,7 @@ int __cdecl MSVCRT__stricmp(const char *s1, const char *s2)
*/
char
*
__cdecl
MSVCRT_strstr
(
const
char
*
haystack
,
const
char
*
needle
)
{
MSVCRT_
size_t
i
,
j
,
len
,
needle_len
,
lps_len
;
size_t
i
,
j
,
len
,
needle_len
,
lps_len
;
BYTE
lps
[
256
];
needle_len
=
strlen
(
needle
);
...
...
@@ -2757,7 +2757,7 @@ char* __cdecl MSVCRT_strstr(const char *haystack, const char *needle)
/*********************************************************************
* _memicmp_l (MSVCRT.@)
*/
int
__cdecl
MSVCRT__memicmp_l
(
const
char
*
s1
,
const
char
*
s2
,
MSVCRT_
size_t
len
,
_locale_t
locale
)
int
__cdecl
MSVCRT__memicmp_l
(
const
char
*
s1
,
const
char
*
s2
,
size_t
len
,
_locale_t
locale
)
{
int
ret
=
0
;
...
...
@@ -2783,7 +2783,7 @@ int __cdecl MSVCRT__memicmp_l(const char *s1, const char *s2, MSVCRT_size_t len,
/*********************************************************************
* _memicmp (MSVCRT.@)
*/
int
__cdecl
MSVCRT__memicmp
(
const
char
*
s1
,
const
char
*
s2
,
MSVCRT_
size_t
len
)
int
__cdecl
MSVCRT__memicmp
(
const
char
*
s1
,
const
char
*
s2
,
size_t
len
)
{
return
MSVCRT__memicmp_l
(
s1
,
s2
,
len
,
NULL
);
}
...
...
@@ -2791,7 +2791,7 @@ int __cdecl MSVCRT__memicmp(const char *s1, const char *s2, MSVCRT_size_t len)
/*********************************************************************
* strcspn (MSVCRT.@)
*/
MSVCRT_
size_t
__cdecl
MSVCRT_strcspn
(
const
char
*
str
,
const
char
*
reject
)
size_t
__cdecl
MSVCRT_strcspn
(
const
char
*
str
,
const
char
*
reject
)
{
BOOL
rejects
[
256
];
const
char
*
p
;
...
...
@@ -2822,9 +2822,9 @@ char* __cdecl MSVCRT_strpbrk(const char *str, const char *accept)
/*********************************************************************
* __strncnt (MSVCRT.@)
*/
MSVCRT_size_t
__cdecl
MSVCRT___strncnt
(
const
char
*
str
,
MSVCRT_
size_t
size
)
size_t
__cdecl
MSVCRT___strncnt
(
const
char
*
str
,
size_t
size
)
{
MSVCRT_
size_t
ret
=
0
;
size_t
ret
=
0
;
#if _MSVCR_VER >= 140
while
(
*
str
++
&&
size
--
)
...
...
dlls/msvcrt/time.c
View file @
fa272ada
...
...
@@ -85,7 +85,7 @@ int MSVCRT___daylight = 1;
/*********************************************************************
* _timezone (MSVCRT.@)
*/
MSVCRT
_long
MSVCRT___timezone
=
28800
;
__msvcrt
_long
MSVCRT___timezone
=
28800
;
/*********************************************************************
* _dstbias (MSVCRT.@)
...
...
@@ -219,11 +219,11 @@ static BOOL is_dst(const SYSTEMTIME *st)
#define TICKSPERMSEC 10000
#define TICKS_1601_TO_1970 (SECS_1601_TO_1970 * TICKSPERSEC)
static
MSVCRT_
__time64_t
mktime_helper
(
struct
MSVCRT_tm
*
mstm
,
BOOL
local
)
static
__time64_t
mktime_helper
(
struct
MSVCRT_tm
*
mstm
,
BOOL
local
)
{
SYSTEMTIME
st
;
FILETIME
ft
;
MSVCRT_
__time64_t
ret
=
0
;
__time64_t
ret
=
0
;
int
i
;
BOOL
use_dst
=
FALSE
;
...
...
@@ -249,11 +249,11 @@ static MSVCRT___time64_t mktime_helper(struct MSVCRT_tm *mstm, BOOL local)
return
-
1
;
}
ret
=
((
MSVCRT_
__time64_t
)
ft
.
dwHighDateTime
<<
32
)
+
ft
.
dwLowDateTime
;
ret
+=
(
MSVCRT_
__time64_t
)
mstm
->
tm_sec
*
TICKSPERSEC
;
ret
+=
(
MSVCRT_
__time64_t
)
mstm
->
tm_min
*
60
*
TICKSPERSEC
;
ret
+=
(
MSVCRT_
__time64_t
)
mstm
->
tm_hour
*
60
*
60
*
TICKSPERSEC
;
ret
+=
(
MSVCRT_
__time64_t
)(
mstm
->
tm_mday
-
1
)
*
SECSPERDAY
*
TICKSPERSEC
;
ret
=
((
__time64_t
)
ft
.
dwHighDateTime
<<
32
)
+
ft
.
dwLowDateTime
;
ret
+=
(
__time64_t
)
mstm
->
tm_sec
*
TICKSPERSEC
;
ret
+=
(
__time64_t
)
mstm
->
tm_min
*
60
*
TICKSPERSEC
;
ret
+=
(
__time64_t
)
mstm
->
tm_hour
*
60
*
60
*
TICKSPERSEC
;
ret
+=
(
__time64_t
)(
mstm
->
tm_mday
-
1
)
*
SECSPERDAY
*
TICKSPERSEC
;
ft
.
dwLowDateTime
=
ret
&
0xffffffff
;
ft
.
dwHighDateTime
=
ret
>>
32
;
...
...
@@ -265,7 +265,7 @@ static MSVCRT___time64_t mktime_helper(struct MSVCRT_tm *mstm, BOOL local)
if
((
mstm
->
tm_isdst
<=-
1
&&
use_dst
)
||
(
mstm
->
tm_isdst
>=
1
))
{
SYSTEMTIME
tmp
;
ret
+=
(
MSVCRT_
__time64_t
)
MSVCRT__dstbias
*
TICKSPERSEC
;
ret
+=
(
__time64_t
)
MSVCRT__dstbias
*
TICKSPERSEC
;
ft
.
dwLowDateTime
=
ret
&
0xffffffff
;
ft
.
dwHighDateTime
=
ret
>>
32
;
...
...
@@ -278,13 +278,13 @@ static MSVCRT___time64_t mktime_helper(struct MSVCRT_tm *mstm, BOOL local)
use_dst
=
TRUE
;
}
}
else
if
(
mstm
->
tm_isdst
==
0
&&
use_dst
)
{
ret
-=
(
MSVCRT_
__time64_t
)
MSVCRT__dstbias
*
TICKSPERSEC
;
ret
-=
(
__time64_t
)
MSVCRT__dstbias
*
TICKSPERSEC
;
ft
.
dwLowDateTime
=
ret
&
0xffffffff
;
ft
.
dwHighDateTime
=
ret
>>
32
;
FileTimeToSystemTime
(
&
ft
,
&
st
);
ret
+=
(
MSVCRT_
__time64_t
)
MSVCRT__dstbias
*
TICKSPERSEC
;
ret
+=
(
__time64_t
)
MSVCRT__dstbias
*
TICKSPERSEC
;
}
ret
+=
(
MSVCRT_
__time64_t
)
MSVCRT___timezone
*
TICKSPERSEC
;
ret
+=
(
__time64_t
)
MSVCRT___timezone
*
TICKSPERSEC
;
}
mstm
->
tm_sec
=
st
.
wSecond
;
...
...
@@ -310,7 +310,7 @@ static MSVCRT___time64_t mktime_helper(struct MSVCRT_tm *mstm, BOOL local)
/**********************************************************************
* _mktime64 (MSVCRT.@)
*/
MSVCRT_
__time64_t
CDECL
MSVCRT__mktime64
(
struct
MSVCRT_tm
*
mstm
)
__time64_t
CDECL
MSVCRT__mktime64
(
struct
MSVCRT_tm
*
mstm
)
{
return
mktime_helper
(
mstm
,
TRUE
);
}
...
...
@@ -318,22 +318,22 @@ MSVCRT___time64_t CDECL MSVCRT__mktime64(struct MSVCRT_tm *mstm)
/**********************************************************************
* _mktime32 (MSVCRT.@)
*/
MSVCRT_
__time32_t
CDECL
MSVCRT__mktime32
(
struct
MSVCRT_tm
*
mstm
)
__time32_t
CDECL
MSVCRT__mktime32
(
struct
MSVCRT_tm
*
mstm
)
{
MSVCRT_
__time64_t
ret
=
MSVCRT__mktime64
(
mstm
);
return
ret
==
(
MSVCRT_
__time32_t
)
ret
?
ret
:
-
1
;
__time64_t
ret
=
MSVCRT__mktime64
(
mstm
);
return
ret
==
(
__time32_t
)
ret
?
ret
:
-
1
;
}
/**********************************************************************
* mktime (MSVCRT.@)
*/
#ifdef _WIN64
MSVCRT_
__time64_t
CDECL
MSVCRT_mktime
(
struct
MSVCRT_tm
*
mstm
)
__time64_t
CDECL
MSVCRT_mktime
(
struct
MSVCRT_tm
*
mstm
)
{
return
MSVCRT__mktime64
(
mstm
);
}
#else
MSVCRT_
__time32_t
CDECL
MSVCRT_mktime
(
struct
MSVCRT_tm
*
mstm
)
__time32_t
CDECL
MSVCRT_mktime
(
struct
MSVCRT_tm
*
mstm
)
{
return
MSVCRT__mktime32
(
mstm
);
}
...
...
@@ -344,7 +344,7 @@ MSVCRT___time32_t CDECL MSVCRT_mktime(struct MSVCRT_tm *mstm)
*
* time->tm_isdst value is ignored
*/
MSVCRT_
__time64_t
CDECL
MSVCRT__mkgmtime64
(
struct
MSVCRT_tm
*
time
)
__time64_t
CDECL
MSVCRT__mkgmtime64
(
struct
MSVCRT_tm
*
time
)
{
return
mktime_helper
(
time
,
FALSE
);
}
...
...
@@ -352,22 +352,22 @@ MSVCRT___time64_t CDECL MSVCRT__mkgmtime64(struct MSVCRT_tm *time)
/**********************************************************************
* _mkgmtime32 (MSVCRT.@)
*/
MSVCRT_
__time32_t
CDECL
MSVCRT__mkgmtime32
(
struct
MSVCRT_tm
*
time
)
__time32_t
CDECL
MSVCRT__mkgmtime32
(
struct
MSVCRT_tm
*
time
)
{
MSVCRT_
__time64_t
ret
=
MSVCRT__mkgmtime64
(
time
);
return
ret
==
(
MSVCRT_
__time32_t
)
ret
?
ret
:
-
1
;
__time64_t
ret
=
MSVCRT__mkgmtime64
(
time
);
return
ret
==
(
__time32_t
)
ret
?
ret
:
-
1
;
}
/**********************************************************************
* _mkgmtime (MSVCRT.@)
*/
#ifdef _WIN64
MSVCRT_
__time64_t
CDECL
MSVCRT__mkgmtime
(
struct
MSVCRT_tm
*
time
)
__time64_t
CDECL
MSVCRT__mkgmtime
(
struct
MSVCRT_tm
*
time
)
{
return
MSVCRT__mkgmtime64
(
time
);
}
#else
MSVCRT_
__time32_t
CDECL
MSVCRT__mkgmtime
(
struct
MSVCRT_tm
*
time
)
__time32_t
CDECL
MSVCRT__mkgmtime
(
struct
MSVCRT_tm
*
time
)
{
return
MSVCRT__mkgmtime32
(
time
);
}
...
...
@@ -376,7 +376,7 @@ MSVCRT___time32_t CDECL MSVCRT__mkgmtime(struct MSVCRT_tm *time)
/*********************************************************************
* _localtime64_s (MSVCRT.@)
*/
int
CDECL
_localtime64_s
(
struct
MSVCRT_tm
*
res
,
const
MSVCRT_
__time64_t
*
secs
)
int
CDECL
_localtime64_s
(
struct
MSVCRT_tm
*
res
,
const
__time64_t
*
secs
)
{
int
i
;
FILETIME
ft
;
...
...
@@ -424,7 +424,7 @@ int CDECL _localtime64_s(struct MSVCRT_tm *res, const MSVCRT___time64_t *secs)
/*********************************************************************
* _localtime64 (MSVCRT.@)
*/
struct
MSVCRT_tm
*
CDECL
MSVCRT__localtime64
(
const
MSVCRT_
__time64_t
*
secs
)
struct
MSVCRT_tm
*
CDECL
MSVCRT__localtime64
(
const
__time64_t
*
secs
)
{
thread_data_t
*
data
=
msvcrt_get_thread_data
();
...
...
@@ -439,9 +439,9 @@ struct MSVCRT_tm* CDECL MSVCRT__localtime64(const MSVCRT___time64_t* secs)
/*********************************************************************
* _localtime32 (MSVCRT.@)
*/
struct
MSVCRT_tm
*
CDECL
MSVCRT__localtime32
(
const
MSVCRT_
__time32_t
*
secs
)
struct
MSVCRT_tm
*
CDECL
MSVCRT__localtime32
(
const
__time32_t
*
secs
)
{
MSVCRT_
__time64_t
secs64
;
__time64_t
secs64
;
if
(
!
secs
)
return
NULL
;
...
...
@@ -453,9 +453,9 @@ struct MSVCRT_tm* CDECL MSVCRT__localtime32(const MSVCRT___time32_t* secs)
/*********************************************************************
* _localtime32_s (MSVCRT.@)
*/
int
CDECL
_localtime32_s
(
struct
MSVCRT_tm
*
time
,
const
MSVCRT_
__time32_t
*
secs
)
int
CDECL
_localtime32_s
(
struct
MSVCRT_tm
*
time
,
const
__time32_t
*
secs
)
{
MSVCRT_
__time64_t
secs64
;
__time64_t
secs64
;
if
(
!
time
||
!
secs
||
*
secs
<
0
)
{
...
...
@@ -474,12 +474,12 @@ int CDECL _localtime32_s(struct MSVCRT_tm *time, const MSVCRT___time32_t *secs)
* localtime (MSVCRT.@)
*/
#ifdef _WIN64
struct
MSVCRT_tm
*
CDECL
MSVCRT_localtime
(
const
MSVCRT_
__time64_t
*
secs
)
struct
MSVCRT_tm
*
CDECL
MSVCRT_localtime
(
const
__time64_t
*
secs
)
{
return
MSVCRT__localtime64
(
secs
);
}
#else
struct
MSVCRT_tm
*
CDECL
MSVCRT_localtime
(
const
MSVCRT_
__time32_t
*
secs
)
struct
MSVCRT_tm
*
CDECL
MSVCRT_localtime
(
const
__time32_t
*
secs
)
{
return
MSVCRT__localtime32
(
secs
);
}
...
...
@@ -488,7 +488,7 @@ struct MSVCRT_tm* CDECL MSVCRT_localtime(const MSVCRT___time32_t* secs)
/*********************************************************************
* _gmtime64 (MSVCRT.@)
*/
int
CDECL
MSVCRT__gmtime64_s
(
struct
MSVCRT_tm
*
res
,
const
MSVCRT_
__time64_t
*
secs
)
int
CDECL
MSVCRT__gmtime64_s
(
struct
MSVCRT_tm
*
res
,
const
__time64_t
*
secs
)
{
int
i
;
FILETIME
ft
;
...
...
@@ -531,7 +531,7 @@ int CDECL MSVCRT__gmtime64_s(struct MSVCRT_tm *res, const MSVCRT___time64_t *sec
/*********************************************************************
* _gmtime64 (MSVCRT.@)
*/
struct
MSVCRT_tm
*
CDECL
MSVCRT__gmtime64
(
const
MSVCRT_
__time64_t
*
secs
)
struct
MSVCRT_tm
*
CDECL
MSVCRT__gmtime64
(
const
__time64_t
*
secs
)
{
thread_data_t
*
const
data
=
msvcrt_get_thread_data
();
...
...
@@ -546,9 +546,9 @@ struct MSVCRT_tm* CDECL MSVCRT__gmtime64(const MSVCRT___time64_t *secs)
/*********************************************************************
* _gmtime32_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__gmtime32_s
(
struct
MSVCRT_tm
*
res
,
const
MSVCRT_
__time32_t
*
secs
)
int
CDECL
MSVCRT__gmtime32_s
(
struct
MSVCRT_tm
*
res
,
const
__time32_t
*
secs
)
{
MSVCRT_
__time64_t
secs64
;
__time64_t
secs64
;
if
(
secs
)
{
secs64
=
*
secs
;
...
...
@@ -560,9 +560,9 @@ int CDECL MSVCRT__gmtime32_s(struct MSVCRT_tm *res, const MSVCRT___time32_t *sec
/*********************************************************************
* _gmtime32 (MSVCRT.@)
*/
struct
MSVCRT_tm
*
CDECL
MSVCRT__gmtime32
(
const
MSVCRT_
__time32_t
*
secs
)
struct
MSVCRT_tm
*
CDECL
MSVCRT__gmtime32
(
const
__time32_t
*
secs
)
{
MSVCRT_
__time64_t
secs64
;
__time64_t
secs64
;
if
(
!
secs
)
return
NULL
;
...
...
@@ -575,12 +575,12 @@ struct MSVCRT_tm* CDECL MSVCRT__gmtime32(const MSVCRT___time32_t* secs)
* gmtime (MSVCRT.@)
*/
#ifdef _WIN64
struct
MSVCRT_tm
*
CDECL
MSVCRT_gmtime
(
const
MSVCRT_
__time64_t
*
secs
)
struct
MSVCRT_tm
*
CDECL
MSVCRT_gmtime
(
const
__time64_t
*
secs
)
{
return
MSVCRT__gmtime64
(
secs
);
}
#else
struct
MSVCRT_tm
*
CDECL
MSVCRT_gmtime
(
const
MSVCRT_
__time32_t
*
secs
)
struct
MSVCRT_tm
*
CDECL
MSVCRT_gmtime
(
const
__time32_t
*
secs
)
{
return
MSVCRT__gmtime32
(
secs
);
}
...
...
@@ -598,7 +598,7 @@ char* CDECL MSVCRT__strdate(char* date)
/**********************************************************************
* _strdate_s (MSVCRT.@)
*/
int
CDECL
_strdate_s
(
char
*
date
,
MSVCRT_
size_t
size
)
int
CDECL
_strdate_s
(
char
*
date
,
size_t
size
)
{
if
(
date
&&
size
)
date
[
0
]
=
'\0'
;
...
...
@@ -629,7 +629,7 @@ wchar_t* CDECL MSVCRT__wstrdate(wchar_t* date)
/**********************************************************************
* _wstrdate_s (MSVCRT.@)
*/
int
CDECL
_wstrdate_s
(
wchar_t
*
date
,
MSVCRT_
size_t
size
)
int
CDECL
_wstrdate_s
(
wchar_t
*
date
,
size_t
size
)
{
if
(
date
&&
size
)
date
[
0
]
=
'\0'
;
...
...
@@ -660,7 +660,7 @@ char* CDECL MSVCRT__strtime(char* time)
/*********************************************************************
* _strtime_s (MSVCRT.@)
*/
int
CDECL
_strtime_s
(
char
*
time
,
MSVCRT_
size_t
size
)
int
CDECL
_strtime_s
(
char
*
time
,
size_t
size
)
{
if
(
time
&&
size
)
time
[
0
]
=
'\0'
;
...
...
@@ -691,7 +691,7 @@ wchar_t* CDECL MSVCRT__wstrtime(wchar_t* time)
/*********************************************************************
* _wstrtime_s (MSVCRT.@)
*/
int
CDECL
_wstrtime_s
(
wchar_t
*
time
,
MSVCRT_
size_t
size
)
int
CDECL
_wstrtime_s
(
wchar_t
*
time
,
size_t
size
)
{
if
(
time
&&
size
)
time
[
0
]
=
'\0'
;
...
...
@@ -724,7 +724,7 @@ clock_t CDECL MSVCRT_clock(void)
/*********************************************************************
* _difftime64 (MSVCRT.@)
*/
double
CDECL
MSVCRT__difftime64
(
MSVCRT___time64_t
time1
,
MSVCRT_
__time64_t
time2
)
double
CDECL
MSVCRT__difftime64
(
__time64_t
time1
,
__time64_t
time2
)
{
return
(
double
)(
time1
-
time2
);
}
...
...
@@ -732,7 +732,7 @@ double CDECL MSVCRT__difftime64(MSVCRT___time64_t time1, MSVCRT___time64_t time2
/*********************************************************************
* _difftime32 (MSVCRT.@)
*/
double
CDECL
MSVCRT__difftime32
(
MSVCRT___time32_t
time1
,
MSVCRT_
__time32_t
time2
)
double
CDECL
MSVCRT__difftime32
(
__time32_t
time1
,
__time32_t
time2
)
{
return
(
double
)(
time1
-
time2
);
}
...
...
@@ -741,12 +741,12 @@ double CDECL MSVCRT__difftime32(MSVCRT___time32_t time1, MSVCRT___time32_t time2
* difftime (MSVCRT.@)
*/
#ifdef _WIN64
double
CDECL
MSVCRT_difftime
(
MSVCRT___time64_t
time1
,
MSVCRT_
__time64_t
time2
)
double
CDECL
MSVCRT_difftime
(
__time64_t
time1
,
__time64_t
time2
)
{
return
MSVCRT__difftime64
(
time1
,
time2
);
}
#else
double
CDECL
MSVCRT_difftime
(
MSVCRT___time32_t
time1
,
MSVCRT_
__time32_t
time2
)
double
CDECL
MSVCRT_difftime
(
__time32_t
time1
,
__time32_t
time2
)
{
return
MSVCRT__difftime32
(
time1
,
time2
);
}
...
...
@@ -824,9 +824,9 @@ void CDECL MSVCRT__ftime(struct __timeb32 *buf)
/*********************************************************************
* _time64 (MSVCRT.@)
*/
MSVCRT___time64_t
CDECL
MSVCRT__time64
(
MSVCRT_
__time64_t
*
buf
)
__time64_t
CDECL
MSVCRT__time64
(
__time64_t
*
buf
)
{
MSVCRT_
__time64_t
curtime
;
__time64_t
curtime
;
struct
__timeb64
tb
;
MSVCRT__ftime64
(
&
tb
);
...
...
@@ -838,9 +838,9 @@ MSVCRT___time64_t CDECL MSVCRT__time64(MSVCRT___time64_t *buf)
/*********************************************************************
* _time32 (MSVCRT.@)
*/
MSVCRT___time32_t
CDECL
MSVCRT__time32
(
MSVCRT_
__time32_t
*
buf
)
__time32_t
CDECL
MSVCRT__time32
(
__time32_t
*
buf
)
{
MSVCRT_
__time32_t
curtime
;
__time32_t
curtime
;
struct
__timeb64
tb
;
MSVCRT__ftime64
(
&
tb
);
...
...
@@ -853,12 +853,12 @@ MSVCRT___time32_t CDECL MSVCRT__time32(MSVCRT___time32_t *buf)
* time (MSVCRT.@)
*/
#ifdef _WIN64
MSVCRT___time64_t
CDECL
MSVCRT_time
(
MSVCRT_
__time64_t
*
buf
)
__time64_t
CDECL
MSVCRT_time
(
__time64_t
*
buf
)
{
return
MSVCRT__time64
(
buf
);
}
#else
MSVCRT___time32_t
CDECL
MSVCRT_time
(
MSVCRT_
__time32_t
*
buf
)
__time32_t
CDECL
MSVCRT_time
(
__time32_t
*
buf
)
{
return
MSVCRT__time32
(
buf
);
}
...
...
@@ -895,7 +895,7 @@ int CDECL MSVCRT__get_dstbias(int *seconds)
/*********************************************************************
* __p__timezone (MSVCRT.@)
*/
MSVCRT
_long
*
CDECL
MSVCRT___p__timezone
(
void
)
__msvcrt
_long
*
CDECL
MSVCRT___p__timezone
(
void
)
{
return
&
MSVCRT___timezone
;
}
...
...
@@ -903,7 +903,7 @@ MSVCRT_long * CDECL MSVCRT___p__timezone(void)
/*********************************************************************
* _get_tzname (MSVCRT.@)
*/
int
CDECL
MSVCRT__get_tzname
(
MSVCRT_size_t
*
ret
,
char
*
buf
,
MSVCRT_
size_t
bufsize
,
int
index
)
int
CDECL
MSVCRT__get_tzname
(
size_t
*
ret
,
char
*
buf
,
size_t
bufsize
,
int
index
)
{
char
*
timezone
;
...
...
@@ -956,8 +956,8 @@ char ** CDECL __p__tzname(void)
#endif
#define strftime_str(a,b,c,d) strftime_nstr(a,b,c,d,SIZE_MAX)
static
inline
BOOL
strftime_nstr
(
STRFTIME_CHAR
*
str
,
MSVCRT_
size_t
*
pos
,
MSVCRT_size_t
max
,
const
STRFTIME_CHAR
*
src
,
MSVCRT_
size_t
len
)
static
inline
BOOL
strftime_nstr
(
STRFTIME_CHAR
*
str
,
size_t
*
pos
,
size_t
max
,
const
STRFTIME_CHAR
*
src
,
size_t
len
)
{
while
(
*
src
&&
len
)
{
...
...
@@ -975,10 +975,10 @@ static inline BOOL strftime_nstr(STRFTIME_CHAR *str, MSVCRT_size_t *pos,
return
TRUE
;
}
static
inline
BOOL
strftime_int
(
STRFTIME_CHAR
*
str
,
MSVCRT_size_t
*
pos
,
MSVCRT_
size_t
max
,
static
inline
BOOL
strftime_int
(
STRFTIME_CHAR
*
str
,
size_t
*
pos
,
size_t
max
,
int
src
,
int
prec
,
int
l
,
int
h
)
{
MSVCRT_
size_t
len
;
size_t
len
;
if
(
!
MSVCRT_CHECK_PMT
(
src
>=
l
&&
src
<=
h
))
{
*
str
=
0
;
...
...
@@ -1000,10 +1000,10 @@ static inline BOOL strftime_int(STRFTIME_CHAR *str, MSVCRT_size_t *pos, MSVCRT_s
return
TRUE
;
}
static
inline
BOOL
strftime_format
(
STRFTIME_CHAR
*
str
,
MSVCRT_size_t
*
pos
,
MSVCRT_
size_t
max
,
static
inline
BOOL
strftime_format
(
STRFTIME_CHAR
*
str
,
size_t
*
pos
,
size_t
max
,
const
struct
MSVCRT_tm
*
mstm
,
__lc_time_data
*
time_data
,
const
STRFTIME_CHAR
*
format
)
{
MSVCRT_
size_t
count
;
size_t
count
;
BOOL
ret
=
TRUE
;
while
(
*
format
&&
ret
)
...
...
@@ -1155,9 +1155,9 @@ static inline BOOL strftime_format(STRFTIME_CHAR *str, MSVCRT_size_t *pos, MSVCR
}
#if _MSVCR_VER>=140
static
inline
BOOL
strftime_tzdiff
(
STRFTIME_CHAR
*
str
,
MSVCRT_size_t
*
pos
,
MSVCRT_
size_t
max
,
BOOL
is_dst
)
static
inline
BOOL
strftime_tzdiff
(
STRFTIME_CHAR
*
str
,
size_t
*
pos
,
size_t
max
,
BOOL
is_dst
)
{
MSVCRT
_long
tz
=
MSVCRT___timezone
+
(
is_dst
?
MSVCRT__dstbias
:
0
);
__msvcrt
_long
tz
=
MSVCRT___timezone
+
(
is_dst
?
MSVCRT__dstbias
:
0
);
char
sign
;
if
(
tz
<
0
)
{
...
...
@@ -1175,11 +1175,11 @@ static inline BOOL strftime_tzdiff(STRFTIME_CHAR *str, MSVCRT_size_t *pos, MSVCR
}
#endif
static
MSVCRT_size_t
strftime_impl
(
STRFTIME_CHAR
*
str
,
MSVCRT_
size_t
max
,
static
size_t
strftime_impl
(
STRFTIME_CHAR
*
str
,
size_t
max
,
const
STRFTIME_CHAR
*
format
,
const
struct
MSVCRT_tm
*
mstm
,
__lc_time_data
*
time_data
,
_locale_t
loc
)
{
MSVCRT_
size_t
ret
,
tmp
;
size_t
ret
,
tmp
;
BOOL
alternate
;
int
year
=
mstm
?
mstm
->
tm_year
+
1900
:
-
1
;
...
...
@@ -1525,7 +1525,7 @@ einval_error:
return
0
;
}
static
MSVCRT_size_t
strftime_helper
(
char
*
str
,
MSVCRT_
size_t
max
,
const
char
*
format
,
static
size_t
strftime_helper
(
char
*
str
,
size_t
max
,
const
char
*
format
,
const
struct
MSVCRT_tm
*
mstm
,
__lc_time_data
*
time_data
,
_locale_t
loc
)
{
#if _MSVCR_VER <= 90
...
...
@@ -1533,7 +1533,7 @@ static MSVCRT_size_t strftime_helper(char *str, MSVCRT_size_t max, const char *f
return
strftime_impl
(
str
,
max
,
format
,
mstm
,
time_data
,
loc
);
#else
wchar_t
*
s
,
*
fmt
;
MSVCRT_
size_t
len
;
size_t
len
;
TRACE
(
"(%p %Iu %s %p %p %p)
\n
"
,
str
,
max
,
format
,
mstm
,
time_data
,
loc
);
...
...
@@ -1564,7 +1564,7 @@ static MSVCRT_size_t strftime_helper(char *str, MSVCRT_size_t max, const char *f
/********************************************************************
* _strftime_l (MSVCR80.@)
*/
MSVCRT_size_t
CDECL
MSVCRT__strftime_l
(
char
*
str
,
MSVCRT_
size_t
max
,
const
char
*
format
,
size_t
CDECL
MSVCRT__strftime_l
(
char
*
str
,
size_t
max
,
const
char
*
format
,
const
struct
MSVCRT_tm
*
mstm
,
_locale_t
loc
)
{
return
strftime_helper
(
str
,
max
,
format
,
mstm
,
NULL
,
loc
);
...
...
@@ -1574,7 +1574,7 @@ MSVCRT_size_t CDECL MSVCRT__strftime_l( char *str, MSVCRT_size_t max, const char
/*********************************************************************
* _Strftime (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
_Strftime
(
char
*
str
,
MSVCRT_
size_t
max
,
const
char
*
format
,
size_t
CDECL
_Strftime
(
char
*
str
,
size_t
max
,
const
char
*
format
,
const
struct
MSVCRT_tm
*
mstm
,
__lc_time_data
*
time_data
)
{
return
strftime_helper
(
str
,
max
,
format
,
mstm
,
time_data
,
NULL
);
...
...
@@ -1583,19 +1583,19 @@ MSVCRT_size_t CDECL _Strftime(char *str, MSVCRT_size_t max, const char *format,
/*********************************************************************
* strftime (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_strftime
(
char
*
str
,
MSVCRT_
size_t
max
,
const
char
*
format
,
size_t
CDECL
MSVCRT_strftime
(
char
*
str
,
size_t
max
,
const
char
*
format
,
const
struct
MSVCRT_tm
*
mstm
)
{
return
strftime_helper
(
str
,
max
,
format
,
mstm
,
NULL
,
NULL
);
}
static
MSVCRT_size_t
wcsftime_helper
(
wchar_t
*
str
,
MSVCRT_
size_t
max
,
static
size_t
wcsftime_helper
(
wchar_t
*
str
,
size_t
max
,
const
wchar_t
*
format
,
const
struct
MSVCRT_tm
*
mstm
,
__lc_time_data
*
time_data
,
_locale_t
loc
)
{
#if _MSVCR_VER <= 90
char
*
s
,
*
fmt
;
MSVCRT_
size_t
len
;
size_t
len
;
TRACE
(
"%p %Iu %s %p %p %p
\n
"
,
str
,
max
,
debugstr_w
(
format
),
mstm
,
time_data
,
loc
);
...
...
@@ -1622,7 +1622,7 @@ static MSVCRT_size_t wcsftime_helper( wchar_t *str, MSVCRT_size_t max,
/*********************************************************************
* _wcsftime_l (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT__wcsftime_l
(
wchar_t
*
str
,
MSVCRT_
size_t
max
,
size_t
CDECL
MSVCRT__wcsftime_l
(
wchar_t
*
str
,
size_t
max
,
const
wchar_t
*
format
,
const
struct
MSVCRT_tm
*
mstm
,
_locale_t
loc
)
{
return
wcsftime_helper
(
str
,
max
,
format
,
mstm
,
NULL
,
loc
);
...
...
@@ -1631,7 +1631,7 @@ MSVCRT_size_t CDECL MSVCRT__wcsftime_l( wchar_t *str, MSVCRT_size_t max,
/*********************************************************************
* wcsftime (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_wcsftime
(
wchar_t
*
str
,
MSVCRT_
size_t
max
,
size_t
CDECL
MSVCRT_wcsftime
(
wchar_t
*
str
,
size_t
max
,
const
wchar_t
*
format
,
const
struct
MSVCRT_tm
*
mstm
)
{
return
wcsftime_helper
(
str
,
max
,
format
,
mstm
,
NULL
,
NULL
);
...
...
@@ -1641,7 +1641,7 @@ MSVCRT_size_t CDECL MSVCRT_wcsftime( wchar_t *str, MSVCRT_size_t max,
/*********************************************************************
* _Wcsftime (MSVCR110.@)
*/
MSVCRT_size_t
CDECL
_Wcsftime
(
wchar_t
*
str
,
MSVCRT_
size_t
max
,
size_t
CDECL
_Wcsftime
(
wchar_t
*
str
,
size_t
max
,
const
wchar_t
*
format
,
const
struct
MSVCRT_tm
*
mstm
,
__lc_time_data
*
time_data
)
{
...
...
@@ -1701,7 +1701,7 @@ char * CDECL MSVCRT_asctime(const struct MSVCRT_tm *mstm)
/*********************************************************************
* asctime_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_asctime_s
(
char
*
time
,
MSVCRT_
size_t
size
,
const
struct
MSVCRT_tm
*
mstm
)
int
CDECL
MSVCRT_asctime_s
(
char
*
time
,
size_t
size
,
const
struct
MSVCRT_tm
*
mstm
)
{
if
(
!
MSVCRT_CHECK_PMT
(
time
!=
NULL
))
return
MSVCRT_EINVAL
;
if
(
size
)
time
[
0
]
=
0
;
...
...
@@ -1746,7 +1746,7 @@ wchar_t * CDECL MSVCRT__wasctime(const struct MSVCRT_tm *mstm)
/*********************************************************************
* _wasctime_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__wasctime_s
(
wchar_t
*
time
,
MSVCRT_
size_t
size
,
const
struct
MSVCRT_tm
*
mstm
)
int
CDECL
MSVCRT__wasctime_s
(
wchar_t
*
time
,
size_t
size
,
const
struct
MSVCRT_tm
*
mstm
)
{
char
buffer
[
26
];
int
ret
;
...
...
@@ -1766,7 +1766,7 @@ int CDECL MSVCRT__wasctime_s(wchar_t* time, MSVCRT_size_t size, const struct MSV
/*********************************************************************
* _ctime64 (MSVCRT.@)
*/
char
*
CDECL
MSVCRT__ctime64
(
const
MSVCRT_
__time64_t
*
time
)
char
*
CDECL
MSVCRT__ctime64
(
const
__time64_t
*
time
)
{
struct
MSVCRT_tm
*
t
;
t
=
MSVCRT__localtime64
(
time
);
...
...
@@ -1777,7 +1777,7 @@ char * CDECL MSVCRT__ctime64(const MSVCRT___time64_t *time)
/*********************************************************************
* _ctime64_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__ctime64_s
(
char
*
res
,
MSVCRT_size_t
len
,
const
MSVCRT_
__time64_t
*
time
)
int
CDECL
MSVCRT__ctime64_s
(
char
*
res
,
size_t
len
,
const
__time64_t
*
time
)
{
struct
MSVCRT_tm
*
t
;
...
...
@@ -1795,7 +1795,7 @@ int CDECL MSVCRT__ctime64_s(char *res, MSVCRT_size_t len, const MSVCRT___time64_
/*********************************************************************
* _ctime32 (MSVCRT.@)
*/
char
*
CDECL
MSVCRT__ctime32
(
const
MSVCRT_
__time32_t
*
time
)
char
*
CDECL
MSVCRT__ctime32
(
const
__time32_t
*
time
)
{
struct
MSVCRT_tm
*
t
;
t
=
MSVCRT__localtime32
(
time
);
...
...
@@ -1806,7 +1806,7 @@ char * CDECL MSVCRT__ctime32(const MSVCRT___time32_t *time)
/*********************************************************************
* _ctime32_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__ctime32_s
(
char
*
res
,
MSVCRT_size_t
len
,
const
MSVCRT_
__time32_t
*
time
)
int
CDECL
MSVCRT__ctime32_s
(
char
*
res
,
size_t
len
,
const
__time32_t
*
time
)
{
struct
MSVCRT_tm
*
t
;
...
...
@@ -1825,12 +1825,12 @@ int CDECL MSVCRT__ctime32_s(char *res, MSVCRT_size_t len, const MSVCRT___time32_
* ctime (MSVCRT.@)
*/
#ifdef _WIN64
char
*
CDECL
MSVCRT_ctime
(
const
MSVCRT_
__time64_t
*
time
)
char
*
CDECL
MSVCRT_ctime
(
const
__time64_t
*
time
)
{
return
MSVCRT__ctime64
(
time
);
}
#else
char
*
CDECL
MSVCRT_ctime
(
const
MSVCRT_
__time32_t
*
time
)
char
*
CDECL
MSVCRT_ctime
(
const
__time32_t
*
time
)
{
return
MSVCRT__ctime32
(
time
);
}
...
...
@@ -1839,7 +1839,7 @@ char * CDECL MSVCRT_ctime(const MSVCRT___time32_t *time)
/*********************************************************************
* _wctime64 (MSVCRT.@)
*/
wchar_t
*
CDECL
MSVCRT__wctime64
(
const
MSVCRT_
__time64_t
*
time
)
wchar_t
*
CDECL
MSVCRT__wctime64
(
const
__time64_t
*
time
)
{
return
MSVCRT__wasctime
(
MSVCRT__localtime64
(
time
)
);
}
...
...
@@ -1847,7 +1847,7 @@ wchar_t * CDECL MSVCRT__wctime64(const MSVCRT___time64_t *time)
/*********************************************************************
* _wctime32 (MSVCRT.@)
*/
wchar_t
*
CDECL
MSVCRT__wctime32
(
const
MSVCRT_
__time32_t
*
time
)
wchar_t
*
CDECL
MSVCRT__wctime32
(
const
__time32_t
*
time
)
{
return
MSVCRT__wasctime
(
MSVCRT__localtime32
(
time
)
);
}
...
...
@@ -1856,12 +1856,12 @@ wchar_t * CDECL MSVCRT__wctime32(const MSVCRT___time32_t *time)
* _wctime (MSVCRT.@)
*/
#ifdef _WIN64
wchar_t
*
CDECL
MSVCRT__wctime
(
const
MSVCRT_
__time64_t
*
time
)
wchar_t
*
CDECL
MSVCRT__wctime
(
const
__time64_t
*
time
)
{
return
MSVCRT__wctime64
(
time
);
}
#else
wchar_t
*
CDECL
MSVCRT__wctime
(
const
MSVCRT_
__time32_t
*
time
)
wchar_t
*
CDECL
MSVCRT__wctime
(
const
__time32_t
*
time
)
{
return
MSVCRT__wctime32
(
time
);
}
...
...
@@ -1871,7 +1871,7 @@ wchar_t * CDECL MSVCRT__wctime(const MSVCRT___time32_t *time)
* _wctime64_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__wctime64_s
(
wchar_t
*
buf
,
MSVCRT_size_t
size
,
const
MSVCRT_
__time64_t
*
time
)
size_t
size
,
const
__time64_t
*
time
)
{
struct
MSVCRT_tm
tm
;
int
ret
;
...
...
@@ -1893,8 +1893,8 @@ int CDECL MSVCRT__wctime64_s(wchar_t *buf,
/*********************************************************************
* _wctime32_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__wctime32_s
(
wchar_t
*
buf
,
MSVCRT_
size_t
size
,
const
MSVCRT_
__time32_t
*
time
)
int
CDECL
MSVCRT__wctime32_s
(
wchar_t
*
buf
,
size_t
size
,
const
__time32_t
*
time
)
{
struct
MSVCRT_tm
tm
;
int
ret
;
...
...
@@ -1944,13 +1944,13 @@ int CDECL _get_daylight(int *hours)
struct
_timespec32
{
MSVCRT_
__time32_t
tv_sec
;
__time32_t
tv_sec
;
LONG
tv_nsec
;
};
struct
_timespec64
{
MSVCRT_
__time64_t
tv_sec
;
__time64_t
tv_sec
;
LONG
tv_nsec
;
};
...
...
@@ -1985,7 +1985,7 @@ int CDECL _timespec32_get(struct _timespec32 *ts, int base)
if
(
_timespec64_get
(
&
ts64
,
base
)
!=
base
)
return
0
;
if
(
ts64
.
tv_sec
!=
(
MSVCRT_
__time32_t
)
ts64
.
tv_sec
)
if
(
ts64
.
tv_sec
!=
(
__time32_t
)
ts64
.
tv_sec
)
return
0
;
ts
->
tv_sec
=
ts64
.
tv_sec
;
...
...
dlls/msvcrt/wcs.c
View file @
fa272ada
...
...
@@ -88,7 +88,7 @@ wchar_t* CDECL MSVCRT__wcsdup( const wchar_t* str )
/*********************************************************************
* _towlower_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__towlower_l
(
MSVCRT_
wint_t
c
,
_locale_t
locale
)
int
CDECL
MSVCRT__towlower_l
(
wint_t
c
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
wchar_t
ret
;
...
...
@@ -112,7 +112,7 @@ int CDECL MSVCRT__towlower_l(MSVCRT_wint_t c, _locale_t locale)
/*********************************************************************
* towlower (MSVCRT.@)
*/
int
CDECL
MSVCRT_towlower
(
MSVCRT_
wint_t
c
)
int
CDECL
MSVCRT_towlower
(
wint_t
c
)
{
return
MSVCRT__towlower_l
(
c
,
NULL
);
}
...
...
@@ -160,7 +160,7 @@ INT CDECL MSVCRT__wcsicmp( const wchar_t* str1, const wchar_t* str2 )
* _wcsnicmp_l (MSVCRT.@)
*/
INT
CDECL
MSVCRT__wcsnicmp_l
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
MSVCRT_
size_t
n
,
_locale_t
locale
)
size_t
n
,
_locale_t
locale
)
{
_locale_tstruct
tmp
=
{
0
};
wchar_t
c1
,
c2
;
...
...
@@ -187,7 +187,7 @@ INT CDECL MSVCRT__wcsnicmp_l(const wchar_t *str1, const wchar_t *str2,
/*********************************************************************
* _wcsnicmp (MSVCRT.@)
*/
INT
CDECL
MSVCRT__wcsnicmp
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
MSVCRT_
size_t
n
)
INT
CDECL
MSVCRT__wcsnicmp
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
size_t
n
)
{
return
MSVCRT__wcsnicmp_l
(
str1
,
str2
,
n
,
NULL
);
}
...
...
@@ -237,7 +237,7 @@ INT CDECL MSVCRT__wcsicoll( const wchar_t* str1, const wchar_t* str2 )
* _wcsnicoll_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcsnicoll_l
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
MSVCRT_
size_t
count
,
_locale_t
locale
)
size_t
count
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
...
...
@@ -274,7 +274,7 @@ int CDECL MSVCRT__wcsnicoll_l(const wchar_t* str1, const wchar_t* str2,
/*********************************************************************
* _wcsnicoll (MSVCRT.@)
*/
INT
CDECL
MSVCRT__wcsnicoll
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
MSVCRT_
size_t
count
)
INT
CDECL
MSVCRT__wcsnicoll
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
size_t
count
)
{
return
MSVCRT__wcsnicoll_l
(
str1
,
str2
,
count
,
NULL
);
}
...
...
@@ -282,7 +282,7 @@ INT CDECL MSVCRT__wcsnicoll( const wchar_t* str1, const wchar_t* str2, MSVCRT_si
/*********************************************************************
* _wcsnset (MSVCRT.@)
*/
wchar_t
*
CDECL
MSVCRT__wcsnset
(
wchar_t
*
str
,
wchar_t
c
,
MSVCRT_
size_t
n
)
wchar_t
*
CDECL
MSVCRT__wcsnset
(
wchar_t
*
str
,
wchar_t
c
,
size_t
n
)
{
wchar_t
*
ret
=
str
;
while
((
n
--
>
0
)
&&
*
str
)
*
str
++
=
c
;
...
...
@@ -292,9 +292,9 @@ wchar_t* CDECL MSVCRT__wcsnset( wchar_t* str, wchar_t c, MSVCRT_size_t n )
/*********************************************************************
* _wcsnset_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcsnset_s
(
wchar_t
*
str
,
MSVCRT_size_t
size
,
wchar_t
c
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT__wcsnset_s
(
wchar_t
*
str
,
size_t
size
,
wchar_t
c
,
size_t
count
)
{
MSVCRT_
size_t
i
;
size_t
i
;
if
(
!
str
&&
!
size
&&
!
count
)
return
0
;
if
(
!
MSVCRT_CHECK_PMT
(
str
!=
NULL
))
return
MSVCRT_EINVAL
;
...
...
@@ -332,7 +332,7 @@ wchar_t* CDECL MSVCRT__wcsrev( wchar_t* str )
/*********************************************************************
* _wcsset_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcsset_s
(
wchar_t
*
str
,
MSVCRT_
size_t
n
,
wchar_t
c
)
int
CDECL
MSVCRT__wcsset_s
(
wchar_t
*
str
,
size_t
n
,
wchar_t
c
)
{
wchar_t
*
p
=
str
;
...
...
@@ -362,8 +362,7 @@ wchar_t* CDECL MSVCRT__wcsset( wchar_t* str, wchar_t c )
/******************************************************************
* _wcsupr_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcsupr_s_l
(
wchar_t
*
str
,
MSVCRT_size_t
n
,
_locale_t
locale
)
int
CDECL
MSVCRT__wcsupr_s_l
(
wchar_t
*
str
,
size_t
n
,
_locale_t
locale
)
{
_locale_tstruct
tmp
=
{
0
};
wchar_t
*
ptr
=
str
;
...
...
@@ -402,7 +401,7 @@ int CDECL MSVCRT__wcsupr_s_l( wchar_t* str, MSVCRT_size_t n,
* _wcsupr_s (MSVCRT.@)
*
*/
INT
CDECL
MSVCRT__wcsupr_s
(
wchar_t
*
str
,
MSVCRT_
size_t
n
)
INT
CDECL
MSVCRT__wcsupr_s
(
wchar_t
*
str
,
size_t
n
)
{
return
MSVCRT__wcsupr_s_l
(
str
,
n
,
NULL
);
}
...
...
@@ -427,7 +426,7 @@ wchar_t* CDECL MSVCRT__wcsupr( wchar_t *str )
/******************************************************************
* _wcslwr_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcslwr_s_l
(
wchar_t
*
str
,
MSVCRT_
size_t
n
,
_locale_t
locale
)
int
CDECL
MSVCRT__wcslwr_s_l
(
wchar_t
*
str
,
size_t
n
,
_locale_t
locale
)
{
_locale_tstruct
tmp
=
{
0
};
wchar_t
*
ptr
=
str
;
...
...
@@ -465,7 +464,7 @@ int CDECL MSVCRT__wcslwr_s_l( wchar_t* str, MSVCRT_size_t n, _locale_t locale )
/******************************************************************
* _wcslwr_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcslwr_s
(
wchar_t
*
str
,
MSVCRT_
size_t
n
)
int
CDECL
MSVCRT__wcslwr_s
(
wchar_t
*
str
,
size_t
n
)
{
return
MSVCRT__wcslwr_s_l
(
str
,
n
,
NULL
);
}
...
...
@@ -491,7 +490,7 @@ wchar_t* CDECL MSVCRT__wcslwr( wchar_t* str )
/*********************************************************************
* wcsncmp (MSVCRT.@)
*/
int
CDECL
MSVCRT_wcsncmp
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
MSVCRT_
size_t
n
)
int
CDECL
MSVCRT_wcsncmp
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
size_t
n
)
{
if
(
!
n
)
return
0
;
...
...
@@ -507,7 +506,7 @@ int CDECL MSVCRT_wcsncmp(const wchar_t *str1, const wchar_t *str2, MSVCRT_size_t
* _wcsncoll_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcsncoll_l
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
MSVCRT_
size_t
count
,
_locale_t
locale
)
size_t
count
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
...
...
@@ -526,7 +525,7 @@ int CDECL MSVCRT__wcsncoll_l(const wchar_t* str1, const wchar_t* str2,
/*********************************************************************
* _wcsncoll (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcsncoll
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT__wcsncoll
(
const
wchar_t
*
str1
,
const
wchar_t
*
str2
,
size_t
count
)
{
return
MSVCRT__wcsncoll_l
(
str1
,
str2
,
count
,
NULL
);
}
...
...
@@ -582,11 +581,11 @@ double CDECL MSVCRT__wcstod_l(const wchar_t* str, wchar_t** end,
/*********************************************************************
* wcsrtombs_l (INTERNAL)
*/
static
MSVCRT_
size_t
MSVCRT_wcsrtombs_l
(
char
*
mbstr
,
const
wchar_t
**
wcstr
,
MSVCRT_
size_t
count
,
_locale_t
locale
)
static
size_t
MSVCRT_wcsrtombs_l
(
char
*
mbstr
,
const
wchar_t
**
wcstr
,
size_t
count
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
MSVCRT_
size_t
tmp
=
0
;
size_t
tmp
=
0
;
BOOL
used_default
=
FALSE
;
BOOL
*
pused_default
;
...
...
@@ -596,7 +595,7 @@ static MSVCRT_size_t MSVCRT_wcsrtombs_l(char *mbstr, const wchar_t **wcstr,
locinfo
=
locale
->
locinfo
;
if
(
!
locinfo
->
lc_codepage
)
{
MSVCRT_
size_t
i
;
size_t
i
;
if
(
!
mbstr
)
return
MSVCRT_wcslen
(
*
wcstr
);
...
...
@@ -627,7 +626,7 @@ static MSVCRT_size_t MSVCRT_wcsrtombs_l(char *mbstr, const wchar_t **wcstr,
while
(
**
wcstr
)
{
char
buf
[
3
];
MSVCRT_
size_t
i
,
size
;
size_t
i
,
size
;
size
=
WideCharToMultiByte
(
locinfo
->
lc_codepage
,
WC_NO_BEST_FIT_CHARS
,
*
wcstr
,
1
,
buf
,
3
,
NULL
,
pused_default
);
...
...
@@ -653,8 +652,8 @@ static MSVCRT_size_t MSVCRT_wcsrtombs_l(char *mbstr, const wchar_t **wcstr,
/*********************************************************************
* _wcstombs_l (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT__wcstombs_l
(
char
*
mbstr
,
const
wchar_t
*
wcstr
,
MSVCRT_
size_t
count
,
_locale_t
locale
)
size_t
CDECL
MSVCRT__wcstombs_l
(
char
*
mbstr
,
const
wchar_t
*
wcstr
,
size_t
count
,
_locale_t
locale
)
{
return
MSVCRT_wcsrtombs_l
(
mbstr
,
&
wcstr
,
count
,
locale
);
}
...
...
@@ -662,8 +661,8 @@ MSVCRT_size_t CDECL MSVCRT__wcstombs_l(char *mbstr, const wchar_t *wcstr,
/*********************************************************************
* wcstombs (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT_wcstombs
(
char
*
mbstr
,
const
wchar_t
*
wcstr
,
MSVCRT_
size_t
count
)
size_t
CDECL
MSVCRT_wcstombs
(
char
*
mbstr
,
const
wchar_t
*
wcstr
,
size_t
count
)
{
return
MSVCRT_wcsrtombs_l
(
mbstr
,
&
wcstr
,
count
,
NULL
);
}
...
...
@@ -671,8 +670,8 @@ MSVCRT_size_t CDECL MSVCRT_wcstombs(char *mbstr, const wchar_t *wcstr,
/*********************************************************************
* wcsrtombs (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT_wcsrtombs
(
char
*
mbstr
,
const
wchar_t
**
wcstr
,
MSVCRT_size_t
count
,
MSVCRT_
mbstate_t
*
mbstate
)
size_t
CDECL
MSVCRT_wcsrtombs
(
char
*
mbstr
,
const
wchar_t
**
wcstr
,
size_t
count
,
mbstate_t
*
mbstate
)
{
if
(
mbstate
)
*
mbstate
=
0
;
...
...
@@ -683,11 +682,10 @@ MSVCRT_size_t CDECL MSVCRT_wcsrtombs(char *mbstr, const wchar_t **wcstr,
/*********************************************************************
* MSVCRT_wcsrtombs_s_l (INTERNAL)
*/
static
int
MSVCRT_wcsrtombs_s_l
(
MSVCRT_size_t
*
ret
,
char
*
mbstr
,
MSVCRT_size_t
size
,
const
wchar_t
**
wcstr
,
MSVCRT_size_t
count
,
_locale_t
locale
)
static
int
MSVCRT_wcsrtombs_s_l
(
size_t
*
ret
,
char
*
mbstr
,
size_t
size
,
const
wchar_t
**
wcstr
,
size_t
count
,
_locale_t
locale
)
{
MSVCRT_
size_t
conv
;
size_t
conv
;
int
err
;
if
(
!
mbstr
&&
!
size
&&
wcstr
)
{
...
...
@@ -738,9 +736,8 @@ static int MSVCRT_wcsrtombs_s_l(MSVCRT_size_t *ret, char *mbstr,
/*********************************************************************
* _wcstombs_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcstombs_s_l
(
MSVCRT_size_t
*
ret
,
char
*
mbstr
,
MSVCRT_size_t
size
,
const
wchar_t
*
wcstr
,
MSVCRT_size_t
count
,
_locale_t
locale
)
int
CDECL
MSVCRT__wcstombs_s_l
(
size_t
*
ret
,
char
*
mbstr
,
size_t
size
,
const
wchar_t
*
wcstr
,
size_t
count
,
_locale_t
locale
)
{
return
MSVCRT_wcsrtombs_s_l
(
ret
,
mbstr
,
size
,
&
wcstr
,
count
,
locale
);
}
...
...
@@ -748,8 +745,8 @@ int CDECL MSVCRT__wcstombs_s_l(MSVCRT_size_t *ret, char *mbstr,
/*********************************************************************
* wcstombs_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_wcstombs_s
(
MSVCRT_size_t
*
ret
,
char
*
mbstr
,
MSVCRT_size_t
size
,
const
wchar_t
*
wcstr
,
MSVCRT_
size_t
count
)
int
CDECL
MSVCRT_wcstombs_s
(
size_t
*
ret
,
char
*
mbstr
,
size_t
size
,
const
wchar_t
*
wcstr
,
size_t
count
)
{
return
MSVCRT_wcsrtombs_s_l
(
ret
,
mbstr
,
size
,
&
wcstr
,
count
,
NULL
);
}
...
...
@@ -757,8 +754,8 @@ int CDECL MSVCRT_wcstombs_s(MSVCRT_size_t *ret, char *mbstr,
/*********************************************************************
* wcsrtombs_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_wcsrtombs_s
(
MSVCRT_size_t
*
ret
,
char
*
mbstr
,
MSVCRT_
size_t
size
,
const
wchar_t
**
wcstr
,
MSVCRT_size_t
count
,
MSVCRT_
mbstate_t
*
mbstate
)
int
CDECL
MSVCRT_wcsrtombs_s
(
size_t
*
ret
,
char
*
mbstr
,
size_t
size
,
const
wchar_t
**
wcstr
,
size_t
count
,
mbstate_t
*
mbstate
)
{
if
(
mbstate
)
*
mbstate
=
0
;
...
...
@@ -915,7 +912,7 @@ int CDECL __stdio_common_vsprintf( unsigned __int64 options, char *str, size_t l
/*********************************************************************
* _vsnprintf_l (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsnprintf_l
(
char
*
str
,
MSVCRT_
size_t
len
,
const
char
*
format
,
int
CDECL
MSVCRT_vsnprintf_l
(
char
*
str
,
size_t
len
,
const
char
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
static
const
char
nullbyte
=
'\0'
;
...
...
@@ -951,8 +948,8 @@ int WINAPIV MSVCRT_sprintf_l(char *str, const char *format,
return
retval
;
}
static
int
CDECL
MSVCRT_vsnprintf_s_l_opt
(
char
*
str
,
MSVCRT_
size_t
sizeOfBuffer
,
MSVCRT_
size_t
count
,
const
char
*
format
,
DWORD
options
,
static
int
CDECL
MSVCRT_vsnprintf_s_l_opt
(
char
*
str
,
size_t
sizeOfBuffer
,
size_t
count
,
const
char
*
format
,
DWORD
options
,
_locale_t
locale
,
__ms_va_list
valist
)
{
static
const
char
nullbyte
=
'\0'
;
...
...
@@ -983,8 +980,8 @@ static int CDECL MSVCRT_vsnprintf_s_l_opt( char *str, MSVCRT_size_t sizeOfBuffer
return
ret
;
}
static
int
MSVCRT_vsnwprintf_s_l_opt
(
wchar_t
*
str
,
MSVCRT_
size_t
sizeOfBuffer
,
MSVCRT_
size_t
count
,
const
wchar_t
*
format
,
DWORD
options
,
static
int
MSVCRT_vsnwprintf_s_l_opt
(
wchar_t
*
str
,
size_t
sizeOfBuffer
,
size_t
count
,
const
wchar_t
*
format
,
DWORD
options
,
_locale_t
locale
,
__ms_va_list
valist
)
{
struct
_str_ctx_w
ctx
;
...
...
@@ -1016,8 +1013,8 @@ static int MSVCRT_vsnwprintf_s_l_opt( wchar_t *str, MSVCRT_size_t sizeOfBuffer,
/*********************************************************************
* _vsnprintf_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsnprintf_s_l
(
char
*
str
,
MSVCRT_
size_t
sizeOfBuffer
,
MSVCRT_
size_t
count
,
const
char
*
format
,
int
CDECL
MSVCRT_vsnprintf_s_l
(
char
*
str
,
size_t
sizeOfBuffer
,
size_t
count
,
const
char
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
return
MSVCRT_vsnprintf_s_l_opt
(
str
,
sizeOfBuffer
,
count
,
format
,
0
,
locale
,
valist
);
...
...
@@ -1026,7 +1023,7 @@ int CDECL MSVCRT_vsnprintf_s_l( char *str, MSVCRT_size_t sizeOfBuffer,
/*********************************************************************
* _vsprintf_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsprintf_s_l
(
char
*
str
,
MSVCRT_
size_t
count
,
const
char
*
format
,
int
CDECL
MSVCRT_vsprintf_s_l
(
char
*
str
,
size_t
count
,
const
char
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
return
MSVCRT_vsnprintf_s_l
(
str
,
INT_MAX
,
count
,
format
,
locale
,
valist
);
...
...
@@ -1035,7 +1032,7 @@ int CDECL MSVCRT_vsprintf_s_l( char *str, MSVCRT_size_t count, const char *forma
/*********************************************************************
* _sprintf_s_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT_sprintf_s_l
(
char
*
str
,
MSVCRT_
size_t
count
,
const
char
*
format
,
int
WINAPIV
MSVCRT_sprintf_s_l
(
char
*
str
,
size_t
count
,
const
char
*
format
,
_locale_t
locale
,
...)
{
int
retval
;
...
...
@@ -1049,8 +1046,8 @@ int WINAPIV MSVCRT_sprintf_s_l( char *str, MSVCRT_size_t count, const char *form
/*********************************************************************
* _vsnprintf_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsnprintf_s
(
char
*
str
,
MSVCRT_
size_t
sizeOfBuffer
,
MSVCRT_
size_t
count
,
const
char
*
format
,
__ms_va_list
valist
)
int
CDECL
MSVCRT_vsnprintf_s
(
char
*
str
,
size_t
sizeOfBuffer
,
size_t
count
,
const
char
*
format
,
__ms_va_list
valist
)
{
return
MSVCRT_vsnprintf_s_l
(
str
,
sizeOfBuffer
,
count
,
format
,
NULL
,
valist
);
}
...
...
@@ -1058,7 +1055,7 @@ int CDECL MSVCRT_vsnprintf_s( char *str, MSVCRT_size_t sizeOfBuffer,
/*********************************************************************
* _vsnprintf_c_l (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsnprintf_c_l
(
char
*
str
,
MSVCRT_
size_t
len
,
const
char
*
format
,
int
CDECL
MSVCRT_vsnprintf_c_l
(
char
*
str
,
size_t
len
,
const
char
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
return
MSVCRT_vsnprintf_s_l_opt
(
str
,
len
,
len
,
format
,
0
,
locale
,
valist
);
...
...
@@ -1067,7 +1064,7 @@ int CDECL MSVCRT_vsnprintf_c_l(char *str, MSVCRT_size_t len, const char *format,
/*********************************************************************
* _vsnprintf_c (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsnprintf_c
(
char
*
str
,
MSVCRT_
size_t
len
,
int
CDECL
MSVCRT_vsnprintf_c
(
char
*
str
,
size_t
len
,
const
char
*
format
,
__ms_va_list
valist
)
{
return
MSVCRT_vsnprintf_c_l
(
str
,
len
,
format
,
NULL
,
valist
);
...
...
@@ -1079,7 +1076,7 @@ int CDECL MSVCRT_vsnprintf_c(char *str, MSVCRT_size_t len,
* __stdio_common_vsnprintf_s (UCRTBASE.@)
*/
int
CDECL
MSVCRT__stdio_common_vsnprintf_s
(
unsigned
__int64
options
,
char
*
str
,
MSVCRT_size_t
sizeOfBuffer
,
MSVCRT_
size_t
count
,
char
*
str
,
size_t
sizeOfBuffer
,
size_t
count
,
const
char
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
if
(
options
&
~
UCRTBASE_PRINTF_MASK
)
...
...
@@ -1091,7 +1088,7 @@ int CDECL MSVCRT__stdio_common_vsnprintf_s( unsigned __int64 options,
* __stdio_common_vsnwprintf_s (UCRTBASE.@)
*/
int
CDECL
MSVCRT__stdio_common_vsnwprintf_s
(
unsigned
__int64
options
,
wchar_t
*
str
,
MSVCRT_size_t
sizeOfBuffer
,
MSVCRT_
size_t
count
,
wchar_t
*
str
,
size_t
sizeOfBuffer
,
size_t
count
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
if
(
options
&
~
UCRTBASE_PRINTF_MASK
)
...
...
@@ -1103,7 +1100,7 @@ int CDECL MSVCRT__stdio_common_vsnwprintf_s( unsigned __int64 options,
* __stdio_common_vswprintf_s (UCRTBASE.@)
*/
int
CDECL
MSVCRT__stdio_common_vswprintf_s
(
unsigned
__int64
options
,
wchar_t
*
str
,
MSVCRT_
size_t
count
,
const
wchar_t
*
format
,
wchar_t
*
str
,
size_t
count
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
return
MSVCRT__stdio_common_vsnwprintf_s
(
options
,
str
,
INT_MAX
,
count
,
format
,
locale
,
valist
);
...
...
@@ -1113,7 +1110,7 @@ int CDECL MSVCRT__stdio_common_vswprintf_s( unsigned __int64 options,
* __stdio_common_vsprintf_s (UCRTBASE.@)
*/
int
CDECL
MSVCRT__stdio_common_vsprintf_s
(
unsigned
__int64
options
,
char
*
str
,
MSVCRT_
size_t
count
,
const
char
*
format
,
char
*
str
,
size_t
count
,
const
char
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
if
(
options
&
~
UCRTBASE_PRINTF_MASK
)
...
...
@@ -1134,7 +1131,7 @@ int CDECL MSVCRT_vsprintf( char *str, const char *format, __ms_va_list valist)
/*********************************************************************
* vsprintf_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsprintf_s
(
char
*
str
,
MSVCRT_
size_t
num
,
const
char
*
format
,
__ms_va_list
valist
)
int
CDECL
MSVCRT_vsprintf_s
(
char
*
str
,
size_t
num
,
const
char
*
format
,
__ms_va_list
valist
)
{
return
vsnprintf
(
str
,
num
,
format
,
valist
);
}
...
...
@@ -1197,7 +1194,7 @@ int CDECL MSVCRT__vscprintf_p(const char *format, __ms_va_list argptr)
/*********************************************************************
* _snprintf (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snprintf
(
char
*
str
,
MSVCRT_
size_t
len
,
const
char
*
format
,
...)
int
WINAPIV
MSVCRT__snprintf
(
char
*
str
,
size_t
len
,
const
char
*
format
,
...)
{
int
retval
;
__ms_va_list
valist
;
...
...
@@ -1210,7 +1207,7 @@ int WINAPIV MSVCRT__snprintf(char *str, MSVCRT_size_t len, const char *format, .
/*********************************************************************
* _snprintf_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snprintf_l
(
char
*
str
,
MSVCRT_
size_t
count
,
const
char
*
format
,
int
WINAPIV
MSVCRT__snprintf_l
(
char
*
str
,
size_t
count
,
const
char
*
format
,
_locale_t
locale
,
...)
{
int
retval
;
...
...
@@ -1224,7 +1221,7 @@ int WINAPIV MSVCRT__snprintf_l(char *str, MSVCRT_size_t count, const char *forma
/*********************************************************************
* _snprintf_c_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT_snprintf_c_l
(
char
*
str
,
MSVCRT_
size_t
count
,
const
char
*
format
,
int
WINAPIV
MSVCRT_snprintf_c_l
(
char
*
str
,
size_t
count
,
const
char
*
format
,
_locale_t
locale
,
...)
{
int
retval
;
...
...
@@ -1238,7 +1235,7 @@ int WINAPIV MSVCRT_snprintf_c_l(char *str, MSVCRT_size_t count, const char *form
/*********************************************************************
* _snprintf_c (MSVCRT.@)
*/
int
WINAPIV
MSVCRT_snprintf_c
(
char
*
str
,
MSVCRT_
size_t
count
,
const
char
*
format
,
...)
int
WINAPIV
MSVCRT_snprintf_c
(
char
*
str
,
size_t
count
,
const
char
*
format
,
...)
{
int
retval
;
__ms_va_list
valist
;
...
...
@@ -1251,7 +1248,7 @@ int WINAPIV MSVCRT_snprintf_c(char *str, MSVCRT_size_t count, const char *format
/*********************************************************************
* _snprintf_s_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT_snprintf_s_l
(
char
*
str
,
MSVCRT_size_t
len
,
MSVCRT_
size_t
count
,
int
WINAPIV
MSVCRT_snprintf_s_l
(
char
*
str
,
size_t
len
,
size_t
count
,
const
char
*
format
,
_locale_t
locale
,
...)
{
int
retval
;
...
...
@@ -1265,7 +1262,7 @@ int WINAPIV MSVCRT_snprintf_s_l(char *str, MSVCRT_size_t len, MSVCRT_size_t coun
/*********************************************************************
* _snprintf_s (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snprintf_s
(
char
*
str
,
MSVCRT_size_t
len
,
MSVCRT_
size_t
count
,
int
WINAPIV
MSVCRT__snprintf_s
(
char
*
str
,
size_t
len
,
size_t
count
,
const
char
*
format
,
...)
{
int
retval
;
...
...
@@ -1292,7 +1289,7 @@ int WINAPIV MSVCRT__scprintf(const char *format, ...)
/*********************************************************************
* _vsnwprintf (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsnwprintf
(
wchar_t
*
str
,
MSVCRT_
size_t
len
,
int
CDECL
MSVCRT_vsnwprintf
(
wchar_t
*
str
,
size_t
len
,
const
wchar_t
*
format
,
__ms_va_list
valist
)
{
struct
_str_ctx_w
ctx
=
{
len
,
str
};
...
...
@@ -1307,9 +1304,8 @@ int CDECL MSVCRT_vsnwprintf(wchar_t *str, MSVCRT_size_t len,
/*********************************************************************
* _vsnwprintf_l (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsnwprintf_l
(
wchar_t
*
str
,
MSVCRT_size_t
len
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
int
CDECL
MSVCRT_vsnwprintf_l
(
wchar_t
*
str
,
size_t
len
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
struct
_str_ctx_w
ctx
=
{
len
,
str
};
int
ret
;
...
...
@@ -1323,9 +1319,8 @@ int CDECL MSVCRT_vsnwprintf_l(wchar_t *str, MSVCRT_size_t len,
/*********************************************************************
* _vswprintf_c_l (MSVCRT.@)
*/
int
CDECL
MSVCRT_vswprintf_c_l
(
wchar_t
*
str
,
MSVCRT_size_t
len
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
int
CDECL
MSVCRT_vswprintf_c_l
(
wchar_t
*
str
,
size_t
len
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
return
MSVCRT_vsnwprintf_s_l_opt
(
str
,
len
,
len
,
format
,
0
,
locale
,
valist
);
}
...
...
@@ -1333,13 +1328,13 @@ int CDECL MSVCRT_vswprintf_c_l(wchar_t *str, MSVCRT_size_t len,
/*********************************************************************
* _vswprintf_c (MSVCRT.@)
*/
int
CDECL
MSVCRT_vswprintf_c
(
wchar_t
*
str
,
MSVCRT_
size_t
len
,
int
CDECL
MSVCRT_vswprintf_c
(
wchar_t
*
str
,
size_t
len
,
const
wchar_t
*
format
,
__ms_va_list
valist
)
{
return
MSVCRT_vswprintf_c_l
(
str
,
len
,
format
,
NULL
,
valist
);
}
static
int
MSVCRT_vswprintf_p_l_opt
(
wchar_t
*
buffer
,
MSVCRT_
size_t
length
,
static
int
MSVCRT_vswprintf_p_l_opt
(
wchar_t
*
buffer
,
size_t
length
,
const
wchar_t
*
format
,
DWORD
options
,
_locale_t
locale
,
__ms_va_list
args
)
{
printf_arg
args_ctx
[
MSVCRT__ARGMAX
+
1
];
...
...
@@ -1368,7 +1363,7 @@ static int MSVCRT_vswprintf_p_l_opt(wchar_t *buffer, MSVCRT_size_t length,
/*********************************************************************
* _vswprintf_p_l (MSVCRT.@)
*/
int
CDECL
MSVCRT_vswprintf_p_l
(
wchar_t
*
buffer
,
MSVCRT_
size_t
length
,
int
CDECL
MSVCRT_vswprintf_p_l
(
wchar_t
*
buffer
,
size_t
length
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
args
)
{
return
MSVCRT_vswprintf_p_l_opt
(
buffer
,
length
,
format
,
0
,
locale
,
args
);
...
...
@@ -1378,7 +1373,7 @@ int CDECL MSVCRT_vswprintf_p_l(wchar_t *buffer, MSVCRT_size_t length,
/*********************************************************************
* _vswprintf_p (MSVCR80.@)
*/
int
CDECL
MSVCRT__vswprintf_p
(
wchar_t
*
buffer
,
MSVCRT_
size_t
length
,
int
CDECL
MSVCRT__vswprintf_p
(
wchar_t
*
buffer
,
size_t
length
,
const
wchar_t
*
format
,
__ms_va_list
args
)
{
return
MSVCRT_vswprintf_p_l_opt
(
buffer
,
length
,
format
,
0
,
NULL
,
args
);
...
...
@@ -1390,7 +1385,7 @@ int CDECL MSVCRT__vswprintf_p(wchar_t *buffer, MSVCRT_size_t length,
* __stdio_common_vswprintf_p (UCRTBASE.@)
*/
int
CDECL
MSVCRT__stdio_common_vswprintf_p
(
unsigned
__int64
options
,
wchar_t
*
str
,
MSVCRT_
size_t
count
,
const
wchar_t
*
format
,
wchar_t
*
str
,
size_t
count
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
if
(
options
&
~
UCRTBASE_PRINTF_MASK
)
...
...
@@ -1402,8 +1397,8 @@ int CDECL MSVCRT__stdio_common_vswprintf_p( unsigned __int64 options,
/*********************************************************************
* _vsnwprintf_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsnwprintf_s_l
(
wchar_t
*
str
,
MSVCRT_
size_t
sizeOfBuffer
,
MSVCRT_
size_t
count
,
const
wchar_t
*
format
,
int
CDECL
MSVCRT_vsnwprintf_s_l
(
wchar_t
*
str
,
size_t
sizeOfBuffer
,
size_t
count
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
return
MSVCRT_vsnwprintf_s_l_opt
(
str
,
sizeOfBuffer
,
count
,
format
,
0
,
locale
,
valist
);
...
...
@@ -1412,8 +1407,8 @@ int CDECL MSVCRT_vsnwprintf_s_l( wchar_t *str, MSVCRT_size_t sizeOfBuffer,
/*********************************************************************
* _vsnwprintf_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsnwprintf_s
(
wchar_t
*
str
,
MSVCRT_
size_t
sizeOfBuffer
,
MSVCRT_
size_t
count
,
const
wchar_t
*
format
,
__ms_va_list
valist
)
int
CDECL
MSVCRT_vsnwprintf_s
(
wchar_t
*
str
,
size_t
sizeOfBuffer
,
size_t
count
,
const
wchar_t
*
format
,
__ms_va_list
valist
)
{
return
MSVCRT_vsnwprintf_s_l
(
str
,
sizeOfBuffer
,
count
,
format
,
NULL
,
valist
);
...
...
@@ -1422,7 +1417,7 @@ int CDECL MSVCRT_vsnwprintf_s(wchar_t *str, MSVCRT_size_t sizeOfBuffer,
/*********************************************************************
* _snwprintf (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snwprintf
(
wchar_t
*
str
,
MSVCRT_
size_t
len
,
const
wchar_t
*
format
,
...)
int
WINAPIV
MSVCRT__snwprintf
(
wchar_t
*
str
,
size_t
len
,
const
wchar_t
*
format
,
...)
{
int
retval
;
__ms_va_list
valist
;
...
...
@@ -1435,7 +1430,7 @@ int WINAPIV MSVCRT__snwprintf( wchar_t *str, MSVCRT_size_t len, const wchar_t *f
/*********************************************************************
* _snwprintf_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snwprintf_l
(
wchar_t
*
str
,
MSVCRT_
size_t
len
,
const
wchar_t
*
format
,
int
WINAPIV
MSVCRT__snwprintf_l
(
wchar_t
*
str
,
size_t
len
,
const
wchar_t
*
format
,
_locale_t
locale
,
...)
{
int
retval
;
...
...
@@ -1449,7 +1444,7 @@ int WINAPIV MSVCRT__snwprintf_l( wchar_t *str, MSVCRT_size_t len, const wchar_t
/*********************************************************************
* _snwprintf_s (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snwprintf_s
(
wchar_t
*
str
,
MSVCRT_size_t
len
,
MSVCRT_
size_t
count
,
int
WINAPIV
MSVCRT__snwprintf_s
(
wchar_t
*
str
,
size_t
len
,
size_t
count
,
const
wchar_t
*
format
,
...)
{
int
retval
;
...
...
@@ -1463,7 +1458,7 @@ int WINAPIV MSVCRT__snwprintf_s( wchar_t *str, MSVCRT_size_t len, MSVCRT_size_t
/*********************************************************************
* _snwprintf_s_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__snwprintf_s_l
(
wchar_t
*
str
,
MSVCRT_size_t
len
,
MSVCRT_
size_t
count
,
int
WINAPIV
MSVCRT__snwprintf_s_l
(
wchar_t
*
str
,
size_t
len
,
size_t
count
,
const
wchar_t
*
format
,
_locale_t
locale
,
...
)
{
int
retval
;
...
...
@@ -1500,7 +1495,7 @@ static int puts_clbk_str_c99_w(void *ctx, int len, const wchar_t *str)
* __stdio_common_vswprintf (UCRTBASE.@)
*/
int
CDECL
MSVCRT__stdio_common_vswprintf
(
unsigned
__int64
options
,
wchar_t
*
str
,
MSVCRT_
size_t
len
,
const
wchar_t
*
format
,
wchar_t
*
str
,
size_t
len
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
valist
)
{
struct
_str_ctx_w
ctx
=
{
len
,
str
};
...
...
@@ -1544,7 +1539,7 @@ int WINAPIV MSVCRT_sprintf( char *str, const char *format, ... )
/*********************************************************************
* sprintf_s (MSVCRT.@)
*/
int
WINAPIV
MSVCRT_sprintf_s
(
char
*
str
,
MSVCRT_
size_t
num
,
const
char
*
format
,
...
)
int
WINAPIV
MSVCRT_sprintf_s
(
char
*
str
,
size_t
num
,
const
char
*
format
,
...
)
{
__ms_va_list
ap
;
int
r
;
...
...
@@ -1586,7 +1581,7 @@ int WINAPIV MSVCRT_swprintf( wchar_t *str, const wchar_t *format, ... )
/*********************************************************************
* swprintf_s (MSVCRT.@)
*/
int
WINAPIV
MSVCRT_swprintf_s
(
wchar_t
*
str
,
MSVCRT_
size_t
numberOfElements
,
int
WINAPIV
MSVCRT_swprintf_s
(
wchar_t
*
str
,
size_t
numberOfElements
,
const
wchar_t
*
format
,
...
)
{
__ms_va_list
ap
;
...
...
@@ -1602,7 +1597,7 @@ int WINAPIV MSVCRT_swprintf_s(wchar_t *str, MSVCRT_size_t numberOfElements,
/*********************************************************************
* _swprintf_s_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT__swprintf_s_l
(
wchar_t
*
str
,
MSVCRT_
size_t
numberOfElements
,
int
WINAPIV
MSVCRT__swprintf_s_l
(
wchar_t
*
str
,
size_t
numberOfElements
,
const
wchar_t
*
format
,
_locale_t
locale
,
...
)
{
__ms_va_list
ap
;
...
...
@@ -1618,7 +1613,7 @@ int WINAPIV MSVCRT__swprintf_s_l(wchar_t *str, MSVCRT_size_t numberOfElements,
/*********************************************************************
* _swprintf_c_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT_swprintf_c_l
(
wchar_t
*
str
,
MSVCRT_
size_t
len
,
int
WINAPIV
MSVCRT_swprintf_c_l
(
wchar_t
*
str
,
size_t
len
,
const
wchar_t
*
format
,
_locale_t
locale
,
...
)
{
__ms_va_list
ap
;
...
...
@@ -1634,7 +1629,7 @@ int WINAPIV MSVCRT_swprintf_c_l(wchar_t *str, MSVCRT_size_t len,
/*********************************************************************
* _swprintf_c (MSVCRT.@)
*/
int
WINAPIV
MSVCRT_swprintf_c
(
wchar_t
*
str
,
MSVCRT_
size_t
len
,
int
WINAPIV
MSVCRT_swprintf_c
(
wchar_t
*
str
,
size_t
len
,
const
wchar_t
*
format
,
...
)
{
__ms_va_list
ap
;
...
...
@@ -1701,7 +1696,7 @@ int CDECL MSVCRT__vscwprintf_p(const wchar_t *format, __ms_va_list args)
/*********************************************************************
* vswprintf_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_vswprintf_s
(
wchar_t
*
str
,
MSVCRT_
size_t
numberOfElements
,
int
CDECL
MSVCRT_vswprintf_s
(
wchar_t
*
str
,
size_t
numberOfElements
,
const
wchar_t
*
format
,
__ms_va_list
args
)
{
return
MSVCRT_vsnwprintf_s
(
str
,
numberOfElements
,
INT_MAX
,
format
,
args
);
...
...
@@ -1710,14 +1705,14 @@ int CDECL MSVCRT_vswprintf_s(wchar_t* str, MSVCRT_size_t numberOfElements,
/*********************************************************************
* _vswprintf_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT_vswprintf_s_l
(
wchar_t
*
str
,
MSVCRT_
size_t
numberOfElements
,
int
CDECL
MSVCRT_vswprintf_s_l
(
wchar_t
*
str
,
size_t
numberOfElements
,
const
wchar_t
*
format
,
_locale_t
locale
,
__ms_va_list
args
)
{
return
MSVCRT_vsnwprintf_s_l
(
str
,
numberOfElements
,
INT_MAX
,
format
,
locale
,
args
);
}
static
int
MSVCRT_vsprintf_p_l_opt
(
char
*
buffer
,
MSVCRT_
size_t
length
,
const
char
*
format
,
static
int
MSVCRT_vsprintf_p_l_opt
(
char
*
buffer
,
size_t
length
,
const
char
*
format
,
DWORD
options
,
_locale_t
locale
,
__ms_va_list
args
)
{
static
const
char
nullbyte
=
'\0'
;
...
...
@@ -1747,7 +1742,7 @@ static int MSVCRT_vsprintf_p_l_opt(char *buffer, MSVCRT_size_t length, const cha
/*********************************************************************
* _vsprintf_p_l (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsprintf_p_l
(
char
*
buffer
,
MSVCRT_
size_t
length
,
const
char
*
format
,
int
CDECL
MSVCRT_vsprintf_p_l
(
char
*
buffer
,
size_t
length
,
const
char
*
format
,
_locale_t
locale
,
__ms_va_list
args
)
{
return
MSVCRT_vsprintf_p_l_opt
(
buffer
,
length
,
format
,
0
,
locale
,
args
);
...
...
@@ -1756,7 +1751,7 @@ int CDECL MSVCRT_vsprintf_p_l(char *buffer, MSVCRT_size_t length, const char *fo
/*********************************************************************
* _vsprintf_p (MSVCRT.@)
*/
int
CDECL
MSVCRT_vsprintf_p
(
char
*
buffer
,
MSVCRT_
size_t
length
,
int
CDECL
MSVCRT_vsprintf_p
(
char
*
buffer
,
size_t
length
,
const
char
*
format
,
__ms_va_list
args
)
{
return
MSVCRT_vsprintf_p_l
(
buffer
,
length
,
format
,
NULL
,
args
);
...
...
@@ -1766,7 +1761,7 @@ int CDECL MSVCRT_vsprintf_p(char *buffer, MSVCRT_size_t length,
/*********************************************************************
* __stdio_common_vsprintf_p (UCRTBASE.@)
*/
int
CDECL
MSVCRT__stdio_common_vsprintf_p
(
unsigned
__int64
options
,
char
*
buffer
,
MSVCRT_
size_t
length
,
int
CDECL
MSVCRT__stdio_common_vsprintf_p
(
unsigned
__int64
options
,
char
*
buffer
,
size_t
length
,
const
char
*
format
,
_locale_t
locale
,
__ms_va_list
args
)
{
if
(
options
&
~
UCRTBASE_PRINTF_MASK
)
...
...
@@ -1778,7 +1773,7 @@ int CDECL MSVCRT__stdio_common_vsprintf_p(unsigned __int64 options, char *buffer
/*********************************************************************
* _sprintf_p_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT_sprintf_p_l
(
char
*
buffer
,
MSVCRT_
size_t
length
,
int
WINAPIV
MSVCRT_sprintf_p_l
(
char
*
buffer
,
size_t
length
,
const
char
*
format
,
_locale_t
locale
,
...)
{
__ms_va_list
valist
;
...
...
@@ -1809,7 +1804,7 @@ int WINAPIV MSVCRT___swprintf_l( wchar_t *str, const wchar_t *format,
/*********************************************************************
* _sprintf_p (MSVCR80.@)
*/
int
WINAPIV
MSVCRT__sprintf_p
(
char
*
buffer
,
MSVCRT_
size_t
length
,
const
char
*
format
,
...)
int
WINAPIV
MSVCRT__sprintf_p
(
char
*
buffer
,
size_t
length
,
const
char
*
format
,
...)
{
__ms_va_list
valist
;
int
r
;
...
...
@@ -1825,7 +1820,7 @@ int WINAPIV MSVCRT__sprintf_p(char *buffer, MSVCRT_size_t length, const char *fo
/*********************************************************************
* _swprintf_p_l (MSVCRT.@)
*/
int
WINAPIV
MSVCRT_swprintf_p_l
(
wchar_t
*
buffer
,
MSVCRT_
size_t
length
,
int
WINAPIV
MSVCRT_swprintf_p_l
(
wchar_t
*
buffer
,
size_t
length
,
const
wchar_t
*
format
,
_locale_t
locale
,
...)
{
__ms_va_list
valist
;
...
...
@@ -1939,7 +1934,7 @@ wchar_t * CDECL MSVCRT_wcstok( wchar_t *str, const wchar_t *delim )
/*********************************************************************
* _wctomb_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__wctomb_s_l
(
int
*
len
,
char
*
mbchar
,
MSVCRT_
size_t
size
,
int
CDECL
MSVCRT__wctomb_s_l
(
int
*
len
,
char
*
mbchar
,
size_t
size
,
wchar_t
wch
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
...
...
@@ -2004,7 +1999,7 @@ int CDECL MSVCRT__wctomb_s_l(int *len, char *mbchar, MSVCRT_size_t size,
/*********************************************************************
* wctomb_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_wctomb_s
(
int
*
len
,
char
*
mbchar
,
MSVCRT_
size_t
size
,
wchar_t
wch
)
int
CDECL
MSVCRT_wctomb_s
(
int
*
len
,
char
*
mbchar
,
size_t
size
,
wchar_t
wch
)
{
return
MSVCRT__wctomb_s_l
(
len
,
mbchar
,
size
,
wch
,
NULL
);
}
...
...
@@ -2031,7 +2026,7 @@ INT CDECL MSVCRT_wctomb( char *dst, wchar_t ch )
/*********************************************************************
* wctob (MSVCRT.@)
*/
INT
CDECL
MSVCRT_wctob
(
MSVCRT_
wint_t
wchar
)
INT
CDECL
MSVCRT_wctob
(
wint_t
wchar
)
{
char
out
;
BOOL
error
=
FALSE
;
...
...
@@ -2053,8 +2048,8 @@ INT CDECL MSVCRT_wctob( MSVCRT_wint_t wchar )
/*********************************************************************
* wcrtomb_s (MSVCRT.@)
*/
INT
CDECL
MSVCRT_wcrtomb_s
(
MSVCRT_
size_t
*
len
,
char
*
mbchar
,
MSVCRT_size_t
size
,
wchar_t
wch
,
MSVCRT_
mbstate_t
*
s
)
INT
CDECL
MSVCRT_wcrtomb_s
(
size_t
*
len
,
char
*
mbchar
,
size_t
size
,
wchar_t
wch
,
mbstate_t
*
s
)
{
int
ilen
,
ret
;
...
...
@@ -2067,7 +2062,7 @@ INT CDECL MSVCRT_wcrtomb_s(MSVCRT_size_t *len, char *mbchar,
/*********************************************************************
* wcrtomb (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_wcrtomb
(
char
*
dst
,
wchar_t
ch
,
MSVCRT_
mbstate_t
*
s
)
size_t
CDECL
MSVCRT_wcrtomb
(
char
*
dst
,
wchar_t
ch
,
mbstate_t
*
s
)
{
if
(
s
)
*
s
=
0
;
...
...
@@ -2296,9 +2291,9 @@ INT CDECL MSVCRT_iswblank( wchar_t wc )
/*********************************************************************
* wcscpy_s (MSVCRT.@)
*/
INT
CDECL
MSVCRT_wcscpy_s
(
wchar_t
*
wcDest
,
MSVCRT_
size_t
numElement
,
const
wchar_t
*
wcSrc
)
INT
CDECL
MSVCRT_wcscpy_s
(
wchar_t
*
wcDest
,
size_t
numElement
,
const
wchar_t
*
wcSrc
)
{
MSVCRT_
size_t
size
=
0
;
size_t
size
=
0
;
if
(
!
MSVCRT_CHECK_PMT
(
wcDest
))
return
MSVCRT_EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
numElement
))
return
MSVCRT_EINVAL
;
...
...
@@ -2335,10 +2330,9 @@ wchar_t* __cdecl MSVCRT_wcscpy( wchar_t *dst, const wchar_t *src )
/******************************************************************
* wcsncpy (MSVCRT.@)
*/
wchar_t
*
__cdecl
MSVCRT_wcsncpy
(
wchar_t
*
s1
,
const
wchar_t
*
s2
,
MSVCRT_size_t
n
)
wchar_t
*
__cdecl
MSVCRT_wcsncpy
(
wchar_t
*
s1
,
const
wchar_t
*
s2
,
size_t
n
)
{
MSVCRT_
size_t
i
;
size_t
i
;
for
(
i
=
0
;
i
<
n
;
i
++
)
if
(
!
(
s1
[
i
]
=
s2
[
i
]))
break
;
...
...
@@ -2350,8 +2344,8 @@ wchar_t* __cdecl MSVCRT_wcsncpy( wchar_t* s1,
/******************************************************************
* wcsncpy_s (MSVCRT.@)
*/
INT
CDECL
MSVCRT_wcsncpy_s
(
wchar_t
*
wcDest
,
MSVCRT_
size_t
numElement
,
const
wchar_t
*
wcSrc
,
MSVCRT_
size_t
count
)
INT
CDECL
MSVCRT_wcsncpy_s
(
wchar_t
*
wcDest
,
size_t
numElement
,
const
wchar_t
*
wcSrc
,
size_t
count
)
{
WCHAR
*
p
=
wcDest
;
BOOL
truncate
=
(
count
==
MSVCRT__TRUNCATE
);
...
...
@@ -2393,7 +2387,7 @@ INT CDECL MSVCRT_wcsncpy_s( wchar_t* wcDest, MSVCRT_size_t numElement, const wch
* wcscat_s (MSVCRT.@)
*
*/
INT
CDECL
MSVCRT_wcscat_s
(
wchar_t
*
dst
,
MSVCRT_
size_t
elem
,
const
wchar_t
*
src
)
INT
CDECL
MSVCRT_wcscat_s
(
wchar_t
*
dst
,
size_t
elem
,
const
wchar_t
*
src
)
{
wchar_t
*
ptr
=
dst
;
...
...
@@ -2428,10 +2422,10 @@ wchar_t* __cdecl MSVCRT_wcscat( wchar_t *dst, const wchar_t *src )
* wcsncat_s (MSVCRT.@)
*
*/
INT
CDECL
MSVCRT_wcsncat_s
(
wchar_t
*
dst
,
MSVCRT_
size_t
elem
,
const
wchar_t
*
src
,
MSVCRT_
size_t
count
)
INT
CDECL
MSVCRT_wcsncat_s
(
wchar_t
*
dst
,
size_t
elem
,
const
wchar_t
*
src
,
size_t
count
)
{
MSVCRT_
size_t
srclen
;
size_t
srclen
;
wchar_t
dststart
;
INT
ret
=
0
;
...
...
@@ -2584,7 +2578,7 @@ __int64 CDECL MSVCRT__wcstoi64(const wchar_t *nptr,
/*********************************************************************
* _wcstol_l (MSVCRT.@)
*/
MSVCRT
_long
CDECL
MSVCRT__wcstol_l
(
const
wchar_t
*
s
,
__msvcrt
_long
CDECL
MSVCRT__wcstol_l
(
const
wchar_t
*
s
,
wchar_t
**
end
,
int
base
,
_locale_t
locale
)
{
__int64
ret
=
MSVCRT__wcstoi64_l
(
s
,
end
,
base
,
locale
);
...
...
@@ -2602,7 +2596,7 @@ MSVCRT_long CDECL MSVCRT__wcstol_l(const wchar_t *s,
/*********************************************************************
* wcstol (MSVCRT.@)
*/
MSVCRT
_long
CDECL
MSVCRT_wcstol
(
const
wchar_t
*
s
,
__msvcrt
_long
CDECL
MSVCRT_wcstol
(
const
wchar_t
*
s
,
wchar_t
**
end
,
int
base
)
{
return
MSVCRT__wcstol_l
(
s
,
end
,
base
,
NULL
);
...
...
@@ -2636,7 +2630,7 @@ int __cdecl MSVCRT__wtoi(const wchar_t *str)
/*********************************************************************
* _wtol_l (MSVCRT.@)
*/
MSVCRT
_long
__cdecl
MSVCRT__wtol_l
(
const
wchar_t
*
str
,
_locale_t
locale
)
__msvcrt
_long
__cdecl
MSVCRT__wtol_l
(
const
wchar_t
*
str
,
_locale_t
locale
)
{
__int64
ret
=
MSVCRT__wcstoi64_l
(
str
,
NULL
,
10
,
locale
);
...
...
@@ -2653,7 +2647,7 @@ MSVCRT_long __cdecl MSVCRT__wtol_l(const wchar_t *str, _locale_t locale)
/*********************************************************************
* _wtol (MSVCRT.@)
*/
MSVCRT
_long
__cdecl
MSVCRT__wtol
(
const
wchar_t
*
str
)
__msvcrt
_long
__cdecl
MSVCRT__wtol
(
const
wchar_t
*
str
)
{
return
MSVCRT__wtol_l
(
str
,
NULL
);
}
...
...
@@ -2663,7 +2657,7 @@ MSVCRT_long __cdecl MSVCRT__wtol(const wchar_t *str)
/*********************************************************************
* _wtoll_l (MSVCR120.@)
*/
MSVCRT_longlong
__cdecl
MSVCRT__wtoll_l
(
const
wchar_t
*
str
,
_locale_t
locale
)
__int64
__cdecl
MSVCRT__wtoll_l
(
const
wchar_t
*
str
,
_locale_t
locale
)
{
return
MSVCRT__wcstoi64_l
(
str
,
NULL
,
10
,
locale
);
}
...
...
@@ -2671,7 +2665,7 @@ MSVCRT_longlong __cdecl MSVCRT__wtoll_l(const wchar_t *str, _locale_t locale)
/*********************************************************************
* _wtoll (MSVCR120.@)
*/
MSVCRT_longlong
__cdecl
MSVCRT__wtoll
(
const
wchar_t
*
str
)
__int64
__cdecl
MSVCRT__wtoll
(
const
wchar_t
*
str
)
{
return
MSVCRT__wtoll_l
(
str
,
NULL
);
}
...
...
@@ -2751,7 +2745,7 @@ unsigned __int64 CDECL MSVCRT__wcstoui64(const wchar_t *nptr,
/*********************************************************************
* _wcstoul_l (MSVCRT.@)
*/
MSVCRT
_ulong
__cdecl
MSVCRT__wcstoul_l
(
const
wchar_t
*
s
,
__msvcrt
_ulong
__cdecl
MSVCRT__wcstoul_l
(
const
wchar_t
*
s
,
wchar_t
**
end
,
int
base
,
_locale_t
locale
)
{
__int64
ret
=
MSVCRT__wcstoi64_l
(
s
,
end
,
base
,
locale
);
...
...
@@ -2769,7 +2763,7 @@ MSVCRT_ulong __cdecl MSVCRT__wcstoul_l(const wchar_t *s,
/*********************************************************************
* wcstoul (MSVCRT.@)
*/
MSVCRT
_ulong
__cdecl
MSVCRT_wcstoul
(
const
wchar_t
*
s
,
wchar_t
**
end
,
int
base
)
__msvcrt
_ulong
__cdecl
MSVCRT_wcstoul
(
const
wchar_t
*
s
,
wchar_t
**
end
,
int
base
)
{
return
MSVCRT__wcstoul_l
(
s
,
end
,
base
,
NULL
);
}
...
...
@@ -2777,9 +2771,9 @@ MSVCRT_ulong __cdecl MSVCRT_wcstoul(const wchar_t *s, wchar_t **end, int base)
/******************************************************************
* wcsnlen (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_wcsnlen
(
const
wchar_t
*
s
,
MSVCRT_
size_t
maxlen
)
size_t
CDECL
MSVCRT_wcsnlen
(
const
wchar_t
*
s
,
size_t
maxlen
)
{
MSVCRT_
size_t
i
;
size_t
i
;
for
(
i
=
0
;
i
<
maxlen
;
i
++
)
if
(
!
s
[
i
])
break
;
...
...
@@ -2789,7 +2783,7 @@ MSVCRT_size_t CDECL MSVCRT_wcsnlen(const wchar_t *s, MSVCRT_size_t maxlen)
/*********************************************************************
* _towupper_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__towupper_l
(
MSVCRT_
wint_t
c
,
_locale_t
locale
)
int
CDECL
MSVCRT__towupper_l
(
wint_t
c
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
wchar_t
ret
;
...
...
@@ -2813,7 +2807,7 @@ int CDECL MSVCRT__towupper_l(MSVCRT_wint_t c, _locale_t locale)
/*********************************************************************
* towupper (MSVCRT.@)
*/
int
CDECL
MSVCRT_towupper
(
MSVCRT_
wint_t
c
)
int
CDECL
MSVCRT_towupper
(
wint_t
c
)
{
return
MSVCRT__towupper_l
(
c
,
NULL
);
}
...
...
@@ -2840,7 +2834,7 @@ wchar_t* CDECL MSVCRT_wcsrchr(const wchar_t *str, wchar_t ch)
/***********************************************************************
* wcslen (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT_wcslen
(
const
wchar_t
*
str
)
size_t
CDECL
MSVCRT_wcslen
(
const
wchar_t
*
str
)
{
const
wchar_t
*
s
=
str
;
while
(
*
s
)
s
++
;
...
...
@@ -2905,8 +2899,8 @@ __int64 CDECL MSVCRT__wtoi64(const wchar_t *str)
/*********************************************************************
* _wcsxfrm_l (MSVCRT.@)
*/
MSVCRT_
size_t
CDECL
MSVCRT__wcsxfrm_l
(
wchar_t
*
dest
,
const
wchar_t
*
src
,
MSVCRT_
size_t
len
,
_locale_t
locale
)
size_t
CDECL
MSVCRT__wcsxfrm_l
(
wchar_t
*
dest
,
const
wchar_t
*
src
,
size_t
len
,
_locale_t
locale
)
{
pthreadlocinfo
locinfo
;
int
i
,
ret
;
...
...
@@ -2954,8 +2948,7 @@ MSVCRT_size_t CDECL MSVCRT__wcsxfrm_l(wchar_t *dest, const wchar_t *src,
/*********************************************************************
* wcsxfrm (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT_wcsxfrm
(
wchar_t
*
dest
,
const
wchar_t
*
src
,
MSVCRT_size_t
len
)
size_t
CDECL
MSVCRT_wcsxfrm
(
wchar_t
*
dest
,
const
wchar_t
*
src
,
size_t
len
)
{
return
MSVCRT__wcsxfrm_l
(
dest
,
src
,
len
,
NULL
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment