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
c9205f17
Commit
c9205f17
authored
Jun 20, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
605f503a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
85 deletions
+63
-85
Makefile.in
dlls/shlwapi/Makefile.in
+2
-0
assoc.c
dlls/shlwapi/assoc.c
+0
-1
msgbox.c
dlls/shlwapi/msgbox.c
+0
-4
ordinal.c
dlls/shlwapi/ordinal.c
+9
-13
path.c
dlls/shlwapi/path.c
+35
-39
reg.c
dlls/shlwapi/reg.c
+4
-5
stopwatch.c
dlls/shlwapi/stopwatch.c
+0
-3
string.c
dlls/shlwapi/string.c
+11
-15
url.c
dlls/shlwapi/url.c
+2
-5
No files found.
dlls/shlwapi/Makefile.in
View file @
c9205f17
...
...
@@ -4,6 +4,8 @@ IMPORTLIB = shlwapi
IMPORTS
=
uuid user32 gdi32 advapi32 kernelbase
DELAYIMPORTS
=
userenv oleaut32 ole32 comctl32 comdlg32 mpr mlang urlmon shell32 winmm version
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
assoc.c
\
clist.c
\
...
...
dlls/shlwapi/assoc.c
View file @
c9205f17
...
...
@@ -28,7 +28,6 @@
#include "shlguid.h"
#include "shlobj.h"
#include "shlwapi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
shell
);
...
...
dlls/shlwapi/msgbox.c
View file @
c9205f17
...
...
@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
...
...
@@ -29,7 +26,6 @@
#include "winuser.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "resource.h"
...
...
dlls/shlwapi/ordinal.c
View file @
c9205f17
...
...
@@ -20,9 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
...
...
@@ -47,7 +44,6 @@
#include "commdlg.h"
#include "mlang.h"
#include "mshtmhst.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -501,11 +497,11 @@ INT WINAPI SHStringFromGUIDW(REFGUID guid, LPWSTR lpszDest, INT cchMax)
TRACE
(
"(%s,%p,%d)
\n
"
,
debugstr_guid
(
guid
),
lpszDest
,
cchMax
);
s
printfW
(
xguid
,
wszFormat
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
s
wprintf
(
xguid
,
ARRAY_SIZE
(
xguid
)
,
wszFormat
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
iLen
=
strlenW
(
xguid
)
+
1
;
iLen
=
l
strlenW
(
xguid
)
+
1
;
if
(
iLen
>
cchMax
)
return
0
;
...
...
@@ -602,7 +598,7 @@ BOOL WINAPI SHAboutInfoW(LPWSTR lpszDest, DWORD dwDestLen)
dwLen
=
30
;
if
(
!
SHGetValueW
(
HKEY_LOCAL_MACHINE
,
szIEKey
,
szVersion
,
&
dwType
,
buff
,
&
dwLen
))
{
DWORD
dwStrLen
=
strlenW
(
buff
);
DWORD
dwStrLen
=
l
strlenW
(
buff
);
dwLen
=
30
-
dwStrLen
;
SHGetValueW
(
HKEY_LOCAL_MACHINE
,
szIEKey
,
szCustomized
,
&
dwType
,
buff
+
dwStrLen
,
&
dwLen
);
...
...
@@ -2756,13 +2752,13 @@ DWORD WINAPI SHGetIniStringW(LPCWSTR appName, LPCWSTR keyName, LPWSTR out,
ret
=
GetPrivateProfileStringW
(
appName
,
keyName
,
NULL
,
buf
,
outLen
,
filename
);
if
(
ret
)
strcpyW
(
out
,
buf
);
l
strcpyW
(
out
,
buf
);
else
*
out
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
return
strlenW
(
out
);
return
l
strlenW
(
out
);
}
/*************************************************************************
...
...
@@ -3106,9 +3102,9 @@ HMODULE WINAPI MLLoadLibraryW(LPCWSTR new_mod, HMODULE inst_hwnd, DWORD dwCrossC
len
=
GetModuleFileNameW
(
inst_hwnd
,
mod_path
,
ARRAY_SIZE
(
mod_path
));
if
(
!
len
||
len
>=
ARRAY_SIZE
(
mod_path
))
return
NULL
;
ptr
=
strrchrW
(
mod_path
,
'\\'
);
ptr
=
wcsrchr
(
mod_path
,
'\\'
);
if
(
ptr
)
{
strcpyW
(
ptr
+
1
,
new_mod
);
l
strcpyW
(
ptr
+
1
,
new_mod
);
TRACE
(
"loading %s
\n
"
,
debugstr_w
(
mod_path
));
return
LoadLibraryW
(
mod_path
);
}
...
...
@@ -4669,7 +4665,7 @@ DWORD WINAPI SHGetObjectCompatFlags(IUnknown *pUnk, const CLSID *clsid)
}
StringFromCLSID
(
clsid
,
&
clsid_str
);
s
printfW
(
strW
,
compatpathW
,
clsid_str
);
s
wprintf
(
strW
,
ARRAY_SIZE
(
strW
)
,
compatpathW
,
clsid_str
);
CoTaskMemFree
(
clsid_str
);
ret
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
strW
,
&
key
);
...
...
@@ -4687,7 +4683,7 @@ DWORD WINAPI SHGetObjectCompatFlags(IUnknown *pUnk, const CLSID *clsid)
while
(
right
>=
left
)
{
x
=
(
left
+
right
)
/
2
;
res
=
strcmpW
(
strW
,
objcompat_table
[
x
].
name
);
res
=
wcscmp
(
strW
,
objcompat_table
[
x
].
name
);
if
(
res
==
0
)
{
ret
|=
objcompat_table
[
x
].
value
;
...
...
dlls/shlwapi/path.c
View file @
c9205f17
...
...
@@ -19,14 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "wine/unicode.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
...
...
@@ -272,7 +268,7 @@ static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
return
FALSE
;
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
l
strcpyW
(
lpszFile
,
buff
);
return
TRUE
;
}
GetWindowsDirectoryW
(
buff
,
MAX_PATH
);
...
...
@@ -280,7 +276,7 @@ static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
return
FALSE
;
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
l
strcpyW
(
lpszFile
,
buff
);
return
TRUE
;
}
GetWindowsDirectoryW
(
buff
,
MAX_PATH
);
...
...
@@ -288,7 +284,7 @@ static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
return
FALSE
;
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
l
strcpyW
(
lpszFile
,
buff
);
return
TRUE
;
}
/* Try dirs listed in %PATH% */
...
...
@@ -322,7 +318,7 @@ static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
}
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
l
strcpyW
(
lpszFile
,
buff
);
HeapFree
(
GetProcessHeap
(),
0
,
lpszPATH
);
return
TRUE
;
}
...
...
@@ -407,7 +403,7 @@ BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile,LPCWSTR *lppszOtherDirs,DWORD dwWh
PathCombineW
(
buff
,
*
lpszOtherPath
,
lpszFile
);
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
l
strcpyW
(
lpszFile
,
buff
);
return
TRUE
;
}
lpszOtherPath
++
;
...
...
@@ -521,7 +517,7 @@ BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath,
if
(
cchMax
<
2
)
return
TRUE
;
dwLen
=
strlenW
(
lpszPath
)
+
1
;
dwLen
=
l
strlenW
(
lpszPath
)
+
1
;
if
(
dwLen
<
cchMax
)
{
...
...
@@ -547,7 +543,7 @@ BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath,
/* Compact the file name with ellipses at the end */
cchMax
-=
4
;
memcpy
(
lpszDest
,
lpszFile
,
cchMax
*
sizeof
(
WCHAR
));
strcpyW
(
lpszDest
+
cchMax
,
szEllipses
);
l
strcpyW
(
lpszDest
+
cchMax
,
szEllipses
);
return
TRUE
;
}
/* We have a root in the path */
...
...
@@ -564,7 +560,7 @@ BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath,
*
lpszDest
=
'\0'
;
return
TRUE
;
}
strcpyW
(
lpszDest
,
szEllipses
);
l
strcpyW
(
lpszDest
,
szEllipses
);
lpszDest
+=
3
;
cchMax
-=
4
;
*
lpszDest
++
=
*
lpszFile
++
;
...
...
@@ -577,15 +573,15 @@ BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath,
}
cchMax
-=
4
;
memcpy
(
lpszDest
,
lpszFile
,
cchMax
*
sizeof
(
WCHAR
));
strcpyW
(
lpszDest
+
cchMax
,
szEllipses
);
l
strcpyW
(
lpszDest
+
cchMax
,
szEllipses
);
return
TRUE
;
}
/* Only the root needs to be Compacted */
dwLen
=
cchMax
-
dwFileLen
-
3
;
memcpy
(
lpszDest
,
lpszPath
,
dwLen
*
sizeof
(
WCHAR
));
strcpyW
(
lpszDest
+
dwLen
,
szEllipses
);
strcpyW
(
lpszDest
+
dwLen
+
3
,
lpszFile
);
l
strcpyW
(
lpszDest
+
dwLen
,
szEllipses
);
l
strcpyW
(
lpszDest
+
dwLen
+
3
,
lpszFile
);
return
TRUE
;
}
...
...
@@ -761,7 +757,7 @@ BOOL WINAPI PathIsContentTypeW(LPCWSTR lpszPath, LPCWSTR lpszContentType)
if
(
lpszPath
&&
(
szExt
=
PathFindExtensionW
(
lpszPath
))
&&
*
szExt
&&
!
SHGetValueW
(
HKEY_CLASSES_ROOT
,
szExt
,
szContentType
,
REG_NONE
,
szBuff
,
&
dwDummy
)
&&
!
strcmpiW
(
lpszContentType
,
szBuff
))
!
wcsicmp
(
lpszContentType
,
szBuff
))
{
return
TRUE
;
}
...
...
@@ -869,14 +865,14 @@ BOOL WINAPI PathMakePrettyW(LPWSTR lpszPath)
{
do
{
if
(
is
lowerW
(
*
pszIter
))
if
(
is
wlower
(
*
pszIter
))
return
FALSE
;
/* Not DOS path */
pszIter
++
;
}
while
(
*
pszIter
);
pszIter
=
lpszPath
+
1
;
while
(
*
pszIter
)
{
*
pszIter
=
to
lowerW
(
*
pszIter
);
*
pszIter
=
to
wlower
(
*
pszIter
);
pszIter
++
;
}
}
...
...
@@ -936,7 +932,7 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
hdc
=
hDC
=
GetDC
(
0
);
/* Get the length of the whole path */
dwLen
=
strlenW
(
lpszPath
);
dwLen
=
l
strlenW
(
lpszPath
);
GetTextExtentPointW
(
hDC
,
lpszPath
,
dwLen
,
&
size
);
if
((
UINT
)
size
.
cx
>
dx
)
...
...
@@ -952,7 +948,7 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
GetTextExtentPointW
(
hDC
,
szEllipses
,
3
,
&
size
);
dwEllipsesLen
=
size
.
cx
;
/* Get the size of the file name */
GetTextExtentPointW
(
hDC
,
sFile
,
strlenW
(
sFile
),
&
size
);
GetTextExtentPointW
(
hDC
,
sFile
,
l
strlenW
(
sFile
),
&
size
);
dwPathLen
=
size
.
cx
;
if
(
sFile
!=
lpszPath
)
...
...
@@ -986,14 +982,14 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
{
if
(
bEllipses
)
{
strcpyW
(
sPath
,
szEllipses
);
strcpyW
(
sPath
+
3
,
buff
);
l
strcpyW
(
sPath
,
szEllipses
);
l
strcpyW
(
sPath
+
3
,
buff
);
}
bRet
=
TRUE
;
goto
end
;
}
strcpyW
(
lpszPath
,
szEllipses
);
strcpyW
(
lpszPath
+
3
,
buff
);
l
strcpyW
(
lpszPath
,
szEllipses
);
l
strcpyW
(
lpszPath
+
3
,
buff
);
bRet
=
FALSE
;
goto
end
;
}
...
...
@@ -1001,7 +997,7 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
/* Trim the path by adding ellipses to the end, e.g:
* A very long file name.txt ==> A very...
*/
dwLen
=
strlenW
(
lpszPath
);
dwLen
=
l
strlenW
(
lpszPath
);
if
(
dwLen
>
MAX_PATH
-
3
)
dwLen
=
MAX_PATH
-
3
;
...
...
@@ -1030,8 +1026,8 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
}
else
{
strcpyW
(
buff
+
dwLen
,
szEllipses
);
strcpyW
(
lpszPath
,
buff
);
l
strcpyW
(
buff
+
dwLen
,
szEllipses
);
l
strcpyW
(
lpszPath
,
buff
);
}
}
...
...
@@ -1109,11 +1105,11 @@ BOOL WINAPI PathMakeSystemFolderW(LPCWSTR lpszPath)
/* If the directory is already a system directory, don't do anything */
GetSystemDirectoryW
(
buff
,
MAX_PATH
);
if
(
!
strcmpW
(
buff
,
lpszPath
))
if
(
!
wcscmp
(
buff
,
lpszPath
))
return
TRUE
;
GetWindowsDirectoryW
(
buff
,
MAX_PATH
);
if
(
!
strcmpW
(
buff
,
lpszPath
))
if
(
!
wcscmp
(
buff
,
lpszPath
))
return
TRUE
;
/* "UseSystemForSystemFolders" Tells Win what attributes to use */
...
...
@@ -1342,11 +1338,11 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
lstrcpynW
(
szSearch
,
lpszPath
,
MAX_PATH
);
PathAddBackslashW
(
szSearch
);
dwLen
=
strlenW
(
szSearch
);
dwLen
=
l
strlenW
(
szSearch
);
if
(
dwLen
>
MAX_PATH
-
4
)
return
FALSE
;
strcpyW
(
szSearch
+
dwLen
,
szAllFiles
);
l
strcpyW
(
szSearch
+
dwLen
,
szAllFiles
);
hfind
=
FindFirstFileW
(
szSearch
,
&
find_data
);
if
(
hfind
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
...
...
@@ -1428,14 +1424,14 @@ LPCWSTR WINAPI PathFindSuffixArrayW(LPCWSTR lpszSuffix, LPCWSTR *lppszArray, int
if
(
lpszSuffix
&&
lppszArray
&&
dwCount
>
0
)
{
dwLen
=
strlenW
(
lpszSuffix
);
dwLen
=
l
strlenW
(
lpszSuffix
);
while
(
dwRet
<
dwCount
)
{
size_t
dwCompareLen
=
strlenW
(
*
lppszArray
);
size_t
dwCompareLen
=
l
strlenW
(
*
lppszArray
);
if
(
dwCompareLen
<
dwLen
)
{
if
(
!
strcmpW
(
lpszSuffix
+
dwLen
-
dwCompareLen
,
*
lppszArray
))
if
(
!
wcscmp
(
lpszSuffix
+
dwLen
-
dwCompareLen
,
*
lppszArray
))
return
*
lppszArray
;
/* Found */
}
dwRet
++
;
...
...
@@ -1504,7 +1500,7 @@ VOID WINAPI PathUndecorateW(LPWSTR lpszPath)
if
(
*
lpszSkip
==
'['
)
lpszSkip
++
;
/* [] (no number) */
else
while
(
lpszSkip
>
lpszPath
&&
is
digitW
(
lpszSkip
[
-
1
]))
while
(
lpszSkip
>
lpszPath
&&
is
wdigit
(
lpszSkip
[
-
1
]))
lpszSkip
--
;
if
(
lpszSkip
>
lpszPath
&&
lpszSkip
[
-
1
]
==
'['
&&
lpszSkip
[
-
2
]
!=
'\\'
)
{
...
...
@@ -1565,12 +1561,12 @@ HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR lpszFile, LPWSTR lpszPath, DWORD
if
(
dwLen
>
0
&&
lpszPath
[
dwLen
-
1
]
==
'\\'
)
dwLen
--
;
dwFileLen
=
strlenW
(
lpszFile
);
dwFileLen
=
l
strlenW
(
lpszFile
);
if
(
dwLen
+
dwFileLen
+
ARRAY_SIZE
(
szWeb
)
>=
dwPathLen
)
return
E_FAIL
;
/* lpszPath too short */
strcpyW
(
lpszPath
+
dwLen
,
szWeb
);
l
strcpyW
(
lpszPath
+
dwLen
,
szWeb
);
dwLen
+=
ARRAY_SIZE
(
szWeb
);
dwPathLen
=
dwPathLen
-
dwLen
;
/* Remaining space */
...
...
@@ -1583,14 +1579,14 @@ HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR lpszFile, LPWSTR lpszPath, DWORD
{
/* Use localised content in the users UI language if present */
wsprintfW
(
lpszPath
+
dwLen
,
szWebMui
,
lidUser
);
strcpyW
(
lpszPath
+
dwLen
+
ARRAY_SIZE
(
szWebMui
),
lpszFile
);
l
strcpyW
(
lpszPath
+
dwLen
+
ARRAY_SIZE
(
szWebMui
),
lpszFile
);
if
(
PathFileExistsW
(
lpszPath
))
return
S_OK
;
}
}
/* Fall back to OS default installed content */
strcpyW
(
lpszPath
+
dwLen
,
lpszFile
);
l
strcpyW
(
lpszPath
+
dwLen
,
lpszFile
);
if
(
PathFileExistsW
(
lpszPath
))
return
S_OK
;
return
E_FAIL
;
...
...
dlls/shlwapi/reg.c
View file @
c9205f17
...
...
@@ -28,7 +28,6 @@
#include "wine/debug.h"
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
shell
);
...
...
@@ -667,7 +666,7 @@ BOOL WINAPI RegisterMIMETypeForExtensionW(LPCWSTR lpszSubKey, LPCWSTR lpszValue)
}
return
!
SHSetValueW
(
HKEY_CLASSES_ROOT
,
lpszSubKey
,
lpszContentTypeW
,
REG_SZ
,
lpszValue
,
strlenW
(
lpszValue
));
REG_SZ
,
lpszValue
,
l
strlenW
(
lpszValue
));
}
/*************************************************************************
...
...
@@ -743,7 +742,7 @@ BOOL WINAPI GetMIMETypeSubKeyW(LPCWSTR lpszType, LPWSTR lpszBuffer, DWORD dwLen)
if
(
dwLen
>
dwLenMimeDbContent
&&
lpszType
&&
lpszBuffer
)
{
DWORD
dwStrLen
=
strlenW
(
lpszType
);
DWORD
dwStrLen
=
l
strlenW
(
lpszType
);
if
(
dwStrLen
<
dwLen
-
dwLenMimeDbContent
)
{
...
...
@@ -818,7 +817,7 @@ BOOL WINAPI MIME_GetExtensionW(LPCWSTR lpszType, LPWSTR lpExt, INT iLen)
lpExt
[
1
])
{
if
(
lpExt
[
1
]
==
'.'
)
memmove
(
lpExt
,
lpExt
+
1
,
(
strlenW
(
lpExt
+
1
)
+
1
)
*
sizeof
(
WCHAR
));
memmove
(
lpExt
,
lpExt
+
1
,
(
l
strlenW
(
lpExt
+
1
)
+
1
)
*
sizeof
(
WCHAR
));
else
*
lpExt
=
'.'
;
/* Supply a '.' */
bRet
=
TRUE
;
...
...
@@ -1006,7 +1005,7 @@ HRESULT WINAPI SHRegGetCLSIDKeyW(REFGUID guid, LPCWSTR lpszValue, BOOL bUseHKCU,
if
(
lpszValue
)
{
szKey
[
ARRAY_SIZE
(
szClassIdKey
)
+
39
]
=
'\\'
;
strcpyW
(
szKey
+
ARRAY_SIZE
(
szClassIdKey
)
+
40
,
lpszValue
);
/* Append value name */
l
strcpyW
(
szKey
+
ARRAY_SIZE
(
szClassIdKey
)
+
40
,
lpszValue
);
/* Append value name */
}
hkey
=
bUseHKCU
?
HKEY_CURRENT_USER
:
HKEY_CLASSES_ROOT
;
...
...
dlls/shlwapi/stopwatch.c
View file @
c9205f17
...
...
@@ -23,9 +23,6 @@
* B) Want to use a substandard API to tune its performance.
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
...
...
dlls/shlwapi/string.c
View file @
c9205f17
...
...
@@ -19,9 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
...
...
@@ -39,7 +36,6 @@
#include "shlobj.h"
#include "mlang.h"
#include "ddeml.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "resource.h"
...
...
@@ -133,7 +129,7 @@ static int FormatDouble(double value, int decimals, LPWSTR pszBuf, int cchBuf)
NUMBERFMTW
fmt
;
WCHAR
decimal
[
8
],
thousand
[
8
];
s
nprintfW
(
buf
,
64
,
flfmt
,
value
);
s
wprintf
(
buf
,
64
,
flfmt
,
value
);
FillNumberFmt
(
&
fmt
,
decimal
,
ARRAY_SIZE
(
decimal
),
thousand
,
ARRAY_SIZE
(
thousand
));
fmt
.
NumDigits
=
decimals
;
...
...
@@ -157,7 +153,7 @@ LPWSTR WINAPI StrCatW(LPWSTR lpszStr, LPCWSTR lpszSrc)
TRACE
(
"(%s,%s)
\n
"
,
debugstr_w
(
lpszStr
),
debugstr_w
(
lpszSrc
));
if
(
lpszStr
&&
lpszSrc
)
strcatW
(
lpszStr
,
lpszSrc
);
l
strcatW
(
lpszStr
,
lpszSrc
);
return
lpszStr
;
}
...
...
@@ -178,7 +174,7 @@ LPWSTR WINAPI StrCpyW(LPWSTR lpszStr, LPCWSTR lpszSrc)
TRACE
(
"(%p,%s)
\n
"
,
lpszStr
,
debugstr_w
(
lpszSrc
));
if
(
lpszStr
&&
lpszSrc
)
strcpyW
(
lpszStr
,
lpszSrc
);
l
strcpyW
(
lpszStr
,
lpszSrc
);
return
lpszStr
;
}
...
...
@@ -269,7 +265,7 @@ HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest,
size_t
dst_len
;
if
(
!
src
->
u
.
pOleStr
)
return
E_FAIL
;
dst_len
=
strlenW
(
src
->
u
.
pOleStr
);
dst_len
=
l
strlenW
(
src
->
u
.
pOleStr
);
memcpy
(
dest
,
src
->
u
.
pOleStr
,
min
(
dst_len
,
len
-
1
)
*
sizeof
(
WCHAR
));
dest
[
min
(
dst_len
,
len
-
1
)]
=
0
;
CoTaskMemFree
(
src
->
u
.
pOleStr
);
...
...
@@ -536,7 +532,7 @@ LPWSTR WINAPI StrNCatW(LPWSTR lpszStr, LPCWSTR lpszCat, INT cchMax)
return
NULL
;
}
StrCpyNW
(
lpszStr
+
strlenW
(
lpszStr
),
lpszCat
,
cchMax
);
StrCpyNW
(
lpszStr
+
l
strlenW
(
lpszStr
),
lpszCat
,
cchMax
);
return
lpszRet
;
}
...
...
@@ -718,7 +714,7 @@ static int SHLWAPI_WriteTimeClass(LPWSTR lpszOut, DWORD dwValue,
iDigits
=
SHLWAPI_FormatSignificant
(
szOut
+
1
,
iDigits
);
*
szOut
=
' '
;
LoadStringW
(
shlwapi_hInstance
,
uClassStringId
,
szBuff
+
32
,
32
);
strcatW
(
lpszOut
,
szOut
);
l
strcatW
(
lpszOut
,
szOut
);
return
iDigits
;
}
...
...
@@ -812,7 +808,7 @@ INT WINAPI StrFromTimeIntervalW(LPWSTR lpszStr, UINT cchMax, DWORD dwMS,
SHLWAPI_WriteTimeClass
(
szCopy
,
dwMS
,
IDS_TIME_INTERVAL_SECONDS
,
iDigits
);
lstrcpynW
(
lpszStr
,
szCopy
,
cchMax
);
iRet
=
strlenW
(
lpszStr
);
iRet
=
l
strlenW
(
lpszStr
);
}
return
iRet
;
}
...
...
@@ -883,7 +879,7 @@ LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
{
WCHAR
wszBytesFormat
[
64
];
LoadStringW
(
shlwapi_hInstance
,
IDS_BYTES_FORMAT
,
wszBytesFormat
,
64
);
s
nprintfW
(
lpszDest
,
cchMax
,
wszBytesFormat
,
(
int
)
llBytes
);
s
wprintf
(
lpszDest
,
cchMax
,
wszBytesFormat
,
(
int
)
llBytes
);
return
lpszDest
;
}
...
...
@@ -1014,7 +1010,7 @@ WCHAR WINAPI SHStripMneumonicW(LPCWSTR lpszStr)
if
(
*
lpszTmp
!=
'&'
)
ch
=
*
lpszTmp
;
memmove
(
lpszIter
,
lpszTmp
,
(
strlenW
(
lpszTmp
)
+
1
)
*
sizeof
(
WCHAR
)
);
memmove
(
lpszIter
,
lpszTmp
,
(
l
strlenW
(
lpszTmp
)
+
1
)
*
sizeof
(
WCHAR
)
);
}
}
...
...
@@ -1099,7 +1095,7 @@ DWORD WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr,
*
lpDstStr
=
'\0'
;
len
=
strlenW
(
lpSrcStr
)
+
1
;
len
=
l
strlenW
(
lpSrcStr
)
+
1
;
switch
(
CodePage
)
{
...
...
@@ -1228,5 +1224,5 @@ BOOL WINAPI DoesStringRoundTripW(LPCWSTR lpSrcStr, LPSTR lpDst, INT iLen)
SHUnicodeToAnsi
(
lpSrcStr
,
lpDst
,
iLen
);
SHAnsiToUnicode
(
lpDst
,
szBuff
,
MAX_PATH
);
return
!
strcmpW
(
lpSrcStr
,
szBuff
);
return
!
wcscmp
(
lpSrcStr
,
szBuff
);
}
dlls/shlwapi/url.c
View file @
c9205f17
...
...
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
...
...
@@ -27,7 +25,6 @@
#include "winbase.h"
#include "winnls.h"
#include "winerror.h"
#include "wine/unicode.h"
#include "wininet.h"
#include "winreg.h"
#include "winternl.h"
...
...
@@ -136,7 +133,7 @@ HRESULT WINAPI MLBuildResURLW(LPCWSTR lpszLibName, HMODULE hMod, DWORD dwFlags,
len
=
GetModuleFileNameW
(
hMod
,
szBuff
,
ARRAY_SIZE
(
szBuff
));
if
(
len
&&
len
<
ARRAY_SIZE
(
szBuff
))
{
DWORD
dwPathLen
=
strlenW
(
szBuff
)
+
1
;
DWORD
dwPathLen
=
l
strlenW
(
szBuff
)
+
1
;
if
(
dwDestLen
>=
dwPathLen
)
{
...
...
@@ -145,7 +142,7 @@ HRESULT WINAPI MLBuildResURLW(LPCWSTR lpszLibName, HMODULE hMod, DWORD dwFlags,
dwDestLen
-=
dwPathLen
;
memcpy
(
lpszDest
+
szResLen
,
szBuff
,
dwPathLen
*
sizeof
(
WCHAR
));
dwResLen
=
strlenW
(
lpszRes
)
+
1
;
dwResLen
=
l
strlenW
(
lpszRes
)
+
1
;
if
(
dwDestLen
>=
dwResLen
+
1
)
{
lpszDest
[
szResLen
+
dwPathLen
-
1
]
=
'/'
;
...
...
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