Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1eaae093
Commit
1eaae093
authored
Nov 07, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implemented _vc(w)printf.
parent
7d384d23
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
34 deletions
+89
-34
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+3
-3
msvcr70.spec
dlls/msvcr70/msvcr70.spec
+1
-1
msvcr71.spec
dlls/msvcr71/msvcr71.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+3
-3
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+3
-3
console.c
dlls/msvcrt/console.c
+75
-20
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+3
-3
No files found.
dlls/msvcr100/msvcr100.spec
View file @
1eaae093
...
...
@@ -564,7 +564,7 @@
@ cdecl _ctime64(ptr) msvcrt._ctime64
@ stub _ctime64_s
@ cdecl _cwait(ptr long long) msvcrt._cwait
@
stub
_cwprintf
@
varargs _cwprintf(wstr) msvcrt.
_cwprintf
@ stub _cwprintf_l
@ stub _cwprintf_p
@ stub _cwprintf_p_l
...
...
@@ -1216,13 +1216,13 @@
@ cdecl _unlock_file(ptr) msvcrt._unlock_file
@ cdecl _utime32(str ptr) msvcrt._utime32
@ cdecl _utime64(str ptr) msvcrt._utime64
@
stub
_vcprintf
@
cdecl _vcprintf(str ptr) msvcrt.
_vcprintf
@ stub _vcprintf_l
@ stub _vcprintf_p
@ stub _vcprintf_p_l
@ stub _vcprintf_s
@ stub _vcprintf_s_l
@
stub
_vcwprintf
@
cdecl _vcwprintf(wstr ptr) msvcrt.
_vcwprintf
@ stub _vcwprintf_l
@ stub _vcwprintf_p
@ stub _vcwprintf_p_l
...
...
dlls/msvcr70/msvcr70.spec
View file @
1eaae093
...
...
@@ -267,7 +267,7 @@
@ cdecl _ctime64(ptr) msvcrt._ctime64
@ extern _ctype msvcrt._ctype
@ cdecl _cwait(ptr long long) msvcrt._cwait
@
stub
_cwprintf
@
varargs _cwprintf(str) msvcrt.
_cwprintf
@ varargs _cwscanf(wstr) msvcrt._cwscanf
@ extern _daylight msvcrt._daylight
@ extern _dstbias msvcrt._dstbias
...
...
dlls/msvcr71/msvcr71.spec
View file @
1eaae093
...
...
@@ -261,7 +261,7 @@
@ varargs _cscanf(str) msvcrt._cscanf
@ cdecl _ctime64(ptr) msvcrt._ctime64
@ cdecl _cwait(ptr long long) msvcrt._cwait
@
stub
_cwprintf
@
varargs _cwprintf(wstr) msvcrt.
_cwprintf
@ varargs _cwscanf(wstr) msvcrt._cwscanf
@ extern _daylight msvcrt._daylight
@ extern _dstbias msvcrt._dstbias
...
...
dlls/msvcr80/msvcr80.spec
View file @
1eaae093
...
...
@@ -403,7 +403,7 @@
@ cdecl _ctime64(ptr) msvcrt._ctime64
@ stub _ctime64_s
@ cdecl _cwait(ptr long long) msvcrt._cwait
@
stub
_cwprintf
@
varargs _cwprintf(wstr) msvcrt.
_cwprintf
@ stub _cwprintf_l
@ stub _cwprintf_p
@ stub _cwprintf_p_l
...
...
@@ -1069,13 +1069,13 @@
@ cdecl _unlock_file(ptr) msvcrt._unlock_file
@ cdecl _utime32(str ptr) msvcrt._utime32
@ cdecl _utime64(str ptr) msvcrt._utime64
@
stub
_vcprintf
@
cdecl _vcprintf(str ptr) msvcrt.
_vcprintf
@ stub _vcprintf_l
@ stub _vcprintf_p
@ stub _vcprintf_p_l
@ stub _vcprintf_s
@ stub _vcprintf_s_l
@
stub
_vcwprintf
@
cdecl _vcwprintf(wstr ptr) msvcrt.
_vcwprintf
@ stub _vcwprintf_l
@ stub _vcwprintf_p
@ stub _vcwprintf_p_l
...
...
dlls/msvcr90/msvcr90.spec
View file @
1eaae093
...
...
@@ -395,7 +395,7 @@
@ cdecl _ctime64(ptr) msvcrt._ctime64
@ stub _ctime64_s
@ cdecl _cwait(ptr long long) msvcrt._cwait
@
stub
_cwprintf
@
varargs _cwprintf(wstr) msvcrt.
_cwprintf
@ stub _cwprintf_l
@ stub _cwprintf_p
@ stub _cwprintf_p_l
...
...
@@ -1056,13 +1056,13 @@
@ cdecl _unlock_file(ptr) msvcrt._unlock_file
@ cdecl _utime32(str ptr) msvcrt._utime32
@ cdecl _utime64(str ptr) msvcrt._utime64
@
stub
_vcprintf
@
cdecl _vcprintf(str ptr) msvcrt.
_vcprintf
@ stub _vcprintf_l
@ stub _vcprintf_p
@ stub _vcprintf_p_l
@ stub _vcprintf_s
@ stub _vcprintf_s_l
@
stub
_vcwprintf
@
cdecl _vcwprintf(wstr ptr) msvcrt.
_vcwprintf
@ stub _vcwprintf_l
@ stub _vcwprintf_p
@ stub _vcwprintf_p_l
...
...
dlls/msvcrt/console.c
View file @
1eaae093
...
...
@@ -22,6 +22,7 @@
*/
#include "msvcrt.h"
#include "winnls.h"
#include "wincon.h"
#include "mtdll.h"
#include "wine/debug.h"
...
...
@@ -299,35 +300,89 @@ int CDECL _kbhit(void)
/*********************************************************************
* _vcprintf (MSVCRT.@)
*/
int
CDECL
_vcprintf
(
const
char
*
format
,
__ms_va_list
valist
)
{
char
buf
[
2048
];
LPWSTR
formatW
=
NULL
;
DWORD
sz
;
pf_output
out
;
int
retval
;
out
.
unicode
=
FALSE
;
out
.
buf
.
A
=
out
.
grow
.
A
=
buf
;
out
.
used
=
0
;
out
.
len
=
sizeof
(
buf
);
sz
=
MultiByteToWideChar
(
CP_ACP
,
0
,
format
,
-
1
,
NULL
,
0
);
formatW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sz
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
format
,
-
1
,
formatW
,
sz
);
if
((
retval
=
pf_vsnprintf
(
&
out
,
formatW
,
NULL
,
FALSE
,
valist
))
>
0
)
{
LOCK_CONSOLE
;
retval
=
_cputs
(
out
.
buf
.
A
);
UNLOCK_CONSOLE
;
}
HeapFree
(
GetProcessHeap
(),
0
,
formatW
);
if
(
out
.
buf
.
A
!=
buf
)
MSVCRT_free
(
out
.
buf
.
A
);
return
retval
;
}
/*********************************************************************
* _cprintf (MSVCRT.@)
*/
int
CDECL
_cprintf
(
const
char
*
format
,
...)
{
char
buf
[
2048
],
*
mem
=
buf
;
int
written
,
resize
=
sizeof
(
buf
),
retval
;
int
retval
;
__ms_va_list
valist
;
__ms_va_start
(
valist
,
format
);
/* There are two conventions for snprintf failing:
* Return -1 if we truncated, or
* Return the number of bytes that would have been written
* The code below handles both cases
*/
while
((
written
=
MSVCRT_vsnprintf
(
mem
,
resize
,
format
,
valist
))
==
-
1
||
written
>
resize
)
retval
=
_vcprintf
(
format
,
valist
);
__ms_va_end
(
valist
);
return
retval
;
}
/*********************************************************************
* _vcwprintf (MSVCRT.@)
*/
int
CDECL
_vcwprintf
(
const
MSVCRT_wchar_t
*
format
,
__ms_va_list
valist
)
{
MSVCRT_wchar_t
buf
[
2048
];
pf_output
out
;
int
retval
;
out
.
unicode
=
TRUE
;
out
.
buf
.
W
=
out
.
grow
.
W
=
buf
;
out
.
used
=
0
;
out
.
len
=
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]);
if
((
retval
=
pf_vsnprintf
(
&
out
,
format
,
NULL
,
FALSE
,
valist
))
>=
0
)
{
resize
=
(
written
==
-
1
?
resize
*
2
:
written
+
1
);
if
(
mem
!=
buf
)
MSVCRT_free
(
mem
);
if
(
!
(
mem
=
MSVCRT_malloc
(
resize
)))
return
MSVCRT_EOF
;
__ms_va_start
(
valist
,
format
);
LOCK_CONSOLE
;
retval
=
_cputws
(
out
.
buf
.
W
);
UNLOCK_CONSOLE
;
}
if
(
out
.
buf
.
W
!=
buf
)
MSVCRT_free
(
out
.
buf
.
W
);
return
retval
;
}
/*********************************************************************
* _cwprintf (MSVCRT.@)
*/
int
CDECL
_cwprintf
(
const
MSVCRT_wchar_t
*
format
,
...)
{
int
retval
;
__ms_va_list
valist
;
__ms_va_start
(
valist
,
format
);
retval
=
_vcwprintf
(
format
,
valist
);
__ms_va_end
(
valist
);
LOCK_CONSOLE
;
retval
=
_cputs
(
mem
);
UNLOCK_CONSOLE
;
if
(
mem
!=
buf
)
MSVCRT_free
(
mem
);
return
retval
;
}
dlls/msvcrt/msvcrt.spec
View file @
1eaae093
...
...
@@ -361,7 +361,7 @@
# stub _ctime64_s
@ extern _ctype MSVCRT__ctype
@ cdecl _cwait(ptr long long)
# stub _cwprintf
@ varargs _cwprintf(wstr)
# stub _cwprintf_l
# stub _cwprintf_p
# stub _cwprintf_p_l
...
...
@@ -992,13 +992,13 @@
@ cdecl _unlock_file(ptr) MSVCRT__unlock_file
@ cdecl _utime32(str ptr)
@ cdecl _utime64(str ptr)
# stub _vcprintf
@ cdecl _vcprintf(str ptr)
# stub _vcprintf_l
# stub _vcprintf_p
# stub _vcprintf_p_l
# stub _vcprintf_s
# stub _vcprintf_s_l
# stub _vcwprintf
@ cdecl _vcwprintf(wstr ptr)
# stub _vcwprintf_l
# stub _vcwprintf_p
# stub _vcwprintf_p_l
...
...
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