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
f44e90d2
Commit
f44e90d2
authored
May 12, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add a few printf functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9a044007
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
2 deletions
+103
-2
ntdll.spec
dlls/ntdll/ntdll.spec
+10
-2
printf.c
dlls/ntdll/printf.c
+93
-0
No files found.
dlls/ntdll/ntdll.spec
View file @
f44e90d2
...
...
@@ -1444,8 +1444,10 @@
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ varargs _snprintf(ptr long str) NTDLL__snprintf
@ varargs _snprintf_s(ptr long long str)
_snprintf_s
@ varargs _snprintf_s(ptr long long str)
@ varargs _snwprintf(ptr long wstr) NTDLL__snwprintf
@ varargs _snwprintf_s(ptr long long wstr)
@ varargs _swprintf(ptr wstr) NTDLL_swprintf
@ cdecl _splitpath(str ptr ptr ptr ptr)
@ cdecl _strcmpi(str str) _stricmp
@ cdecl _stricmp(str str)
...
...
@@ -1459,8 +1461,10 @@
@ cdecl _ultoa(long ptr long)
@ cdecl _ultow(long ptr long)
@ cdecl -norelay _vsnprintf(ptr long str ptr) NTDLL__vsnprintf
@ cdecl _vsnprintf_s(ptr long str ptr)
_vsnprintf_s
@ cdecl _vsnprintf_s(ptr long str ptr)
@ cdecl _vsnwprintf(ptr long wstr ptr) NTDLL__vsnwprintf
@ cdecl _vsnwprintf_s(ptr long long wstr ptr)
@ cdecl _vswprintf(ptr wstr ptr) NTDLL__vswprintf
@ cdecl _wcsicmp(wstr wstr) NTDLL__wcsicmp
@ cdecl _wcslwr(wstr) NTDLL__wcslwr
@ cdecl _wcsnicmp(wstr wstr long) NTDLL__wcsnicmp
...
...
@@ -1506,6 +1510,7 @@
@ cdecl qsort(ptr long long ptr) NTDLL_qsort
@ cdecl sin(double) NTDLL_sin
@ varargs sprintf(ptr str) NTDLL_sprintf
@ varargs sprintf_s(ptr long str)
@ cdecl sqrt(double) NTDLL_sqrt
@ varargs sscanf(str str) NTDLL_sscanf
@ cdecl strcat(str str) NTDLL_strcat
...
...
@@ -1525,6 +1530,7 @@
@ cdecl strtol(str ptr long) NTDLL_strtol
@ cdecl strtoul(str ptr long) NTDLL_strtoul
@ varargs swprintf(ptr wstr) NTDLL_swprintf
@ varargs swprintf_s(ptr long wstr)
@ cdecl tan(double) NTDLL_tan
@ cdecl tolower(long) NTDLL_tolower
@ cdecl toupper(long) NTDLL_toupper
...
...
@@ -1533,6 +1539,8 @@
@ stdcall vDbgPrintEx(long long str ptr)
@ stdcall vDbgPrintExWithPrefix(str long long str ptr)
@ cdecl vsprintf(ptr str ptr) NTDLL_vsprintf
@ cdecl vsprintf_s(ptr long str ptr)
@ cdecl vswprintf_s(ptr long wstr ptr)
@ cdecl wcscat(wstr wstr) NTDLL_wcscat
@ cdecl wcschr(wstr long) NTDLL_wcschr
@ cdecl wcscmp(wstr wstr) NTDLL_wcscmp
...
...
dlls/ntdll/printf.c
View file @
f44e90d2
...
...
@@ -798,6 +798,27 @@ int CDECL _vsnprintf_s( char *str, SIZE_T size, SIZE_T len, const char *format,
}
/***********************************************************************
* _vsnwprintf_s (NTDLL.@)
*/
int
CDECL
_vsnwprintf_s
(
WCHAR
*
str
,
SIZE_T
size
,
SIZE_T
len
,
const
WCHAR
*
format
,
__ms_va_list
args
)
{
pf_output
out
;
int
r
;
out
.
unicode
=
TRUE
;
out
.
buf
.
W
=
str
;
out
.
used
=
0
;
out
.
len
=
min
(
size
,
len
);
r
=
pf_vsnprintf
(
&
out
,
format
,
args
);
if
(
out
.
used
<
size
)
str
[
out
.
used
]
=
0
;
else
str
[
0
]
=
0
;
if
(
r
==
size
)
r
=
-
1
;
return
r
;
}
/*********************************************************************
* _snprintf_s (NTDLL.@)
*/
...
...
@@ -814,6 +835,21 @@ int WINAPIV _snprintf_s( char *str, SIZE_T size, SIZE_T len, const char *format,
/*********************************************************************
* _snwprintf_s (NTDLL.@)
*/
int
WINAPIV
_snwprintf_s
(
WCHAR
*
str
,
SIZE_T
size
,
SIZE_T
len
,
const
WCHAR
*
format
,
...
)
{
int
ret
;
__ms_va_list
valist
;
__ms_va_start
(
valist
,
format
);
ret
=
_vsnwprintf_s
(
str
,
size
,
len
,
format
,
valist
);
__ms_va_end
(
valist
);
return
ret
;
}
/*********************************************************************
* vsprintf (NTDLL.@)
*/
int
CDECL
NTDLL_vsprintf
(
char
*
str
,
const
char
*
format
,
__ms_va_list
args
)
...
...
@@ -823,6 +859,33 @@ int CDECL NTDLL_vsprintf( char *str, const char *format, __ms_va_list args )
/*********************************************************************
* vsprintf_s (NTDLL.@)
*/
int
CDECL
vsprintf_s
(
char
*
str
,
SIZE_T
size
,
const
char
*
format
,
__ms_va_list
args
)
{
return
_vsnprintf_s
(
str
,
size
,
size
,
format
,
args
);
}
/*********************************************************************
* _vswprintf (NTDLL.@)
*/
int
CDECL
NTDLL__vswprintf
(
WCHAR
*
str
,
const
WCHAR
*
format
,
__ms_va_list
args
)
{
return
NTDLL__vsnwprintf
(
str
,
size_max
,
format
,
args
);
}
/*********************************************************************
* vswprintf_s (NTDLL.@)
*/
int
CDECL
vswprintf_s
(
WCHAR
*
str
,
SIZE_T
size
,
const
WCHAR
*
format
,
__ms_va_list
args
)
{
return
_vsnwprintf_s
(
str
,
size
,
size
,
format
,
args
);
}
/*********************************************************************
* sprintf (NTDLL.@)
*/
int
WINAPIV
NTDLL_sprintf
(
char
*
str
,
const
char
*
format
,
...
)
...
...
@@ -837,6 +900,21 @@ int WINAPIV NTDLL_sprintf( char *str, const char *format, ... )
}
/*********************************************************************
* sprintf_s (NTDLL.@)
*/
int
WINAPIV
sprintf_s
(
char
*
str
,
SIZE_T
size
,
const
char
*
format
,
...
)
{
int
ret
;
__ms_va_list
valist
;
__ms_va_start
(
valist
,
format
);
ret
=
vsprintf_s
(
str
,
size
,
format
,
valist
);
__ms_va_end
(
valist
);
return
ret
;
}
/***********************************************************************
* swprintf (NTDLL.@)
*/
...
...
@@ -850,3 +928,18 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... )
__ms_va_end
(
valist
);
return
ret
;
}
/***********************************************************************
* swprintf_s (NTDLL.@)
*/
int
WINAPIV
swprintf_s
(
WCHAR
*
str
,
SIZE_T
size
,
const
WCHAR
*
format
,
...
)
{
int
ret
;
__ms_va_list
valist
;
__ms_va_start
(
valist
,
format
);
ret
=
vswprintf_s
(
str
,
size
,
format
,
valist
);
__ms_va_end
(
valist
);
return
ret
;
}
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