Commit cb10fdab authored by Alexandre Julliard's avatar Alexandre Julliard

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

to trap exceptions.
parent c1d5dc40
...@@ -261,7 +261,7 @@ static void EDIT_UpdateText(WND *wnd, LPRECT rc, BOOL bErase); ...@@ -261,7 +261,7 @@ static void EDIT_UpdateText(WND *wnd, LPRECT rc, BOOL bErase);
*/ */
static inline BOOL EDIT_EM_CanUndo(WND *wnd, EDITSTATE *es) 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, ...@@ -803,7 +803,7 @@ LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg,
case WM_GETTEXTLENGTH: case WM_GETTEXTLENGTH:
DPRINTF_EDIT_MSG32("WM_GETTEXTLENGTH"); DPRINTF_EDIT_MSG32("WM_GETTEXTLENGTH");
result = lstrlenA(es->text); result = strlen(es->text);
break; break;
case WM_HSCROLL: case WM_HSCROLL:
...@@ -982,7 +982,7 @@ static void EDIT_BuildLineDefs_ML(WND *wnd, EDITSTATE *es) ...@@ -982,7 +982,7 @@ static void EDIT_BuildLineDefs_ML(WND *wnd, EDITSTATE *es)
} }
if (!(*cp)) { if (!(*cp)) {
current_def->ending = END_0; current_def->ending = END_0;
current_def->net_length = lstrlenA(start); current_def->net_length = strlen(start);
} else if ((cp > start) && (*(cp - 1) == '\r')) { } else if ((cp > start) && (*(cp - 1) == '\r')) {
current_def->ending = END_SOFT; current_def->ending = END_SOFT;
current_def->net_length = cp - start - 1; 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_ ...@@ -1162,7 +1162,7 @@ static INT EDIT_CharFromPos(WND *wnd, EDITSTATE *es, INT x, INT y, LPBOOL after_
else else
{ {
INT low = es->x_offset; INT low = es->x_offset;
INT high = lstrlenA(es->text) + 1; INT high = strlen(es->text) + 1;
while (low < high - 1) while (low < high - 1)
{ {
INT mid = (low + high) / 2; INT mid = (low + high) / 2;
...@@ -1230,7 +1230,7 @@ static void EDIT_GetLineRect(WND *wnd, EDITSTATE *es, INT line, INT scol, INT ec ...@@ -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) static LPSTR EDIT_GetPasswordPointer_SL(WND *wnd, EDITSTATE *es)
{ {
if (es->style & ES_PASSWORD) { if (es->style & ES_PASSWORD) {
INT len = lstrlenA(es->text); INT len = strlen(es->text);
LPSTR text = HeapAlloc(es->heap, 0, len + 1); LPSTR text = HeapAlloc(es->heap, 0, len + 1);
RtlFillMemory(text, len, es->password_char); RtlFillMemory(text, len, es->password_char);
text[len] = '\0'; text[len] = '\0';
...@@ -1368,7 +1368,7 @@ static void EDIT_InvalidateText(WND *wnd, EDITSTATE *es, INT start, INT end) ...@@ -1368,7 +1368,7 @@ static void EDIT_InvalidateText(WND *wnd, EDITSTATE *es, INT start, INT end)
return; return;
if (end == -1) if (end == -1)
end = lstrlenA(es->text); end = strlen(es->text);
ORDER_INT(start, end); ORDER_INT(start, end);
...@@ -1526,7 +1526,7 @@ static void EDIT_MoveEnd(WND *wnd, EDITSTATE *es, BOOL extend) ...@@ -1526,7 +1526,7 @@ static void EDIT_MoveEnd(WND *wnd, EDITSTATE *es, BOOL extend)
e = EDIT_CharFromPos(wnd, es, 0x3fffffff, e = EDIT_CharFromPos(wnd, es, 0x3fffffff,
HIWORD(EDIT_EM_PosFromChar(wnd, es, es->selection_end, es->flags & EF_AFTER_WRAP)), &after_wrap); HIWORD(EDIT_EM_PosFromChar(wnd, es, es->selection_end, es->flags & EF_AFTER_WRAP)), &after_wrap);
else else
e = lstrlenA(es->text); e = strlen(es->text);
EDIT_EM_SetSel(wnd, es, extend ? es->selection_start : e, e, after_wrap); EDIT_EM_SetSel(wnd, es, extend ? es->selection_start : e, e, after_wrap);
EDIT_EM_ScrollCaret(wnd, es); EDIT_EM_ScrollCaret(wnd, es);
} }
...@@ -2039,7 +2039,7 @@ static HLOCAL EDIT_EM_GetHandle(WND *wnd, EDITSTATE *es) ...@@ -2039,7 +2039,7 @@ static HLOCAL EDIT_EM_GetHandle(WND *wnd, EDITSTATE *es)
else if (es->hloc16) else if (es->hloc16)
return (HLOCAL)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"); ERR("could not allocate new 32 bit buffer\n");
return 0; return 0;
} }
...@@ -2099,7 +2099,7 @@ static HLOCAL16 EDIT_EM_GetHandle16(WND *wnd, EDITSTATE *es) ...@@ -2099,7 +2099,7 @@ static HLOCAL16 EDIT_EM_GetHandle16(WND *wnd, EDITSTATE *es)
} }
TRACE("local heap initialized\n"); 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"); ERR("could not allocate new 16 bit buffer\n");
return 0; return 0;
} }
...@@ -2207,7 +2207,7 @@ static INT EDIT_EM_LineFromChar(WND *wnd, EDITSTATE *es, INT index) ...@@ -2207,7 +2207,7 @@ static INT EDIT_EM_LineFromChar(WND *wnd, EDITSTATE *es, INT index)
if (!(es->style & ES_MULTILINE)) if (!(es->style & ES_MULTILINE))
return 0; return 0;
if (index > lstrlenA(es->text)) if (index > strlen(es->text))
return es->line_count - 1; return es->line_count - 1;
if (index == -1) if (index == -1)
index = min(es->selection_start, es->selection_end); index = min(es->selection_start, es->selection_end);
...@@ -2269,7 +2269,7 @@ static INT EDIT_EM_LineLength(WND *wnd, EDITSTATE *es, INT index) ...@@ -2269,7 +2269,7 @@ static INT EDIT_EM_LineLength(WND *wnd, EDITSTATE *es, INT index)
LINEDEF *line_def; LINEDEF *line_def;
if (!(es->style & ES_MULTILINE)) if (!(es->style & ES_MULTILINE))
return lstrlenA(es->text); return strlen(es->text);
if (index == -1) { if (index == -1) {
/* get the number of remaining non-selected chars of selected lines */ /* 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) ...@@ -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) 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 l;
INT li; INT li;
INT x; INT x;
...@@ -2408,8 +2408,8 @@ static LRESULT EDIT_EM_PosFromChar(WND *wnd, EDITSTATE *es, INT index, BOOL afte ...@@ -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) static void EDIT_EM_ReplaceSel(WND *wnd, EDITSTATE *es, BOOL can_undo, LPCSTR lpsz_replace)
{ {
INT strl = lstrlenA(lpsz_replace); INT strl = strlen(lpsz_replace);
INT tl = lstrlenA(es->text); INT tl = strlen(es->text);
INT utl; INT utl;
UINT s; UINT s;
UINT e; UINT e;
...@@ -2430,7 +2430,7 @@ static void EDIT_EM_ReplaceSel(WND *wnd, EDITSTATE *es, BOOL can_undo, LPCSTR lp ...@@ -2430,7 +2430,7 @@ static void EDIT_EM_ReplaceSel(WND *wnd, EDITSTATE *es, BOOL can_undo, LPCSTR lp
if (e != s) { if (e != s) {
/* there is something to be deleted */ /* there is something to be deleted */
if (can_undo) { 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))) { if (!es->undo_insert_count && (*es->undo_text && (s == es->undo_position))) {
/* undo-buffer is extended to the right */ /* undo-buffer is extended to the right */
EDIT_MakeUndoFit(wnd, es, utl + e - s); 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 ...@@ -2479,7 +2479,7 @@ static void EDIT_EM_ReplaceSel(WND *wnd, EDITSTATE *es, BOOL can_undo, LPCSTR lp
EDIT_EM_EmptyUndoBuffer(wnd, es); EDIT_EM_EmptyUndoBuffer(wnd, es);
/* now insert */ /* now insert */
tl = lstrlenA(es->text); tl = strlen(es->text);
for (p = es->text + tl ; p >= es->text + s ; p--) for (p = es->text + tl ; p >= es->text + s ; p--)
p[strl] = p[0]; p[strl] = p[0];
for (i = 0 , p = es->text + s ; i < strl ; i++) for (i = 0 , p = es->text + s ; i < strl ; i++)
...@@ -2598,7 +2598,7 @@ static void EDIT_EM_ScrollCaret(WND *wnd, EDITSTATE *es) ...@@ -2598,7 +2598,7 @@ static void EDIT_EM_ScrollCaret(WND *wnd, EDITSTATE *es)
EDIT_UpdateText(wnd, NULL, TRUE); EDIT_UpdateText(wnd, NULL, TRUE);
} else if (x > es->format_rect.right) { } else if (x > es->format_rect.right) {
INT x_last; INT x_last;
INT len = lstrlenA(es->text); INT len = strlen(es->text);
goal = es->format_rect.right - format_width / HSCROLL_FRACTION; goal = es->format_rect.right - format_width / HSCROLL_FRACTION;
do { do {
es->x_offset++; es->x_offset++;
...@@ -2789,7 +2789,7 @@ static void EDIT_EM_SetSel(WND *wnd, EDITSTATE *es, UINT start, UINT end, BOOL a ...@@ -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_start = es->selection_start;
UINT old_end = es->selection_end; UINT old_end = es->selection_end;
UINT len = lstrlenA(es->text); UINT len = strlen(es->text);
if (start == -1) { if (start == -1) {
start = es->selection_end; start = es->selection_end;
...@@ -2926,7 +2926,7 @@ static void EDIT_EM_SetWordBreakProc16(WND *wnd, EDITSTATE *es, EDITWORDBREAKPRO ...@@ -2926,7 +2926,7 @@ static void EDIT_EM_SetWordBreakProc16(WND *wnd, EDITSTATE *es, EDITWORDBREAKPRO
*/ */
static BOOL EDIT_EM_Undo(WND *wnd, EDITSTATE *es) 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); LPSTR utext = HeapAlloc(es->heap, 0, ulength + 1);
lstrcpyA(utext, es->undo_text); lstrcpyA(utext, es->undo_text);
...@@ -3100,7 +3100,7 @@ static void EDIT_WM_ContextMenu(WND *wnd, EDITSTATE *es, HWND hwnd, INT x, INT y ...@@ -3100,7 +3100,7 @@ static void EDIT_WM_ContextMenu(WND *wnd, EDITSTATE *es, HWND hwnd, INT x, INT y
/* delete */ /* delete */
EnableMenuItem(popup, 5, MF_BYPOSITION | ((end - start) ? MF_ENABLED : MF_GRAYED)); EnableMenuItem(popup, 5, MF_BYPOSITION | ((end - start) ? MF_ENABLED : MF_GRAYED));
/* select all */ /* 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); TrackPopupMenu(popup, TPM_LEFTALIGN | TPM_RIGHTBUTTON, x, y, 0, wnd->hwndSelf, NULL);
DestroyMenu(menu); DestroyMenu(menu);
......
...@@ -4370,7 +4370,7 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT item, BOOL bypos, ...@@ -4370,7 +4370,7 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT item, BOOL bypos,
switch (MENU_ITEM_TYPE(menu->fType)) { switch (MENU_ITEM_TYPE(menu->fType)) {
case MF_STRING: case MF_STRING:
if (menu->text) { if (menu->text) {
int len = lstrlenA(menu->text); int len = strlen(menu->text);
if(lpmii->dwTypeData && lpmii->cch) { if(lpmii->dwTypeData && lpmii->cch) {
if (unicode) if (unicode)
lstrcpynAtoW((LPWSTR) lpmii->dwTypeData, menu->text, lstrcpynAtoW((LPWSTR) lpmii->dwTypeData, menu->text,
...@@ -4401,7 +4401,7 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT item, BOOL bypos, ...@@ -4401,7 +4401,7 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT item, BOOL bypos,
else else
lstrcpynA(lpmii->dwTypeData, menu->text, lpmii->cch); lstrcpynA(lpmii->dwTypeData, menu->text, lpmii->cch);
} }
lpmii->cch = lstrlenA(menu->text); lpmii->cch = strlen(menu->text);
} }
if (lpmii->fMask & MIIM_FTYPE) if (lpmii->fMask & MIIM_FTYPE)
......
...@@ -484,7 +484,7 @@ void WINAPI PathStripPathW(LPWSTR lpszPath) ...@@ -484,7 +484,7 @@ void WINAPI PathStripPathW(LPWSTR lpszPath)
TRACE("%s\n", debugstr_w(lpszPath)); TRACE("%s\n", debugstr_w(lpszPath));
if(lpszFileName) 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 ) ...@@ -612,7 +612,7 @@ LPWSTR WINAPI PathRemoveBackslashW( LPWSTR lpszPath )
if(lpszPath) if(lpszPath)
{ {
len = lstrlenW(lpszPath); len = strlenW(lpszPath);
szTemp = CharPrevW(lpszPath, lpszPath+len); szTemp = CharPrevW(lpszPath, lpszPath+len);
if (! PathIsRootW(lpszPath)) if (! PathIsRootW(lpszPath))
{ {
...@@ -662,7 +662,7 @@ void WINAPI PathRemoveBlanksW(LPWSTR str) ...@@ -662,7 +662,7 @@ void WINAPI PathRemoveBlanksW(LPWSTR str)
{ {
while (*x==' ') x = CharNextW(x); while (*x==' ') x = CharNextW(x);
if (x!=str) lstrcpyW(str,x); if (x!=str) lstrcpyW(str,x);
x=str+lstrlenW(str)-1; x=str+strlenW(str)-1;
while (*x==' ') x = CharPrevW(str, x); while (*x==' ') x = CharPrevW(str, x);
if (*x==' ') *x='\0'; if (*x==' ') *x='\0';
} }
...@@ -698,7 +698,7 @@ LPWSTR WINAPI PathQuoteSpacesW(LPWSTR lpszPath) ...@@ -698,7 +698,7 @@ LPWSTR WINAPI PathQuoteSpacesW(LPWSTR lpszPath)
if(StrChrW(lpszPath,' ')) if(StrChrW(lpszPath,' '))
{ {
int len = lstrlenW(lpszPath); int len = strlenW(lpszPath);
RtlMoveMemory(lpszPath+1, lpszPath, len*sizeof(WCHAR)); RtlMoveMemory(lpszPath+1, lpszPath, len*sizeof(WCHAR));
*(lpszPath++) = '"'; *(lpszPath++) = '"';
lpszPath += len; lpszPath += len;
...@@ -717,7 +717,7 @@ LPWSTR WINAPI PathQuoteSpacesW(LPWSTR lpszPath) ...@@ -717,7 +717,7 @@ LPWSTR WINAPI PathQuoteSpacesW(LPWSTR lpszPath)
*/ */
VOID WINAPI PathUnquoteSpacesA(LPSTR str) VOID WINAPI PathUnquoteSpacesA(LPSTR str)
{ {
DWORD len = lstrlenA(str); DWORD len = strlen(str);
TRACE("%s\n",str); TRACE("%s\n",str);
...@@ -1471,7 +1471,7 @@ BOOL WINAPI PathCanonicalizeA(LPSTR pszBuf, LPCSTR pszPath) ...@@ -1471,7 +1471,7 @@ BOOL WINAPI PathCanonicalizeA(LPSTR pszBuf, LPCSTR pszPath)
*/ */
BOOL WINAPI PathCanonicalizeW(LPWSTR pszBuf, LPCWSTR 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; BOOL bModifyed = FALSE;
TRACE("%p %s\n", pszBuf, debugstr_w(pszPath)); TRACE("%p %s\n", pszBuf, debugstr_w(pszPath));
...@@ -1574,7 +1574,7 @@ LPWSTR WINAPI PathFindNextComponentW(LPCWSTR pszPath) ...@@ -1574,7 +1574,7 @@ LPWSTR WINAPI PathFindNextComponentW(LPCWSTR pszPath)
if(!pszPath || !*pszPath) return NULL; if(!pszPath || !*pszPath) return NULL;
if (!(pos = StrChrW(pszPath, '\\'))) if (!(pos = StrChrW(pszPath, '\\')))
return (LPWSTR) pszPath + lstrlenW(pszPath); return (LPWSTR) pszPath + strlenW(pszPath);
pos++; pos++;
if(pos[0] == '\\') pos++; if(pos[0] == '\\') pos++;
return pos; return pos;
......
...@@ -382,9 +382,9 @@ static BOOL TEXT_GrayString(HDC hdc, HBRUSH hb, GRAYSTRINGPROC fn, LPARAM lp, IN ...@@ -382,9 +382,9 @@ static BOOL TEXT_GrayString(HDC hdc, HBRUSH hb, GRAYSTRINGPROC fn, LPARAM lp, IN
if(unicode) if(unicode)
slen = lstrlenW((LPCWSTR)lp); slen = lstrlenW((LPCWSTR)lp);
else if(_32bit) else if(_32bit)
slen = lstrlenA((LPCSTR)lp); slen = strlen((LPCSTR)lp);
else else
slen = lstrlenA((LPCSTR)PTR_SEG_TO_LIN(lp)); slen = strlen((LPCSTR)PTR_SEG_TO_LIN(lp));
} }
if((cx == 0 || cy == 0) && slen != -1) if((cx == 0 || cy == 0) && slen != -1)
......
...@@ -968,7 +968,7 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath, ...@@ -968,7 +968,7 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath,
/* Check if the file exists and use the existing file name */ /* Check if the file exists and use the existing file name */
if ( DOSFS_GetFullName ( tmpshortpath, TRUE, &full_name ) ) { if ( DOSFS_GetFullName ( tmpshortpath, TRUE, &full_name ) ) {
lstrcpyA ( tmpshortpath+sp, strrchr ( full_name.short_name, '\\' ) + 1 ); lstrcpyA ( tmpshortpath+sp, strrchr ( full_name.short_name, '\\' ) + 1 );
sp += lstrlenA ( tmpshortpath+sp ); sp += strlen ( tmpshortpath+sp );
lp += tmplen; lp += tmplen;
continue; continue;
} }
...@@ -981,7 +981,7 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath, ...@@ -981,7 +981,7 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath,
lstrcpynA ( shortpath, tmpshortpath, shortlen ); lstrcpynA ( shortpath, tmpshortpath, shortlen );
TRACE("returning %s\n", debugstr_a(shortpath) ); TRACE("returning %s\n", debugstr_a(shortpath) );
tmplen = lstrlenA ( tmpshortpath ); tmplen = strlen ( tmpshortpath );
HeapFree ( GetProcessHeap(), 0, tmpshortpath ); HeapFree ( GetProcessHeap(), 0, tmpshortpath );
return tmplen; return tmplen;
......
...@@ -1244,9 +1244,9 @@ UINT WINAPI GetCurrentDirectoryA( UINT buflen, LPSTR buf ) ...@@ -1244,9 +1244,9 @@ UINT WINAPI GetCurrentDirectoryA( UINT buflen, LPSTR buf )
return ret; return ret;
} }
GetLongPathNameA(shortname, longname, MAX_PATHNAME_LEN); GetLongPathNameA(shortname, longname, MAX_PATHNAME_LEN);
ret = lstrlenA( longname ) + 1; ret = strlen( longname ) + 1;
if (ret > buflen) return ret; if (ret > buflen) return ret;
lstrcpyA(buf, longname); strcpy(buf, longname);
return ret - 1; return ret - 1;
} }
......
...@@ -463,8 +463,8 @@ HANDLE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing, ...@@ -463,8 +463,8 @@ HANDLE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing,
return HFILE_ERROR; return HFILE_ERROR;
/* Open a console for CONIN$ or CONOUT$ */ /* Open a console for CONIN$ or CONOUT$ */
if (!lstrcmpiA(filename, "CONIN$")) return CONSOLE_OpenHandle( FALSE, access, sa ); if (!strcasecmp(filename, "CONIN$")) return CONSOLE_OpenHandle( FALSE, access, sa );
if (!lstrcmpiA(filename, "CONOUT$")) return CONSOLE_OpenHandle( TRUE, access, sa ); if (!strcasecmp(filename, "CONOUT$")) return CONSOLE_OpenHandle( TRUE, access, sa );
if (DOSFS_GetDevice( filename )) if (DOSFS_GetDevice( filename ))
{ {
......
...@@ -206,7 +206,7 @@ BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, ...@@ -206,7 +206,7 @@ BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
char printerEnabled[20]; char printerEnabled[20];
PROFILE_GetWineIniString( "wine", "printer", "off", PROFILE_GetWineIniString( "wine", "printer", "off",
printerEnabled, sizeof(printerEnabled) ); printerEnabled, sizeof(printerEnabled) );
if (lstrcmpiA(printerEnabled,"on")) if (strcasecmp(printerEnabled,"on"))
{ {
MESSAGE("Printing disabled in wine.conf or .winerc file\n"); MESSAGE("Printing disabled in wine.conf or .winerc file\n");
MESSAGE("Use \"printer=on\" in the \"[wine]\" section to enable it.\n"); MESSAGE("Use \"printer=on\" in the \"[wine]\" section to enable it.\n");
......
...@@ -429,7 +429,7 @@ static void LFD_UnParse(LPSTR dp, UINT buf_size, LFD* lfd) ...@@ -429,7 +429,7 @@ static void LFD_UnParse(LPSTR dp, UINT buf_size, LFD* lfd)
static void LFD_GetWeight( fontInfo* fi, LPCSTR lpStr) static void LFD_GetWeight( fontInfo* fi, LPCSTR lpStr)
{ {
int j = lstrlenA(lpStr); int j = strlen(lpStr);
if( j == 1 && *lpStr == '0') if( j == 1 && *lpStr == '0')
fi->fi_flags |= FI_POLYWEIGHT; fi->fi_flags |= FI_POLYWEIGHT;
else if( j == 4 ) else if( j == 4 )
...@@ -465,7 +465,7 @@ static void LFD_GetWeight( fontInfo* fi, LPCSTR lpStr) ...@@ -465,7 +465,7 @@ static void LFD_GetWeight( fontInfo* fi, LPCSTR lpStr)
static BOOL LFD_GetSlant( fontInfo* fi, LPCSTR lpStr) static BOOL LFD_GetSlant( fontInfo* fi, LPCSTR lpStr)
{ {
int l = lstrlenA(lpStr); int l = strlen(lpStr);
if( l == 1 ) if( l == 1 )
{ {
switch( tolower( *lpStr ) ) switch( tolower( *lpStr ) )
...@@ -486,7 +486,7 @@ static BOOL LFD_GetSlant( fontInfo* fi, LPCSTR 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) 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" */ if( j > 3 ) /* find out is there "sans" or "script" */
{ {
j = 0; j = 0;
...@@ -1411,9 +1411,9 @@ static fontAlias* XFONT_CreateAlias( LPCSTR lpTypeFace, LPCSTR lpAlias ) ...@@ -1411,9 +1411,9 @@ static fontAlias* XFONT_CreateAlias( LPCSTR lpTypeFace, LPCSTR lpAlias )
prev = pfa; prev = pfa;
} }
j = lstrlenA(lpTypeFace) + 1; j = strlen(lpTypeFace) + 1;
pfa = HeapAlloc( GetProcessHeap(), 0, sizeof(fontAlias) + pfa = HeapAlloc( GetProcessHeap(), 0, sizeof(fontAlias) +
j + lstrlenA(lpAlias) + 1 ); j + strlen(lpAlias) + 1 );
if (pfa) if (pfa)
{ {
if (!prev) if (!prev)
......
...@@ -514,7 +514,7 @@ module_loadorder_t *MODULE_GetLoadOrder(const char *path) ...@@ -514,7 +514,7 @@ module_loadorder_t *MODULE_GetLoadOrder(const char *path)
} }
strcpy(fname, name); 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'; fname[len-4] = '\0';
lo.modulename = fname; lo.modulename = fname;
......
...@@ -46,7 +46,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 ) ...@@ -46,7 +46,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff; case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
*((WORD *)dialog16)++ = *((WORD *)p)++; break; *((WORD *)dialog16)++ = *((WORD *)p)++; break;
default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p ); default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p );
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1; ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1; ((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
break; break;
} }
...@@ -58,14 +58,14 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 ) ...@@ -58,14 +58,14 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff; case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
*((WORD *)dialog16)++ = *((WORD *)p)++; break; *((WORD *)dialog16)++ = *((WORD *)p)++; break;
default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p ); default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p );
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1; ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1; ((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
break; break;
} }
/* Transfer window caption */ /* Transfer window caption */
lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p ); lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p );
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1; ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1; ((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
/* Transfer font info */ /* Transfer font info */
...@@ -78,7 +78,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 ) ...@@ -78,7 +78,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
*((WORD *)dialog16)++ = *((WORD *)p)++; /* italic */ *((WORD *)dialog16)++ = *((WORD *)p)++; /* italic */
} }
lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p ); /* faceName */ lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p ); /* faceName */
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1; ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1; ((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
} }
...@@ -120,7 +120,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 ) ...@@ -120,7 +120,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
case 0xffff: ((WORD *)p)++; case 0xffff: ((WORD *)p)++;
*((BYTE *)dialog16)++ = (BYTE)*((WORD *)p)++; break; *((BYTE *)dialog16)++ = (BYTE)*((WORD *)p)++; break;
default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p ); default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p );
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1; ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1; ((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
break; break;
} }
...@@ -132,7 +132,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 ) ...@@ -132,7 +132,7 @@ VOID WINAPI ConvertDialog32To16( LPVOID dialog32, DWORD size, LPVOID dialog16 )
case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff; case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
*((WORD *)dialog16)++ = *((WORD *)p)++; break; *((WORD *)dialog16)++ = *((WORD *)p)++; break;
default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p ); default: lstrcpyWtoA( (LPSTR)dialog16, (LPWSTR)p );
((LPSTR)dialog16) += lstrlenA( (LPSTR)dialog16 ) + 1; ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1; ((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
break; break;
} }
...@@ -295,7 +295,7 @@ VOID WINAPI ConvertMenu32To16( LPVOID menu32, DWORD size, LPVOID menu16 ) ...@@ -295,7 +295,7 @@ VOID WINAPI ConvertMenu32To16( LPVOID menu32, DWORD size, LPVOID menu16 )
level++; level++;
lstrcpyWtoA( (LPSTR)menu16, (LPWSTR)p ); lstrcpyWtoA( (LPSTR)menu16, (LPWSTR)p );
((LPSTR)menu16) += lstrlenA( (LPSTR)menu16 ) + 1; ((LPSTR)menu16) += strlen( (LPSTR)menu16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1; ((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
if ( flags & MF_END ) if ( flags & MF_END )
...@@ -309,7 +309,7 @@ VOID WINAPI ConvertMenu32To16( LPVOID menu32, DWORD size, LPVOID menu16 ) ...@@ -309,7 +309,7 @@ VOID WINAPI ConvertMenu32To16( LPVOID menu32, DWORD size, LPVOID menu16 )
flags = *((BYTE *)menu16)++ = (BYTE)*((WORD *)p)++; flags = *((BYTE *)menu16)++ = (BYTE)*((WORD *)p)++;
lstrcpyWtoA( (LPSTR)menu16, (LPWSTR)p ); lstrcpyWtoA( (LPSTR)menu16, (LPWSTR)p );
((LPSTR)menu16) += lstrlenA( (LPSTR)menu16 ) + 1; ((LPSTR)menu16) += strlen( (LPSTR)menu16 ) + 1;
((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1; ((LPWSTR)p) += lstrlenW( (LPWSTR)p ) + 1;
/* align on DWORD boundary (32-bit only) */ /* align on DWORD boundary (32-bit only) */
......
...@@ -1504,7 +1504,7 @@ HMODULE16 WINAPI GetModuleHandle16( LPCSTR name ) ...@@ -1504,7 +1504,7 @@ HMODULE16 WINAPI GetModuleHandle16( LPCSTR name )
loadedfn--; loadedfn--;
} }
/* case insensitive compare ... */ /* case insensitive compare ... */
if (!lstrcmpiA(loadedfn, s)) if (!strcasecmp(loadedfn, s))
return hModule; return hModule;
} }
...@@ -1579,7 +1579,7 @@ static HMODULE16 NE_GetModuleByFilename( LPCSTR name ) ...@@ -1579,7 +1579,7 @@ static HMODULE16 NE_GetModuleByFilename( LPCSTR name )
loadedfn--; loadedfn--;
} }
/* case insensitive compare ... */ /* case insensitive compare ... */
if (!lstrcmpiA(loadedfn, s)) if (!strcasecmp(loadedfn, s))
return hModule; return hModule;
} }
......
...@@ -66,8 +66,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId ...@@ -66,8 +66,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
if (p[1] & 0x8000) if (p[1] & 0x8000)
{ {
if (!HIWORD(typeId)) continue; if (!HIWORD(typeId)) continue;
if (lstrcmpiA( typeId, if (strcasecmp( typeId, (char *)(p + 3) )) continue;
(char *)(p + 3) )) continue;
} }
else if (HIWORD(typeId) || (((DWORD)typeId & ~0x8000)!= p[1])) else if (HIWORD(typeId) || (((DWORD)typeId & ~0x8000)!= p[1]))
continue; continue;
...@@ -77,8 +76,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId ...@@ -77,8 +76,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
if (p[2] & 0x8000) if (p[2] & 0x8000)
{ {
if (!HIWORD(resId)) continue; if (!HIWORD(resId)) continue;
if (lstrcmpiA( resId, if (strcasecmp( resId, (char*)(p+3)+strlen((char*)(p+3))+1 )) continue;
(char*)(p+3)+strlen((char*)(p+3))+1 )) continue;
} }
else if (HIWORD(resId) || (((DWORD)resId & ~0x8000) != p[2])) else if (HIWORD(resId) || (((DWORD)resId & ~0x8000) != p[2]))
......
...@@ -1220,7 +1220,7 @@ __w31_dumptree( unsigned short idx, ...@@ -1220,7 +1220,7 @@ __w31_dumptree( unsigned short idx,
/* all toplevel entries AND the entries in the /* all toplevel entries AND the entries in the
* toplevel subdirectory belong to \SOFTWARE\Classes * 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); __w31_dumptree(dir->child_idx,txt,tab,head,hkey,lastmodified,level+1);
idx=dir->sibling_idx; idx=dir->sibling_idx;
continue; continue;
......
...@@ -209,11 +209,11 @@ UINT WINAPI GetEnhMetaFileDescriptionA( ...@@ -209,11 +209,11 @@ UINT WINAPI GetEnhMetaFileDescriptionA(
first = lstrlenW( (WCHAR *) ((char *) emh + emh->offDescription)); first = lstrlenW( (WCHAR *) ((char *) emh + emh->offDescription));
lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription), size); lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription), size);
first_A = lstrlenA( buf ); first_A = strlen( buf );
buf += first_A + 1; buf += first_A + 1;
lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription+2*(first+1)), lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription+2*(first+1)),
size - first_A - 1); /* i18n ready */ size - first_A - 1); /* i18n ready */
first_A += lstrlenA(buf) + 1; first_A += strlen(buf) + 1;
EMF_ReleaseEnhMetaHeader(hmf); EMF_ReleaseEnhMetaHeader(hmf);
return min(size, first_A); return min(size, first_A);
......
...@@ -1182,7 +1182,7 @@ BOOL WINAPI GetStringTypeExA(LCID locale,DWORD dwInfoType,LPCSTR src, ...@@ -1182,7 +1182,7 @@ BOOL WINAPI GetStringTypeExA(LCID locale,DWORD dwInfoType,LPCSTR src,
} }
if (cchSrc==-1) if (cchSrc==-1)
cchSrc=lstrlenA(src)+1; cchSrc=strlen(src)+1;
switch (dwInfoType) { switch (dwInfoType) {
case CT_CTYPE1: case CT_CTYPE1:
...@@ -1778,7 +1778,7 @@ INT WINAPI LCMapStringA( ...@@ -1778,7 +1778,7 @@ INT WINAPI LCMapStringA(
return 0; return 0;
} }
if (srclen == -1) if (srclen == -1)
srclen = lstrlenA(srcstr) + 1 ; /* (include final '\0') */ srclen = strlen(srcstr) + 1 ; /* (include final '\0') */
#define LCMAPSTRINGA_SUPPORTED_FLAGS (LCMAP_UPPERCASE | \ #define LCMAPSTRINGA_SUPPORTED_FLAGS (LCMAP_UPPERCASE | \
LCMAP_LOWERCASE | \ LCMAP_LOWERCASE | \
...@@ -2359,8 +2359,8 @@ UINT WINAPI CompareStringA( ...@@ -2359,8 +2359,8 @@ UINT WINAPI CompareStringA(
if(fdwStyle & NORM_IGNORESYMBOLS) if(fdwStyle & NORM_IGNORESYMBOLS)
FIXME("IGNORESYMBOLS not supported\n"); FIXME("IGNORESYMBOLS not supported\n");
if (l1 == -1) l1 = lstrlenA(s1); if (l1 == -1) l1 = strlen(s1);
if (l2 == -1) l2 = lstrlenA(s2); if (l2 == -1) l2 = strlen(s2);
mapstring_flags = LCMAP_SORTKEY | fdwStyle ; mapstring_flags = LCMAP_SORTKEY | fdwStyle ;
len1 = OLE2NLS_EstimateMappingLength(lcid, mapstring_flags, s1, l1); len1 = OLE2NLS_EstimateMappingLength(lcid, mapstring_flags, s1, l1);
......
...@@ -52,7 +52,7 @@ int RELAY_ShowDebugmsgRelay(const char *func) { ...@@ -52,7 +52,7 @@ int RELAY_ShowDebugmsgRelay(const char *func) {
itemlen = strlen(*listitem); itemlen = strlen(*listitem);
if((itemlen == len && !lstrncmpiA(*listitem, func, len)) || if((itemlen == len && !lstrncmpiA(*listitem, func, len)) ||
(itemlen == len2 && !lstrncmpiA(*listitem, func, len2)) || (itemlen == len2 && !lstrncmpiA(*listitem, func, len2)) ||
!lstrcmpiA(*listitem, term)) { !strcasecmp(*listitem, term)) {
show = !show; show = !show;
break; break;
} }
...@@ -115,7 +115,6 @@ static void get_entry_point( char *buffer, DEBUG_ENTRY_POINT *relay ) ...@@ -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) for (wm = PROCESS_Current()->modref_list; wm; wm = wm->next)
{ {
if (wm->type != MODULE32_PE) continue;
if (!(wm->flags & WINE_MODREF_INTERNAL)) continue; if (!(wm->flags & WINE_MODREF_INTERNAL)) continue;
base = (char *)wm->module; base = (char *)wm->module;
dir = &PE_HEADER(base)->OptionalHeader.DataDirectory[IMAGE_FILE_EXPORT_DIRECTORY]; dir = &PE_HEADER(base)->OptionalHeader.DataDirectory[IMAGE_FILE_EXPORT_DIRECTORY];
......
...@@ -321,7 +321,7 @@ HANDLE DEVICE_Open( LPCSTR filename, DWORD access, ...@@ -321,7 +321,7 @@ HANDLE DEVICE_Open( LPCSTR filename, DWORD access,
const struct VxDInfo *info; const struct VxDInfo *info;
for (info = VxDList; info->name; 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 ); return FILE_CreateDevice( info->id | 0x10000, access, sa );
FIXME( "Unknown VxD %s\n", filename); FIXME( "Unknown VxD %s\n", filename);
......
...@@ -91,7 +91,7 @@ BOOL WINAPI GetComputerNameA(LPSTR name,LPDWORD size) ...@@ -91,7 +91,7 @@ BOOL WINAPI GetComputerNameA(LPSTR name,LPDWORD size)
{ {
ret = (-1!=gethostname(name,*size)); ret = (-1!=gethostname(name,*size));
if (ret) if (ret)
*size = lstrlenA(name); *size = strlen(name);
} }
__EXCEPT(page_fault) __EXCEPT(page_fault)
{ {
......
...@@ -82,7 +82,7 @@ static void WINE_UNUSED DRIVER_LoadStartupDrivers(void) ...@@ -82,7 +82,7 @@ static void WINE_UNUSED DRIVER_LoadStartupDrivers(void)
HDRVR16 hDrv; HDRVR16 hDrv;
LPSTR ptr; 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); TRACE("str='%s'\n", ptr);
hDrv = OpenDriver16(ptr, "drivers", 0L); hDrv = OpenDriver16(ptr, "drivers", 0L);
TRACE("hDrv=%04x\n", hDrv); TRACE("hDrv=%04x\n", hDrv);
...@@ -732,7 +732,7 @@ static HDRVR16 DRIVER_TryOpenDriver16(LPCSTR lpFileName, LPARAM lParam, BOOL bCa ...@@ -732,7 +732,7 @@ static HDRVR16 DRIVER_TryOpenDriver16(LPCSTR lpFileName, LPARAM lParam, BOOL bCa
TRACE("('%s', %08lX, %d);\n", lpFileName, lParam, bCallFrom32); TRACE("('%s', %08lX, %d);\n", lpFileName, lParam, bCallFrom32);
if (lstrlenA(lpFileName) < 1) if (strlen(lpFileName) < 1)
return 0; return 0;
lpSFN = strrchr(lpFileName, '\\'); lpSFN = strrchr(lpFileName, '\\');
...@@ -766,7 +766,7 @@ static HDRVR DRIVER_TryOpenDriver32(LPCSTR lpFileName, LPARAM lParam, BOOL bCall ...@@ -766,7 +766,7 @@ static HDRVR DRIVER_TryOpenDriver32(LPCSTR lpFileName, LPARAM lParam, BOOL bCall
TRACE("('%s', %08lX, %d);\n", lpFileName, lParam, bCallFrom32); TRACE("('%s', %08lX, %d);\n", lpFileName, lParam, bCallFrom32);
if (lstrlenA(lpFileName) < 1) if (strlen(lpFileName) < 1)
return 0; return 0;
lpSFN = strrchr(lpFileName, '\\'); lpSFN = strrchr(lpFileName, '\\');
......
...@@ -1485,9 +1485,9 @@ static BOOL PAINTING_DrawState(HDC hdc, HBRUSH hbr, ...@@ -1485,9 +1485,9 @@ static BOOL PAINTING_DrawState(HDC hdc, HBRUSH hbr,
if(unicode) if(unicode)
len = lstrlenW((LPWSTR)lp); len = lstrlenW((LPWSTR)lp);
else if(_32bit) else if(_32bit)
len = lstrlenA((LPSTR)lp); len = strlen((LPSTR)lp);
else 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 */ /* Find out what size the image has if not given by caller */
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "wingdi.h" #include "wingdi.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "wine/unicode.h"
#include "options.h" #include "options.h"
#include "class.h" #include "class.h"
#include "win.h" #include "win.h"
...@@ -1556,7 +1557,7 @@ static HWND WIN_FindWindow( HWND parent, HWND child, ATOM className, ...@@ -1556,7 +1557,7 @@ static HWND WIN_FindWindow( HWND parent, HWND child, ATOM className,
retvalue = pWnd->hwndSelf; retvalue = pWnd->hwndSelf;
goto end; goto end;
} }
if (pWnd->text && !lstrcmpW( pWnd->text, title )) if (pWnd->text && !strcmpW( pWnd->text, title ))
{ {
retvalue = pWnd->hwndSelf; retvalue = pWnd->hwndSelf;
goto end; goto end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment