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
b19c9848
Commit
b19c9848
authored
Sep 27, 2006
by
Andrew Talbot
Committed by
Alexandre Julliard
Sep 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Add size parameters to function that takes array arguments.
parent
bc0f9c49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
string.c
dlls/shlwapi/string.c
+10
-7
No files found.
dlls/shlwapi/string.c
View file @
b19c9848
...
...
@@ -66,7 +66,8 @@ static HRESULT WINAPI _SHStrDupAA(LPCSTR,LPSTR*);
static
HRESULT
WINAPI
_SHStrDupAW
(
LPCWSTR
,
LPSTR
*
);
static
void
FillNumberFmt
(
NUMBERFMTW
*
fmt
,
WCHAR
decimal_buffer
[
8
],
WCHAR
thousand_buffer
[
8
])
static
void
FillNumberFmt
(
NUMBERFMTW
*
fmt
,
LPWSTR
decimal_buffer
,
int
decimal_bufwlen
,
LPWSTR
thousand_buffer
,
int
thousand_bufwlen
)
{
WCHAR
grouping
[
64
];
WCHAR
*
c
;
...
...
@@ -74,11 +75,11 @@ static void FillNumberFmt(NUMBERFMTW *fmt, WCHAR decimal_buffer[8], WCHAR thousa
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_ILZERO
|
LOCALE_RETURN_NUMBER
,
(
LPWSTR
)
&
fmt
->
LeadingZero
,
sizeof
(
fmt
->
LeadingZero
)
/
sizeof
(
WCHAR
));
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_INEGNUMBER
|
LOCALE_RETURN_NUMBER
,
(
LPWSTR
)
&
fmt
->
LeadingZero
,
sizeof
(
fmt
->
NegativeOrder
)
/
sizeof
(
WCHAR
));
fmt
->
NumDigits
=
0
;
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_SDECIMAL
,
decimal_buffer
,
sizeof
(
decimal_buffer
)
/
sizeof
(
WCHAR
)
);
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_STHOUSAND
,
thousand_buffer
,
sizeof
(
thousand_buffer
)
/
sizeof
(
WCHAR
)
);
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_SDECIMAL
,
decimal_buffer
,
decimal_bufwlen
);
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_STHOUSAND
,
thousand_buffer
,
thousand_bufwlen
);
fmt
->
lpThousandSep
=
thousand_buffer
;
fmt
->
lpDecimalSep
=
decimal_buffer
;
/*
* Converting grouping string to number as described on
* http://blogs.msdn.com/oldnewthing/archive/2006/04/18/578251.aspx
...
...
@@ -114,8 +115,9 @@ static int FormatInt(LONGLONG qdwValue, LPWSTR pszBuf, int cchBuf)
WCHAR
*
c
;
BOOL
neg
=
(
qdwValue
<
0
);
FillNumberFmt
(
&
fmt
,
decimal
,
thousand
);
FillNumberFmt
(
&
fmt
,
decimal
,
sizeof
decimal
/
sizeof
(
WCHAR
),
thousand
,
sizeof
thousand
/
sizeof
(
WCHAR
));
c
=
&
buf
[
24
];
*
(
--
c
)
=
0
;
do
...
...
@@ -147,7 +149,8 @@ static int FormatDouble(double value, int decimals, LPWSTR pszBuf, int cchBuf)
snprintfW
(
buf
,
64
,
flfmt
,
value
);
FillNumberFmt
(
&
fmt
,
decimal
,
thousand
);
FillNumberFmt
(
&
fmt
,
decimal
,
sizeof
decimal
/
sizeof
(
WCHAR
),
thousand
,
sizeof
thousand
/
sizeof
(
WCHAR
));
fmt
.
NumDigits
=
decimals
;
return
GetNumberFormatW
(
LOCALE_USER_DEFAULT
,
0
,
buf
,
&
fmt
,
pszBuf
,
cchBuf
);
}
...
...
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