summaryrefslogtreecommitdiff
path: root/plugins/Variables/src/parse_math.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
commit2f261839b60692e33d0e160344d0d636d49c90ba (patch)
tree187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/Variables/src/parse_math.cpp
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/src/parse_math.cpp')
-rw-r--r--plugins/Variables/src/parse_math.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/Variables/src/parse_math.cpp b/plugins/Variables/src/parse_math.cpp
index a9946d8a7a..cd028d3651 100644
--- a/plugins/Variables/src/parse_math.cpp
+++ b/plugins/Variables/src/parse_math.cpp
@@ -54,18 +54,18 @@ static wchar_t *parseHex(ARGUMENTSINFO *ai)
int val = ttoi(ai->targv[1]);
int padding = ttoi(ai->targv[2]);
- mir_sntprintf(szVal, L"%x", val);
- unsigned int zeros = max(padding - (signed int)mir_tstrlen(szVal), 0);
- wchar_t *res = (wchar_t*)mir_alloc((zeros + mir_tstrlen(szVal) + 3)*sizeof(wchar_t));
+ mir_snwprintf(szVal, L"%x", val);
+ unsigned int zeros = max(padding - (signed int)mir_wstrlen(szVal), 0);
+ wchar_t *res = (wchar_t*)mir_alloc((zeros + mir_wstrlen(szVal) + 3)*sizeof(wchar_t));
if (res == NULL)
return NULL;
- memset(res, 0, ((zeros + mir_tstrlen(szVal) + 3) * sizeof(wchar_t)));
- mir_tstrcpy(res, L"0x");
+ memset(res, 0, ((zeros + mir_wstrlen(szVal) + 3) * sizeof(wchar_t)));
+ mir_wstrcpy(res, L"0x");
for (i = 0; i < zeros; i++)
*(res + 2 + i) = '0';
- mir_tstrcat(res, szVal);
+ mir_wstrcat(res, szVal);
return res;
}
@@ -140,19 +140,19 @@ static wchar_t *parseNum(ARGUMENTSINFO *ai)
if (szVal == NULL)
return NULL;
- unsigned zeros = max(padding - (signed int)mir_tstrlen(szVal), 0);
- wchar_t *res = (wchar_t*)mir_alloc((zeros + mir_tstrlen(szVal) + 1)*sizeof(wchar_t));
+ unsigned zeros = max(padding - (signed int)mir_wstrlen(szVal), 0);
+ wchar_t *res = (wchar_t*)mir_alloc((zeros + mir_wstrlen(szVal) + 1)*sizeof(wchar_t));
if (res == NULL) {
mir_free(szVal);
return NULL;
}
- memset(res, 0, ((zeros + mir_tstrlen(szVal) + 1) * sizeof(wchar_t)));
+ memset(res, 0, ((zeros + mir_wstrlen(szVal) + 1) * sizeof(wchar_t)));
wchar_t *cur = res;
for (unsigned i = 0; i < zeros; i++)
*cur++ = '0';
- mir_tstrcat(res, szVal);
+ mir_wstrcat(res, szVal);
mir_free(szVal);
return res;