Commit 3036649a authored by Alexandre Julliard's avatar Alexandre Julliard

taskmgr: Use C runtime wchar functions instead of wine/unicode.h.

parent 0b18409c
......@@ -29,7 +29,6 @@
#include <commctrl.h>
#include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h"
#include "perfdata.h"
......
......@@ -27,7 +27,6 @@
#include <windows.h>
#include <commctrl.h>
#include "wine/unicode.h"
#include "taskmgr.h"
typedef struct
......@@ -147,13 +146,13 @@ static void AddOrUpdateHwnd(HWND hWnd, WCHAR *wszTitle, HICON hIcon, BOOL bHung)
{
/* Check to see if anything needs updating */
if ((pAPLI->hIcon != hIcon) ||
(strcmpW(pAPLI->wszTitle, wszTitle) != 0) ||
(lstrcmpW(pAPLI->wszTitle, wszTitle) != 0) ||
(pAPLI->bHung != bHung))
{
/* Update the structure */
pAPLI->hIcon = hIcon;
pAPLI->bHung = bHung;
strcpyW(pAPLI->wszTitle, wszTitle);
lstrcpyW(pAPLI->wszTitle, wszTitle);
/* Update the image list */
ImageList_ReplaceIcon(hImageListLarge, item.iItem, hIcon);
......@@ -174,7 +173,7 @@ static void AddOrUpdateHwnd(HWND hWnd, WCHAR *wszTitle, HICON hIcon, BOOL bHung)
pAPLI->hWnd = hWnd;
pAPLI->hIcon = hIcon;
pAPLI->bHung = bHung;
strcpyW(pAPLI->wszTitle, wszTitle);
lstrcpyW(pAPLI->wszTitle, wszTitle);
/* Add the item to the list */
memset(&item, 0, sizeof(LV_ITEMW));
......@@ -198,7 +197,7 @@ static void AddOrUpdateHwnd(HWND hWnd, WCHAR *wszTitle, HICON hIcon, BOOL bHung)
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (!IsWindow(pAPLI->hWnd)||
(strlenW(pAPLI->wszTitle) <= 0) ||
(lstrlenW(pAPLI->wszTitle) <= 0) ||
!IsWindowVisible(pAPLI->hWnd) ||
(GetParent(pAPLI->hWnd) != NULL) ||
(GetWindow(pAPLI->hWnd, GW_OWNER) != NULL) ||
......@@ -402,7 +401,7 @@ static int CALLBACK ApplicationPageCompareFunc(LPARAM lParam1, LPARAM lParam2, L
Param1 = (LPAPPLICATION_PAGE_LIST_ITEM)lParam2;
Param2 = (LPAPPLICATION_PAGE_LIST_ITEM)lParam1;
}
return strcmpW(Param1->wszTitle, Param2->wszTitle);
return lstrcmpW(Param1->wszTitle, Param2->wszTitle);
}
static void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam)
......
......@@ -28,7 +28,6 @@
#include <commctrl.h>
#include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h"
#include "perfdata.h"
......
......@@ -28,7 +28,6 @@
#include <commctrl.h>
#include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h"
#include "perfdata.h"
......
......@@ -28,7 +28,6 @@
#include <commctrl.h>
#include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h"
#include "perfdata.h"
......@@ -82,15 +81,15 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
*/
if (CpuUsage == 100)
{
sprintfW(Text, wszFormatI, (int)CpuUsage);
swprintf(Text, wszFormatI, (int)CpuUsage);
}
else if (CpuUsage < 10)
{
sprintfW(Text, wszFormatII, (int)CpuUsage);
swprintf(Text, wszFormatII, (int)CpuUsage);
}
else
{
sprintfW(Text, wszFormatIII, (int)CpuUsage);
swprintf(Text, wszFormatIII, (int)CpuUsage);
}
/*
......@@ -252,13 +251,13 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
CommitChargeTotal = (ULONGLONG)PerfDataGetCommitChargeTotalK();
CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK();
sprintfW(Text, wszFormat, (int)CommitChargeTotal);
swprintf(Text, wszFormat, (int)CommitChargeTotal);
/*
* Draw the font text onto the graph
* The bottom 20 pixels are reserved for the text
*/
Font_DrawText(hDC, Text, ((rcClient.right - rcClient.left) - (strlenW(Text) * 8)) / 2, rcClient.bottom - 11 - 5);
Font_DrawText(hDC, Text, ((rcClient.right - rcClient.left) - (lstrlenW(Text) * 8)) / 2, rcClient.bottom - 11 - 5);
/*
* Now we have to draw the graph
......
......@@ -28,7 +28,6 @@
#include <commctrl.h>
#include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h"
#include "perfdata.h"
#include "graphctl.h"
......
......@@ -28,7 +28,6 @@
#include <commctrl.h>
#include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h"
#include "perfdata.h"
......
......@@ -28,7 +28,6 @@
#include <commctrl.h>
#include <winnt.h>
#include "wine/unicode.h"
#include "resource.h"
#include "taskmgr.h"
#include "perfdata.h"
......@@ -727,8 +726,8 @@ LPWSTR GetLastErrorText(LPWSTR lpwszBuf, DWORD dwSize)
if (!dwRet || ( dwSize < dwRet+14)) {
lpwszBuf[0] = '\0';
} else {
lpwszTemp[strlenW(lpwszTemp)-2] = '\0'; /* remove cr and newline character */
sprintfW(lpwszBuf, wszFormat, lpwszTemp, GetLastError());
lpwszTemp[lstrlenW(lpwszTemp)-2] = '\0'; /* remove cr and newline character */
swprintf(lpwszBuf, wszFormat, lpwszTemp, GetLastError());
}
if (lpwszTemp) {
LocalFree(lpwszTemp);
......
......@@ -28,7 +28,6 @@
#include <winnt.h>
#include <shellapi.h>
#include "wine/unicode.h"
#include "taskmgr.h"
#include "perfdata.h"
......
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