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
8bf437d8
Commit
8bf437d8
authored
Nov 24, 2010
by
Eryk Wieliczko
Committed by
Alexandre Julliard
Nov 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implement vfprintf_s and vfwprintf_s.
parent
ab2e5c04
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
11 deletions
+80
-11
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+2
-2
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+2
-2
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+2
-2
file.c
dlls/msvcrt/file.c
+69
-3
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-2
stdio.h
include/msvcrt/stdio.h
+2
-0
wchar.h
include/msvcrt/wchar.h
+1
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
8bf437d8
...
...
@@ -1617,9 +1617,9 @@
@ cdecl ungetc(long ptr) msvcrt.ungetc
@ cdecl ungetwc(long ptr) msvcrt.ungetwc
@ cdecl vfprintf(ptr str ptr) msvcrt.vfprintf
@
stub
vfprintf_s
@
cdecl vfprintf_s(ptr str ptr) msvcrt.
vfprintf_s
@ cdecl vfwprintf(ptr wstr ptr) msvcrt.vfwprintf
@
stub
vfwprintf_s
@
cdecl vfwprintf_s(ptr wstr ptr) msvcrt.
vfwprintf_s
@ cdecl vprintf(str ptr) msvcrt.vprintf
@ stub vprintf_s
@ cdecl vsprintf(ptr str ptr) msvcrt.vsprintf
...
...
dlls/msvcr80/msvcr80.spec
View file @
8bf437d8
...
...
@@ -1471,9 +1471,9 @@
@ cdecl ungetc(long ptr) msvcrt.ungetc
@ cdecl ungetwc(long ptr) msvcrt.ungetwc
@ cdecl vfprintf(ptr str ptr) msvcrt.vfprintf
@
stub
vfprintf_s
@
cdecl vfprintf_s(ptr str ptr) msvcrt.
vfprintf_s
@ cdecl vfwprintf(ptr wstr ptr) msvcrt.vfwprintf
@
stub
vfwprintf_s
@
cdecl vfwprintf_s(ptr wstr ptr) msvcrt.
vfwprintf_s
@ cdecl vprintf(str ptr) msvcrt.vprintf
@ stub vprintf_s
@ cdecl vsprintf(ptr str ptr) msvcrt.vsprintf
...
...
dlls/msvcr90/msvcr90.spec
View file @
8bf437d8
...
...
@@ -1455,9 +1455,9 @@
@ cdecl ungetc(long ptr) msvcrt.ungetc
@ cdecl ungetwc(long ptr) msvcrt.ungetwc
@ cdecl vfprintf(ptr str ptr) msvcrt.vfprintf
@
stub
vfprintf_s
@
cdecl vfprintf_s(ptr str ptr) msvcrt.
vfprintf_s
@ cdecl vfwprintf(ptr wstr ptr) msvcrt.vfwprintf
@
stub
vfwprintf_s
@
cdecl vfwprintf_s(ptr wstr ptr) msvcrt.
vfwprintf_s
@ cdecl vprintf(str ptr) msvcrt.vprintf
@ stub vprintf_s
@ cdecl vsprintf(ptr str ptr) msvcrt.vsprintf
...
...
dlls/msvcrt/file.c
View file @
8bf437d8
...
...
@@ -3362,10 +3362,46 @@ int CDECL MSVCRT_vfprintf(MSVCRT_FILE* file, const char *format, __ms_va_list va
}
/*********************************************************************
* vfprintf_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_vfprintf_s
(
MSVCRT_FILE
*
file
,
const
char
*
format
,
__ms_va_list
valist
)
{
char
buf
[
2048
];
LPWSTR
formatW
=
NULL
;
DWORD
sz
;
pf_output
out
;
int
written
,
retval
;
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
)
)
{
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
-
1
;
}
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
((
written
=
pf_vsnprintf
(
&
out
,
formatW
,
NULL
,
TRUE
,
valist
))
>=
0
)
{
retval
=
MSVCRT_fwrite
(
out
.
buf
.
A
,
sizeof
(
*
out
.
buf
.
A
),
written
,
file
);
}
else
retval
=
-
1
;
HeapFree
(
GetProcessHeap
(),
0
,
formatW
);
if
(
out
.
buf
.
A
!=
out
.
grow
.
A
)
MSVCRT_free
(
out
.
buf
.
A
);
return
retval
;
}
/*********************************************************************
* vfwprintf (MSVCRT.@)
* FIXME:
* Is final char included in written (then resize is too big) or not
* (then we must test for equality too)?
*/
int
CDECL
MSVCRT_vfwprintf
(
MSVCRT_FILE
*
file
,
const
MSVCRT_wchar_t
*
format
,
__ms_va_list
valist
)
{
...
...
@@ -3389,6 +3425,36 @@ int CDECL MSVCRT_vfwprintf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, __ms
}
/*********************************************************************
* vfwprintf_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_vfwprintf_s
(
MSVCRT_FILE
*
file
,
const
MSVCRT_wchar_t
*
format
,
__ms_va_list
valist
)
{
MSVCRT_wchar_t
buf
[
2048
];
pf_output
out
;
int
written
,
retval
;
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
)
)
{
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
-
1
;
}
out
.
unicode
=
TRUE
;
out
.
buf
.
W
=
out
.
grow
.
W
=
buf
;
out
.
used
=
0
;
out
.
len
=
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]);
if
((
written
=
pf_vsnprintf
(
&
out
,
format
,
NULL
,
TRUE
,
valist
))
>=
0
)
{
retval
=
MSVCRT_fwrite
(
out
.
buf
.
W
,
sizeof
(
*
out
.
buf
.
W
),
written
,
file
);
}
else
retval
=
-
1
;
if
(
out
.
buf
.
W
!=
out
.
grow
.
W
)
MSVCRT_free
(
out
.
buf
.
W
);
return
retval
;
}
/*********************************************************************
* vprintf (MSVCRT.@)
*/
int
CDECL
MSVCRT_vprintf
(
const
char
*
format
,
__ms_va_list
valist
)
...
...
dlls/msvcrt/msvcrt.spec
View file @
8bf437d8
...
...
@@ -1422,9 +1422,9 @@
@ cdecl ungetwc(long ptr) MSVCRT_ungetwc
# stub utime
@ cdecl vfprintf(ptr str ptr) MSVCRT_vfprintf
# stub
vfprintf_s
@ cdecl vfprintf_s(ptr str ptr) MSVCRT_
vfprintf_s
@ cdecl vfwprintf(ptr wstr ptr) MSVCRT_vfwprintf
# stub
vfwprintf_s
@ cdecl vfwprintf_s(ptr wstr ptr) MSVCRT_
vfwprintf_s
@ cdecl vprintf(str ptr) MSVCRT_vprintf
# stub vprintf_s
# stub vsnprintf
...
...
include/msvcrt/stdio.h
View file @
8bf437d8
...
...
@@ -166,6 +166,7 @@ FILE* __cdecl tmpfile(void);
char
*
__cdecl
tmpnam
(
char
*
);
int
__cdecl
ungetc
(
int
,
FILE
*
);
int
__cdecl
vfprintf
(
FILE
*
,
const
char
*
,
__ms_va_list
);
int
__cdecl
vfprintf_s
(
FILE
*
,
const
char
*
,
__ms_va_list
);
int
__cdecl
vprintf
(
const
char
*
,
__ms_va_list
);
int
__cdecl
vsprintf
(
char
*
,
const
char
*
,
__ms_va_list
);
int
__cdecl
vsprintf_s
(
char
*
,
size_t
,
const
char
*
,
__ms_va_list
);
...
...
@@ -212,6 +213,7 @@ int __cdecl swscanf(const wchar_t*,const wchar_t*,...);
int
__cdecl
swscanf_s
(
const
wchar_t
*
,
const
wchar_t
*
,...);
wint_t
__cdecl
ungetwc
(
wint_t
,
FILE
*
);
int
__cdecl
vfwprintf
(
FILE
*
,
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
vfwprintf_s
(
FILE
*
,
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
vswprintf
(
wchar_t
*
,
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
vswprintf_s
(
wchar_t
*
,
size_t
,
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
vwprintf
(
const
wchar_t
*
,
__ms_va_list
);
...
...
include/msvcrt/wchar.h
View file @
8bf437d8
...
...
@@ -310,6 +310,7 @@ int __cdecl swscanf(const wchar_t*,const wchar_t*,...);
int
__cdecl
swscanf_s
(
const
wchar_t
*
,
const
wchar_t
*
,...);
wint_t
__cdecl
ungetwc
(
wint_t
,
FILE
*
);
int
__cdecl
vfwprintf
(
FILE
*
,
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
vfwprintf_s
(
FILE
*
,
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
vswprintf
(
wchar_t
*
,
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
vswprintf_s
(
wchar_t
*
,
size_t
,
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
vwprintf
(
const
wchar_t
*
,
__ms_va_list
);
...
...
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