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
0803575f
Commit
0803575f
authored
Mar 26, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implement _vscprintf and _vscwprintf.
parent
5df31cc9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
8 deletions
+29
-8
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-0
wcs.c
dlls/msvcrt/wcs.c
+24
-8
stdio.h
include/msvcrt/stdio.h
+2
-0
wchar.h
include/msvcrt/wchar.h
+1
-0
No files found.
dlls/msvcrt/msvcrt.spec
View file @
0803575f
...
...
@@ -508,6 +508,8 @@
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)
@ cdecl _utime(str ptr)
@ cdecl _vscprintf(str ptr)
@ cdecl _vscwprintf(wstr ptr)
@ cdecl _vsnprintf(ptr long str ptr) MSVCRT_vsnprintf
@ cdecl _vsnwprintf(ptr long wstr ptr) MSVCRT_vsnwprintf
@ cdecl _waccess(wstr long)
...
...
dlls/msvcrt/wcs.c
View file @
0803575f
...
...
@@ -200,11 +200,11 @@ static inline int pf_output_stringW( pf_output *out, LPCWSTR str, int len )
if
(
space
>=
len
)
{
memcpy
(
p
,
str
,
len
*
sizeof
(
WCHAR
)
);
if
(
out
->
buf
.
W
)
memcpy
(
p
,
str
,
len
*
sizeof
(
WCHAR
)
);
out
->
used
+=
len
;
return
len
;
}
if
(
space
>
0
)
if
(
space
>
0
&&
out
->
buf
.
W
)
memcpy
(
p
,
str
,
space
*
sizeof
(
WCHAR
)
);
out
->
used
+=
len
;
}
...
...
@@ -215,11 +215,11 @@ static inline int pf_output_stringW( pf_output *out, LPCWSTR str, int len )
if
(
space
>=
n
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
len
,
p
,
n
,
NULL
,
NULL
);
if
(
out
->
buf
.
A
)
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
len
,
p
,
n
,
NULL
,
NULL
);
out
->
used
+=
n
;
return
len
;
}
if
(
space
>
0
)
if
(
space
>
0
&&
out
->
buf
.
A
)
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
len
,
p
,
space
,
NULL
,
NULL
);
out
->
used
+=
n
;
}
...
...
@@ -238,11 +238,11 @@ static inline int pf_output_stringA( pf_output *out, LPCSTR str, int len )
if
(
space
>=
len
)
{
memcpy
(
p
,
str
,
len
);
if
(
out
->
buf
.
A
)
memcpy
(
p
,
str
,
len
);
out
->
used
+=
len
;
return
len
;
}
if
(
space
>
0
)
if
(
space
>
0
&&
out
->
buf
.
A
)
memcpy
(
p
,
str
,
space
);
out
->
used
+=
len
;
}
...
...
@@ -253,11 +253,11 @@ static inline int pf_output_stringA( pf_output *out, LPCSTR str, int len )
if
(
space
>=
n
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
len
,
p
,
n
);
if
(
out
->
buf
.
W
)
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
len
,
p
,
n
);
out
->
used
+=
n
;
return
len
;
}
if
(
space
>
0
)
if
(
space
>
0
&&
out
->
buf
.
W
)
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
len
,
p
,
space
);
out
->
used
+=
n
;
}
...
...
@@ -804,6 +804,14 @@ int CDECL MSVCRT_vsprintf( char *str, const char *format, __ms_va_list valist)
}
/*********************************************************************
* _vscprintf (MSVCRT.@)
*/
int
CDECL
_vscprintf
(
const
char
*
format
,
__ms_va_list
valist
)
{
return
MSVCRT_vsnprintf
(
NULL
,
INT_MAX
,
format
,
valist
);
}
/*********************************************************************
* _snprintf (MSVCRT.@)
*/
int
CDECL
MSVCRT__snprintf
(
char
*
str
,
unsigned
int
len
,
const
char
*
format
,
...)
...
...
@@ -882,6 +890,14 @@ int CDECL MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, _
}
/*********************************************************************
* _vscwprintf (MSVCRT.@)
*/
int
CDECL
_vscwprintf
(
const
MSVCRT_wchar_t
*
format
,
__ms_va_list
args
)
{
return
MSVCRT_vsnwprintf
(
NULL
,
INT_MAX
,
format
,
args
);
}
/*********************************************************************
* vswprintf_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_vswprintf_s
(
MSVCRT_wchar_t
*
str
,
MSVCRT_size_t
num
,
const
MSVCRT_wchar_t
*
format
,
__ms_va_list
args
)
...
...
include/msvcrt/stdio.h
View file @
0803575f
...
...
@@ -115,6 +115,7 @@ int __cdecl _setmaxstdio(int);
int
__cdecl
_snprintf
(
char
*
,
size_t
,
const
char
*
,...);
char
*
__cdecl
_tempnam
(
const
char
*
,
const
char
*
);
int
__cdecl
_unlink
(
const
char
*
);
int
__cdecl
_vscprintf
(
const
char
*
,
__ms_va_list
);
int
__cdecl
_vsnprintf
(
char
*
,
size_t
,
const
char
*
,
__ms_va_list
);
void
__cdecl
clearerr
(
FILE
*
);
...
...
@@ -166,6 +167,7 @@ wint_t __cdecl _fputwchar(wint_t);
wchar_t
*
__cdecl
_getws
(
wchar_t
*
);
int
__cdecl
_putws
(
const
wchar_t
*
);
int
__cdecl
_snwprintf
(
wchar_t
*
,
size_t
,
const
wchar_t
*
,...);
int
__cdecl
_vscwprintf
(
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
_vsnwprintf
(
wchar_t
*
,
size_t
,
const
wchar_t
*
,
__ms_va_list
);
FILE
*
__cdecl
_wfdopen
(
int
,
const
wchar_t
*
);
FILE
*
__cdecl
_wfopen
(
const
wchar_t
*
,
const
wchar_t
*
);
...
...
include/msvcrt/wchar.h
View file @
0803575f
...
...
@@ -275,6 +275,7 @@ wint_t __cdecl _fputwchar(wint_t);
wchar_t
*
__cdecl
_getws
(
wchar_t
*
);
int
__cdecl
_putws
(
const
wchar_t
*
);
int
__cdecl
_snwprintf
(
wchar_t
*
,
size_t
,
const
wchar_t
*
,...);
int
__cdecl
_vscwprintf
(
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
_vsnwprintf
(
wchar_t
*
,
size_t
,
const
wchar_t
*
,
__ms_va_list
);
FILE
*
__cdecl
_wfdopen
(
int
,
const
wchar_t
*
);
FILE
*
__cdecl
_wfopen
(
const
wchar_t
*
,
const
wchar_t
*
);
...
...
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