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
89f079bf
Commit
89f079bf
authored
Aug 08, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced a few calls to lstr* functions by their CRTDLL or libc
equivalent.
parent
7147e4cf
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
41 additions
and
43 deletions
+41
-43
comctl32undoc.c
dlls/comctl32/comctl32undoc.c
+4
-5
printdlg.c
dlls/commdlg/printdlg.c
+2
-2
rtlstr.c
dlls/ntdll/rtlstr.c
+2
-1
shell32_main.c
dlls/shell32/shell32_main.c
+3
-3
shellpath.c
dlls/shell32/shellpath.c
+11
-10
info.c
dlls/version/info.c
+2
-1
dos_fs.c
files/dos_fs.c
+4
-4
thunk.c
if1632/thunk.c
+2
-2
winestring.h
include/wine/winestring.h
+0
-5
libres.c
loader/libres.c
+3
-1
pe_resource.c
loader/pe_resource.c
+2
-1
ole2nls.c
ole/ole2nls.c
+4
-6
kernel32.c
win32/kernel32.c
+2
-2
No files found.
dlls/comctl32/comctl32undoc.c
View file @
89f079bf
...
...
@@ -22,6 +22,7 @@
#include "winerror.h"
#include "objbase.h"
#include "commctrl.h"
#include "crtdll.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
commctrl
)
...
...
@@ -33,10 +34,8 @@ extern HANDLE COMCTL32_hHeap; /* handle to the private heap */
* We put some function prototypes here that don't seem to belong in
* any header file. When they find their place, we can remove them.
*/
extern
LPWSTR
__cdecl
CRTDLL_wcschr
(
LPCWSTR
,
WCHAR
);
extern
LPSTR
WINAPI
lstrrchr
(
LPCSTR
,
LPCSTR
,
WORD
);
extern
LPWSTR
WINAPI
lstrrchrw
(
LPCWSTR
,
LPCWSTR
,
WORD
);
extern
LPWSTR
WINAPI
strstrw
(
LPCWSTR
,
LPCWSTR
);
typedef
struct
_STREAMDATA
...
...
@@ -1994,7 +1993,7 @@ LPWSTR WINAPI COMCTL32_StrChrW( LPCWSTR lpStart, WORD wMatch) {
*
*/
INT
WINAPI
COMCTL32_StrCmpNA
(
LPCSTR
lpStr1
,
LPCSTR
lpStr2
,
int
nChar
)
{
return
lstrncmpA
(
lpStr1
,
lpStr2
,
nChar
);
return
strncmp
(
lpStr1
,
lpStr2
,
nChar
);
}
/**************************************************************************
...
...
@@ -2002,7 +2001,7 @@ INT WINAPI COMCTL32_StrCmpNA( LPCSTR lpStr1, LPCSTR lpStr2, int nChar) {
*
*/
INT
WINAPI
COMCTL32_StrCmpNW
(
LPCWSTR
lpStr1
,
LPCWSTR
lpStr2
,
int
nChar
)
{
return
lstrncmpW
(
lpStr1
,
lpStr2
,
nChar
);
return
CRTDLL_wcsncmp
(
lpStr1
,
lpStr2
,
nChar
);
}
/**************************************************************************
...
...
@@ -2034,7 +2033,7 @@ LPSTR WINAPI COMCTL32_StrStrA( LPCSTR lpFirst, LPCSTR lpSrch) {
*
*/
LPWSTR
WINAPI
COMCTL32_StrStrW
(
LPCWSTR
lpFirst
,
LPCWSTR
lpSrch
)
{
return
strstrw
(
lpFirst
,
lpSrch
);
return
CRTDLL_wcsstr
(
lpFirst
,
lpSrch
);
}
/**************************************************************************
...
...
dlls/commdlg/printdlg.c
View file @
89f079bf
...
...
@@ -298,8 +298,8 @@ static void PRINTDLG_UpdatePrinterInfoTexts(HWND hDlg, PRINT_PTRA* PrintStructur
LoadStringA
(
COMDLG32_hInstance
,
(
1
<<
i
),
ResourceString
,
255
);
if
(
StatusMsg
[
0
]
!=
'\0'
)
/* append ; before next item */
lstrcatA
(
StatusMsg
,
"; "
);
lstrcatA
(
StatusMsg
,
ResourceString
);
strcat
(
StatusMsg
,
"; "
);
strcat
(
StatusMsg
,
ResourceString
);
}
}
if
(
StatusMsg
[
0
]
==
'\0'
)
/* no Status ??? */
...
...
dlls/ntdll/rtlstr.c
View file @
89f079bf
...
...
@@ -13,6 +13,7 @@
# include <wctype.h>
#endif
#include "wine/winestring.h"
#include "crtdll.h"
#include "heap.h"
#include "winnls.h"
#include "debugtools.h"
...
...
@@ -224,7 +225,7 @@ DWORD WINAPI RtlEqualUnicodeString(PUNICODE_STRING s1,PUNICODE_STRING s2,DWORD x
return
0
;
if
(
s1
->
Length
!=
s2
->
Length
)
return
1
;
return
!
lstrncmpW
(
s1
->
Buffer
,
s2
->
Buffer
,
s1
->
Length
/
2
);
return
!
CRTDLL_wcsncmp
(
s1
->
Buffer
,
s2
->
Buffer
,
s1
->
Length
/
2
);
}
/**************************************************************************
...
...
dlls/shell32/shell32_main.c
View file @
89f079bf
...
...
@@ -545,7 +545,7 @@ BOOL WINAPI AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
hWndCtl
=
GetDlgItem
(
hWnd
,
IDC_WINE_TEXT
);
SendMessageA
(
hWndCtl
,
WM_GETTEXT
,
512
,
(
LPARAM
)
Template
);
if
(
!
lstrncmpA
(
Template
,
"WINE"
,
4
)
)
if
(
!
strncmp
(
Template
,
"WINE"
,
4
)
)
SetWindowTextA
(
GetDlgItem
(
hWnd
,
IDC_STATIC_TEXT
),
Template
);
else
{
char
*
pch
=
Template
+
strlen
(
Template
)
-
strlen
(
__appendix_str
);
...
...
@@ -554,8 +554,8 @@ BOOL WINAPI AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
(
WPARAM
)
-
1
,
(
LPARAM
)
Template
);
}
lstrcpyA
(
Template
,
pstr
);
lstrcatA
(
Template
,
__appendix_str
);
strcpy
(
Template
,
pstr
);
strcat
(
Template
,
__appendix_str
);
SetWindowTextA
(
hWndCtl
,
Template
);
SetWindowLongA
(
hWnd
,
DWL_MSGRESULT
,
1
);
return
TRUE
;
...
...
dlls/shell32/shellpath.c
View file @
89f079bf
...
...
@@ -10,6 +10,7 @@
#include "winnls.h"
#include "winversion.h"
#include "winreg.h"
#include "crtdll.h"
#include "shlobj.h"
#include "shell32_main.h"
...
...
@@ -130,7 +131,7 @@ LPWSTR WINAPI PathAddBackslashW(LPWSTR path)
{
int
len
;
TRACE
(
"%p->%s
\n
"
,
path
,
debugstr_w
(
path
));
len
=
lstrlenW
(
path
);
len
=
CRTDLL_wcslen
(
path
);
if
(
len
&&
path
[
len
-
1
]
!=
(
WCHAR
)
'\\'
)
{
path
[
len
]
=
(
WCHAR
)
'\\'
;
path
[
len
+
1
]
=
0x00
;
...
...
@@ -170,10 +171,10 @@ LPWSTR WINAPI PathRemoveBlanksW(LPWSTR str)
TRACE
(
"%s
\n
"
,
debugstr_w
(
str
));
while
(
*
x
==
' '
)
x
++
;
if
(
x
!=
str
)
lstrcpyW
(
str
,
x
);
CRTDLL_wcscpy
(
str
,
x
);
if
(
!*
str
)
return
str
;
x
=
str
+
lstrlenW
(
str
)
-
1
;
x
=
str
+
CRTDLL_wcslen
(
str
)
-
1
;
while
(
*
x
==
' '
)
x
--
;
if
(
*
x
==
' '
)
...
...
@@ -319,19 +320,19 @@ LPWSTR WINAPI PathCombineW(LPWSTR szDest, LPCWSTR lpszDir, LPCWSTR lpszFile)
if
(
!
lpszFile
||
!
lpszFile
[
0
]
||
(
lpszFile
[
0
]
==
(
WCHAR
)
'.'
&&
!
lpszFile
[
1
])
)
{
lstrcpyW
(
szDest
,
lpszDir
);
{
CRTDLL_wcscpy
(
szDest
,
lpszDir
);
return
szDest
;
}
/* if lpszFile is a complete path don't care about lpszDir */
if
(
PathIsRootW
(
lpszFile
))
{
lstrcpyW
(
szDest
,
lpszFile
);
{
CRTDLL_wcscpy
(
szDest
,
lpszFile
);
}
else
{
lstrcpyW
(
sTemp
,
lpszDir
);
{
CRTDLL_wcscpy
(
sTemp
,
lpszDir
);
PathAddBackslashW
(
sTemp
);
lstrcatW
(
sTemp
,
lpszFile
);
lstrcpyW
(
szDest
,
sTemp
);
CRTDLL_wcscat
(
sTemp
,
lpszFile
);
CRTDLL_wcscpy
(
szDest
,
sTemp
);
}
return
szDest
;
}
...
...
@@ -625,7 +626,7 @@ VOID WINAPI PathUnquoteSpacesA(LPSTR str)
return
;
}
VOID
WINAPI
PathUnquoteSpacesW
(
LPWSTR
str
)
{
DWORD
len
=
lstrlenW
(
str
);
{
DWORD
len
=
CRTDLL_wcslen
(
str
);
TRACE
(
"%s
\n
"
,
debugstr_w
(
str
));
...
...
@@ -634,7 +635,7 @@ VOID WINAPI PathUnquoteSpacesW(LPWSTR str)
if
(
str
[
len
-
1
]
!=
'"'
)
return
;
str
[
len
-
1
]
=
'\0'
;
lstrcpyW
(
str
,
str
+
1
);
CRTDLL_wcscpy
(
str
,
str
+
1
);
return
;
}
VOID
WINAPI
PathUnquoteSpacesAW
(
LPVOID
str
)
...
...
dlls/version/info.c
View file @
89f079bf
...
...
@@ -14,6 +14,7 @@
#include "wine/winestring.h"
#include "winerror.h"
#include "heap.h"
#include "crtdll.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
ver
)
...
...
@@ -400,7 +401,7 @@ VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT32 *inf
while
(
(
DWORD
)
child
<
(
DWORD
)
info
+
info
->
wLength
)
{
if
(
!
lstrncmpiW
(
child
->
szKey
,
szKey
,
cbKey
)
)
if
(
!
CRTDLL__wcsnicmp
(
child
->
szKey
,
szKey
,
cbKey
)
)
return
child
;
child
=
VersionInfo32_Next
(
child
);
...
...
files/dos_fs.c
View file @
89f079bf
...
...
@@ -545,7 +545,7 @@ BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
{
if
(
!
ignore_case
)
{
if
(
!
lstrncmpA
(
long_name
,
name
,
len
))
break
;
if
(
!
strncmp
(
long_name
,
name
,
len
))
break
;
}
else
{
...
...
@@ -1867,15 +1867,15 @@ DWORD WINAPI QueryDosDeviceA(LPCSTR devname,LPSTR target,DWORD bufsize)
TRACE_
(
dosfs
)(
"(%s,...)
\n
"
,
devname
?
devname
:
"<null>"
);
if
(
!
devname
)
{
/* return known MSDOS devices */
lstrcpyA
(
buffer
,
"CON COM1 COM2 LPT1 NUL "
);
strcpy
(
buffer
,
"CON COM1 COM2 LPT1 NUL "
);
while
((
s
=
strchr
(
buffer
,
' '
)))
*
s
=
'\0'
;
lstrcpynA
(
target
,
buffer
,
bufsize
);
return
strlen
(
buffer
);
}
lstrcpyA
(
buffer
,
"
\\
DEV
\\
"
);
lstrcatA
(
buffer
,
devname
);
strcpy
(
buffer
,
"
\\
DEV
\\
"
);
strcat
(
buffer
,
devname
);
if
((
s
=
strchr
(
buffer
,
':'
)))
*
s
=
'\0'
;
lstrcpynA
(
target
,
buffer
,
bufsize
);
return
strlen
(
buffer
);
...
...
if1632/thunk.c
View file @
89f079bf
...
...
@@ -945,14 +945,14 @@ UINT WINAPI ThunkConnect16(
)
{
BOOL
directionSL
;
if
(
!
lstrncmpA
(
TD
->
magic
,
"SL01"
,
4
))
if
(
!
strncmp
(
TD
->
magic
,
"SL01"
,
4
))
{
directionSL
=
TRUE
;
TRACE_
(
thunk
)(
"SL01 thunk %s (%lx) -> %s (%s), Reason: %ld
\n
"
,
module16
,
(
DWORD
)
TD
,
module32
,
thunkfun32
,
dwReason
);
}
else
if
(
!
lstrncmpA
(
TD
->
magic
,
"LS01"
,
4
))
else
if
(
!
strncmp
(
TD
->
magic
,
"LS01"
,
4
))
{
directionSL
=
FALSE
;
...
...
include/wine/winestring.h
View file @
89f079bf
...
...
@@ -7,12 +7,7 @@ INT16 WINAPI WideCharToLocal16(LPSTR,LPWSTR,INT16);
INT
WINAPI
WideCharToLocal
(
LPSTR
,
LPWSTR
,
INT
);
INT16
WINAPI
LocalToWideChar16
(
LPWSTR
,
LPSTR
,
INT16
);
INT
WINAPI
LocalToWideChar
(
LPWSTR
,
LPSTR
,
INT
);
INT
WINAPI
lstrncmpA
(
LPCSTR
,
LPCSTR
,
INT
);
INT
WINAPI
lstrncmpW
(
LPCWSTR
,
LPCWSTR
,
INT
);
#define lstrncmp WINELIB_NAME_AW(lstrncmp)
INT
WINAPI
lstrncmpiA
(
LPCSTR
,
LPCSTR
,
INT
);
INT
WINAPI
lstrncmpiW
(
LPCWSTR
,
LPCWSTR
,
INT
);
#define lstrncmpi WINELIB_NAME_AW(lstrncmpi)
LPWSTR
WINAPI
lstrcpyAtoW
(
LPWSTR
,
LPCSTR
);
LPSTR
WINAPI
lstrcpyWtoA
(
LPSTR
,
LPCWSTR
);
LPWSTR
WINAPI
lstrcpynAtoW
(
LPWSTR
,
LPCSTR
,
INT
);
...
...
loader/libres.c
View file @
89f079bf
...
...
@@ -10,6 +10,7 @@
#include "resource.h"
#include "debugtools.h"
#include "heap.h"
#include "crtdll.h"
#include "xmalloc.h"
DEFAULT_DEBUG_CHANNEL
(
resource
)
...
...
@@ -79,7 +80,8 @@ HRSRC LIBRES_FindResource( HINSTANCE hModule, LPCWSTR name, LPCWSTR type )
for
(
Res
=
ResBlock
->
Resources
;
*
Res
;
Res
++
)
if
(
name
)
{
if
((
*
Res
)
->
restype
==
typeid
&&
!
lstrncmpiW
((
LPCWSTR
)((
*
Res
)
->
resname
+
1
),
name
,
*
((
*
Res
)
->
resname
)))
if
((
*
Res
)
->
restype
==
typeid
&&
!
CRTDLL__wcsnicmp
((
LPCWSTR
)((
*
Res
)
->
resname
+
1
),
name
,
*
((
*
Res
)
->
resname
)))
return
(
HRSRC
)
*
Res
;
}
else
...
...
loader/pe_resource.c
View file @
89f079bf
...
...
@@ -22,6 +22,7 @@
#include "libres.h"
#include "stackframe.h"
#include "neexe.h"
#include "crtdll.h"
#include "debugtools.h"
/**********************************************************************
...
...
@@ -71,7 +72,7 @@ PIMAGE_RESOURCE_DIRECTORY GetResDirEntryW(PIMAGE_RESOURCE_DIRECTORY resdirptr,
entryTable
[
entrynum
].
u1
.
s
.
NameOffset
);
if
(
namelen
!=
str
->
Length
)
continue
;
if
(
lstrncmpiW
(
name
,
str
->
NameString
,
str
->
Length
)
==
0
)
if
(
CRTDLL__wcsnicmp
(
name
,
str
->
NameString
,
str
->
Length
)
==
0
)
return
(
PIMAGE_RESOURCE_DIRECTORY
)
(
root
+
entryTable
[
entrynum
].
u2
.
s
.
OffsetToDirectory
);
...
...
ole/ole2nls.c
View file @
89f079bf
...
...
@@ -15,6 +15,7 @@
#include "winreg.h"
#include "winerror.h"
#include "debugtools.h"
#include "crtdll.h"
#include "main.h"
DECLARE_DEBUG_CHANNEL
(
file
)
...
...
@@ -2401,7 +2402,7 @@ UINT WINAPI CompareStringW(DWORD lcid, DWORD fdwStyle,
l2
=
(
l2
==-
1
)
?
lstrlenW
(
s2
)
:
l2
;
len
=
l1
<
l2
?
l1
:
l2
;
ret
=
(
fdwStyle
&
NORM_IGNORECASE
)
?
lstrncmpiW
(
s1
,
s2
,
len
)
:
lstrncmpW
(
s1
,
s2
,
len
);
CRTDLL__wcsnicmp
(
s1
,
s2
,
len
)
:
CRTDLL_wcsncmp
(
s1
,
s2
,
len
);
/* not equal, return 1 or 3 */
if
(
ret
!=
0
)
return
ret
+
2
;
/* same len, return 2 */
...
...
@@ -2801,13 +2802,10 @@ static INT OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
/* cat buf onto the output */
outlen
=
lstrlenW
(
buf
);
if
(
outpos
+
buflen
<
outlen
)
{
output
[
outpos
]
=
0
;
/* a "hook" for strcat */
lstrcatW
(
output
,
buf
);
lstrcpyW
(
output
+
outpos
,
buf
);
outpos
+=
buflen
;
}
else
{
output
[
outpos
]
=
0
;
lstrcatnW
(
output
,
buf
,
outlen
-
outpos
);
output
[
outlen
-
1
]
=
0
;
lstrcpynW
(
output
+
outpos
,
buf
,
outlen
-
outpos
);
Overflow
=
1
;
break
;
/* Abnormal exit */
}
...
...
win32/kernel32.c
View file @
89f079bf
...
...
@@ -207,14 +207,14 @@ UINT WINAPI ThunkConnect32(
)
{
BOOL
directionSL
;
if
(
!
lstrncmpA
(
TD
->
magic
,
"SL01"
,
4
))
if
(
!
strncmp
(
TD
->
magic
,
"SL01"
,
4
))
{
directionSL
=
TRUE
;
TRACE_
(
thunk
)(
"SL01 thunk %s (%lx) <- %s (%s), Reason: %ld
\n
"
,
module32
,
(
DWORD
)
TD
,
module16
,
thunkfun16
,
dwReason
);
}
else
if
(
!
lstrncmpA
(
TD
->
magic
,
"LS01"
,
4
))
else
if
(
!
strncmp
(
TD
->
magic
,
"LS01"
,
4
))
{
directionSL
=
FALSE
;
...
...
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