diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/SmileyAdd/src/customsmiley.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SmileyAdd/src/customsmiley.cpp')
-rw-r--r-- | plugins/SmileyAdd/src/customsmiley.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/SmileyAdd/src/customsmiley.cpp b/plugins/SmileyAdd/src/customsmiley.cpp index 97480911f6..a61a014e9c 100644 --- a/plugins/SmileyAdd/src/customsmiley.cpp +++ b/plugins/SmileyAdd/src/customsmiley.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. SmileyPackCListType g_SmileyPackCStore;
-bool SmileyPackCListType::AddSmileyPack(MCONTACT hContact, TCHAR *dir)
+bool SmileyPackCListType::AddSmileyPack(MCONTACT hContact, wchar_t *dir)
{
bool res = true;
if (GetSmileyPack(hContact) == NULL) {
@@ -36,7 +36,7 @@ bool SmileyPackCListType::AddSmileyPack(MCONTACT hContact, TCHAR *dir) return res;
}
-bool SmileyPackCListType::AddSmiley(MCONTACT hContact, TCHAR *path)
+bool SmileyPackCListType::AddSmiley(MCONTACT hContact, wchar_t *path)
{
SmileyPackCType *smpack = GetSmileyPack(hContact);
if (smpack == NULL) {
@@ -59,7 +59,7 @@ SmileyPackCType* SmileyPackCListType::GetSmileyPack(MCONTACT id) }
-SmileyCType::SmileyCType(const CMString &fullpath, const TCHAR *filepath)
+SmileyCType::SmileyCType(const CMString &fullpath, const wchar_t *filepath)
{
LoadFromResource(fullpath, 0);
CreateTriggerText(_T2A(filepath));
@@ -78,7 +78,7 @@ bool SmileyCType::CreateTriggerText(char *text) return false;
char save = res[reslen]; res[reslen] = 0; // safe because of mir_alloc
- TCHAR *txt = mir_utf8decodeT(res);
+ wchar_t *txt = mir_utf8decodeT(res);
res[reslen] = save;
if (txt == NULL)
@@ -93,19 +93,19 @@ bool SmileyCType::CreateTriggerText(char *text) // SmileyPackCType
//
-bool SmileyPackCType::LoadSmileyDir(TCHAR *dir)
+bool SmileyPackCType::LoadSmileyDir(wchar_t *dir)
{
CMString dirs = dir;
dirs += L"\\*.*";
- _tfinddata_t c_file;
- INT_PTR hFile = _tfindfirst((TCHAR*)dirs.c_str(), &c_file);
+ _wfinddata_t c_file;
+ INT_PTR hFile = _wfindfirst((wchar_t*)dirs.c_str(), &c_file);
if (hFile > -1L) {
do {
if (c_file.name[0] != '.') {
CMString fullpath = dir;
fullpath = fullpath + L"\\" + c_file.name;
- TCHAR *div = _tcsrchr(c_file.name, '.');
+ wchar_t *div = wcsrchr(c_file.name, '.');
if (div) {
*div = 0;
SmileyCType *smlc = new SmileyCType(fullpath, c_file.name);
@@ -115,7 +115,7 @@ bool SmileyPackCType::LoadSmileyDir(TCHAR *dir) m_SmileyList.insert(smlc);
}
}
- } while (_tfindnext(hFile, &c_file) == 0);
+ } while (_wfindnext(hFile, &c_file) == 0);
_findclose(hFile);
AddTriggersToSmileyLookup();
return true;
@@ -123,7 +123,7 @@ bool SmileyPackCType::LoadSmileyDir(TCHAR *dir) return false;
}
-bool SmileyPackCType::LoadSmiley(TCHAR *path)
+bool SmileyPackCType::LoadSmiley(wchar_t *path)
{
CMString dirs = path;
int slash = dirs.ReverseFind('\\');
@@ -137,7 +137,7 @@ bool SmileyPackCType::LoadSmiley(TCHAR *path) return true;
}
- m_SmileyList.insert(new SmileyCType(dirs, (TCHAR*)name.c_str()));
+ m_SmileyList.insert(new SmileyCType(dirs, (wchar_t*)name.c_str()));
CMString empty;
m_SmileyLookup.insert(new SmileyLookup(
|