summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-30 21:20:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-30 21:20:14 +0000
commitd9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d (patch)
treea6f925c63bc31e4b4dba301183cc3b429d52d816 /plugins/NewsAggregator
parentce2d4f19e3f810b282eb7d47d470d426ff459e1f (diff)
new sorting functions applied
git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r--plugins/NewsAggregator/Src/CheckFeed.cpp120
-rw-r--r--plugins/NewsAggregator/Src/ExportImport.cpp22
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp20
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp40
4 files changed, 101 insertions, 101 deletions
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp
index deeb313f48..acd2291594 100644
--- a/plugins/NewsAggregator/Src/CheckFeed.cpp
+++ b/plugins/NewsAggregator/Src/CheckFeed.cpp
@@ -35,17 +35,17 @@ TCHAR* CheckFeed(TCHAR *tszURL, HWND hwndDlg)
if (hXml != NULL) {
int childcount = 0;
HXML node;
- if (!lstrcmpi(xi.getName(hXml), _T("xml")))
+ if (!mir_tstrcmpi(xi.getName(hXml), _T("xml")))
node = xi.getChild(hXml, childcount);
else
node = hXml;
while (node) {
LPCTSTR szNodeName = xi.getName(node);
- if (!lstrcmpi(szNodeName, _T("rss")) || !lstrcmpi(szNodeName, _T("rdf"))) {
+ if (!mir_tstrcmpi(szNodeName, _T("rss")) || !mir_tstrcmpi(szNodeName, _T("rdf"))) {
HXML chan = xi.getChild(node, 0);
for (int j = 0; j < xi.getChildCount(chan); j++) {
HXML child = xi.getChild(chan, j);
- if (!lstrcmpi(xi.getName(child), _T("title"))) {
+ if (!mir_tstrcmpi(xi.getName(child), _T("title"))) {
TCHAR mes[MAX_PATH];
mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a valid feed's address."), tszURL);
MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION);
@@ -54,10 +54,10 @@ TCHAR* CheckFeed(TCHAR *tszURL, HWND hwndDlg)
}
}
}
- else if (!lstrcmpi(szNodeName, _T("feed"))) {
+ else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
for (int j = 0; j < xi.getChildCount(node); j++) {
HXML child = xi.getChild(node, j);
- if (!lstrcmpi(xi.getName(child), _T("title"))) {
+ if (!mir_tstrcmpi(xi.getName(child), _T("title"))) {
TCHAR mes[MAX_PATH];
mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a valid feed's address."), tszURL);
MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION);
@@ -140,7 +140,7 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin
if (olddbei.timestamp < (DWORD)stamp)
break;
- if (strlen((char*)olddbei.pBlob) == cbOrigLen && !lstrcmpA((char*)olddbei.pBlob, pszTemp)) {
+ if (strlen((char*)olddbei.pBlob) == cbOrigLen && !mir_strcmp((char*)olddbei.pBlob, pszTemp)) {
MesExist = true;
break;
}
@@ -186,18 +186,18 @@ void CheckCurrentFeed(MCONTACT hContact)
if (hXml != NULL) {
int childcount = 0;
HXML node;
- if (!lstrcmpi(xi.getName(hXml), _T("xml")))
+ if (!mir_tstrcmpi(xi.getName(hXml), _T("xml")))
node = xi.getChild(hXml, childcount);
else
node = hXml;
while (node) {
LPCTSTR szNodeName = xi.getName(node);
- bool isRSS = !lstrcmpi(szNodeName, _T("rss")), isAtom = !lstrcmpi(szNodeName, _T("rdf"));
+ bool isRSS = !mir_tstrcmpi(szNodeName, _T("rss")), isAtom = !mir_tstrcmpi(szNodeName, _T("rdf"));
if (isRSS || isAtom) {
if (isRSS) {
for (int i = 0; i < xi.getAttrCount(node); i++) {
LPCTSTR szAttrName = xi.getAttrName(node, i);
- if (!lstrcmpi(szAttrName, _T("version"))) {
+ if (!mir_tstrcmpi(szAttrName, _T("version"))) {
TCHAR ver[MAX_PATH];
mir_sntprintf(ver, SIZEOF(ver), _T("RSS %s"), xi.getAttrValue(node, szAttrName));
db_set_ts(hContact, MODULE, "MirVer", ver);
@@ -212,17 +212,17 @@ void CheckCurrentFeed(MCONTACT hContact)
for (int j = 0; j < xi.getChildCount(chan); j++) {
HXML child = xi.getChild(chan, j);
LPCTSTR childName = xi.getName(child);
- if (!lstrcmpi(childName, _T("title"))) {
+ if (!mir_tstrcmpi(childName, _T("title"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(childName, _T("link"))) {
+ else if (!mir_tstrcmpi(childName, _T("link"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Homepage", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(childName, _T("description"))) {
+ else if (!mir_tstrcmpi(childName, _T("description"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText) {
ClearText(szValue, szChildText);
@@ -230,30 +230,30 @@ void CheckCurrentFeed(MCONTACT hContact)
db_set_ts(hContact, "CList", "StatusMsg", szValue);
}
}
- else if (!lstrcmpi(childName, _T("language"))) {
+ else if (!mir_tstrcmpi(childName, _T("language"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(childName, _T("managingEditor"))) {
+ else if (!mir_tstrcmpi(childName, _T("managingEditor"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "e-mail", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(childName, _T("category"))) {
+ else if (!mir_tstrcmpi(childName, _T("category"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(childName, _T("copyright"))) {
+ else if (!mir_tstrcmpi(childName, _T("copyright"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_s(hContact, "UserInfo", "MyNotes", _T2A(ClearText(szValue, szChildText)));
}
- else if (!lstrcmpi(childName, _T("image"))) {
+ else if (!mir_tstrcmpi(childName, _T("image"))) {
for (int x = 0; x < xi.getChildCount(child); x++) {
HXML imageval = xi.getChild(child, x);
- if (!lstrcmpi(xi.getName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) {
LPCTSTR url = xi.getText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -281,7 +281,7 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- else if (!lstrcmpi(childName, _T("lastBuildDate"))) {
+ else if (!mir_tstrcmpi(childName, _T("lastBuildDate"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText) {
TCHAR *lastupdtime = (TCHAR *)xi.getText(child);
@@ -295,36 +295,36 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- else if (!lstrcmpi(childName, _T("item"))) {
+ else if (!mir_tstrcmpi(childName, _T("item"))) {
CMString title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xi.getChildCount(child); z++) {
HXML itemval = xi.getChild(child, z);
LPCTSTR itemName = xi.getName(itemval);
// We only use the first tag for now and ignore the rest.
- if (!lstrcmpi(itemName, _T("title")))
+ if (!mir_tstrcmpi(itemName, _T("title")))
ClearText(title, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("link")))
+ else if (!mir_tstrcmpi(itemName, _T("link")))
ClearText(link, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("pubDate")) || !lstrcmpi(itemName, _T("date"))) {
+ else if (!mir_tstrcmpi(itemName, _T("pubDate")) || !mir_tstrcmpi(itemName, _T("date"))) {
if (stamp == 0)
stamp = DateToUnixTime(xi.getText(itemval), 0);
}
- else if (!lstrcmpi(itemName, _T("description")) || !lstrcmpi(itemName, _T("encoded")))
+ else if (!mir_tstrcmpi(itemName, _T("description")) || !mir_tstrcmpi(itemName, _T("encoded")))
ClearText(descr, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("author")) || !lstrcmpi(itemName, _T("creator")))
+ else if (!mir_tstrcmpi(itemName, _T("author")) || !mir_tstrcmpi(itemName, _T("creator")))
ClearText(author, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("comments")))
+ else if (!mir_tstrcmpi(itemName, _T("comments")))
ClearText(comments, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("guid")))
+ else if (!mir_tstrcmpi(itemName, _T("guid")))
ClearText(guid, xi.getText(itemval));
- else if (!lstrcmpi(itemName, _T("category")))
+ else if (!mir_tstrcmpi(itemName, _T("category")))
ClearText(category, xi.getText(itemval));
}
@@ -332,27 +332,27 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- else if (!lstrcmpi(szNodeName, _T("feed"))) {
+ else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
db_set_ts(hContact, MODULE, "MirVer", _T("Atom 3"));
for (int j = 0; j < xi.getChildCount(node); j++) {
HXML child = xi.getChild(node, j);
LPCTSTR szChildName = xi.getName(child);
- if (!lstrcmpi(szChildName, _T("title"))) {
+ if (!mir_tstrcmpi(szChildName, _T("title"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(szChildName, _T("link"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("link"))) {
for (int x = 0; x < xi.getAttrCount(child); x++) {
- if (!lstrcmpi(xi.getAttrName(child, x), _T("rel")))
- if (!lstrcmpi(xi.getAttrValue(child, xi.getAttrName(child, x)), _T("self")))
+ if (!mir_tstrcmpi(xi.getAttrName(child, x), _T("rel")))
+ if (!mir_tstrcmpi(xi.getAttrValue(child, xi.getAttrName(child, x)), _T("self")))
break;
- if (!lstrcmpi(xi.getAttrName(child, x), _T("href")))
+ if (!mir_tstrcmpi(xi.getAttrName(child, x), _T("href")))
db_set_ts(hContact, MODULE, "Homepage", xi.getAttrValue(child, xi.getAttrName(child, x)));
}
}
- else if (!lstrcmpi(szChildName, _T("subtitle"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("subtitle"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText) {
ClearText(szValue, szChildText);
@@ -360,29 +360,29 @@ void CheckCurrentFeed(MCONTACT hContact)
db_set_ts(hContact, "CList", "StatusMsg", szValue);
}
}
- else if (!lstrcmpi(szChildName, _T("language"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("language"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(szChildName, _T("author"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("author"))) {
for (int x = 0; x < xi.getChildCount(child); x++) {
HXML authorval = xi.getChild(child, x);
- if (!lstrcmpi(xi.getName(authorval), _T("email"))) {
+ if (!mir_tstrcmpi(xi.getName(authorval), _T("email"))) {
db_set_ts(hContact, MODULE, "e-mail", xi.getText(authorval));
break;
}
}
}
- else if (!lstrcmpi(szChildName, _T("category"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("category"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
- else if (!lstrcmpi(szChildName, _T("icon"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("icon"))) {
for (int x = 0; x < xi.getChildCount(child); x++) {
HXML imageval = xi.getChild(child, x);
- if (!lstrcmpi(xi.getName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) {
LPCTSTR url = xi.getText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -407,7 +407,7 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- else if (!lstrcmpi(szChildName, _T("updated"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("updated"))) {
LPCTSTR szChildText = xi.getText(child);
if (szChildText) {
TCHAR *lastupdtime = (TCHAR *)szChildText;
@@ -421,57 +421,57 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
}
- else if (!lstrcmpi(szChildName, _T("entry"))) {
+ else if (!mir_tstrcmpi(szChildName, _T("entry"))) {
CMString title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xi.getChildCount(child); z++) {
HXML itemval = xi.getChild(child, z);
LPCTSTR szItemName = xi.getName(itemval);
- if (!lstrcmpi(szItemName, _T("title"))) {
+ if (!mir_tstrcmpi(szItemName, _T("title"))) {
LPCTSTR szItemText = xi.getText(itemval);
if (szItemText)
ClearText(title, szItemText);
}
- else if (!lstrcmpi(szItemName, _T("link"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("link"))) {
for (int x = 0; x < xi.getAttrCount(itemval); x++) {
- if (!lstrcmpi(xi.getAttrName(itemval, x), _T("href"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(itemval, x), _T("href"))) {
ClearText(link, xi.getAttrValue(itemval, xi.getAttrName(itemval, x)));
break;
}
}
}
- else if (!lstrcmpi(szItemName, _T("updated"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("updated"))) {
if (stamp == 0)
stamp = DateToUnixTime(xi.getText(itemval), 0);
}
- else if (!lstrcmpi(szItemName, _T("summary")) || !lstrcmpi(szItemName, _T("content"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("summary")) || !mir_tstrcmpi(szItemName, _T("content"))) {
LPCTSTR szItemText = xi.getText(itemval);
if (szItemText)
ClearText(descr, szItemText);
}
- else if (!lstrcmpi(szItemName, _T("author"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("author"))) {
for (int x = 0; x < xi.getChildCount(itemval); x++) {
HXML authorval = xi.getChild(itemval, x);
- if (!lstrcmpi(xi.getName(authorval), _T("name")) && xi.getText(authorval)) {
+ if (!mir_tstrcmpi(xi.getName(authorval), _T("name")) && xi.getText(authorval)) {
ClearText(author, xi.getText(authorval));
break;
}
}
}
- else if (!lstrcmpi(szItemName, _T("comments"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("comments"))) {
LPCTSTR szItemText = xi.getText(itemval);
if (szItemText)
ClearText(comments, szItemText);
}
- else if (!lstrcmpi(szItemName, _T("id"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("id"))) {
LPCTSTR szItemText = xi.getText(itemval);
if (szItemText)
ClearText(guid, xi.getText(itemval));
}
- else if (!lstrcmpi(szItemName, _T("category"))) {
+ else if (!mir_tstrcmpi(szItemName, _T("category"))) {
for (int x = 0; x < xi.getAttrCount(itemval); x++) {
LPCTSTR szAttrName = xi.getAttrName(itemval, x);
- if (!lstrcmpi(szAttrName, _T("term")) && xi.getText(itemval)) {
+ if (!mir_tstrcmpi(szAttrName, _T("term")) && xi.getText(itemval)) {
ClearText(category, xi.getAttrValue(itemval, szAttrName));
break;
}
@@ -521,14 +521,14 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
HXML node = xi.getChild(hXml, childcount);
while (node) {
LPCTSTR szNodeName = xi.getName(node);
- if (!lstrcmpi(szNodeName, _T("rss")) || !lstrcmpi(szNodeName, _T("rdf"))) {
+ if (!mir_tstrcmpi(szNodeName, _T("rss")) || !mir_tstrcmpi(szNodeName, _T("rdf"))) {
HXML chan = xi.getChild(node, 0);
for (int j = 0; j < xi.getChildCount(chan); j++) {
HXML child = xi.getChild(chan, j);
- if (!lstrcmpi(xi.getName(child), _T("image"))) {
+ if (!mir_tstrcmpi(xi.getName(child), _T("image"))) {
for (int x = 0; x < xi.getChildCount(child); x++) {
HXML imageval = xi.getChild(child, x);
- if (!lstrcmpi(xi.getName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) {
LPCTSTR url = xi.getText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -556,13 +556,13 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
}
}
}
- else if (!lstrcmpi(szNodeName, _T("feed"))) {
+ else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
for (int j = 0; j < xi.getChildCount(node); j++) {
HXML child = xi.getChild(node, j);
- if (!lstrcmpi(xi.getName(child), _T("icon"))) {
+ if (!mir_tstrcmpi(xi.getName(child), _T("icon"))) {
for (int x = 0; x < xi.getChildCount(child); x++) {
HXML imageval = xi.getChild(child, x);
- if (!lstrcmpi(xi.getName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) {
LPCTSTR url = xi.getText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp
index dfcbf68b65..894aebc04e 100644
--- a/plugins/NewsAggregator/Src/ExportImport.cpp
+++ b/plugins/NewsAggregator/Src/ExportImport.cpp
@@ -68,7 +68,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
node = xi.getNextNode(node);
if (node)
break;
- } while (lstrcmpi(xi.getName(node), _T("body")));
+ } while (mir_tstrcmpi(xi.getName(node), _T("body")));
}
}
else if (!xmlUrl && outlineChildsCount)
@@ -77,7 +77,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
TCHAR *text = NULL, *url = NULL, *siteurl = NULL, *group = NULL, *utfgroup = NULL;
BYTE NeedToImport = FALSE;
for (int i = 0; i < outlineAttr; i++) {
- if (!lstrcmpi(xi.getAttrName(node, i), _T("text"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("text"))) {
text = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i))));
if (!text) {
isTextUTF = 0;
@@ -88,14 +88,14 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
for (int i = 0; i < count; i++) {
TCHAR item[MAX_PATH];
SendMessage(FeedsImportList, LB_GETTEXT, i, (LPARAM)item);
- if (!lstrcmpi(item, text)) {
+ if (!mir_tstrcmpi(item, text)) {
NeedToImport = TRUE;
break;
}
}
continue;
}
- if (!lstrcmpi(xi.getAttrName(node, i), _T("xmlUrl"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("xmlUrl"))) {
url = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i))));
if ( !url) {
isURLUTF = 0;
@@ -108,7 +108,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
}
continue;
}
- if (!lstrcmpi(xi.getAttrName(node, i), _T("htmlUrl"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("htmlUrl"))) {
siteurl = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i))));
if ( !siteurl) {
isSiteURLUTF = 0;
@@ -123,9 +123,9 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (NeedToImport) {
HXML parent = xi.getParent(node);
- while (lstrcmpi(xi.getName(parent), _T("body"))) {
+ while (mir_tstrcmpi(xi.getName(parent), _T("body"))) {
for (int i = 0; i < xi.getAttrCount(parent); i++) {
- if (!lstrcmpi(xi.getAttrName(parent, i), _T("text"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(parent, i), _T("text"))) {
if ( !group)
group = (TCHAR *)xi.getAttrValue(parent, xi.getAttrName(parent, i));
else {
@@ -196,7 +196,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (node)
break;
}
- while (lstrcmpi(xi.getName(tmpnode), _T("body")));
+ while (mir_tstrcmpi(xi.getName(tmpnode), _T("body")));
}
}
}
@@ -262,7 +262,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
node = xi.getNextNode(node);
if (node)
break;
- } while (lstrcmpi(xi.getName(node), _T("body")));
+ } while (mir_tstrcmpi(xi.getName(node), _T("body")));
}
}
else if (!xmlUrl && outlineChildsCount)
@@ -270,7 +270,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
else if (xmlUrl) {
TCHAR *text = NULL;
for (int i = 0; i < outlineAttr; i++) {
- if (!lstrcmpi(xi.getAttrName(node, i), _T("text"))) {
+ if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("text"))) {
text = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i))));
if (!text) {
isTextUTF = 0;
@@ -297,7 +297,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
node = xi.getNextNode(node);
if (node)
break;
- } while (lstrcmpi(xi.getName(tmpnode), _T("body")));
+ } while (mir_tstrcmpi(xi.getName(tmpnode), _T("body")));
}
}
}
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index 8a0293c4ba..198b78d701 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -44,7 +44,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK);
break;
}
- if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) {
+ if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || mir_tstrcmp(str, _T("http://")) == 0) {
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
break;
}
@@ -115,7 +115,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR tszURL[MAX_PATH] = { 0 }, *tszTitle = NULL;
- if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0)
+ if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0)
tszTitle = CheckFeed(tszURL, hwndDlg);
else
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
@@ -156,14 +156,14 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (dbNick == NULL)
continue;
- if (lstrcmp(dbNick, SelItem.nick) != 0)
+ if (mir_tstrcmp(dbNick, SelItem.nick) != 0)
continue;
ptrT dbURL(db_get_tsa(hContact, MODULE, "URL"));
if (dbURL == NULL)
continue;
- if (lstrcmp(dbURL, SelItem.url) != 0)
+ if (mir_tstrcmp(dbURL, SelItem.url) != 0)
continue;
nSelItem->hContact = hContact;
@@ -208,7 +208,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK);
break;
}
- if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) {
+ if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || mir_tstrcmp(str, _T("http://")) == 0) {
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
break;
}
@@ -278,7 +278,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case IDC_DISCOVERY:
TCHAR tszURL[MAX_PATH] = { 0 };
- if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) {
+ if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) {
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg);
@@ -365,7 +365,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK);
break;
}
- if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) {
+ if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || mir_tstrcmp(str, _T("http://")) == 0) {
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
break;
}
@@ -433,7 +433,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case IDC_DISCOVERY:
TCHAR tszURL[MAX_PATH] = { 0 };
- if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) {
+ if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) {
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg);
@@ -502,13 +502,13 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
ptrT dbNick(db_get_tsa(hContact, MODULE, "Nick"));
if (dbNick == NULL)
break;
- if (lstrcmp(dbNick, nick))
+ if (mir_tstrcmp(dbNick, nick))
continue;
ptrT dbURL(db_get_tsa(hContact, MODULE, "URL"));
if (dbURL == NULL)
break;
- if (lstrcmp(dbURL, url))
+ if (mir_tstrcmp(dbURL, url))
continue;
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index cb85c4da41..1c7c1dba88 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -216,35 +216,35 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType)
int day, month, year, hour, min, sec, timezoneh, timezonem;
if (_tcsstr(p, _T(","))) {
_stscanf(p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
- if (!lstrcmpi(monthstr, _T("Jan")))
+ if (!mir_tstrcmpi(monthstr, _T("Jan")))
month = 1;
- if (!lstrcmpi(monthstr, _T("Feb")))
+ if (!mir_tstrcmpi(monthstr, _T("Feb")))
month = 2;
- if (!lstrcmpi(monthstr, _T("Mar")))
+ if (!mir_tstrcmpi(monthstr, _T("Mar")))
month = 3;
- if (!lstrcmpi(monthstr, _T("Apr")))
+ if (!mir_tstrcmpi(monthstr, _T("Apr")))
month = 4;
- if (!lstrcmpi(monthstr, _T("May")))
+ if (!mir_tstrcmpi(monthstr, _T("May")))
month = 5;
- if (!lstrcmpi(monthstr, _T("Jun")))
+ if (!mir_tstrcmpi(monthstr, _T("Jun")))
month = 6;
- if (!lstrcmpi(monthstr, _T("Jul")))
+ if (!mir_tstrcmpi(monthstr, _T("Jul")))
month = 7;
- if (!lstrcmpi(monthstr, _T("Aug")))
+ if (!mir_tstrcmpi(monthstr, _T("Aug")))
month = 8;
- if (!lstrcmpi(monthstr, _T("Sep")))
+ if (!mir_tstrcmpi(monthstr, _T("Sep")))
month = 9;
- if (!lstrcmpi(monthstr, _T("Oct")))
+ if (!mir_tstrcmpi(monthstr, _T("Oct")))
month = 10;
- if (!lstrcmpi(monthstr, _T("Nov")))
+ if (!mir_tstrcmpi(monthstr, _T("Nov")))
month = 11;
- if (!lstrcmpi(monthstr, _T("Dec")))
+ if (!mir_tstrcmpi(monthstr, _T("Dec")))
month = 12;
if (year < 2000)
year += 2000;
- if (!lstrcmp(timezonesign, _T("+")))
+ if (!mir_tstrcmp(timezonesign, _T("+")))
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec);
- else if (!lstrcmp(timezonesign, _T("-")))
+ else if (!mir_tstrcmp(timezonesign, _T("-")))
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour+timezoneh, min+timezonem, sec);
else
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec);
@@ -256,9 +256,9 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType)
else
{
_stscanf(p, _T("%d-%d-%d %d:%d:%d %1s%02d%02d"), &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
- if (!lstrcmp(timezonesign, _T("+")))
+ if (!mir_tstrcmp(timezonesign, _T("+")))
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec);
- else if (!lstrcmp(timezonesign, _T("-")))
+ else if (!mir_tstrcmp(timezonesign, _T("-")))
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour+timezoneh, min+timezonem, sec);
else
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec);
@@ -420,11 +420,11 @@ bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal)
if ((200 == pReply->resultCode) && (pReply->dataLength > 0)) {
char *date = NULL, *size = NULL;
for (int i = 0; i < pReply->headersCount; i++) {
- if (!lstrcmpiA(pReply->headers[i].szName, "Last-Modified")) {
+ if (!mir_strcmpi(pReply->headers[i].szName, "Last-Modified")) {
date = pReply->headers[i].szValue;
continue;
}
- else if (!lstrcmpiA(pReply->headers[i].szName, "Content-Length")) {
+ else if (!mir_strcmpi(pReply->headers[i].szName, "Content-Length")) {
size = pReply->headers[i].szValue;
continue;
}
@@ -581,7 +581,7 @@ MCONTACT GetContactByNick(const TCHAR *nick)
for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
ptrW contactNick(::db_get_wsa(hContact, MODULE, "Nick"));
- if (!lstrcmpi(contactNick, nick))
+ if (!mir_tstrcmpi(contactNick, nick))
break;
}
return hContact;
@@ -593,7 +593,7 @@ MCONTACT GetContactByURL(const TCHAR *url)
for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
ptrW contactURL(::db_get_wsa(hContact, MODULE, "URL"));
- if (!lstrcmpi(contactURL, url))
+ if (!mir_tstrcmpi(contactURL, url))
break;
}
return hContact;