summaryrefslogtreecommitdiff
path: root/plugins/IEView
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/IEView
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IEView')
-rw-r--r--plugins/IEView/src/HTMLBuilder.cpp18
-rw-r--r--plugins/IEView/src/IEView.cpp4
-rw-r--r--plugins/IEView/src/Options.cpp2
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp14
-rw-r--r--plugins/IEView/src/TextToken.cpp10
-rw-r--r--plugins/IEView/src/ieview_main.cpp2
6 files changed, 25 insertions, 25 deletions
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp
index c43c1dc415..8dd3337a13 100644
--- a/plugins/IEView/src/HTMLBuilder.cpp
+++ b/plugins/IEView/src/HTMLBuilder.cpp
@@ -88,7 +88,7 @@ char* HTMLBuilder::encodeUTF8(MCONTACT hContact, const char *proto, const wchar_
CMStringW str;
encode(hContact, proto, wtext, str, 0, flags, isSent);
- return mir_utf8encodeT(str);
+ return mir_utf8encodeW(str);
}
char* HTMLBuilder::encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int flags, bool isSent)
@@ -104,7 +104,7 @@ char* HTMLBuilder::encodeUTF8(MCONTACT hContact, const char *proto, const char *
if (text == NULL)
return NULL;
- ptrW wtext(mir_a2t_cp(text, cp));
+ ptrW wtext(mir_a2u_cp(text, cp));
return encodeUTF8(hContact, proto, wtext, flags, isSent);
}
@@ -184,11 +184,11 @@ void HTMLBuilder::getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut)
{
hContact = getRealContact(hContact);
- ptrT id(Contact_GetInfo(CNF_UNIQUEID, hContact));
- uinIn = mir_utf8encodeT(id ? id.get() : L"");
+ ptrW id(Contact_GetInfo(CNF_UNIQUEID, hContact));
+ uinIn = mir_utf8encodeW(id ? id.get() : L"");
id = Contact_GetInfo(CNF_UNIQUEID, NULL);
- uinOut = mir_utf8encodeT(id ? id.get() : L"");
+ uinOut = mir_utf8encodeW(id ? id.get() : L"");
}
wchar_t* HTMLBuilder::getContactName(MCONTACT hContact, const char *szProto)
@@ -203,9 +203,9 @@ wchar_t* HTMLBuilder::getContactName(MCONTACT hContact, const char *szProto)
str = pcli->pfnGetContactDisplayName(hContact, 0);
if (str != NULL)
- return mir_tstrdup(str);
+ return mir_wstrdup(str);
- return mir_tstrdup(TranslateT("(Unknown Contact)"));
+ return mir_wstrdup(TranslateT("(Unknown Contact)"));
}
char* HTMLBuilder::getEncodedContactName(MCONTACT hContact, const char* szProto, const char* szSmileyProto)
@@ -302,13 +302,13 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event)
}
else if (dbei.eventType == EVENTTYPE_AUTHREQUEST) {
//blob is: uin(DWORD), hContact(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
- eventData->ptszText = mir_tstrdup(TranslateT(" requested authorization"));
+ eventData->ptszText = mir_wstrdup(TranslateT(" requested authorization"));
eventData->ptszNick = DbGetEventStringT(&dbei, (char *)dbei.pBlob + 8);
eventData->iType = IEED_EVENT_SYSTEM;
}
else if (dbei.eventType == EVENTTYPE_ADDED) {
//blob is: uin(DWORD), hContact(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
- eventData->ptszText = mir_tstrdup(TranslateT(" was added."));
+ eventData->ptszText = mir_wstrdup(TranslateT(" was added."));
eventData->ptszNick = DbGetEventStringT(&dbei, (char *)dbei.pBlob + 8);
eventData->iType = IEED_EVENT_SYSTEM;
}
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp
index adc87feb1b..8a4cddba29 100644
--- a/plugins/IEView/src/IEView.cpp
+++ b/plugins/IEView/src/IEView.cpp
@@ -168,7 +168,7 @@ void IEViewSink::PropertyChange(BSTR) {}
void IEViewSink::BeforeNavigate2(IDispatch*, VARIANT* url, VARIANT*, VARIANT*, VARIANT*, VARIANT*, VARIANT_BOOL* cancel)
{
#ifndef GECKO
- if (mir_tstrcmp(url->bstrVal, L"about:blank"))
+ if (mir_wstrcmp(url->bstrVal, L"about:blank"))
{
Utils_OpenUrlT(url->bstrVal);
*cancel = VARIANT_TRUE;
@@ -989,7 +989,7 @@ void* IEView::getSelection(IEVIEWEVENT *event)
if (event->cbSize >= IEVIEWEVENT_SIZE_V2)
cp = event->codepage;
- char *str = mir_t2a_cp(selectedText, cp);
+ char *str = mir_u2a_cp(selectedText, cp);
mir_free(selectedText);
selectedText = (BSTR)str;
}
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp
index f99da29479..5e055c1cac 100644
--- a/plugins/IEView/src/Options.cpp
+++ b/plugins/IEView/src/Options.cpp
@@ -386,7 +386,7 @@ static void RefreshProtoList(HWND hwndDlg, int mode, bool protoTemplates)
else
CallProtoService(proto->getProtocolName(), PS_GETNAME, sizeof(protoName), (LPARAM)protoName);
- tvi.item.pszText = mir_a2t(protoName);
+ tvi.item.pszText = mir_a2u(protoName);
tvi.item.lParam = (LPARAM)proto;
tvi.item.iImage = i;
tvi.item.iSelectedImage = i;
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index c0712adff6..438fa6f6ef 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.cpp
+++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp
@@ -53,11 +53,11 @@ char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto)
}
}
if (!db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
- if (mir_tstrlen(dbv.ptszVal) > 0) {
+ if (mir_wstrlen(dbv.ptszVal) > 0) {
//wchar_t *ext = wcsrchr(dbv.ptszVal, '.');
if (result == NULL) {
/* relative -> absolute */
- mir_tstrcpy(tmpPath, dbv.ptszVal);
+ mir_wstrcpy(tmpPath, dbv.ptszVal);
if (wcsncmp(tmpPath, L"http://", 7))
PathToAbsoluteT(dbv.ptszVal, tmpPath);
result = tmpPath;
@@ -65,7 +65,7 @@ char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto)
}
db_free(&dbv);
}
- char* res = mir_utf8encodeT(result);
+ char* res = mir_utf8encodeW(result);
Utils::convertPath(res);
return res;
}
@@ -157,7 +157,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr
wchar_t *szNoAvatarPathTmp = wcsrchr(szNoAvatarPath, '\\');
if (szNoAvatarPathTmp != NULL)
*szNoAvatarPathTmp = 0;
- mir_tstrcat(szNoAvatarPath, L"\\noavatar.png");
+ mir_wstrcat(szNoAvatarPath, L"\\noavatar.png");
if (_waccess(szNoAvatarPath, 0) == -1)
mir_snprintf(tempStr, "%snoavatar.jpg", tempBase);
else
@@ -178,7 +178,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr
db_free(&dbv);
}
- ptrT tszNick(Contact_GetInfo(CNF_NICK, event->hContact, szProto));
+ ptrW tszNick(Contact_GetInfo(CNF_NICK, event->hContact, szProto));
if (tszNick != NULL)
szNickIn = encodeUTF8(event->hContact, szRealProto, tszNick, ENF_NAMESMILEYS, true);
@@ -326,7 +326,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event,
wchar_t *szNoAvatarPathTmp = wcsrchr(szNoAvatarPath, '\\');
if (szNoAvatarPathTmp != NULL)
*szNoAvatarPathTmp = 0;
- mir_tstrcat(szNoAvatarPath, L"\\noavatar.png");
+ mir_wstrcat(szNoAvatarPath, L"\\noavatar.png");
if (_waccess(szNoAvatarPath, 0) == -1)
mir_snprintf(tempStr, "%snoavatar.jpg", tempBase);
else
@@ -352,7 +352,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event,
}
}
- ptrT tszNick(Contact_GetInfo(CNF_NICK, event->hContact, szProto));
+ ptrW tszNick(Contact_GetInfo(CNF_NICK, event->hContact, szProto));
if (tszNick != NULL)
szNickIn = encodeUTF8(event->hContact, szRealProto, tszNick, ENF_NAMESMILEYS, true);
diff --git a/plugins/IEView/src/TextToken.cpp b/plugins/IEView/src/TextToken.cpp
index ab3441f5b6..1b77f1efb4 100644
--- a/plugins/IEView/src/TextToken.cpp
+++ b/plugins/IEView/src/TextToken.cpp
@@ -28,7 +28,7 @@ TextToken::TextToken(int _type, const char *_text, int _len)
end = false;
type = _type;
text = mir_strndup(_text, _len);
- wtext = mir_a2t(text);
+ wtext = mir_a2u(text);
link = NULL;
wlink = NULL;
}
@@ -39,8 +39,8 @@ TextToken::TextToken(int _type, const wchar_t *_wtext, int _len)
tag = 0;
end = false;
type = _type;
- wtext = mir_tstrndup(_wtext, _len);
- text = mir_t2a(wtext);
+ wtext = mir_wstrndup(_wtext, _len);
+ text = mir_u2a(wtext);
link = NULL;
wlink = NULL;
}
@@ -58,7 +58,7 @@ void TextToken::setLink(const char *_link)
replaceStr(link, _link);
mir_free(wlink);
- this->wlink = mir_a2t(_link);
+ this->wlink = mir_a2u(_link);
}
void TextToken::setLink(const wchar_t *_link)
@@ -169,7 +169,7 @@ TextToken* TextToken::tokenizeBBCodes(const wchar_t *text, int l)
newTokenType = BBCODE;
newTokenSize = k - i;
if (bbTagArg[j]) {
- wchar_t *urlLink = mir_tstrndup(text + tagArgStart, tagArgEnd - tagArgStart);
+ wchar_t *urlLink = mir_wstrndup(text + tagArgStart, tagArgEnd - tagArgStart);
bbToken->setLink(urlLink);
mir_free(urlLink);
}
diff --git a/plugins/IEView/src/ieview_main.cpp b/plugins/IEView/src/ieview_main.cpp
index ecf69d2561..87997933dd 100644
--- a/plugins/IEView/src/ieview_main.cpp
+++ b/plugins/IEView/src/ieview_main.cpp
@@ -63,7 +63,7 @@ extern "C" int __declspec(dllexport) Load(void)
wchar_t *workingDir = new wchar_t[wdsize];
GetCurrentDirectory(wdsize, workingDir);
Utils::convertPath(workingDir);
- workingDirUtf8 = mir_utf8encodeT(workingDir);
+ workingDirUtf8 = mir_utf8encodeW(workingDir);
delete[] workingDir;
mir_getLP(&pluginInfoEx);