summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src/CheckFeed.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/NewsAggregator/Src/CheckFeed.cpp
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator/Src/CheckFeed.cpp')
-rw-r--r--plugins/NewsAggregator/Src/CheckFeed.cpp194
1 files changed, 97 insertions, 97 deletions
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp
index d152cca932..c9967ba341 100644
--- a/plugins/NewsAggregator/Src/CheckFeed.cpp
+++ b/plugins/NewsAggregator/Src/CheckFeed.cpp
@@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA.
LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg)
{
- Netlib_LogfT(hNetlibUser, _T("Started validating feed %s."), tszURL);
+ Netlib_LogfT(hNetlibUser, L"Started validating feed %s.", tszURL);
char *szData = NULL;
GetNewsData(tszURL, &szData, NULL, hwndDlg);
if (szData) {
@@ -36,11 +36,11 @@ LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg)
LPCTSTR codepage = NULL;
int childcount = 0;
HXML node;
- if (!mir_tstrcmpi(xmlGetName(hXml), _T("xml"))) {
+ if (!mir_tstrcmpi(xmlGetName(hXml), L"xml")) {
int attrcount = xmlGetAttrCount(hXml);
for (int i = 0; i < attrcount; i++) {
LPCTSTR szAttrName = xmlGetAttrName(hXml, i);
- if (!mir_tstrcmpi(szAttrName, _T("encoding"))) {
+ if (!mir_tstrcmpi(szAttrName, L"encoding")) {
codepage = xmlGetAttrValue(hXml, szAttrName);
break;
}
@@ -51,15 +51,15 @@ LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg)
node = hXml;
while (node) {
LPCTSTR szNodeName = xmlGetName(node);
- if (!mir_tstrcmpi(szNodeName, _T("rss")) || !mir_tstrcmpi(szNodeName, _T("rdf"))) {
+ if (!mir_tstrcmpi(szNodeName, L"rss") || !mir_tstrcmpi(szNodeName, L"rdf")) {
HXML chan = xmlGetChild(node, 0);
for (int j = 0; j < xmlGetChildCount(chan); j++) {
HXML child = xmlGetChild(chan, j);
- if (!mir_tstrcmpi(xmlGetName(child), _T("title"))) {
+ if (!mir_tstrcmpi(xmlGetName(child), L"title")) {
TCHAR mes[MAX_PATH];
mir_sntprintf(mes, TranslateT("%s\nis a valid feed's address."), tszURL);
MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION);
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
return mir_tstrdup(buf);
@@ -69,14 +69,14 @@ LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg)
}
}
}
- else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
+ else if (!mir_tstrcmpi(szNodeName, L"feed")) {
for (int j = 0; j < xmlGetChildCount(node); j++) {
HXML child = xmlGetChild(node, j);
- if (!mir_tstrcmpi(xmlGetName(child), _T("title"))) {
+ if (!mir_tstrcmpi(xmlGetName(child), L"title")) {
TCHAR mes[MAX_PATH];
mir_sntprintf(mes, TranslateT("%s\nis a valid feed's address."), tszURL);
MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION);
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
return mir_tstrdup(buf);
@@ -91,7 +91,7 @@ LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg)
}
xmlDestroyNode(hXml);
}
- Netlib_LogfT(hNetlibUser, _T("%s is not a valid feed's address."), tszURL);
+ Netlib_LogfT(hNetlibUser, L"%s is not a valid feed's address.", tszURL);
TCHAR mes[MAX_PATH];
mir_sntprintf(mes, TranslateT("%s\nis not a valid feed's address."), tszURL);
MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONERROR);
@@ -105,39 +105,39 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin
message = TAGSDEFAULT;
if (title.IsEmpty())
- message.Replace(_T("#<title>#"), TranslateT("empty"));
+ message.Replace(L"#<title>#", TranslateT("empty"));
else
- message.Replace(_T("#<title>#"), title);
+ message.Replace(L"#<title>#", title);
if (link.IsEmpty())
- message.Replace(_T("#<link>#"), TranslateT("empty"));
+ message.Replace(L"#<link>#", TranslateT("empty"));
else
- message.Replace(_T("#<link>#"), link);
+ message.Replace(L"#<link>#", link);
if (descr.IsEmpty())
- message.Replace(_T("#<description>#"), TranslateT("empty"));
+ message.Replace(L"#<description>#", TranslateT("empty"));
else
- message.Replace(_T("#<description>#"), descr);
+ message.Replace(L"#<description>#", descr);
if (author.IsEmpty())
- message.Replace(_T("#<author>#"), TranslateT("empty"));
+ message.Replace(L"#<author>#", TranslateT("empty"));
else
- message.Replace(_T("#<author>#"), author);
+ message.Replace(L"#<author>#", author);
if (comments.IsEmpty())
- message.Replace(_T("#<comments>#"), TranslateT("empty"));
+ message.Replace(L"#<comments>#", TranslateT("empty"));
else
- message.Replace(_T("#<comments>#"), comments);
+ message.Replace(L"#<comments>#", comments);
if (guid.IsEmpty())
- message.Replace(_T("#<guid>#"), TranslateT("empty"));
+ message.Replace(L"#<guid>#", TranslateT("empty"));
else
- message.Replace(_T("#<guid>#"), guid);
+ message.Replace(L"#<guid>#", guid);
if (category.IsEmpty())
- message.Replace(_T("#<category>#"), TranslateT("empty"));
+ message.Replace(L"#<category>#", TranslateT("empty"));
else
- message.Replace(_T("#<category>#"), category);
+ message.Replace(L"#<category>#", category);
DBEVENTINFO olddbei = { 0 };
olddbei.cbSize = sizeof(olddbei);
@@ -187,7 +187,7 @@ void CheckCurrentFeed(MCONTACT hContact)
if (szURL == NULL)
return;
- Netlib_LogfT(hNetlibUser, _T("Started checking feed %s."), szURL);
+ Netlib_LogfT(hNetlibUser, L"Started checking feed %s.", szURL);
char *szData = NULL;
GetNewsData(szURL, &szData, hContact, NULL);
@@ -207,11 +207,11 @@ void CheckCurrentFeed(MCONTACT hContact)
LPCTSTR codepage = NULL;
int childcount = 0;
HXML node;
- if (!mir_tstrcmpi(xmlGetName(hXml), _T("xml"))) {
+ if (!mir_tstrcmpi(xmlGetName(hXml), L"xml")) {
int attrcount = xmlGetAttrCount(hXml);
for (int i = 0; i < attrcount; i++) {
LPCTSTR szAttrName = xmlGetAttrName(hXml, i);
- if (!mir_tstrcmpi(szAttrName, _T("encoding"))) {
+ if (!mir_tstrcmpi(szAttrName, L"encoding")) {
codepage = xmlGetAttrValue(hXml, szAttrName);
break;
}
@@ -222,29 +222,29 @@ void CheckCurrentFeed(MCONTACT hContact)
node = hXml;
while (node) {
LPCTSTR szNodeName = xmlGetName(node);
- bool isRSS = !mir_tstrcmpi(szNodeName, _T("rss")), isAtom = !mir_tstrcmpi(szNodeName, _T("rdf"));
+ bool isRSS = !mir_tstrcmpi(szNodeName, L"rss"), isAtom = !mir_tstrcmpi(szNodeName, L"rdf");
if (isRSS || isAtom) {
if (isRSS) {
for (int i = 0; i < xmlGetAttrCount(node); i++) {
LPCTSTR szAttrName = xmlGetAttrName(node, i);
- if (!mir_tstrcmpi(szAttrName, _T("version"))) {
+ if (!mir_tstrcmpi(szAttrName, L"version")) {
TCHAR ver[MAX_PATH];
- mir_sntprintf(ver, _T("RSS %s"), xmlGetAttrValue(node, szAttrName));
+ mir_sntprintf(ver, L"RSS %s", xmlGetAttrValue(node, szAttrName));
db_set_ts(hContact, MODULE, "MirVer", ver);
break;
}
}
}
else if (isAtom)
- db_set_ts(hContact, MODULE, "MirVer", _T("RSS 1.0"));
+ db_set_ts(hContact, MODULE, "MirVer", L"RSS 1.0");
HXML chan = xmlGetChild(node, 0);
for (int j = 0; j < xmlGetChildCount(chan); j++) {
HXML child = xmlGetChild(chan, j);
LPCTSTR childName = xmlGetName(child);
- if (!mir_tstrcmpi(childName, _T("title"))) {
+ if (!mir_tstrcmpi(childName, L"title")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -254,9 +254,9 @@ void CheckCurrentFeed(MCONTACT hContact)
if (szChildText)
db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(childName, _T("link"))) {
+ else if (!mir_tstrcmpi(childName, L"link")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -266,9 +266,9 @@ void CheckCurrentFeed(MCONTACT hContact)
if (szChildText)
db_set_ts(hContact, MODULE, "Homepage", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(childName, _T("description"))) {
+ else if (!mir_tstrcmpi(childName, L"description")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -281,9 +281,9 @@ void CheckCurrentFeed(MCONTACT hContact)
db_set_ts(hContact, "CList", "StatusMsg", szValue);
}
}
- else if (!mir_tstrcmpi(childName, _T("language"))) {
+ else if (!mir_tstrcmpi(childName, L"language")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -293,9 +293,9 @@ void CheckCurrentFeed(MCONTACT hContact)
if (szChildText)
db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(childName, _T("managingEditor"))) {
+ else if (!mir_tstrcmpi(childName, L"managingEditor")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -305,9 +305,9 @@ void CheckCurrentFeed(MCONTACT hContact)
if (szChildText)
db_set_ts(hContact, MODULE, "e-mail", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(childName, _T("category"))) {
+ else if (!mir_tstrcmpi(childName, L"category")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -317,9 +317,9 @@ void CheckCurrentFeed(MCONTACT hContact)
if (szChildText)
db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(childName, _T("copyright"))) {
+ else if (!mir_tstrcmpi(childName, L"copyright")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -329,10 +329,10 @@ void CheckCurrentFeed(MCONTACT hContact)
if (szChildText)
db_set_s(hContact, "UserInfo", "MyNotes", _T2A(ClearText(szValue, szChildText)));
}
- else if (!mir_tstrcmpi(childName, _T("image"))) {
+ else if (!mir_tstrcmpi(childName, L"image")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML imageval = xmlGetChild(child, x);
- if (!mir_tstrcmpi(xmlGetName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -345,8 +345,8 @@ void CheckCurrentFeed(MCONTACT hContact)
ai.format = ProtoGetAvatarFormat(url);
CMString filename = szNick;
- filename.Replace(_T("/"), _T("_"));
- mir_sntprintf(ai.filename, _T("%s\\%s.%s"), tszRoot, filename.c_str(), ext);
+ filename.Replace(L"/", L"_");
+ mir_sntprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename.c_str(), ext);
CreateDirectoryTreeT(tszRoot);
if (DownloadFile(url, ai.filename)) {
db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
@@ -359,9 +359,9 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- else if (!mir_tstrcmpi(childName, _T("lastBuildDate"))) {
+ else if (!mir_tstrcmpi(childName, L"lastBuildDate")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -379,14 +379,14 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- else if (!mir_tstrcmpi(childName, _T("item"))) {
+ else if (!mir_tstrcmpi(childName, L"item")) {
CMString title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xmlGetChildCount(child); z++) {
HXML itemval = xmlGetChild(child, z);
LPCTSTR itemName = xmlGetName(itemval);
LPCTSTR value = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(itemval)), -1, buf, _countof(buf));
value = buf;
@@ -395,29 +395,29 @@ void CheckCurrentFeed(MCONTACT hContact)
value = xmlGetText(itemval);
// We only use the first tag for now and ignore the rest.
- if (!mir_tstrcmpi(itemName, _T("title")))
+ if (!mir_tstrcmpi(itemName, L"title"))
ClearText(title, value);
- else if (!mir_tstrcmpi(itemName, _T("link")))
+ else if (!mir_tstrcmpi(itemName, L"link"))
ClearText(link, value);
- else if (!mir_tstrcmpi(itemName, _T("pubDate")) || !mir_tstrcmpi(itemName, _T("date"))) {
+ else if (!mir_tstrcmpi(itemName, L"pubDate") || !mir_tstrcmpi(itemName, L"date")) {
if (stamp == 0)
stamp = DateToUnixTime(value, 0);
}
- else if (!mir_tstrcmpi(itemName, _T("description")) || !mir_tstrcmpi(itemName, _T("encoded")))
+ else if (!mir_tstrcmpi(itemName, L"description") || !mir_tstrcmpi(itemName, L"encoded"))
ClearText(descr, value);
- else if (!mir_tstrcmpi(itemName, _T("author")) || !mir_tstrcmpi(itemName, _T("creator")))
+ else if (!mir_tstrcmpi(itemName, L"author") || !mir_tstrcmpi(itemName, L"creator"))
ClearText(author, value);
- else if (!mir_tstrcmpi(itemName, _T("comments")))
+ else if (!mir_tstrcmpi(itemName, L"comments"))
ClearText(comments, value);
- else if (!mir_tstrcmpi(itemName, _T("guid")))
+ else if (!mir_tstrcmpi(itemName, L"guid"))
ClearText(guid, value);
- else if (!mir_tstrcmpi(itemName, _T("category")))
+ else if (!mir_tstrcmpi(itemName, L"category"))
ClearText(category, value);
}
@@ -425,27 +425,27 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
- db_set_ts(hContact, MODULE, "MirVer", _T("Atom 3"));
+ else if (!mir_tstrcmpi(szNodeName, L"feed")) {
+ db_set_ts(hContact, MODULE, "MirVer", L"Atom 3");
for (int j = 0; j < xmlGetChildCount(node); j++) {
HXML child = xmlGetChild(node, j);
LPCTSTR szChildName = xmlGetName(child);
- if (!mir_tstrcmpi(szChildName, _T("title"))) {
+ if (!mir_tstrcmpi(szChildName, L"title")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(szChildName, _T("link"))) {
+ else if (!mir_tstrcmpi(szChildName, L"link")) {
for (int x = 0; x < xmlGetAttrCount(child); x++) {
- if (!mir_tstrcmpi(xmlGetAttrName(child, x), _T("rel")))
- if (!mir_tstrcmpi(xmlGetAttrValue(child, xmlGetAttrName(child, x)), _T("self")))
+ if (!mir_tstrcmpi(xmlGetAttrName(child, x), L"rel"))
+ if (!mir_tstrcmpi(xmlGetAttrValue(child, xmlGetAttrName(child, x)), L"self"))
break;
- if (!mir_tstrcmpi(xmlGetAttrName(child, x), _T("href")))
+ if (!mir_tstrcmpi(xmlGetAttrName(child, x), L"href"))
db_set_ts(hContact, MODULE, "Homepage", xmlGetAttrValue(child, xmlGetAttrName(child, x)));
}
}
- else if (!mir_tstrcmpi(szChildName, _T("subtitle"))) {
+ else if (!mir_tstrcmpi(szChildName, L"subtitle")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText) {
ClearText(szValue, szChildText);
@@ -453,29 +453,29 @@ void CheckCurrentFeed(MCONTACT hContact)
db_set_ts(hContact, "CList", "StatusMsg", szValue);
}
}
- else if (!mir_tstrcmpi(szChildName, _T("language"))) {
+ else if (!mir_tstrcmpi(szChildName, L"language")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(szChildName, _T("author"))) {
+ else if (!mir_tstrcmpi(szChildName, L"author")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML authorval = xmlGetChild(child, x);
- if (!mir_tstrcmpi(xmlGetName(authorval), _T("email"))) {
+ if (!mir_tstrcmpi(xmlGetName(authorval), L"email")) {
db_set_ts(hContact, MODULE, "e-mail", xmlGetText(authorval));
break;
}
}
}
- else if (!mir_tstrcmpi(szChildName, _T("category"))) {
+ else if (!mir_tstrcmpi(szChildName, L"category")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(szChildName, _T("icon"))) {
+ else if (!mir_tstrcmpi(szChildName, L"icon")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML imageval = xmlGetChild(child, x);
- if (!mir_tstrcmpi(xmlGetName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -487,7 +487,7 @@ void CheckCurrentFeed(MCONTACT hContact)
ai.format = ProtoGetAvatarFormat(ext);
TCHAR *filename = szNick;
- mir_sntprintf(ai.filename, _T("%s\\%s.%s"), tszRoot, filename, ext);
+ mir_sntprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
@@ -498,7 +498,7 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- else if (!mir_tstrcmpi(szChildName, _T("updated"))) {
+ else if (!mir_tstrcmpi(szChildName, L"updated")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText) {
TCHAR *lastupdtime = (TCHAR *)szChildText;
@@ -512,57 +512,57 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- else if (!mir_tstrcmpi(szChildName, _T("entry"))) {
+ else if (!mir_tstrcmpi(szChildName, L"entry")) {
CMString title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xmlGetChildCount(child); z++) {
HXML itemval = xmlGetChild(child, z);
LPCTSTR szItemName = xmlGetName(itemval);
- if (!mir_tstrcmpi(szItemName, _T("title"))) {
+ if (!mir_tstrcmpi(szItemName, L"title")) {
LPCTSTR szItemText = xmlGetText(itemval);
if (szItemText)
ClearText(title, szItemText);
}
- else if (!mir_tstrcmpi(szItemName, _T("link"))) {
+ else if (!mir_tstrcmpi(szItemName, L"link")) {
for (int x = 0; x < xmlGetAttrCount(itemval); x++) {
- if (!mir_tstrcmpi(xmlGetAttrName(itemval, x), _T("href"))) {
+ if (!mir_tstrcmpi(xmlGetAttrName(itemval, x), L"href")) {
ClearText(link, xmlGetAttrValue(itemval, xmlGetAttrName(itemval, x)));
break;
}
}
}
- else if (!mir_tstrcmpi(szItemName, _T("updated"))) {
+ else if (!mir_tstrcmpi(szItemName, L"updated")) {
if (stamp == 0)
stamp = DateToUnixTime(xmlGetText(itemval), 0);
}
- else if (!mir_tstrcmpi(szItemName, _T("summary")) || !mir_tstrcmpi(szItemName, _T("content"))) {
+ else if (!mir_tstrcmpi(szItemName, L"summary") || !mir_tstrcmpi(szItemName, L"content")) {
LPCTSTR szItemText = xmlGetText(itemval);
if (szItemText)
ClearText(descr, szItemText);
}
- else if (!mir_tstrcmpi(szItemName, _T("author"))) {
+ else if (!mir_tstrcmpi(szItemName, L"author")) {
for (int x = 0; x < xmlGetChildCount(itemval); x++) {
HXML authorval = xmlGetChild(itemval, x);
- if (!mir_tstrcmpi(xmlGetName(authorval), _T("name")) && xmlGetText(authorval)) {
+ if (!mir_tstrcmpi(xmlGetName(authorval), L"name") && xmlGetText(authorval)) {
ClearText(author, xmlGetText(authorval));
break;
}
}
}
- else if (!mir_tstrcmpi(szItemName, _T("comments"))) {
+ else if (!mir_tstrcmpi(szItemName, L"comments")) {
LPCTSTR szItemText = xmlGetText(itemval);
if (szItemText)
ClearText(comments, szItemText);
}
- else if (!mir_tstrcmpi(szItemName, _T("id"))) {
+ else if (!mir_tstrcmpi(szItemName, L"id")) {
LPCTSTR szItemText = xmlGetText(itemval);
if (szItemText)
ClearText(guid, xmlGetText(itemval));
}
- else if (!mir_tstrcmpi(szItemName, _T("category"))) {
+ else if (!mir_tstrcmpi(szItemName, L"category")) {
for (int x = 0; x < xmlGetAttrCount(itemval); x++) {
LPCTSTR szAttrName = xmlGetAttrName(itemval, x);
- if (!mir_tstrcmpi(szAttrName, _T("term")) && xmlGetText(itemval)) {
+ if (!mir_tstrcmpi(szAttrName, L"term") && xmlGetText(itemval)) {
ClearText(category, xmlGetAttrValue(itemval, szAttrName));
break;
}
@@ -612,14 +612,14 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
HXML node = xmlGetChild(hXml, childcount);
while (node) {
LPCTSTR szNodeName = xmlGetName(node);
- if (!mir_tstrcmpi(szNodeName, _T("rss")) || !mir_tstrcmpi(szNodeName, _T("rdf"))) {
+ if (!mir_tstrcmpi(szNodeName, L"rss") || !mir_tstrcmpi(szNodeName, L"rdf")) {
HXML chan = xmlGetChild(node, 0);
for (int j = 0; j < xmlGetChildCount(chan); j++) {
HXML child = xmlGetChild(chan, j);
- if (!mir_tstrcmpi(xmlGetName(child), _T("image"))) {
+ if (!mir_tstrcmpi(xmlGetName(child), L"image")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML imageval = xmlGetChild(child, x);
- if (!mir_tstrcmpi(xmlGetName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -632,7 +632,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
ai.format = ProtoGetAvatarFormat(ext);
TCHAR *filename = szNick;
- mir_sntprintf(ai.filename, _T("%s\\%s.%s"), tszRoot, filename, ext);
+ mir_sntprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
@@ -646,13 +646,13 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
}
}
}
- else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
+ else if (!mir_tstrcmpi(szNodeName, L"feed")) {
for (int j = 0; j < xmlGetChildCount(node); j++) {
HXML child = xmlGetChild(node, j);
- if (!mir_tstrcmpi(xmlGetName(child), _T("icon"))) {
+ if (!mir_tstrcmpi(xmlGetName(child), L"icon")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML imageval = xmlGetChild(child, x);
- if (!mir_tstrcmpi(xmlGetName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -665,7 +665,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
ai.format = ProtoGetAvatarFormat(ext);
TCHAR *filename = szNick;
- mir_sntprintf(ai.filename, _T("%s\\%s.%s"), tszRoot, filename, ext);
+ mir_sntprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);