summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus/src
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/SendScreenshotPlus/src
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus/src')
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.cpp26
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.h6
-rw-r--r--plugins/SendScreenshotPlus/src/CSendEmail.cpp8
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp6
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp6
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp6
-rw-r--r--plugins/SendScreenshotPlus/src/UAboutForm.cpp10
-rw-r--r--plugins/SendScreenshotPlus/src/UMainForm.cpp26
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.cpp16
-rw-r--r--plugins/SendScreenshotPlus/src/dlg_msgbox.cpp10
11 files changed, 61 insertions, 61 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp
index cfbbb32b07..ac1082df93 100644
--- a/plugins/SendScreenshotPlus/src/CSend.cpp
+++ b/plugins/SendScreenshotPlus/src/CSend.cpp
@@ -94,7 +94,7 @@ INT_PTR CALLBACK CSend::ResultDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
Window_SetIcon_IcoLib(hwndDlg, GetIconHandle(ICO_MAIN));
{
CSend* self = (CSend*)lParam;
- wchar_t* tmp = mir_tstrdup(TranslateT("Resulting URL from\n"));
+ wchar_t* tmp = mir_wstrdup(TranslateT("Resulting URL from\n"));
mir_tstradd(tmp, self->m_pszSendTyp);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, tmp);
mir_free(tmp);
@@ -189,7 +189,7 @@ INT_PTR CALLBACK CSend::ResultDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
EmptyClipboard();
HGLOBAL clipbuffer = GlobalAlloc(GMEM_MOVEABLE, len*sizeof(wchar_t) + sizeof(wchar_t));
wchar_t* tmp2 = (wchar_t*)GlobalLock(clipbuffer);
- mir_tstrncpy(tmp2, tmp, len + 1); tmp2[len] = '\0';
+ mir_wstrncpy(tmp2, tmp, len + 1); tmp2[len] = '\0';
GlobalUnlock(clipbuffer);
SetClipboardData(CF_UNICODETEXT, clipbuffer);
CloseClipboard();
@@ -211,11 +211,11 @@ void CSend::svcSendMsgExit(const char* szMessage)
}
if (!m_hContact) {
if (!m_pszFileDesc)
- m_pszFileDesc = mir_a2t(szMessage);
+ m_pszFileDesc = mir_a2u(szMessage);
Exit(CSEND_DIALOG); return;
}
if (m_ChatRoom) {
- wchar_t* tmp = mir_a2t(szMessage);
+ wchar_t* tmp = mir_a2u(szMessage);
if (m_pszFileDesc) {
mir_tstradd(tmp, L"\r\n");
mir_tstradd(tmp, m_pszFileDesc);
@@ -252,7 +252,7 @@ void CSend::svcSendMsgExit(const char* szMessage)
memset(m_szEventMsg, 0, (sizeof(char) * m_cbEventMsg));
mir_strcpy(m_szEventMsg, szMessage);
if (m_pszFileDesc && m_pszFileDesc[0] != NULL) {
- char *temp = mir_t2a(m_pszFileDesc);
+ char *temp = mir_u2a(m_pszFileDesc);
mir_stradd(m_szEventMsg, "\r\n");
mir_stradd(m_szEventMsg, temp);
m_cbEventMsg = (DWORD)mir_strlen(m_szEventMsg) + 1;
@@ -286,13 +286,13 @@ void CSend::svcSendFileExit()
Exit(ACKRESULT_FAILED); return;
}
mir_freeAndNil(m_szEventMsg);
- char* szFile = mir_t2a(m_pszFile);
+ char* szFile = mir_u2a(m_pszFile);
m_cbEventMsg = (DWORD)mir_strlen(szFile) + 2;
m_szEventMsg = (char*)mir_realloc(m_szEventMsg, (sizeof(char) * m_cbEventMsg));
memset(m_szEventMsg, 0, (sizeof(char) * m_cbEventMsg));
mir_strcpy(m_szEventMsg, szFile);
if (m_pszFileDesc && m_pszFileDesc[0] != NULL) {
- char* temp = mir_t2a(m_pszFileDesc);
+ char* temp = mir_u2a(m_pszFileDesc);
m_cbEventMsg += (DWORD)mir_strlen(temp);
m_szEventMsg = (char*)mir_realloc(m_szEventMsg, sizeof(char)*m_cbEventMsg);
mir_strcpy(m_szEventMsg + mir_strlen(szFile) + 1, temp);
@@ -308,8 +308,8 @@ void CSend::svcSendFileExit()
// Start miranda PSS_FILE based on mir ver (T)
wchar_t* ppFile[2] = { 0, 0 };
- wchar_t* pDesc = mir_tstrdup(m_pszFileDesc);
- ppFile[0] = mir_tstrdup(m_pszFile);
+ wchar_t* pDesc = mir_wstrdup(m_pszFileDesc);
+ ppFile[0] = mir_wstrdup(m_pszFile);
ppFile[1] = NULL;
m_hSend = (HANDLE)ProtoChainSend(m_hContact, PSS_FILE, (WPARAM)pDesc, (LPARAM)ppFile);
mir_free(pDesc);
@@ -399,14 +399,14 @@ void CSend::Error(LPCTSTR pszFormat, ...)
{
wchar_t tszMsg[MAX_SECONDLINE];
- mir_sntprintf(tszMsg, L"%s - %s", _A2W(SZ_SENDSS), TranslateT("Error"));
- mir_free(m_ErrorTitle), m_ErrorTitle = mir_tstrdup(tszMsg);
+ mir_snwprintf(tszMsg, L"%s - %s", _A2W(SZ_SENDSS), TranslateT("Error"));
+ mir_free(m_ErrorTitle), m_ErrorTitle = mir_wstrdup(tszMsg);
va_list vl;
va_start(vl, pszFormat);
- mir_vsntprintf(tszMsg, _countof(tszMsg), TranslateTS(pszFormat), vl);
+ mir_vsnwprintf(tszMsg, _countof(tszMsg), TranslateTS(pszFormat), vl);
va_end(vl);
- mir_free(m_ErrorMsg), m_ErrorMsg = mir_tstrdup(tszMsg);
+ mir_free(m_ErrorMsg), m_ErrorMsg = mir_wstrdup(tszMsg);
memset(&m_box, 0, sizeof(MSGBOX));
m_box.cbSize = sizeof(MSGBOX);
diff --git a/plugins/SendScreenshotPlus/src/CSend.h b/plugins/SendScreenshotPlus/src/CSend.h
index 293e34f077..3c5362be3f 100644
--- a/plugins/SendScreenshotPlus/src/CSend.h
+++ b/plugins/SendScreenshotPlus/src/CSend.h
@@ -56,9 +56,9 @@ class CSend {
virtual int Send() = NULL; // returns 1 if sent (you must delete class) and 0 when still sending (class deletes itself)
int SendSilent() {m_bAsync=m_bSilent=true; return Send();};
- void SetFile(wchar_t* file){mir_free(m_pszFile), m_pszFile=mir_tstrdup(file);};
- void SetFile(char* file){mir_free(m_pszFile), m_pszFile=mir_a2t(file);};
- void SetDescription(wchar_t* descr){mir_free(m_pszFileDesc), m_pszFileDesc=mir_tstrdup(descr);};
+ void SetFile(wchar_t* file){mir_free(m_pszFile), m_pszFile=mir_wstrdup(file);};
+ void SetFile(char* file){mir_free(m_pszFile), m_pszFile=mir_a2u(file);};
+ void SetDescription(wchar_t* descr){mir_free(m_pszFileDesc), m_pszFileDesc=mir_wstrdup(descr);};
void SetContact(MCONTACT hContact);
char* GetURL(){return m_URL;};
char* GetURLthumbnail(){return m_URLthumb;};
diff --git a/plugins/SendScreenshotPlus/src/CSendEmail.cpp b/plugins/SendScreenshotPlus/src/CSendEmail.cpp
index dc91c4a867..9b8eb752d3 100644
--- a/plugins/SendScreenshotPlus/src/CSendEmail.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendEmail.cpp
@@ -61,11 +61,11 @@ int CSendEmail::Send()
m_pszFileName = GetFileNameA(m_pszFile);
mir_free(m_pszFileA);
- m_pszFileA = mir_t2a(m_pszFile);
+ m_pszFileA = mir_u2a(m_pszFile);
- m_Email = mir_t2a(ptrT(Contact_GetInfo(CNF_EMAIL, m_hContact, m_pszProto)));
- m_FriendlyName = mir_t2a(ptrT(Contact_GetInfo(CNF_DISPLAY, m_hContact, m_pszProto)));
- m_Subject = mir_t2a(m_pszFileDesc);
+ m_Email = mir_u2a(ptrW(Contact_GetInfo(CNF_EMAIL, m_hContact, m_pszProto)));
+ m_FriendlyName = mir_u2a(ptrW(Contact_GetInfo(CNF_DISPLAY, m_hContact, m_pszProto)));
+ m_Subject = mir_u2a(m_pszFileDesc);
//SendByEmail(m_pszFileA, "", m_FriendlyName, m_Email, m_Subject);
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
index 870ae89f82..559efceaae 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
@@ -50,7 +50,7 @@ int CSendHost_ImageShack::Send()
return !m_bAsync;
}
memset(&m_nlhr, 0, sizeof(m_nlhr));
- char* tmp; tmp = mir_t2a(m_pszFile);
+ char* tmp; tmp = mir_u2a(m_pszFile);
HTTPFormData frm[] = {
// {"Referer",HTTPFORM_HEADER("http://www.imageshack.us/upload_api.php")},
{ "fileupload", HTTPFORM_FILE(tmp) },
@@ -101,10 +101,10 @@ void CSendHost_ImageShack::SendThread()
else {/// check error mess from server
url = GetHTMLContent(reply->pData, "<error ", "</error>");
wchar_t* err = NULL;
- if (url) err = mir_a2t(url);
+ if (url) err = mir_a2u(url);
if (!err || !*err) {/// fallback to server response mess
mir_free(err);
- err = mir_a2t(reply->pData);
+ err = mir_a2u(reply->pData);
}
Error(L"%s", err);
mir_free(err);
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
index a6eb7c6e57..e87cc78e3f 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
@@ -35,7 +35,7 @@ int CSendHost_Imgur::Send()
return !m_bAsync;
}
memset(&m_nlhr, 0, sizeof(m_nlhr));
- char* tmp; tmp = mir_t2a(m_pszFile);
+ char* tmp; tmp = mir_u2a(m_pszFile);
HTTPFormData frm[] = {
{ "Authorization", HTTPFORM_HEADER("Client-ID 2a7303d78abe041") },
{ "image", HTTPFORM_FILE(tmp) },
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
index 68232006ce..731bdc08f2 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
@@ -35,7 +35,7 @@ int CSendHost_UploadPie::Send()
return !m_bAsync;
}
memset(&m_nlhr, 0, sizeof(m_nlhr));
- char* tmp; tmp = mir_t2a(m_pszFile);
+ char* tmp; tmp = mir_u2a(m_pszFile);
HTTPFormData frm[] = {
{ "MAX_FILE_SIZE", HTTPFORM_INT(3145728) },// ??
{ "upload", HTTPFORM_INT(1) },// ??
@@ -93,8 +93,8 @@ void CSendHost_UploadPie::SendThread(void* obj)
else {/// check error mess from server
const char* err = GetHTMLContent(reply->pData, "<p id=\"error\"", "</p>");
wchar_t* werr;
- if (err) werr = mir_a2t(err);
- else werr = mir_a2t(reply->pData);
+ if (err) werr = mir_a2u(err);
+ else werr = mir_a2u(reply->pData);
self->Error(L"%s", werr);
mir_free(werr);
}
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index c2db7bff90..dd1e9f5111 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -75,7 +75,7 @@ wchar_t* GetCustomPath()
wchar_t szPath[1024] = { 0 };
FoldersGetCustomPathT(m_hFolderScreenshot, szPath, 1024, pszPath);
mir_free(pszPath);
- pszPath = mir_tstrdup(szPath);
+ pszPath = mir_wstrdup(szPath);
}
if (!pszPath) {
MessageBox(NULL, L"Can not retrieve screenshot path.", L"SendSS", MB_OK | MB_ICONERROR | MB_APPLMODAL);
@@ -84,7 +84,7 @@ wchar_t* GetCustomPath()
int result = CreateDirectoryTreeT(pszPath);
if (result) {
wchar_t szError[MAX_PATH];
- mir_sntprintf(szError, MAX_PATH, TranslateT("Could not create screenshot folder (error code: %d):\n%s\nDo you have write permissions?"), result, pszPath);
+ mir_snwprintf(szError, MAX_PATH, TranslateT("Could not create screenshot folder (error code: %d):\n%s\nDo you have write permissions?"), result, pszPath);
MessageBox(NULL, szError, L"SendSS", MB_OK | MB_ICONERROR | MB_APPLMODAL);
mir_free(pszPath);
return 0;
@@ -194,7 +194,7 @@ INT_PTR service_Send2ImageShack(WPARAM wParam, LPARAM lParam)
result = mir_strdup(cSend->GetURL());
}
else {
- result = mir_t2a(cSend->GetErrorMsg());
+ result = mir_u2a(cSend->GetErrorMsg());
}
delete cSend;
return (INT_PTR)result;
diff --git a/plugins/SendScreenshotPlus/src/UAboutForm.cpp b/plugins/SendScreenshotPlus/src/UAboutForm.cpp
index ae216cbbcd..2ef1e9470c 100644
--- a/plugins/SendScreenshotPlus/src/UAboutForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UAboutForm.cpp
@@ -102,7 +102,7 @@ LRESULT TfrmAbout::wmInitdialog(WPARAM, LPARAM)
char* data = (char*)mir_alloc(size + 1);
memcpy(data, LockResource(LoadResource(g_hSendSS, hRes)), size);
data[size] = '\0';
- wchar_t* pszCopyright = mir_a2t(data);
+ wchar_t* pszCopyright = mir_a2u(data);
mir_free(data);
mir_tstradd(pszText, pszCopyright);
mir_free(pszCopyright);
@@ -117,7 +117,7 @@ LRESULT TfrmAbout::wmInitdialog(WPARAM, LPARAM)
char* data = (char*)mir_alloc(size + 1);
memcpy(data, LockResource(LoadResource(g_hSendSS, hRes)), size);
data[size] = '\0';
- wchar_t* pszText = mir_a2t(data);
+ wchar_t* pszText = mir_a2u(data);
mir_free(data);
SetDlgItemText(m_hWnd, IDC_CREDIT, pszText);
mir_free(pszText);
@@ -203,9 +203,9 @@ void TfrmAbout::btnPageClick()
}
SetWindowText(hCtrl, button);
wchar_t newTitle[128];
- wchar_t* pszPlug = mir_a2t(__PLUGIN_NAME);
- wchar_t* pszVer = mir_a2t(__VERSION_STRING_DOTS);
- mir_sntprintf(newTitle, L"%s - %s\nv%s", pszPlug, title, pszVer);
+ wchar_t* pszPlug = mir_a2u(__PLUGIN_NAME);
+ wchar_t* pszVer = mir_a2u(__VERSION_STRING_DOTS);
+ mir_snwprintf(newTitle, L"%s - %s\nv%s", pszPlug, title, pszVer);
mir_free(pszPlug);
mir_free(pszVer);
SetDlgItemText(m_hWnd, IDC_HEADERBAR, newTitle);
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp
index 765cbfc410..9d7ac40e04 100644
--- a/plugins/SendScreenshotPlus/src/UMainForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp
@@ -175,7 +175,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
/// Taskbar and Window icon
Window_SetIcon_IcoLib(m_hWnd, GetIconHandle(ICO_MAIN));
- wchar_t *pt = mir_tstrdup(pcli->pfnGetContactDisplayName(m_hContact, 0));
+ wchar_t *pt = mir_wstrdup(pcli->pfnGetContactDisplayName(m_hContact, 0));
if (pt && (m_hContact != 0)) {
CMString string;
string.AppendFormat(TranslateT("Send screenshot to %s"), pt);
@@ -240,7 +240,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
if (m_MonitorCount > 1) {
wchar_t tszTemp[120];
for (size_t mon = 0; mon < m_MonitorCount; ++mon) { /// @todo : fix format for non MSVC compilers
- mir_sntprintf(tszTemp, L"%Iu. %s%s",
+ mir_snwprintf(tszTemp, L"%Iu. %s%s",
mon + 1, TranslateT("Monitor"),
(m_Monitors[mon].dwFlags & MONITORINFOF_PRIMARY) ? TranslateT(" (primary)") : L""
);
@@ -783,7 +783,7 @@ void TfrmMain::SaveOptions(void)
//---------------------------------------------------------------------------
void TfrmMain::Init(wchar_t* DestFolder, MCONTACT Contact)
{
- m_FDestFolder = mir_tstrdup(DestFolder);
+ m_FDestFolder = mir_wstrdup(DestFolder);
m_hContact = Contact;
// create window
@@ -810,7 +810,7 @@ void TfrmMain::btnCaptureClick()
return;
}
fclose(fp);
- mir_free(m_pszFile); m_pszFile = mir_tstrdup(filename);
+ mir_free(m_pszFile); m_pszFile = mir_wstrdup(filename);
}
else if (!m_hTargetWindow) {
wchar_t *err = TranslateT("Select a target window.");
@@ -944,8 +944,8 @@ void TfrmMain::edtSizeUpdate(HWND hWnd, BOOL ClientArea, HWND hTarget, UINT Ctrl
_itow(rect.right - rect.left, B, 10);
// _itow_s(rect.bottom - rect.top, H, 16, 10);
_itow(rect.bottom - rect.top, H, 10);
- mir_tstrncat(B, L"x", _countof(B) - mir_tstrlen(B));
- mir_tstrncat(B, H, _countof(B) - mir_tstrlen(B));
+ mir_wstrncat(B, L"x", _countof(B) - mir_wstrlen(B));
+ mir_wstrncat(B, H, _countof(B) - mir_wstrlen(B));
SetDlgItemText(hTarget, Ctrl, B);
}
@@ -956,8 +956,8 @@ void TfrmMain::edtSizeUpdate(RECT rect, HWND hTarget, UINT Ctrl)
_itow(ABS(rect.right - rect.left), B, 10);
// _itow_s(ABS(rect.bottom - rect.top), H, 16, 10);
_itow(ABS(rect.bottom - rect.top), H, 10);
- mir_tstrncat(B, L"x", _countof(B) - mir_tstrlen(B));
- mir_tstrncat(B, H, _countof(B) - mir_tstrlen(B));
+ mir_wstrncat(B, L"x", _countof(B) - mir_wstrlen(B));
+ mir_wstrncat(B, H, _countof(B) - mir_wstrlen(B));
SetDlgItemText(hTarget, Ctrl, B);
}
@@ -975,11 +975,11 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
if (FileNumber > 99999) FileNumber = 1;
//Generate FileName
mir_tstradd(path, m_FDestFolder);
- if (path[mir_tstrlen(path) - 1] != '\\') mir_tstradd(path, L"\\");
+ if (path[mir_wstrlen(path) - 1] != '\\') mir_tstradd(path, L"\\");
mir_tstradd(path, L"shot%.5u");//on format change, adapt "len" below
- size_t len = mir_tstrlen(path) + 2;
+ size_t len = mir_wstrlen(path) + 2;
pszFilename = (wchar_t*)mir_alloc(sizeof(wchar_t)*(len));
- mir_sntprintf(pszFilename, len, path, FileNumber);
+ mir_snwprintf(pszFilename, len, path, FileNumber);
mir_free(path);
//Generate a description according to the screenshot
@@ -1103,7 +1103,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
//wchar_t* pszFormat = (wchar_t*)ComboBox_GetItemData(hwndCombo, ComboBox_GetCurSel(hwndCombo));
wchar_t pszFormat[6];
ComboBox_GetText(hwndCombo, pszFormat, 6);
- if(ret && (mir_tstrcmpi (pszFormat,L"png") != 0)) {
+ if(ret && (mir_wstrcmpi (pszFormat,L"png") != 0)) {
fif = FIP->FI_GetFIFFromFilenameU(ret);
dib_new = FIP->FI_LoadU(fif, ret,0);
@@ -1130,7 +1130,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
}
else {
mir_free(pszFileDesc);
- m_pszFileDesc = mir_tstrdup(L"");
+ m_pszFileDesc = mir_wstrdup(L"");
}
if (m_cSend) {
diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp
index 260631038f..21b70fc890 100644
--- a/plugins/SendScreenshotPlus/src/Utils.cpp
+++ b/plugins/SendScreenshotPlus/src/Utils.cpp
@@ -343,15 +343,15 @@ wchar_t* GetFileNameW(const wchar_t* pszPath)
const wchar_t* slash = wcsrchr(pszPath, '\\');
if (!slash) slash = wcsrchr(pszPath, '/');
if (slash)
- return mir_t2u(slash + 1);
+ return mir_wstrdup(slash + 1);
else
- return mir_t2u(pszPath);
+ return mir_wstrdup(pszPath);
}
wchar_t* GetFileExtW(const wchar_t* pszPath)
{
const wchar_t* slash = wcsrchr(pszPath, '.');
if (slash)
- return mir_t2u(slash);
+ return mir_wstrdup(slash);
return NULL;
}
@@ -360,15 +360,15 @@ char* GetFileNameA(const wchar_t* pszPath)
const wchar_t* slash = wcsrchr(pszPath, '\\');
if (!slash) slash = wcsrchr(pszPath, '/');
if (slash)
- return mir_t2a(slash + 1);
+ return mir_u2a(slash + 1);
else
- return mir_t2a(pszPath);
+ return mir_u2a(pszPath);
}
char* GetFileExtA(const wchar_t* pszPath)
{
const wchar_t* slash = wcsrchr(pszPath, '.');
if (slash)
- return mir_t2a(slash);
+ return mir_u2a(slash);
return NULL;
}
@@ -406,7 +406,7 @@ void SaveGIF(HBITMAP hBmp, wchar_t* szFilename)
// Get the CLSID of the GIF encoder.
CLSID clsidEncoder;
if (GetEncoderClsid(L"image/gif", clsidEncoder)) {
- LPWSTR pswFile = mir_t2u(szFilename);
+ LPWSTR pswFile = mir_wstrdup(szFilename);
pBitmap->Save((const WCHAR*)pswFile, &clsidEncoder, NULL);
mir_free(pswFile);
}
@@ -445,7 +445,7 @@ void SaveTIF(HBITMAP hBmp, wchar_t* szFilename)
EncParams->Parameter[1].NumberOfValues = 1;
EncParams->Parameter[1].Value = &ulColorDepth;
- LPWSTR pswFile = mir_t2u(szFilename);
+ LPWSTR pswFile = mir_wstrdup(szFilename);
stat = pBitmap->Save((const WCHAR*)pswFile, &EncCLSID, EncParams);
mir_free(pswFile);
free(EncParams);
diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
index 975be30b92..95b567af0f 100644
--- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
+++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
@@ -507,8 +507,8 @@ static INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM, LPARAM lParam)
pd.lchContact = NULL; //(HANDLE)wParam;
// icon
pd.lchIcon = MsgLoadIcon(pMsgBox);
- mir_tstrncpy(pd.lptzContactName, pMsgBox->ptszTitle, _countof(pd.lptzContactName));
- mir_tstrncpy(pd.lptzText, pMsgBox->ptszMsg, _countof(pd.lptzText));
+ mir_wstrncpy(pd.lptzContactName, pMsgBox->ptszTitle, _countof(pd.lptzContactName));
+ mir_wstrncpy(pd.lptzText, pMsgBox->ptszMsg, _countof(pd.lptzText));
// CALLBAC Proc
pd.PluginWindowProc = PopupProc;
@@ -677,7 +677,7 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI
va_list vl;
va_start(vl, pszFormat);
- mir_vsntprintf(tszMsg, _countof(tszMsg), TranslateTS(pszFormat), vl);
+ mir_vsnwprintf(tszMsg, _countof(tszMsg), TranslateTS(pszFormat), vl);
va_end(vl);
MSGBOX mb = { 0 };
@@ -700,11 +700,11 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI
INT_PTR CALLBACK MsgErr(HWND hParent, LPCTSTR pszFormat, ...)
{
wchar_t tszTitle[MAX_SECONDLINE], tszMsg[MAX_SECONDLINE];
- mir_sntprintf(tszTitle, L"%s - %s", _A2W(MODNAME), TranslateT("Error"));
+ mir_snwprintf(tszTitle, L"%s - %s", _A2W(MODNAME), TranslateT("Error"));
va_list vl;
va_start(vl, pszFormat);
- mir_vsntprintf(tszMsg, TranslateTS(pszFormat), vl);
+ mir_vsnwprintf(tszMsg, TranslateTS(pszFormat), vl);
va_end(vl);
MSGBOX mb = { 0 };