summaryrefslogtreecommitdiff
path: root/plugins/PasteIt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PasteIt')
-rw-r--r--plugins/PasteIt/src/Options.cpp4
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp4
-rw-r--r--plugins/PasteIt/src/PasteToWeb.cpp8
-rw-r--r--plugins/PasteIt/src/PasteToWeb1.cpp4
-rw-r--r--plugins/PasteIt/src/PasteToWeb2.cpp6
5 files changed, 13 insertions, 13 deletions
diff --git a/plugins/PasteIt/src/Options.cpp b/plugins/PasteIt/src/Options.cpp
index 628fdd9182..8efd3d1174 100644
--- a/plugins/PasteIt/src/Options.cpp
+++ b/plugins/PasteIt/src/Options.cpp
@@ -646,7 +646,7 @@ void Options::InitCodepageCB(HWND hwndCB, unsigned int codepage)
if (selCpIdx == -1) {
wchar_t buf[10];
- mir_sntprintf(buf, L"%d", codepage);
+ mir_snwprintf(buf, L"%d", codepage);
ComboBox_SetText(hwndCB, buf);
}
else {
@@ -667,7 +667,7 @@ void Options::SetCodepageCB(HWND hwndCB, unsigned int codepage)
if (selCpIdx == -1) {
wchar_t buf[10];
- mir_sntprintf(buf, L"%d", codepage);
+ mir_snwprintf(buf, L"%d", codepage);
ComboBox_SetText(hwndCB, buf);
}
else {
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 6c96d4d1ba..fe85a759c3 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -71,8 +71,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
std::wstring GetFile()
{
wchar_t filter[512];
- mir_tstrncpy(filter, TranslateT("All Files (*.*)"), _countof(filter));
- memcpy(filter + mir_tstrlen(filter), L"\0*.*\0", 6 * sizeof(wchar_t));
+ mir_wstrncpy(filter, TranslateT("All Files (*.*)"), _countof(filter));
+ memcpy(filter + mir_wstrlen(filter), L"\0*.*\0", 6 * sizeof(wchar_t));
wchar_t stzFilePath[1024];
stzFilePath[0] = 0;
stzFilePath[1] = 0;
diff --git a/plugins/PasteIt/src/PasteToWeb.cpp b/plugins/PasteIt/src/PasteToWeb.cpp
index 8e0cecb447..3e62035de1 100644
--- a/plugins/PasteIt/src/PasteToWeb.cpp
+++ b/plugins/PasteIt/src/PasteToWeb.cpp
@@ -384,7 +384,7 @@ void PasteToWeb::FromFile(std::wstring file)
{
if (fileSize.QuadPart > 512000LL)
{
- mir_sntprintf(bufErr, TranslateT("File size is %d KB, do you really want to paste such a large file?"), fileSize.LowPart / 1024);
+ mir_snwprintf(bufErr, TranslateT("File size is %d KB, do you really want to paste such a large file?"), fileSize.LowPart / 1024);
if (MessageBox(NULL, bufErr, TranslateT("Are You sure?"), MB_YESNO | MB_ICONQUESTION) != IDYES)
{
CloseHandle(hFile);
@@ -399,7 +399,7 @@ void PasteToWeb::FromFile(std::wstring file)
mir_free(fromFileData.content);
fromFileData.content = NULL;
fromFileData.contentLen = 0;
- mir_sntprintf(bufErr, TranslateT("Cannot read file '%s'"), file.c_str());
+ mir_snwprintf(bufErr, TranslateT("Cannot read file '%s'"), file.c_str());
error = bufErr;
}
}
@@ -413,7 +413,7 @@ void PasteToWeb::FromFile(std::wstring file)
}
else
{
- mir_sntprintf(bufErr, TranslateT("Cannot open file '%s'"), file.c_str());
+ mir_snwprintf(bufErr, TranslateT("Cannot open file '%s'"), file.c_str());
error = bufErr;
}
@@ -491,7 +491,7 @@ void PasteToWeb::FromFile(std::wstring file)
}
else
{
- mir_sntprintf(bufErr, TranslateT("File '%s' is empty"), file.c_str());
+ mir_snwprintf(bufErr, TranslateT("File '%s' is empty"), file.c_str());
error = bufErr;
}
mir_free(fromFileData.content);
diff --git a/plugins/PasteIt/src/PasteToWeb1.cpp b/plugins/PasteIt/src/PasteToWeb1.cpp
index 73b4b77667..a7de2c10fc 100644
--- a/plugins/PasteIt/src/PasteToWeb1.cpp
+++ b/plugins/PasteIt/src/PasteToWeb1.cpp
@@ -304,7 +304,7 @@ void PasteToWeb1::SendToServer(std::wstring str, std::wstring fileName, std::wst
{
if (memcmp(L"Bad API request, ", resCont, 17 * sizeof(wchar_t)) == 0)
{
- mir_sntprintf(bufErr, TranslateT("Error during sending text to web page: %s"), resCont + 17);
+ mir_snwprintf(bufErr, TranslateT("Error during sending text to web page: %s"), resCont + 17);
error = bufErr;
}
else
@@ -336,7 +336,7 @@ std::wstring PasteToWeb1::GetUserKey(std::wstring& user, std::wstring& password)
{
if (memcmp(L"Bad API request, ", resCont, 17 * sizeof(wchar_t)) == 0)
{
- mir_sntprintf(bufErr, TranslateT("Error during getting user key from web page: %s"), resCont + 17);
+ mir_snwprintf(bufErr, TranslateT("Error during getting user key from web page: %s"), resCont + 17);
MessageBox(NULL, bufErr, TranslateT("Error"), MB_OK | MB_ICONERROR);
}
else
diff --git a/plugins/PasteIt/src/PasteToWeb2.cpp b/plugins/PasteIt/src/PasteToWeb2.cpp
index f9645ee447..a5843149a3 100644
--- a/plugins/PasteIt/src/PasteToWeb2.cpp
+++ b/plugins/PasteIt/src/PasteToWeb2.cpp
@@ -109,7 +109,7 @@ void PasteToWeb2::SendToServer(std::wstring str, std::wstring fileName, std::wst
if (hXml != NULL)
{
HXML node = xmlGetChildByPath(hXml, L"params/param/value/array/data/value/int", 0);
- if (node != NULL && !mir_tstrcmp(xmlGetText(node), L"1"))
+ if (node != NULL && !mir_wstrcmp(xmlGetText(node), L"1"))
{
node = xmlGetChildByPath(hXml, L"params/param/value/array/data", 0);
if (node != NULL)
@@ -120,7 +120,7 @@ void PasteToWeb2::SendToServer(std::wstring str, std::wstring fileName, std::wst
node = xmlGetChildByPath(node, L"string", 0);
if (node != NULL)
{
- char* s = mir_t2a_cp(xmlGetText(node), CP_ACP);
+ char* s = mir_u2a_cp(xmlGetText(node), CP_ACP);
mir_strncpy(szFileLink, s, _countof(szFileLink));
mir_free(s);
error = NULL;
@@ -149,7 +149,7 @@ std::list<PasteFormat> PasteToWeb2::GetFormats()
if (hXml != NULL)
{
HXML node = xmlGetChildByPath(hXml, L"params/param/value/array/data/value/int", 0);
- if (node != NULL && !mir_tstrcmp(xmlGetText(node), L"1"))
+ if (node != NULL && !mir_wstrcmp(xmlGetText(node), L"1"))
{
node = xmlGetChildByPath(hXml, L"params/param/value/array/data", 0);
if (node != NULL)