diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
commit | 2f261839b60692e33d0e160344d0d636d49c90ba (patch) | |
tree | 187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/SmileyAdd | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SmileyAdd')
-rw-r--r-- | plugins/SmileyAdd/src/customsmiley.cpp | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/download.cpp | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/general.cpp | 4 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/options.cpp | 26 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/smileys.cpp | 12 |
5 files changed, 23 insertions, 23 deletions
diff --git a/plugins/SmileyAdd/src/customsmiley.cpp b/plugins/SmileyAdd/src/customsmiley.cpp index a61a014e9c..64fdd3d17e 100644 --- a/plugins/SmileyAdd/src/customsmiley.cpp +++ b/plugins/SmileyAdd/src/customsmiley.cpp @@ -78,7 +78,7 @@ bool SmileyCType::CreateTriggerText(char *text) return false;
char save = res[reslen]; res[reslen] = 0; // safe because of mir_alloc
- wchar_t *txt = mir_utf8decodeT(res);
+ wchar_t *txt = mir_utf8decodeW(res);
res[reslen] = save;
if (txt == NULL)
diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp index 2f45d51950..8a46c4fc70 100644 --- a/plugins/SmileyAdd/src/download.cpp +++ b/plugins/SmileyAdd/src/download.cpp @@ -213,7 +213,7 @@ void GetSmileyCacheFolder(void) FoldersGetCustomPathT(hFolder, cachepath, MAX_PATH, L"");
HookEvent(ME_FOLDERS_PATH_CHANGED, FolderChanged);
}
- else mir_tstrncpy(cachepath, VARST(L"%miranda_userdata%\\SmileyCache"), MAX_PATH);
+ else mir_wstrncpy(cachepath, VARST(L"%miranda_userdata%\\SmileyCache"), MAX_PATH);
}
void DownloadInit(void)
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 0a27734c92..4fda95dd92 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -232,8 +232,8 @@ void ReportError(const wchar_t *errmsg) static const wchar_t title[] = L"Miranda SmileyAdd";
POPUPDATAT pd = { 0 };
- mir_tstrcpy(pd.lpwzContactName, title);
- mir_tstrcpy(pd.lpwzText, errmsg);
+ mir_wstrcpy(pd.lpwzContactName, title);
+ mir_wstrcpy(pd.lpwzText, errmsg);
pd.iSeconds = -1;
if (PUAddPopupT(&pd) == CALLSERVICE_NOTFOUND)
MessageBox(NULL, errmsg, title, MB_OK | MB_ICONWARNING | MB_TOPMOST);
diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp index 8466424240..eca94429b5 100644 --- a/plugins/SmileyAdd/src/options.cpp +++ b/plugins/SmileyAdd/src/options.cpp @@ -481,16 +481,16 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item) ofn.hwndOwner = m_hwndDialog;
wchar_t filter[512], *pfilter;
- mir_tstrcpy(filter, TranslateT("Smiley packs"));
- mir_tstrcat(filter, L" (*.msl;*.asl;*.xep)");
- pfilter = filter + mir_tstrlen(filter) + 1;
- mir_tstrcpy(pfilter, L"*.msl;*.asl;*.xep");
- pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- mir_tstrcpy(pfilter, TranslateT("All files"));
- mir_tstrcat(pfilter, L" (*.*)");
- pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- mir_tstrcpy(pfilter, L"*.*");
- pfilter = pfilter + mir_tstrlen(pfilter) + 1;
+ mir_wstrcpy(filter, TranslateT("Smiley packs"));
+ mir_wstrcat(filter, L" (*.msl;*.asl;*.xep)");
+ pfilter = filter + mir_wstrlen(filter) + 1;
+ mir_wstrcpy(pfilter, L"*.msl;*.asl;*.xep");
+ pfilter = pfilter + mir_wstrlen(pfilter) + 1;
+ mir_wstrcpy(pfilter, TranslateT("All files"));
+ mir_wstrcat(pfilter, L" (*.*)");
+ pfilter = pfilter + mir_wstrlen(pfilter) + 1;
+ mir_wstrcpy(pfilter, L"*.*");
+ pfilter = pfilter + mir_wstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
@@ -592,7 +592,7 @@ void OptionsType::ReadPackFileName(CMString &filename, const CMString &name, con {
CMString settingKey = name + L"-filename";
- ptrT tszValue(db_get_tsa(NULL, "SmileyAdd", _T2A(settingKey.c_str())));
+ ptrW tszValue(db_get_tsa(NULL, "SmileyAdd", _T2A(settingKey.c_str())));
filename = (tszValue != NULL) ? (wchar_t*)tszValue : defaultFilename;
}
@@ -604,7 +604,7 @@ void OptionsType::WritePackFileName(const CMString &filename, const CMString &na void OptionsType::ReadCustomCategories(CMString &cats)
{
- ptrT tszValue(db_get_tsa(NULL, "SmileyAdd", "CustomCategories"));
+ ptrW tszValue(db_get_tsa(NULL, "SmileyAdd", "CustomCategories"));
if (tszValue != NULL)
cats = tszValue;
}
@@ -619,7 +619,7 @@ void OptionsType::WriteCustomCategories(const CMString &cats) void OptionsType::ReadContactCategory(MCONTACT hContact, CMString &cats)
{
- ptrT tszValue(db_get_tsa(hContact, "SmileyAdd", "CustomCategory"));
+ ptrW tszValue(db_get_tsa(hContact, "SmileyAdd", "CustomCategory"));
if (tszValue != NULL)
cats = tszValue;
}
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index c2f70ffc31..213e8307d0 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -212,7 +212,7 @@ static DWORD_PTR ConvertServiceParam(MCONTACT hContact, const wchar_t *param) {
if (param == NULL)
return 0;
- if (mir_tstrcmpi(L"hContact", param) == 0)
+ if (mir_wstrcmpi(L"hContact", param) == 0)
return hContact;
if (iswdigit(*param))
return _wtoi(param);
@@ -359,7 +359,7 @@ bool SmileyPackType::LoadSmileyFile(const CMString &filename, const CMString &pa if (!noerr) {
static const wchar_t errmsg[] = LPGENW("Smiley pack %s for category \"%s\" not found.\nSelect correct smiley pack in the Options -> Customize -> Smileys.");
wchar_t msgtxt[1024];
- mir_sntprintf(msgtxt, TranslateTS(errmsg), modpath.c_str(), packname);
+ mir_snwprintf(msgtxt, TranslateTS(errmsg), modpath.c_str(), packname);
ReportError(msgtxt);
}
@@ -519,7 +519,7 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString & if (!noerr) {
static const wchar_t errmsg[] = LPGENW("Smiley #%u in file %s for smiley pack %s not found.");
wchar_t msgtxt[1024];
- mir_sntprintf(msgtxt, TranslateTS(errmsg), smnum, resname.c_str(), modpath.c_str());
+ mir_snwprintf(msgtxt, TranslateTS(errmsg), smnum, resname.c_str(), modpath.c_str());
CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, _T2A(msgtxt));
errorFound = true;
}
@@ -733,7 +733,7 @@ SmileyPackType* SmileyPackListType::GetSmileyPack(CMString &filename) for (int i = 0; i < m_SmileyPacks.getCount(); i++) {
CMString modpath1;
pathToAbsolute(m_SmileyPacks[i].GetFilename(), modpath1);
- if (mir_tstrcmpi(modpath.c_str(), modpath1.c_str()) == 0) return &m_SmileyPacks[i];
+ if (mir_wstrcmpi(modpath.c_str(), modpath1.c_str()) == 0) return &m_SmileyPacks[i];
}
return NULL;
}
@@ -1068,13 +1068,13 @@ SmileyLookup::SmileyLookup(const CMString &str, const bool regexs, const int ind matcher->getStartingIndex() != matcher->getEndingIndex());
if (!m_valid) {
static const wchar_t errmsg[] = LPGENW("Regular expression \"%s\" in smiley pack \"%s\" could produce \"empty matches\".");
- mir_sntprintf(msgtxt, TranslateTS(errmsg), str.c_str(), smpt.c_str());
+ mir_snwprintf(msgtxt, TranslateTS(errmsg), str.c_str(), smpt.c_str());
}
delete matcher;
}
else {
static const wchar_t errmsg[] = LPGENW("Regular expression \"%s\" in smiley pack \"%s\" malformed.");
- mir_sntprintf(msgtxt, TranslateTS(errmsg), str.c_str(), smpt.c_str());
+ mir_snwprintf(msgtxt, TranslateTS(errmsg), str.c_str(), smpt.c_str());
}
if (!m_valid)
|