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
c60b2192
Commit
c60b2192
authored
Feb 18, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stdio.h: Add ucrt version of vsnprintf inline wrapper.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
229c3379
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
12 deletions
+25
-12
misc.c
dlls/vcruntime140/misc.c
+0
-10
stdio.h
include/msvcrt/stdio.h
+25
-2
No files found.
dlls/vcruntime140/misc.c
View file @
c60b2192
...
...
@@ -22,10 +22,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
vcruntime
);
#define UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR (0x0002)
int
__cdecl
__stdio_common_vsprintf
(
unsigned
__int64
options
,
char
*
str
,
size_t
len
,
const
char
*
format
,
_locale_t
locale
,
__ms_va_list
valist
);
int
*
CDECL
__processing_throw
(
void
);
/*********************************************************************
...
...
@@ -58,9 +54,3 @@ int __cdecl __uncaught_exceptions(void)
{
return
*
__processing_throw
();
}
int
__cdecl
_vsnprintf
(
char
*
buf
,
size_t
size
,
const
char
*
fmt
,
__ms_va_list
args
)
{
return
__stdio_common_vsprintf
(
UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR
,
buf
,
size
,
fmt
,
NULL
,
args
);
}
include/msvcrt/stdio.h
View file @
c60b2192
...
...
@@ -95,7 +95,6 @@ char* __cdecl _tempnam(const char*,const char*);
int
__cdecl
_unlink
(
const
char
*
);
int
WINAPIV
_scprintf
(
const
char
*
,...);
int
__cdecl
_vscprintf
(
const
char
*
,
__ms_va_list
);
int
__cdecl
_vsnprintf
(
char
*
,
size_t
,
const
char
*
,
__ms_va_list
);
int
__cdecl
_vsnprintf_s
(
char
*
,
size_t
,
size_t
,
const
char
*
,
__ms_va_list
);
int
__cdecl
_vsprintf_p_l
(
char
*
,
size_t
,
const
char
*
,
_locale_t
,
__ms_va_list
);
...
...
@@ -173,6 +172,31 @@ int __cdecl vsprintf_s(char*,size_t,const char*,__ms_va_list);
unsigned
int
__cdecl
_get_output_format
(
void
);
unsigned
int
__cdecl
_set_output_format
(
void
);
#ifdef _UCRT
_ACRTIMP
int
__cdecl
__stdio_common_vsprintf
(
unsigned
__int64
,
char
*
,
size_t
,
const
char
*
,
_locale_t
,
__ms_va_list
);
static
inline
int
__cdecl
vsnprintf
(
char
*
buffer
,
size_t
size
,
const
char
*
format
,
__ms_va_list
args
)
{
int
ret
=
__stdio_common_vsprintf
(
_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS
|
_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR
,
buffer
,
size
,
format
,
NULL
,
args
);
return
ret
<
0
?
-
1
:
ret
;
}
static
inline
int
__cdecl
_vsnprintf
(
char
*
buffer
,
size_t
size
,
const
char
*
format
,
__ms_va_list
args
)
{
int
ret
=
__stdio_common_vsprintf
(
_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS
|
_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION
,
buffer
,
size
,
format
,
NULL
,
args
);
return
ret
<
0
?
-
1
:
ret
;
}
#else
/* _UCRT */
int
__cdecl
_vsnprintf
(
char
*
,
size_t
,
const
char
*
,
__ms_va_list
);
static
inline
int
vsnprintf
(
char
*
buffer
,
size_t
size
,
const
char
*
format
,
__ms_va_list
args
)
{
return
_vsnprintf
(
buffer
,
size
,
format
,
args
);
}
#endif
/* _UCRT */
#endif
/* _STDIO_DEFINED */
#ifdef __cplusplus
...
...
@@ -191,7 +215,6 @@ static inline char* tempnam(const char *dir, const char *prefix) { return _tempn
static
inline
int
unlink
(
const
char
*
path
)
{
return
_unlink
(
path
);
}
#define _UNLINK_DEFINED
#endif
static
inline
int
vsnprintf
(
char
*
buffer
,
size_t
size
,
const
char
*
format
,
__ms_va_list
args
)
{
return
_vsnprintf
(
buffer
,
size
,
format
,
args
);
}
static
inline
int
WINAPIV
snprintf
(
char
*
buffer
,
size_t
size
,
const
char
*
format
,
...)
{
...
...
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