summaryrefslogtreecommitdiff
path: root/plugins/TrafficCounter
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TrafficCounter')
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp40
-rw-r--r--plugins/TrafficCounter/src/misc.cpp52
-rw-r--r--plugins/TrafficCounter/src/options.cpp4
-rw-r--r--plugins/TrafficCounter/src/opttree.cpp6
-rw-r--r--plugins/TrafficCounter/src/statistics.cpp8
-rw-r--r--plugins/TrafficCounter/src/vars.cpp46
6 files changed, 78 insertions, 78 deletions
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index d54155159e..2366819516 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -216,26 +216,26 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
// Формат счётчика для каждого активного протокола
if (db_get_ts(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_COUNTER_FORMAT, &dbv) == 0) {
- if (mir_tstrlen(dbv.ptszVal) > 0)
- mir_tstrncpy(Traffic_CounterFormat, dbv.ptszVal, _countof(Traffic_CounterFormat));
+ if (mir_wstrlen(dbv.ptszVal) > 0)
+ mir_wstrncpy(Traffic_CounterFormat, dbv.ptszVal, _countof(Traffic_CounterFormat));
//
db_free(&dbv);
}
else //defaults here
{
- mir_tstrcpy(Traffic_CounterFormat, tszFormat);
+ mir_wstrcpy(Traffic_CounterFormat, tszFormat);
}
// Формат всплывающих подсказок
if (db_get_ts(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_TOOLTIP_FORMAT, &dbv) == 0) {
- if (mir_tstrlen(dbv.ptszVal) > 0)
- mir_tstrncpy(Traffic_TooltipFormat, dbv.ptszVal, _countof(Traffic_TooltipFormat));
+ if (mir_wstrlen(dbv.ptszVal) > 0)
+ mir_wstrncpy(Traffic_TooltipFormat, dbv.ptszVal, _countof(Traffic_TooltipFormat));
//
db_free(&dbv);
}
else //defaults here
{
- mir_tstrcpy(Traffic_TooltipFormat, L"Traffic Counter");
+ mir_wstrcpy(Traffic_TooltipFormat, L"Traffic Counter");
}
Traffic_AdditionSpace = db_get_b(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_ADDITION_SPACE, 0);
@@ -245,8 +245,8 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
//register traffic font
TrafficFontID.cbSize = sizeof(FontIDT);
- mir_tstrcpy(TrafficFontID.group, LPGENW("Traffic counter"));
- mir_tstrcpy(TrafficFontID.name, LPGENW("Font"));
+ mir_wstrcpy(TrafficFontID.group, LPGENW("Traffic counter"));
+ mir_wstrcpy(TrafficFontID.name, LPGENW("Font"));
mir_strcpy(TrafficFontID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
mir_strcpy(TrafficFontID.prefix, "Font");
TrafficFontID.flags = FIDF_DEFAULTVALID | FIDF_SAVEPOINTSIZE;
@@ -254,14 +254,14 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
TrafficFontID.deffontsettings.colour = GetSysColor(COLOR_BTNTEXT);
TrafficFontID.deffontsettings.size = 12;
TrafficFontID.deffontsettings.style = 0;
- mir_tstrcpy(TrafficFontID.deffontsettings.szFace, L"Arial");
+ mir_wstrcpy(TrafficFontID.deffontsettings.szFace, L"Arial");
TrafficFontID.order = 0;
FontRegisterT(&TrafficFontID);
// Регистрируем цвет фона
TrafficBackgroundColorID.cbSize = sizeof(ColourIDT);
- mir_tstrcpy(TrafficBackgroundColorID.group, LPGENW("Traffic counter"));
- mir_tstrcpy(TrafficBackgroundColorID.name, LPGENW("Font"));
+ mir_wstrcpy(TrafficBackgroundColorID.group, LPGENW("Traffic counter"));
+ mir_wstrcpy(TrafficBackgroundColorID.name, LPGENW("Font"));
mir_strcpy(TrafficBackgroundColorID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
mir_strcpy(TrafficBackgroundColorID.setting, "FontBkColor");
TrafficBackgroundColorID.defcolour = GetSysColor(COLOR_BTNFACE);
@@ -385,7 +385,7 @@ int TrafficCounter_Draw(HWND hwnd, HDC hDC)
static void TC_AlphaText(HDC hDC, LPCTSTR lpString, RECT* lpRect, UINT format, BYTE ClistModernPresent)
{
- int nCount = (int)mir_tstrlen(lpString);
+ int nCount = (int)mir_wstrlen(lpString);
if (ClistModernPresent)
AlphaText(hDC, lpString, nCount, lpRect, format, Traffic_FontColor);
@@ -539,7 +539,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC)
// Выводим текст
// Изображаем имя
if (unOptions.DrawProtoName) {
- wchar_t *bu = mir_a2t("Summary");
+ wchar_t *bu = mir_a2u("Summary");
rect.left += dx;
TC_AlphaText(hdc, bu, &rect, DT_SINGLELINE | DT_LEFT | DT_TOP, ClistModernPresent);
@@ -594,7 +594,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC)
// Выводим текст
// Изображаем имя
if (unOptions.DrawProtoName) {
- wchar_t *bu = mir_a2t("Overall");
+ wchar_t *bu = mir_a2u("Overall");
rect.left += dx;
TC_AlphaText(hdc, bu, &rect, DT_SINGLELINE | DT_LEFT | DT_TOP, ClistModernPresent);
@@ -639,7 +639,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC)
ExtraText = (wchar_t**)mir_realloc(ExtraText, sizeof(wchar_t*) * (RowsNumber + 1));
ahIcon = (HICON*)mir_realloc(ahIcon, sizeof(HICON) * (RowsNumber + 1));
- ExtraText[RowsNumber] = mir_a2t(ProtoList[i].name);
+ ExtraText[RowsNumber] = mir_a2u(ProtoList[i].name);
ahIcon[RowsNumber++] = Skin_LoadProtoIcon(ProtoList[i].name, CallProtoService(ProtoList[i].name, PS_GETSTATUS, 0, 0));
}
}
@@ -648,14 +648,14 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC)
ExtraText = (wchar_t**)mir_realloc(ExtraText, sizeof(wchar_t*) * (RowsNumber + 1));
ahIcon = (HICON*)mir_realloc(ahIcon, sizeof(HICON) * (RowsNumber + 1));
- ExtraText[RowsNumber] = mir_a2t("summary");
+ ExtraText[RowsNumber] = mir_a2u("summary");
ahIcon[RowsNumber++] = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
}
if (unOptions.ShowOverall) {
ExtraText = (wchar_t**)mir_realloc(ExtraText, sizeof(wchar_t*) * (RowsNumber + 1));
ahIcon = (HICON*)mir_realloc(ahIcon, sizeof(HICON) * (RowsNumber + 1));
- ExtraText[RowsNumber] = mir_a2t("overall");
+ ExtraText[RowsNumber] = mir_a2u("overall");
ahIcon[RowsNumber++] = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
}
@@ -1065,7 +1065,7 @@ void NotifyOnSend(void)
ppd.lchContact = NULL;
ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
wcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME);
- mir_sntprintf(ppd.lptzText, TranslateT("%d kilobytes sent"), notify_send_size = OverallInfo.CurrentSentTraffic >> 10);
+ mir_snwprintf(ppd.lptzText, TranslateT("%d kilobytes sent"), notify_send_size = OverallInfo.CurrentSentTraffic >> 10);
ppd.colorBack = Traffic_PopupBkColor;
ppd.colorText = Traffic_PopupFontColor;
ppd.PluginWindowProc = NULL;
@@ -1081,7 +1081,7 @@ void NotifyOnRecv(void)
ppd.lchContact = NULL;
ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
wcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME);
- mir_sntprintf(ppd.lptzText, TranslateT("%d kilobytes received"), notify_recv_size = OverallInfo.CurrentRecvTraffic >> 10);
+ mir_snwprintf(ppd.lptzText, TranslateT("%d kilobytes received"), notify_recv_size = OverallInfo.CurrentRecvTraffic >> 10);
ppd.colorBack = Traffic_PopupBkColor;
ppd.colorText = Traffic_PopupFontColor;
ppd.PluginWindowProc = NULL;
@@ -1100,7 +1100,7 @@ void CreateProtocolList(void)
//
for (i = 0; i < NumberOfAccounts; i++) {
ProtoList[i].name = mir_strdup(acc[i]->szModuleName);
- ProtoList[i].tszAccountName = mir_tstrdup(acc[i]->tszAccountName);
+ ProtoList[i].tszAccountName = mir_wstrdup(acc[i]->tszAccountName);
ProtoList[i].Flags = db_get_b(NULL, ProtoList[i].name, SETTINGS_PROTO_FLAGS, 3);
ProtoList[i].CurrentRecvTraffic =
diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp
index 398feaab96..240ba55aa1 100644
--- a/plugins/TrafficCounter/src/misc.cpp
+++ b/plugins/TrafficCounter/src/misc.cpp
@@ -63,9 +63,9 @@ WORD GetRowItems(wchar_t *InputString, RowItemInfo **RowItemsList)
}
else {
// Выделяем память под строку.
- (*RowItemsList)[c].String = (wchar_t*)mir_alloc(sizeof(wchar_t) * mir_tstrlen(end));
+ (*RowItemsList)[c].String = (wchar_t*)mir_alloc(sizeof(wchar_t) * mir_wstrlen(end));
// Копируем строку.
- wcsncpy((*RowItemsList)[c].String, end + 1, mir_tstrlen(end));
+ wcsncpy((*RowItemsList)[c].String, end + 1, mir_wstrlen(end));
}
c++;
@@ -148,20 +148,20 @@ size_t GetFormattedTraffic(DWORD Value, BYTE Unit, wchar_t *Buffer, size_t Size)
return 0;
}
- mir_sntprintf(Str1, L"%d.%d", Value / Divider, Value % Divider);
+ mir_snwprintf(Str1, L"%d.%d", Value / Divider, Value % Divider);
size_t l = GetNumberFormat(LOCALE_USER_DEFAULT, 0, Str1, &nf, NULL, 0);
if (!l) return 0;
- l += mir_tstrlen(szUnit) + 1;
+ l += mir_wstrlen(szUnit) + 1;
Res = (wchar_t*)malloc(l * sizeof(wchar_t));
if (!Res) return 0;
GetNumberFormat(LOCALE_USER_DEFAULT, 0, Str1, &nf, Res, (int)l);
- mir_tstrcat(Res, szUnit);
+ mir_wstrcat(Res, szUnit);
if (Size && Buffer) {
- mir_tstrcpy(Buffer, Res);
- l = mir_tstrlen(Buffer);
+ mir_wstrcpy(Buffer, Res);
+ l = mir_wstrlen(Buffer);
}
- else l = mir_tstrlen(Res) + 1;
+ else l = mir_wstrlen(Res) + 1;
free(Res);
return l;
@@ -197,53 +197,53 @@ size_t GetDurationFormatM(DWORD Duration, wchar_t *Format, wchar_t *Buffer, size
Token[TokenIndex] = 0;
// Что получили в аккумуляторе?
- if (!mir_tstrcmp(Token, L"d")) {
+ if (!mir_wstrcmp(Token, L"d")) {
q = Duration / (60 * 60 * 24);
- mir_sntprintf(Token, L"%d", q);
+ mir_snwprintf(Token, L"%d", q);
Duration -= q * 60 * 60 * 24;
}
- else if (!mir_tstrcmp(Token, L"h")) {
+ else if (!mir_wstrcmp(Token, L"h")) {
q = Duration / (60 * 60);
- mir_sntprintf(Token, L"%d", q);
+ mir_snwprintf(Token, L"%d", q);
Duration -= q * 60 * 60;
}
- else if (!mir_tstrcmp(Token, L"hh")) {
+ else if (!mir_wstrcmp(Token, L"hh")) {
q = Duration / (60 * 60);
- mir_sntprintf(Token, L"%02d", q);
+ mir_snwprintf(Token, L"%02d", q);
Duration -= q * 60 * 60;
}
- else if (!mir_tstrcmp(Token, L"m")) {
+ else if (!mir_wstrcmp(Token, L"m")) {
q = Duration / 60;
- mir_sntprintf(Token, L"%d", q);
+ mir_snwprintf(Token, L"%d", q);
Duration -= q * 60;
}
- else if (!mir_tstrcmp(Token, L"mm")) {
+ else if (!mir_wstrcmp(Token, L"mm")) {
q = Duration / 60;
- mir_sntprintf(Token, L"%02d", q);
+ mir_snwprintf(Token, L"%02d", q);
Duration -= q * 60;
}
- else if (!mir_tstrcmp(Token, L"s")) {
+ else if (!mir_wstrcmp(Token, L"s")) {
q = Duration;
- mir_sntprintf(Token, L"%d", q);
+ mir_snwprintf(Token, L"%d", q);
Duration -= q;
}
- else if (!mir_tstrcmp(Token, L"ss")) {
+ else if (!mir_wstrcmp(Token, L"ss")) {
q = Duration;
- mir_sntprintf(Token, L"%02d", q);
+ mir_snwprintf(Token, L"%02d", q);
Duration -= q;
}
// Добавим памяти, если нужно.
- Length = mir_tstrlen(Res) + mir_tstrlen(Token) + 1;
+ Length = mir_wstrlen(Res) + mir_wstrlen(Token) + 1;
Res = (wchar_t*)realloc(Res, Length * sizeof(wchar_t));
- mir_tstrcat(Res, Token);
+ mir_wstrcat(Res, Token);
}
if (Size && Buffer) {
wcsncpy(Buffer, Res, Size);
- Length = mir_tstrlen(Buffer);
+ Length = mir_wstrlen(Buffer);
}
- else Length = mir_tstrlen(Res) + 1;
+ else Length = mir_wstrlen(Res) + 1;
free(Res);
return Length;
diff --git a/plugins/TrafficCounter/src/options.cpp b/plugins/TrafficCounter/src/options.cpp
index 02bfd9d5d5..db0e0c3c28 100644
--- a/plugins/TrafficCounter/src/options.cpp
+++ b/plugins/TrafficCounter/src/options.cpp
@@ -194,9 +194,9 @@ static INT_PTR CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
{
options[i].szSettingName = (char*)mir_alloc(1 + mir_strlen(ProtoList[j].name));
mir_strcpy(options[i].szSettingName, ProtoList[j].name);
- size_t l = 20 + mir_tstrlen(ProtoList[j].tszAccountName);
+ size_t l = 20 + mir_wstrlen(ProtoList[j].tszAccountName);
options[i].szOptionName = (wchar_t*)mir_alloc(sizeof(wchar_t) * l);
- mir_sntprintf(options[i].szOptionName, l, L"Visible accounts/%s", ProtoList[j].tszAccountName);
+ mir_snwprintf(options[i].szOptionName, l, L"Visible accounts/%s", ProtoList[j].tszAccountName);
options[i].dwFlag = (ProtoList[j++].Enabled ? 1 : OPTTREE_INVISIBLE) | OPTTREE_NOTRANSLATE;
}
Initialized = 1;
diff --git a/plugins/TrafficCounter/src/opttree.cpp b/plugins/TrafficCounter/src/opttree.cpp
index 337fca2806..b75de3cca5 100644
--- a/plugins/TrafficCounter/src/opttree.cpp
+++ b/plugins/TrafficCounter/src/opttree.cpp
@@ -93,7 +93,7 @@ HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const wcha
{
TreeView_GetItem(hwndTree, &tvi);
- if (!mir_tstrcmp(tvi.pszText, name))
+ if (!mir_wstrcmp(tvi.pszText, name))
return tvi.hItem;
tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem);
@@ -109,7 +109,7 @@ HTREEITEM OptTree_AddItem(HWND hwndTree, wchar_t *name, LPARAM lParam, int iconI
int sectionLevel = 0;
HTREEITEM hSection = NULL, result = NULL;
- mir_tstrcpy(itemName, name);
+ mir_wstrcpy(itemName, name);
sectionName = itemName;
while (sectionName)
@@ -193,7 +193,7 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, BOOL*,
HTREEITEM hSection = NULL;
if (options[indx].szOptionName)
- mir_tstrcpy(itemName, options[indx].szOptionName);
+ mir_wstrcpy(itemName, options[indx].szOptionName);
else
itemName[0] = 0;
diff --git a/plugins/TrafficCounter/src/statistics.cpp b/plugins/TrafficCounter/src/statistics.cpp
index cb0f7e3f6d..1815f8544c 100644
--- a/plugins/TrafficCounter/src/statistics.cpp
+++ b/plugins/TrafficCounter/src/statistics.cpp
@@ -187,7 +187,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
switch (unOptions.Stat_Tab) {
case 0: // Hourly
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, szBufW, 32);
- mir_sntprintf(pdi->item.pszText, 32, L"%s %02d:00 - %02d:59",
+ mir_snwprintf(pdi->item.pszText, 32, L"%s %02d:00 - %02d:59",
szBufW,
ProtoList[EldestAcc].AllStatistics[Index].Hour,
ProtoList[EldestAcc].AllStatistics[Index].Hour);
@@ -206,13 +206,13 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
vartime += 6;
VariantTimeToSystemTime(vartime, &st);
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, szBufW, 32);
- mir_sntprintf(pdi->item.pszText, 32, L"%s - %s", pdi->item.pszText, szBufW);
+ mir_snwprintf(pdi->item.pszText, 32, L"%s - %s", pdi->item.pszText, szBufW);
break;
case 3: // Monthly
GetDateFormat(LOCALE_USER_DEFAULT, DATE_YEARMONTH, &st, NULL, pdi->item.pszText, 32);
break;
case 4: // Yearly
- mir_sntprintf(pdi->item.pszText, 32, L"%d", st.wYear);
+ mir_snwprintf(pdi->item.pszText, 32, L"%d", st.wYear);
break;
}
return 0;
@@ -302,7 +302,7 @@ void Stat_ReadFile(BYTE n)
pszPath = Utils_ReplaceVarsT(L"%miranda_userdata%\\statistics");
CreateDirectoryTreeT(pszPath);
- mir_sntprintf(FileName, L"%s\\%S.stat", pszPath, ProtoList[n].name);
+ mir_snwprintf(FileName, L"%s\\%S.stat", pszPath, ProtoList[n].name);
mir_free(pszPath);
GetLocalTime(&stNow);
ProtoList[n].hFile = CreateFile(FileName, GENERIC_READ | GENERIC_WRITE,
diff --git a/plugins/TrafficCounter/src/vars.cpp b/plugins/TrafficCounter/src/vars.cpp
index 64a71c71b5..989df08b21 100644
--- a/plugins/TrafficCounter/src/vars.cpp
+++ b/plugins/TrafficCounter/src/vars.cpp
@@ -30,7 +30,7 @@ static wchar_t* GetTraffic(ARGUMENTSINFO *ai)
if (ai->argc != 5) return NULL;
- if (!mir_tstrcmp(ai->targv[1], L"overall"))
+ if (!mir_wstrcmp(ai->targv[1], L"overall"))
{
tmpsn = OverallInfo.CurrentSentTraffic;
tmprn = OverallInfo.CurrentRecvTraffic;
@@ -38,7 +38,7 @@ static wchar_t* GetTraffic(ARGUMENTSINFO *ai)
tmprt = OverallInfo.TotalRecvTraffic;
}
else
- if (!mir_tstrcmp(ai->targv[1], L"summary"))
+ if (!mir_wstrcmp(ai->targv[1], L"summary"))
{
for (ed = 0; ed < NumberOfAccounts; ed++)
if (ProtoList[ed].Visible)
@@ -54,8 +54,8 @@ static wchar_t* GetTraffic(ARGUMENTSINFO *ai)
for (tmp = ed = 0; ed < NumberOfAccounts; ed++)
{
if (!ProtoList[ed].name) continue;
- wchar_t *buf = mir_a2t(ProtoList[ed].name);
- if (!mir_tstrcmp(buf, ai->targv[1]))
+ wchar_t *buf = mir_a2u(ProtoList[ed].name);
+ if (!mir_wstrcmp(buf, ai->targv[1]))
{
tmpsn = ProtoList[ed].CurrentSentTraffic;
tmprn = ProtoList[ed].CurrentRecvTraffic;
@@ -68,34 +68,34 @@ static wchar_t* GetTraffic(ARGUMENTSINFO *ai)
if (tmp != 0xAA) return NULL;
}
- if (!mir_tstrcmp(ai->targv[2], L"now"))
+ if (!mir_wstrcmp(ai->targv[2], L"now"))
{
- if (!mir_tstrcmp(ai->targv[3], L"sent")) tmp = tmpsn;
+ if (!mir_wstrcmp(ai->targv[3], L"sent")) tmp = tmpsn;
else
- if (!mir_tstrcmp(ai->targv[3], L"received")) tmp = tmprn;
+ if (!mir_wstrcmp(ai->targv[3], L"received")) tmp = tmprn;
else
- if (!mir_tstrcmp(ai->targv[3], L"both")) tmp = tmprn + tmpsn;
+ if (!mir_wstrcmp(ai->targv[3], L"both")) tmp = tmprn + tmpsn;
else return NULL;
}
else
- if (!mir_tstrcmp(ai->targv[2], L"total"))
+ if (!mir_wstrcmp(ai->targv[2], L"total"))
{
- if (!mir_tstrcmp(ai->targv[3], L"sent")) tmp = tmpst;
+ if (!mir_wstrcmp(ai->targv[3], L"sent")) tmp = tmpst;
else
- if (!mir_tstrcmp(ai->targv[3], L"received")) tmp = tmprt;
+ if (!mir_wstrcmp(ai->targv[3], L"received")) tmp = tmprt;
else
- if (!mir_tstrcmp(ai->targv[3], L"both")) tmp = tmprt + tmpst;
+ if (!mir_wstrcmp(ai->targv[3], L"both")) tmp = tmprt + tmpst;
else return NULL;
}
else return NULL;
- if (!mir_tstrcmp(ai->targv[4], L"b")) ed = 0;
+ if (!mir_wstrcmp(ai->targv[4], L"b")) ed = 0;
else
- if (!mir_tstrcmp(ai->targv[4], L"k")) ed = 1;
+ if (!mir_wstrcmp(ai->targv[4], L"k")) ed = 1;
else
- if (!mir_tstrcmp(ai->targv[4], L"m")) ed = 2;
+ if (!mir_wstrcmp(ai->targv[4], L"m")) ed = 2;
else
- if (!mir_tstrcmp(ai->targv[4], L"d")) ed = 3;
+ if (!mir_wstrcmp(ai->targv[4], L"d")) ed = 3;
else return NULL;
// Получаем форматированную строку и возвращаем указатель на неё.
@@ -122,25 +122,25 @@ static wchar_t* GetTime(ARGUMENTSINFO *ai)
{
wchar_t *buf;
if (!ProtoList[ed].name) continue;
- buf = mir_a2t(ProtoList[ed].name);
- if (!mir_tstrcmp(buf, ai->targv[1]))
+ buf = mir_a2u(ProtoList[ed].name);
+ if (!mir_wstrcmp(buf, ai->targv[1]))
{
flag = 0xAA;
- if (!mir_tstrcmp(ai->targv[2], L"now"))
+ if (!mir_wstrcmp(ai->targv[2], L"now"))
Duration = ProtoList[ed].Session.Timer;
- else if (!mir_tstrcmp(ai->targv[2], L"total"))
+ else if (!mir_wstrcmp(ai->targv[2], L"total"))
Duration = ProtoList[ed].Total.Timer;
else flag = 0;
break;
}
mir_free(buf);
}
- if ( (flag != 0xAA) && !mir_tstrcmp(ai->targv[1], L"summary") )
+ if ( (flag != 0xAA) && !mir_wstrcmp(ai->targv[1], L"summary") )
{
flag = 0xAA;
- if (!mir_tstrcmp(ai->targv[2], L"now"))
+ if (!mir_wstrcmp(ai->targv[2], L"now"))
Duration = OverallInfo.Session.Timer;
- else if (!mir_tstrcmp(ai->targv[2], L"total"))
+ else if (!mir_wstrcmp(ai->targv[2], L"total"))
Duration = OverallInfo.Total.Timer;
else flag = 0;
}