Replaced lstrlen/lstrcmp by libc equivalents everywhere we don't need

to trap exceptions.
This commit is contained in:
Alexandre Julliard 2000-08-06 02:41:16 +00:00
parent c1d5dc40c5
commit cb10fdab99
22 changed files with 73 additions and 75 deletions

View File

@ -261,7 +261,7 @@ static void EDIT_UpdateText(WND *wnd, LPRECT rc, BOOL bErase);
*/
static inline BOOL EDIT_EM_CanUndo(WND *wnd, EDITSTATE *es)
{
return (es->undo_insert_count || lstrlenA(es->undo_text));
return (es->undo_insert_count || strlen(es->undo_text));
}
@ -803,7 +803,7 @@ LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg,
case WM_GETTEXTLENGTH:
DPRINTF_EDIT_MSG32("WM_GETTEXTLENGTH");
result = lstrlenA(es->text);
result = strlen(es->text);
break;
case WM_HSCROLL:
@ -982,7 +982,7 @@ static void EDIT_BuildLineDefs_ML(WND *wnd, EDITSTATE *es)
}
if (!(*cp)) {
current_def->ending = END_0;
current_def->net_length = lstrlenA(start);
current_def->net_length = strlen(start);
} else if ((cp > start) && (*(cp - 1) == '\r')) {
current_def->ending = END_SOFT;
current_def->net_length = cp - start - 1;
@ -1162,7 +1162,7 @@ static INT EDIT_CharFromPos(WND *wnd, EDITSTATE *es, INT x, INT y, LPBOOL after_
else
{
INT low = es->x_offset;
INT high = lstrlenA(es->text) + 1;
INT high = strlen(es->text) + 1;
while (low < high - 1)
{
INT mid = (low + high) / 2;
@ -1230,7 +1230,7 @@ static void EDIT_GetLineRect(WND *wnd, EDITSTATE *es, INT line, INT scol, INT ec
static LPSTR EDIT_GetPasswordPointer_SL(WND *wnd, EDITSTATE *es)
{
if (es->style & ES_PASSWORD) {
INT len = lstrlenA(es->text);
INT len = strlen(es->text);
LPSTR text = HeapAlloc(es->heap, 0, len + 1);
RtlFillMemory(text, len, es->password_char);
text[len] = '\0';
@ -1368,7 +1368,7 @@ static void EDIT_InvalidateText(WND *wnd, EDITSTATE *es, INT start, INT end)
return;
if (end == -1)
end = lstrlenA(es->text);
end = strlen(es->text);
ORDER_INT(start, end);
@ -1526,7 +1526,7 @@ static void EDIT_MoveEnd(WND *wnd, EDITSTATE *es, BOOL extend)
e = EDIT_CharFromPos(wnd, es, 0x3fffffff,
HIWORD(EDIT_EM_PosFromChar(wnd, es, es->selection_end, es->flags & EF_AFTER_WRAP)), &after_wrap);
else
e = lstrlenA(es->text);
e = strlen(es->text);
EDIT_EM_SetSel(wnd, es, extend ? es->selection_start : e, e, after_wrap);
EDIT_EM_ScrollCaret(wnd, es);
}
@ -2039,7 +2039,7 @@ static HLOCAL EDIT_EM_GetHandle(WND *wnd, EDITSTATE *es)
else if (es->hloc16)
return (HLOCAL)es->hloc16;
if (!(newBuf = LocalAlloc(LMEM_MOVEABLE, lstrlenA(es->text) + 1))) {
if (!(newBuf = LocalAlloc(LMEM_MOVEABLE, strlen(es->text) + 1))) {
ERR("could not allocate new 32 bit buffer\n");
return 0;
}
@ -2099,7 +2099,7 @@ static HLOCAL16 EDIT_EM_GetHandle16(WND *wnd, EDITSTATE *es)
}
TRACE("local heap initialized\n");
}
if (!(newBuf = LOCAL_Alloc(wnd->hInstance, LMEM_MOVEABLE, lstrlenA(es->text) + 1))) {
if (!(newBuf = LOCAL_Alloc(wnd->hInstance, LMEM_MOVEABLE, strlen(es->text) + 1))) {
ERR("could not allocate new 16 bit buffer\n");
return 0;
}
@ -2207,7 +2207,7 @@ static INT EDIT_EM_LineFromChar(WND *wnd, EDITSTATE *es, INT index)
if (!(es->style & ES_MULTILINE))
return 0;
if (index > lstrlenA(es->text))
if (index > strlen(es->text))
return es->line_count - 1;
if (index == -1)
index = min(es->selection_start, es->selection_end);
@ -2269,7 +2269,7 @@ static INT EDIT_EM_LineLength(WND *wnd, EDITSTATE *es, INT index)
LINEDEF *line_def;
if (!(es->style & ES_MULTILINE))
return lstrlenA(es->text);
return strlen(es->text);
if (index == -1) {
/* get the number of remaining non-selected chars of selected lines */
@ -2343,7 +2343,7 @@ static BOOL EDIT_EM_LineScroll(WND *wnd, EDITSTATE *es, INT dx, INT dy)
*/
static LRESULT EDIT_EM_PosFromChar(WND *wnd, EDITSTATE *es, INT index, BOOL after_wrap)
{
INT len = lstrlenA(es->text);
INT len = strlen(es->text);
INT l;
INT li;
INT x;
@ -2408,8 +2408,8 @@ static LRESULT EDIT_EM_PosFromChar(WND *wnd, EDITSTATE *es, INT index, BOOL afte
*/
static void EDIT_EM_ReplaceSel(WND *wnd, EDITSTATE *es, BOOL can_undo, LPCSTR lpsz_replace)
{
INT strl = lstrlenA(lpsz_replace);
INT tl = lstrlenA(es->text);
INT strl = strlen(lpsz_replace);
INT tl = strlen(es->text);
INT utl;
UINT s;
UINT e;
@ -2430,7 +2430,7 @@ static void EDIT_EM_ReplaceSel(WND *wnd, EDITSTATE *es, BOOL can_undo, LPCSTR lp
if (e != s) {
/* there is something to be deleted */
if (can_undo) {
utl = lstrlenA(es->undo_text);
utl = strlen(es->undo_text);
if (!es->undo_insert_count && (*es->undo_text && (s == es->undo_position))) {
/* undo-buffer is extended to the right */
EDIT_MakeUndoFit(wnd, es, utl + e - s);
@ -2479,7 +2479,7 @@ static void EDIT_EM_ReplaceSel(WND *wnd, EDITSTATE *es, BOOL can_undo, LPCSTR lp
EDIT_EM_EmptyUndoBuffer(wnd, es);
/* now insert */
tl = lstrlenA(es->text);
tl = strlen(es->text);
for (p = es->text + tl ; p >= es->text + s ; p--)
p[strl] = p[0];
for (i = 0 , p = es->text + s ; i < strl ; i++)
@ -2598,7 +2598,7 @@ static void EDIT_EM_ScrollCaret(WND *wnd, EDITSTATE *es)
EDIT_UpdateText(wnd, NULL, TRUE);
} else if (x > es->format_rect.right) {
INT x_last;
INT len = lstrlenA(es->text);
INT len = strlen(es->text);
goal = es->format_rect.right - format_width / HSCROLL_FRACTION;
do {
es->x_offset++;
@ -2789,7 +2789,7 @@ static void EDIT_EM_SetSel(WND *wnd, EDITSTATE *es, UINT start, UINT end, BOOL a
{
UINT old_start = es->selection_start;
UINT old_end = es->selection_end;
UINT len = lstrlenA(es->text);
UINT len = strlen(es->text);
if (start == -1) {
start = es->selection_end;
@ -2926,7 +2926,7 @@ static void EDIT_EM_SetWordBreakProc16(WND *wnd, EDITSTATE *es, EDITWORDBREAKPRO
*/
static BOOL EDIT_EM_Undo(WND *wnd, EDITSTATE *es)
{
INT ulength = lstrlenA(es->undo_text);
INT ulength = strlen(es->undo_text);
LPSTR utext = HeapAlloc(es->heap, 0, ulength + 1);
lstrcpyA(utext, es->undo_text);
@ -3100,7 +3100,7 @@ static void EDIT_WM_ContextMenu(WND *wnd, EDITSTATE *es, HWND hwnd, INT x, INT y
/* delete */
EnableMenuItem(popup, 5, MF_BYPOSITION | ((end - start) ? MF_ENABLED : MF_GRAYED));
/* select all */
EnableMenuItem(popup, 7, MF_BYPOSITION | (start || (end != lstrlenA(es->text)) ? MF_ENABLED : MF_GRAYED));
EnableMenuItem(popup, 7, MF_BYPOSITION | (start || (end != strlen(es->text)) ? MF_ENABLED : MF_GRAYED));
TrackPopupMenu(popup, TPM_LEFTALIGN | TPM_RIGHTBUTTON, x, y, 0, wnd->hwndSelf, NULL);
DestroyMenu(menu);

View File

@ -4370,7 +4370,7 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT item, BOOL bypos,
switch (MENU_ITEM_TYPE(menu->fType)) {
case MF_STRING:
if (menu->text) {
int len = lstrlenA(menu->text);
int len = strlen(menu->text);
if(lpmii->dwTypeData && lpmii->cch) {
if (unicode)
lstrcpynAtoW((LPWSTR) lpmii->dwTypeData, menu->text,
@ -4401,7 +4401,7 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT item, BOOL bypos,
else
lstrcpynA(lpmii->dwTypeData, menu->text, lpmii->cch);
}
lpmii->cch = lstrlenA(menu->text);
lpmii->cch = strlen(menu->text);
}
if (lpmii->fMask & MIIM_FTYPE)

View File

@ -484,7 +484,7 @@ void WINAPI PathStripPathW(LPWSTR lpszPath)
TRACE("%s\n", debugstr_w(lpszPath));
if(lpszFileName)
RtlMoveMemory(lpszPath, lpszFileName, (lstrlenW(lpszFileName)+1)*sizeof(WCHAR));
RtlMoveMemory(lpszPath, lpszFileName, (strlenW(lpszFileName)+1)*sizeof(WCHAR));
}
/*************************************************************************
@ -612,7 +612,7 @@ LPWSTR WINAPI PathRemoveBackslashW( LPWSTR lpszPath )
if(lpszPath)
{
len = lstrlenW(lpszPath);
len = strlenW(lpszPath);
szTemp = CharPrevW(lpszPath, lpszPath+len);
if (! PathIsRootW(lpszPath))
{
@ -662,7 +662,7 @@ void WINAPI PathRemoveBlanksW(LPWSTR str)
{
while (*x==' ') x = CharNextW(x);
if (x!=str) lstrcpyW(str,x);
x=str+lstrlenW(str)-1;
x=str+strlenW(str)-1;
while (*x==' ') x = CharPrevW(str, x);
if (*x==' ') *x='\0';
}
@ -698,7 +698,7 @@ LPWSTR WINAPI PathQuoteSpacesW(LPWSTR lpszPath)
if(StrChrW(lpszPath,' '))
{
int len = lstrlenW(lpszPath);
int len = strlenW(lpszPath);
RtlMoveMemory(lpszPath+1, lpszPath, len*sizeof(WCHAR));
*(lpszPath++) = '"';
lpszPath += len;
@ -717,7 +717,7 @@ LPWSTR WINAPI PathQuoteSpacesW(LPWSTR lpszPath)
*/
VOID WINAPI PathUnquoteSpacesA(LPSTR str)
{
DWORD len = lstrlenA(str);
DWORD len = strlen(str);
TRACE("%s\n",str);
@ -1471,7 +1471,7 @@ BOOL WINAPI PathCanonicalizeA(LPSTR pszBuf, LPCSTR pszPath)
*/
BOOL WINAPI PathCanonicalizeW(LPWSTR pszBuf, LPCWSTR pszPath)
{
int OffsetMin = 0, OffsetSrc = 0, OffsetDst = 0, LenSrc = lstrlenW(pszPath);
int OffsetMin = 0, OffsetSrc = 0, OffsetDst = 0, LenSrc = strlenW(pszPath);
BOOL bModifyed = FALSE;
TRACE("%p %s\n", pszBuf, debugstr_w(pszPath));
@ -1574,7 +1574,7 @@ LPWSTR WINAPI PathFindNextComponentW(LPCWSTR pszPath)
if(!pszPath || !*pszPath) return NULL;
if (!(pos = StrChrW(pszPath, '\\')))
return (LPWSTR) pszPath + lstrlenW(pszPath);
return (LPWSTR) pszPath + strlenW(pszPath);
pos++;
if(pos[0] == '\\') pos++;
return pos;

View File

@ -382,9 +382,9 @@ static BOOL TEXT_GrayString(HDC hdc, HBRUSH hb, GRAYSTRINGPROC fn, LPARAM lp, IN
if(unicode)
slen = lstrlenW((LPCWSTR)lp);
else if(_32bit)
slen = lstrlenA((LPCSTR)lp);
slen = strlen((LPCSTR)lp);
else
slen = lstrlenA((LPCSTR)PTR_SEG_TO_LIN(lp));
slen = strlen((LPCSTR)PTR_SEG_TO_LIN(lp));
}
if((cx == 0 || cy == 0) && slen != -1)

View File

@ -968,7 +968,7 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath,
/* Check if the file exists and use the existing file name */
if ( DOSFS_GetFullName ( tmpshortpath, TRUE, &full_name ) ) {
lstrcpyA ( tmpshortpath+sp, strrchr ( full_name.short_name, '\\' ) + 1 );
sp += lstrlenA ( tmpshortpath+sp );
sp += strlen ( tmpshortpath+sp );
lp += tmplen;
continue;
}
@ -981,7 +981,7 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath,
lstrcpynA ( shortpath, tmpshortpath, shortlen );
TRACE("returning %s\n", debugstr_a(shortpath) );
tmplen = lstrlenA ( tmpshortpath );
tmplen = strlen ( tmpshortpath );
HeapFree ( GetProcessHeap(), 0, tmpshortpath );
return tmplen;

View File

@ -1244,9 +1244,9 @@ UINT WINAPI GetCurrentDirectoryA( UINT buflen, LPSTR buf )
return ret;
}
GetLongPathNameA(shortname, longname, MAX_PATHNAME_LEN);
ret = lstrlenA( longname ) + 1;
ret = strlen( longname ) + 1;
if (ret > buflen) return ret;
lstrcpyA(buf, longname);
strcpy(buf, longname);
return ret - 1;
}

View File

@ -463,8 +463,8 @@ HANDLE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing,
return HFILE_ERROR;
/* Open a console for CONIN$ or CONOUT$ */
if (!lstrcmpiA(filename, "CONIN$")) return CONSOLE_OpenHandle( FALSE, access, sa );
if (!lstrcmpiA(filename, "CONOUT$")) return CONSOLE_OpenHandle( TRUE, access, sa );
if (!strcasecmp(filename, "CONIN$")) return CONSOLE_OpenHandle( FALSE, access, sa );
if (!strcasecmp(filename, "CONOUT$")) return CONSOLE_OpenHandle( TRUE, access, sa );
if (DOSFS_GetDevice( filename ))
{

View File

@ -206,7 +206,7 @@ BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
char printerEnabled[20];
PROFILE_GetWineIniString( "wine", "printer", "off",
printerEnabled, sizeof(printerEnabled) );
if (lstrcmpiA(printerEnabled,"on"))
if (strcasecmp(printerEnabled,"on"))
{
MESSAGE("Printing disabled in wine.conf or .winerc file\n");
MESSAGE("Use \"printer=on\" in the \"[wine]\" section to enable it.\n");

View File

@ -429,7 +429,7 @@ static void LFD_UnParse(LPSTR dp, UINT buf_size, LFD* lfd)
static void LFD_GetWeight( fontInfo* fi, LPCSTR lpStr)
{
int j = lstrlenA(lpStr);
int j = strlen(lpStr);
if( j == 1 && *lpStr == '0')
fi->fi_flags |= FI_POLYWEIGHT;
else if( j == 4 )
@ -465,7 +465,7 @@ static void LFD_GetWeight( fontInfo* fi, LPCSTR lpStr)
static BOOL LFD_GetSlant( fontInfo* fi, LPCSTR lpStr)
{
int l = lstrlenA(lpStr);
int l = strlen(lpStr);
if( l == 1 )
{
switch( tolower( *lpStr ) )
@ -486,7 +486,7 @@ static BOOL LFD_GetSlant( fontInfo* fi, LPCSTR lpStr)
static void LFD_GetStyle( fontInfo* fi, LPCSTR lpstr, int dec_style_check)
{
int j = lstrlenA(lpstr);
int j = strlen(lpstr);
if( j > 3 ) /* find out is there "sans" or "script" */
{
j = 0;
@ -1411,9 +1411,9 @@ static fontAlias* XFONT_CreateAlias( LPCSTR lpTypeFace, LPCSTR lpAlias )
prev = pfa;
}
j = lstrlenA(lpTypeFace) + 1;
j = strlen(lpTypeFace) + 1;
pfa = HeapAlloc( GetProcessHeap(), 0, sizeof(fontAlias) +
j + lstrlenA(lpAlias) + 1 );
j + strlen(lpAlias) + 1 );
if (pfa)
{
if (!prev)

View File

@ -514,7 +514,7 @@ module_loadorder_t *MODULE_GetLoadOrder(const char *path)
}
strcpy(fname, name);
if(len >= 4 && (!lstrcmpiA(fname+len-4, ".dll") || !lstrcmpiA(fname+len-4, ".exe")))
if(len >= 4 && (!strcasecmp(fname+len-4, ".dll") || !strcasecmp(fname+len-4, ".exe")))
fname[len-4] = '\0';
lo.modulename = fname;

View File

@ -46,7 +46,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
*((WORD *)dialog16)++ = *((WORD *)p)++; break;
default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p );
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1;
((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
break;
}
@ -58,14 +58,14 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
*((WORD *)dialog16)++ = *((WORD *)p)++; break;
default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p );
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1;
((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
break;
}
/* Transfer window caption */
lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p );
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1;
((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
/* Transfer font info */
@ -78,7 +78,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
*((WORD *)dialog16)++ = *((WORD *)p)++; /* italic */
}
lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p ); /* faceName */
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1;
((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
}
@ -120,7 +120,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
case 0xffff: ((WORD *)p)++;
*((BYTE *)dialog16)++ = (BYTE)*((WORD *)p)++; break;
default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p );
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1;
((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
break;
}
@ -132,7 +132,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
*((WORD *)dialog16)++ = *((WORD *)p)++; break;
default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p );
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1;
((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
break;
}
@ -295,7 +295,7 @@ VOID WINAPI ConvertMenu32To16( LPVOID menu32, DWORD size, LPVOID menu16 )
level++;
lstrcpyWtoA( (LPSTR)menu16, (LPWSTR)p );
((LPSTR)menu16) += lstrlenA( (LPSTR)menu16 ) + 1;
((LPSTR)menu16) += strlen( (LPSTR)menu16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
if ( flags & MF_END )
@ -309,7 +309,7 @@ VOID WINAPI ConvertMenu32To16( LPVOID menu32, DWORD size, LPVOID menu16 )
flags = *((BYTE *)menu16)++ = (BYTE)*((WORD *)p)++;
lstrcpyWtoA( (LPSTR)menu16, (LPWSTR)p );
((LPSTR)menu16) += lstrlenA( (LPSTR)menu16 ) + 1;
((LPSTR)menu16) += strlen( (LPSTR)menu16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
/* align on DWORD boundary (32-bit only) */

View File

@ -1504,7 +1504,7 @@ HMODULE16 WINAPI GetModuleHandle16( LPCSTR name )
loadedfn--;
}
/* case insensitive compare ... */
if (!lstrcmpiA(loadedfn, s))
if (!strcasecmp(loadedfn, s))
return hModule;
}
@ -1579,7 +1579,7 @@ static HMODULE16 NE_GetModuleByFilename( LPCSTR name )
loadedfn--;
}
/* case insensitive compare ... */
if (!lstrcmpiA(loadedfn, s))
if (!strcasecmp(loadedfn, s))
return hModule;
}

View File

@ -66,8 +66,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
if (p[1] & 0x8000)
{
if (!HIWORD(typeId)) continue;
if (lstrcmpiA( typeId,
(char *)(p + 3) )) continue;
if (strcasecmp( typeId, (char *)(p + 3) )) continue;
}
else if (HIWORD(typeId) || (((DWORD)typeId & ~0x8000)!= p[1]))
continue;
@ -77,8 +76,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
if (p[2] & 0x8000)
{
if (!HIWORD(resId)) continue;
if (lstrcmpiA( resId,
(char*)(p+3)+strlen((char*)(p+3))+1 )) continue;
if (strcasecmp( resId, (char*)(p+3)+strlen((char*)(p+3))+1 )) continue;
}
else if (HIWORD(resId) || (((DWORD)resId & ~0x8000) != p[2]))

View File

@ -1220,7 +1220,7 @@ __w31_dumptree( unsigned short idx,
/* all toplevel entries AND the entries in the
* toplevel subdirectory belong to \SOFTWARE\Classes
*/
if (!level && !lstrcmpA(tail,".classes")) {
if (!level && !strcmp(tail,".classes")) {
__w31_dumptree(dir->child_idx,txt,tab,head,hkey,lastmodified,level+1);
idx=dir->sibling_idx;
continue;

View File

@ -209,11 +209,11 @@ UINT WINAPI GetEnhMetaFileDescriptionA(
first = lstrlenW( (WCHAR *) ((char *) emh + emh->offDescription));
lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription), size);
first_A = lstrlenA( buf );
first_A = strlen( buf );
buf += first_A + 1;
lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription+2*(first+1)),
size - first_A - 1); /* i18n ready */
first_A += lstrlenA(buf) + 1;
first_A += strlen(buf) + 1;
EMF_ReleaseEnhMetaHeader(hmf);
return min(size, first_A);

View File

@ -1182,7 +1182,7 @@ BOOL WINAPI GetStringTypeExA(LCID locale,DWORD dwInfoType,LPCSTR src,
}
if (cchSrc==-1)
cchSrc=lstrlenA(src)+1;
cchSrc=strlen(src)+1;
switch (dwInfoType) {
case CT_CTYPE1:
@ -1778,7 +1778,7 @@ INT WINAPI LCMapStringA(
return 0;
}
if (srclen == -1)
srclen = lstrlenA(srcstr) + 1 ; /* (include final '\0') */
srclen = strlen(srcstr) + 1 ; /* (include final '\0') */
#define LCMAPSTRINGA_SUPPORTED_FLAGS (LCMAP_UPPERCASE | \
LCMAP_LOWERCASE | \
@ -2359,8 +2359,8 @@ UINT WINAPI CompareStringA(
if(fdwStyle & NORM_IGNORESYMBOLS)
FIXME("IGNORESYMBOLS not supported\n");
if (l1 == -1) l1 = lstrlenA(s1);
if (l2 == -1) l2 = lstrlenA(s2);
if (l1 == -1) l1 = strlen(s1);
if (l2 == -1) l2 = strlen(s2);
mapstring_flags = LCMAP_SORTKEY | fdwStyle ;
len1 = OLE2NLS_EstimateMappingLength(lcid, mapstring_flags, s1, l1);

View File

@ -52,7 +52,7 @@ int RELAY_ShowDebugmsgRelay(const char *func) {
itemlen = strlen(*listitem);
if((itemlen == len && !lstrncmpiA(*listitem, func, len)) ||
(itemlen == len2 && !lstrncmpiA(*listitem, func, len2)) ||
!lstrcmpiA(*listitem, term)) {
!strcasecmp(*listitem, term)) {
show = !show;
break;
}
@ -115,7 +115,6 @@ static void get_entry_point( char *buffer, DEBUG_ENTRY_POINT *relay )
for (wm = PROCESS_Current()->modref_list; wm; wm = wm->next)
{
if (wm->type != MODULE32_PE) continue;
if (!(wm->flags & WINE_MODREF_INTERNAL)) continue;
base = (char *)wm->module;
dir = &PE_HEADER(base)->OptionalHeader.DataDirectory[IMAGE_FILE_EXPORT_DIRECTORY];

View File

@ -321,7 +321,7 @@ HANDLE DEVICE_Open( LPCSTR filename, DWORD access,
const struct VxDInfo *info;
for (info = VxDList; info->name; info++)
if (!lstrcmpiA( info->name, filename ))
if (!strncasecmp( info->name, filename, strlen(info->name) ))
return FILE_CreateDevice( info->id | 0x10000, access, sa );
FIXME( "Unknown VxD %s\n", filename);

View File

@ -91,7 +91,7 @@ BOOL WINAPI GetComputerNameA(LPSTR name,LPDWORD size)
{
ret = (-1!=gethostname(name,*size));
if (ret)
*size = lstrlenA(name);
*size = strlen(name);
}
__EXCEPT(page_fault)
{

View File

@ -82,7 +82,7 @@ static void WINE_UNUSED DRIVER_LoadStartupDrivers(void)
HDRVR16 hDrv;
LPSTR ptr;
for (ptr = str; lstrlenA(ptr) != 0; ptr += lstrlenA(ptr) + 1) {
for (ptr = str; *ptr; ptr += strlen(ptr) + 1) {
TRACE("str='%s'\n", ptr);
hDrv = OpenDriver16(ptr, "drivers", 0L);
TRACE("hDrv=%04x\n", hDrv);
@ -732,7 +732,7 @@ static HDRVR16 DRIVER_TryOpenDriver16(LPCSTR lpFileName, LPARAM lParam, BOOL bCa
TRACE("('%s', %08lX, %d);\n", lpFileName, lParam, bCallFrom32);
if (lstrlenA(lpFileName) < 1)
if (strlen(lpFileName) < 1)
return 0;
lpSFN = strrchr(lpFileName, '\\');
@ -766,7 +766,7 @@ static HDRVR DRIVER_TryOpenDriver32(LPCSTR lpFileName, LPARAM lParam, BOOL bCall
TRACE("('%s', %08lX, %d);\n", lpFileName, lParam, bCallFrom32);
if (lstrlenA(lpFileName) < 1)
if (strlen(lpFileName) < 1)
return 0;
lpSFN = strrchr(lpFileName, '\\');

View File

@ -1485,9 +1485,9 @@ static BOOL PAINTING_DrawState(HDC hdc, HBRUSH hbr,
if(unicode)
len = lstrlenW((LPWSTR)lp);
else if(_32bit)
len = lstrlenA((LPSTR)lp);
len = strlen((LPSTR)lp);
else
len = lstrlenA((LPSTR)PTR_SEG_TO_LIN(lp));
len = strlen((LPSTR)PTR_SEG_TO_LIN(lp));
}
/* Find out what size the image has if not given by caller */

View File

@ -10,6 +10,7 @@
#include "wingdi.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "wine/unicode.h"
#include "options.h"
#include "class.h"
#include "win.h"
@ -1556,7 +1557,7 @@ static HWND WIN_FindWindow( HWND parent, HWND child, ATOM className,
retvalue = pWnd->hwndSelf;
goto end;
}
if (pWnd->text && !lstrcmpW( pWnd->text, title ))
if (pWnd->text && !strcmpW( pWnd->text, title ))
{
retvalue = pWnd->hwndSelf;
goto end;