diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /protocols/MSN/src/msn_skypeab.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_skypeab.cpp')
-rw-r--r-- | protocols/MSN/src/msn_skypeab.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/MSN/src/msn_skypeab.cpp b/protocols/MSN/src/msn_skypeab.cpp index d2b1b52444..034b75f52e 100644 --- a/protocols/MSN/src/msn_skypeab.cpp +++ b/protocols/MSN/src/msn_skypeab.cpp @@ -41,10 +41,10 @@ bool CMsnProto::APISkypeComRequest(NETLIBHTTPREQUEST *nlhr, NETLIBHTTPHEADER *he return true;
}
-static TCHAR* get_json_str(JSONNode *item, const char *pszValue)
+static wchar_t* get_json_str(JSONNode *item, const char *pszValue)
{
if (JSONNode *node = json_get(item, pszValue)) {
- TCHAR *ret = json_as_string(node);
+ wchar_t *ret = json_as_string(node);
if (!mir_tstrcmp(ret, L"null")) {
mir_free(ret);
return NULL;
@@ -194,10 +194,10 @@ bool CMsnProto::MSN_SKYABGetProfile(const char *wlid) if (value = get_json_str(item, "firstname")) setTString(hContact, "FirstName", value);
if (value = get_json_str(item, "lastname")) setTString(hContact, "LastName", value);
if (value = get_json_str(item, "displayname")) setTString(hContact, "Nick", value);
- if (value = get_json_str(item, "gender")) setByte(hContact, "Gender", (BYTE)(_ttoi(value) == 1 ? 'M' : 'F'));
+ if (value = get_json_str(item, "gender")) setByte(hContact, "Gender", (BYTE)(_wtoi(value) == 1 ? 'M' : 'F'));
if (value = get_json_str(item, "birthday")) {
int d, m, y;
- _stscanf(value, L"%d-%d-%d", &y, &m, &d);
+ swscanf(value, L"%d-%d-%d", &y, &m, &d);
setWord(hContact, "BirthYear", y);
setByte(hContact, "BirthDay", d);
setByte(hContact, "BirthMonth", m);
@@ -387,13 +387,13 @@ bool CMsnProto::MSN_SKYABSearch(const char *keyWord, HANDLE hSearch) JSONNode *ContactCards = json_get(item, "ContactCards");
JSONNode *Skype = json_get(ContactCards, "Skype");
- TCHAR *sDisplayName = json_as_string(json_get(Skype, "DisplayName"));
- TCHAR *sSkypeName = json_as_string(json_get(Skype, "SkypeName"));
+ wchar_t *sDisplayName = json_as_string(json_get(Skype, "DisplayName"));
+ wchar_t *sSkypeName = json_as_string(json_get(Skype, "SkypeName"));
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
- psr.id.t = sSkypeName;
- psr.nick.t = sDisplayName;
+ psr.id.w = sSkypeName;
+ psr.nick.w = sDisplayName;
ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_DATA, hSearch, (LPARAM)&psr);
}
json_free(items);
|