From b4b33384b4bce30863d9d01aa6e0b60f588d281d Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sat, 19 Jan 2013 17:02:36 +0000 Subject: - Another portion of _T replacement and fixes of previous commits (patch from person) git-svn-id: http://svn.miranda-ng.org/main/trunk@3173 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmileyAdd/src/dlgboxsubclass.cpp | 20 ++++---- plugins/SmileyAdd/src/general.cpp | 18 +++---- plugins/SmileyAdd/src/main.cpp | 4 +- plugins/SmileyAdd/src/options.cpp | 18 +++---- plugins/SmileyAdd/src/services.cpp | 18 +++---- plugins/SmileyAdd/src/smileyroutines.cpp | 8 +-- plugins/SmileyAdd/src/smileys.cpp | 84 ++++++++++++++++---------------- 7 files changed, 85 insertions(+), 85 deletions(-) (limited to 'plugins/SmileyAdd/src') diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 31ccc22f6d..1970577b48 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -158,27 +158,27 @@ public: //identifies the message dialog bool IsMessageSendDialog(HWND hwnd) { - TCHAR szClassName[32] = L""; + TCHAR szClassName[32] = _T(""); GetClassName(hwnd, szClassName, SIZEOF(szClassName)); - if (_tcscmp(szClassName, L"#32770")) return false; + if (_tcscmp(szClassName, _T("#32770"))) return false; if ((REdit = GetDlgItem(hwnd, MI_IDC_LOG)) != NULL) { GetClassName(REdit, szClassName, SIZEOF(szClassName)); - if (_tcscmp(szClassName, L"RichEdit20A") != 0 && - _tcscmp(szClassName, L"RichEdit20W") != 0 && - _tcscmp(szClassName, L"RICHEDIT50W") != 0) return false; + if (_tcscmp(szClassName, _T("RichEdit20A")) != 0 && + _tcscmp(szClassName, _T("RichEdit20W")) != 0 && + _tcscmp(szClassName, _T("RICHEDIT50W")) != 0) return false; } else return false; if ((MEdit = GetDlgItem(hwnd, MI_IDC_MESSAGE)) != NULL) { GetClassName(MEdit, szClassName, SIZEOF(szClassName)); - if (_tcscmp(szClassName, L"Edit") != 0 && - _tcscmp(szClassName, L"RichEdit20A") != 0 && - _tcscmp(szClassName, L"RichEdit20W") != 0 && - _tcscmp(szClassName, L"RICHEDIT50W") != 0) return false; + if (_tcscmp(szClassName, _T("Edit")) != 0 && + _tcscmp(szClassName, _T("RichEdit20A")) != 0 && + _tcscmp(szClassName, _T("RichEdit20W")) != 0 && + _tcscmp(szClassName, _T("RICHEDIT50W")) != 0) return false; } else return false; @@ -236,7 +236,7 @@ public: hSmlButton = CreateWindowEx( WS_EX_LEFT | WS_EX_NOPARENTNOTIFY | WS_EX_TOPMOST, MIRANDABUTTONCLASS, - L"S", + _T("S"), WS_CHILD|WS_VISIBLE|WS_TABSTOP, // window style rect.left, // horizontal position of window rect.top, // vertical position of window diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 6810934d11..8b0b306998 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -46,7 +46,7 @@ int CalculateTextHeight(HDC hdc, CHARFORMAT2* chf) SelectObject(hcdc, hFont); SIZE fontSize; - GetTextExtentPoint32(hcdc, L")", 1, &fontSize); + GetTextExtentPoint32(hcdc, _T(")"), 1, &fontSize); DeleteObject(hFont); DeleteDC(hcdc); @@ -78,7 +78,7 @@ HICON GetDefaultIcon(bool copy) const TCHAR* GetImageExt(bkstring &fname) { - const TCHAR* ext = L""; + const TCHAR* ext = _T(""); int fileId = _topen(fname.c_str(), O_RDONLY | _O_BINARY); if (fileId != -1) @@ -89,13 +89,13 @@ const TCHAR* GetImageExt(bkstring &fname) if (bytes > 4) { if ( *(unsigned short*)buf == 0xd8ff ) - ext = L"jpg"; + ext = _T("jpg"); else if ( *(unsigned short*)buf == 0x4d42 ) - ext = L"bmp"; + ext = _T("bmp"); else if ( *(unsigned*)buf == 0x474e5089 ) - ext = L"png"; + ext = _T("png"); else if ( *(unsigned*)buf == 0x38464947 ) - ext = L"gif"; + ext = _T("gif"); } _close(fileId); } @@ -216,8 +216,8 @@ bool InitGdiPlus(void) { Gdiplus::GdiplusStartupInput gdiplusStartupInput; - static const TCHAR errmsg[] = L"GDI+ not installed.\n" - L"GDI+ can be downloaded here: http://www.microsoft.com/downloads"; + static const TCHAR errmsg[] = _T("GDI+ not installed.\n") + _T("GDI+ can be downloaded here: http://www.microsoft.com/downloads"); #ifdef _MSC_VER __try @@ -273,7 +273,7 @@ bool IsSmileyProto(char* proto) void ReportError(const TCHAR* errmsg) { - static const TCHAR title[] = L"Miranda SmileyAdd"; + static const TCHAR title[] = _T("Miranda SmileyAdd"); /* POPUPDATAW pd = {0}; diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index d6833684b4..60105db465 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -100,8 +100,8 @@ extern "C" __declspec(dllexport) int Load(void) mir_getLP(&pluginInfoEx); if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) { - static const TCHAR errmsg[] = L"Only one instance of SmileyAdd could be executed.\n" - L"Remove duplicate instances from 'Plugins' directory"; + static const TCHAR errmsg[] = LPGENT("Only one instance of SmileyAdd could be executed.\n") + LPGENT("Remove duplicate instances from 'Plugins' directory"); ReportError(TranslateTS(errmsg)); return 1; diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp index 2ca4e7ed29..b485c5ca99 100644 --- a/plugins/SmileyAdd/src/options.cpp +++ b/plugins/SmileyAdd/src/options.cpp @@ -529,7 +529,7 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item) { OPENFILENAME ofn = {0}; - TCHAR filename[MAX_PATH] = L""; + TCHAR filename[MAX_PATH] = _T(""); ofn.lpstrFile = filename; ofn.nMaxFile = SIZEOF(filename); @@ -537,7 +537,7 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item) SmileyCategoryType* smc = tmpsmcat.GetSmileyCategory(item); if (smc->GetFilename().empty()) { - pathToAbsolute(L"Smileys", inidir); + pathToAbsolute(_T("Smileys"), inidir); } else { @@ -551,21 +551,21 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item) TCHAR filter[512], *pfilter; _tcscpy(filter, TranslateT("Smiley Packs")); - lstrcat(filter, L" (*.msl;*.asl;*.xep)"); + lstrcat(filter, _T(" (*.msl;*.asl;*.xep)")); pfilter = filter + _tcslen(filter) + 1; - _tcscpy(pfilter, L"*.msl;*.asl;*.xep"); + _tcscpy(pfilter, _T("*.msl;*.asl;*.xep")); pfilter = pfilter + _tcslen(pfilter) + 1; _tcscpy(pfilter, TranslateT("All Files")); - lstrcat(pfilter, L" (*.*)"); + lstrcat(pfilter, _T(" (*.*)")); pfilter = pfilter + _tcslen(pfilter) + 1; - _tcscpy(pfilter, L"*.*"); + _tcscpy(pfilter, _T("*.*")); pfilter = pfilter + _tcslen(pfilter) + 1; *pfilter = '\0'; ofn.lpstrFilter = filter; ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_READONLY | OFN_EXPLORER | OFN_LONGNAMES | OFN_NOCHANGEDIR; - ofn.lpstrDefExt = L"msl"; + ofn.lpstrDefExt = _T("msl"); if (GetOpenFileName(&ofn)) { @@ -663,7 +663,7 @@ void OptionsType::ReadPackFileName(bkstring& filename, const bkstring& name, const bkstring& defaultFilename) { DBVARIANT dbv; - bkstring settingKey = name + L"-filename"; + bkstring settingKey = name + _T("-filename"); INT_PTR res = DBGetContactSettingTString(NULL, "SmileyAdd", T2A_SM(settingKey.c_str()), &dbv); if (res == 0) @@ -678,7 +678,7 @@ void OptionsType::ReadPackFileName(bkstring& filename, const bkstring& name, void OptionsType::WritePackFileName(const bkstring& filename, const bkstring& name) { - bkstring settingKey = name + L"-filename"; + bkstring settingKey = name + _T("-filename"); DBWriteContactSettingTString(NULL, "SmileyAdd", T2A_SM(settingKey.c_str()), filename.c_str()); } diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index cfe069f731..b2e749305b 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -43,7 +43,7 @@ SmileyPackType* GetSmileyPack(const char* proto, HANDLE hContact, SmileyPackCTyp if (hContact != NULL) { opt.ReadContactCategory(hContact, categoryName); - if (categoryName == L"") return NULL; + if (categoryName == _T("")) return NULL; if (!categoryName.empty() && g_SmileyCategories.GetSmileyCategory(categoryName) == NULL) { @@ -72,7 +72,7 @@ SmileyPackType* GetSmileyPack(const char* proto, HANDLE hContact, SmileyPackCTyp { if (proto == NULL || proto[0] == 0) { - categoryName = L"Standard"; + categoryName = _T("Standard"); } else { @@ -80,7 +80,7 @@ SmileyPackType* GetSmileyPack(const char* proto, HANDLE hContact, SmileyPackCTyp if (opt.UseOneForAll) { SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(categoryName); - if (smc == NULL || smc->IsProto()) categoryName = L"Standard"; + if (smc == NULL || smc->IsProto()) categoryName = _T("Standard"); } } } @@ -386,7 +386,7 @@ INT_PTR CustomCatMenu(WPARAM wParam, LPARAM lParam) else { bkstring empty; - if (lParam == 1) empty = L""; + if (lParam == 1) empty = _T(""); opt.WriteContactCategory(hContact, empty); } NotifyEventHooks(hEvent1, (WPARAM)hContact, 0); @@ -457,8 +457,8 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) mi.position = 1; mi.popupPosition = 1; - mi.ptszName = L""; - if (cat == L"") { + mi.ptszName = _T(""); + if (cat == _T("")) { mi.flags |= CMIF_CHECKED; nonecheck = false; } @@ -523,7 +523,7 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam) case PRAC_ADDED: if (acc != NULL) { - bkstring catname(L"Standard"); + bkstring catname(_T("Standard")); const bkstring& defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename(); g_SmileyCategories.AddAccountAsCategory(acc, defaultFile); } @@ -551,7 +551,7 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam) { if (acc->bIsEnabled) { - bkstring catname(L"Standard"); + bkstring catname(_T("Standard")); const bkstring& defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename(); g_SmileyCategories.AddAccountAsCategory(acc, defaultFile); } @@ -575,7 +575,7 @@ int DbSettingChanged(WPARAM wParam, LPARAM lParam) if (strcmp(cws->szSetting, "Transport") == 0) { - bkstring catname(L"Standard"); + bkstring catname(_T("Standard")); SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(catname); if (smc != NULL) g_SmileyCategories.AddContactTransportAsCategory(hContact, smc->GetFilename()); diff --git a/plugins/SmileyAdd/src/smileyroutines.cpp b/plugins/SmileyAdd/src/smileyroutines.cpp index 98bd40b959..5175309d1b 100644 --- a/plugins/SmileyAdd/src/smileyroutines.cpp +++ b/plugins/SmileyAdd/src/smileyroutines.cpp @@ -281,7 +281,7 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const TCHAR classname[20]; GetClassName(hwnd, classname, SIZEOF(classname)); - bool ishpp = (_tcsncmp(classname, L"THppRichEdit", 12) == 0) || fireView; + bool ishpp = (_tcsncmp(classname, _T("THppRichEdit"), 12) == 0) || fireView; SetRichCallback(hwnd, NULL, false, true); @@ -323,7 +323,7 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const unsigned numBTBSm = 0; - BSTR spaceb = SysAllocString(L" "); + BSTR spaceb = SysAllocString(_T(" ")); // Replace smileys specified in the list in RichEdit for (int j = smllist.getCount(); j--; ) @@ -526,8 +526,8 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const QueryPerformanceCounter(&end); unsigned dif = (end.QuadPart - strt.QuadPart)/(freq.QuadPart/1000); TCHAR mess[300]; - wsprintf(mess, L"Time elapsed: %u", dif); - MessageBox(NULL, mess, L"", MB_OK); + wsprintf(mess, _T("Time elapsed: %u"), dif); + MessageBox(NULL, mess, _T(""), MB_OK); */ } diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 11077b93c6..e7a80280e7 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -163,7 +163,7 @@ static DWORD_PTR ConvertServiceParam(HANDLE hContact, const TCHAR *param) DWORD_PTR ret; if (param == NULL) ret = 0; - else if (_tcsicmp(L"hContact", param) == 0) + else if (_tcsicmp(_T("hContact"), param) == 0) ret = (DWORD_PTR)hContact; else if (_istdigit(*param)) ret = _ttoi(param); @@ -176,7 +176,7 @@ static DWORD_PTR ConvertServiceParam(HANDLE hContact, const TCHAR *param) void SmileyType::CallSmileyService(HANDLE hContact) { - _TPattern * srvsplit = _TPattern::compile(L"(.*)\\|(.*)\\|(.*)"); + _TPattern * srvsplit = _TPattern::compile(_T("(.*)\\|(.*)\\|(.*)")); _TMatcher * m0 = srvsplit->createTMatcher(GetTriggerText()); m0->findFirstMatch(); @@ -209,13 +209,13 @@ SmileyPackType::~SmileyPackType() } static const TCHAR urlRegEx[] = - L"(?:ftp|https|http|file|aim|webcal|irc|msnim|xmpp|gopher|mailto|news|nntp|telnet|wais|prospero)://?[\\w.?%:/$+;]*"; -static const TCHAR pathRegEx[] = L"[\\s\"][a-zA-Z]:[\\\\/][\\w.\\-\\\\/]*"; -static const TCHAR timeRegEx[] = L"\\d{1,2}:\\d{2}:\\d{2}|\\d{1,2}:\\d{2}"; + _T("(?:ftp|https|http|file|aim|webcal|irc|msnim|xmpp|gopher|mailto|news|nntp|telnet|wais|prospero)://?[\\w.?%:/$+;]*"); +static const TCHAR pathRegEx[] = _T("[\\s\"][a-zA-Z]:[\\\\/][\\w.\\-\\\\/]*"); +static const TCHAR timeRegEx[] = _T("\\d{1,2}:\\d{2}:\\d{2}|\\d{1,2}:\\d{2}"); void SmileyPackType::AddTriggersToSmileyLookup(void) { - _TPattern * p = _TPattern::compile(L"\\s+"); + _TPattern * p = _TPattern::compile(_T("\\s+")); { bkstring emptystr; @@ -286,8 +286,8 @@ void SmileyPackType::AddTriggersToSmileyLookup(void) void SmileyPackType::ReplaceAllSpecials(const bkstring& Input, bkstring& Output) { - Output = _TPattern::replace(L"%%_{1,2}%%", Input, L" "); - Output = _TPattern::replace(L"%%''%%", Output, L"\""); + Output = _TPattern::replace(_T("%%_{1,2}%%"), Input, _T(" ")); + Output = _TPattern::replace(_T("%%''%%"), Output, _T("\"")); } @@ -312,7 +312,7 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo if (filename.empty()) { - m_Name = L"Nothing loaded"; + m_Name = _T("Nothing loaded"); return false; } @@ -331,7 +331,7 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo ReportError(msgtxt); } - m_Name = L"Nothing loaded"; + m_Name = _T("Nothing loaded"); return false; } @@ -368,7 +368,7 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo delete[] buf; bool res; - if (filename.find(L".xep") == filename.npos) + if (filename.find(_T(".xep")) == filename.npos) res = LoadSmileyFileMSL(tbuf, onlyInfo, modpath); else res = LoadSmileyFileXEP(tbuf, onlyInfo, modpath); @@ -380,7 +380,7 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& modpath) { - _TPattern * pathsplit = _TPattern::compile(L"(.*\\\\)(.*)\\.|$"); + _TPattern * pathsplit = _TPattern::compile(_T("(.*\\\\)(.*)\\.|$")); _TMatcher * m0 = pathsplit->createTMatcher(modpath); m0->findFirstMatch(); @@ -391,18 +391,18 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& delete pathsplit; _TPattern * otherf = _TPattern::compile( - L"^\\s*(Name|Author|Date|Version|ButtonSmiley)\\s*=\\s*\"(.*)\"", + _T("^\\s*(Name|Author|Date|Version|ButtonSmiley)\\s*=\\s*\"(.*)\""), _TPattern::MULTILINE_MATCHING); m0 = otherf->createTMatcher(tbuf); while (m0->findNextMatch()) { - if (m0->getGroup(1) == L"Name") m_Name = m0->getGroup(2); - if (m0->getGroup(1) == L"Author") m_Author = m0->getGroup(2); - if (m0->getGroup(1) == L"Date") m_Date = m0->getGroup(2); - if (m0->getGroup(1) == L"Version") m_Version = m0->getGroup(2); - if (m0->getGroup(1) == L"ButtonSmiley") m_ButtonSmiley = m0->getGroup(2); + if (m0->getGroup(1) == _T("Name")) m_Name = m0->getGroup(2); + if (m0->getGroup(1) == _T("Author")) m_Author = m0->getGroup(2); + if (m0->getGroup(1) == _T("Date")) m_Date = m0->getGroup(2); + if (m0->getGroup(1) == _T("Version")) m_Version = m0->getGroup(2); + if (m0->getGroup(1) == _T("ButtonSmiley")) m_ButtonSmiley = m0->getGroup(2); } delete m0; delete otherf; @@ -415,7 +415,7 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& win.y = 0; { _TPattern * pat = _TPattern::compile( - L"^\\s*(Selection|Window)Size\\s*=\\s*(\\d+)\\s*,\\s*(\\d+)", + _T("^\\s*(Selection|Window)Size\\s*=\\s*(\\d+)\\s*,\\s*(\\d+)"), _TPattern::MULTILINE_MATCHING); _TMatcher * m0 = pat->createTMatcher(tbuf); while (m0->findNextMatch()) @@ -424,9 +424,9 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& tpt.x = _ttol(m0->getGroup(2).c_str()); tpt.y = _ttol(m0->getGroup(3).c_str()); - if (m0->getGroup(1) == L"Selection") + if (m0->getGroup(1) == _T("Selection")) selec = tpt; - else if (m0->getGroup(1) == L"Window") + else if (m0->getGroup(1) == _T("Window")) win = tpt; } delete m0; @@ -434,12 +434,12 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& } _TPattern * smiley = _TPattern::compile( - L"^\\s*Smiley(\\*)?\\s*=" // Is Hidden - L"(?:\\s*\"(.*)\")" // Smiley file name - L"(?:[\\s,]+(\\-?\\d+))" // Icon resource id - L"(?:[\\s,]+(R|S)?\"(.*?)\")" // Trigger text - L"(?:[\\s,]+\"(.*?)\")?" // Tooltip or insert text - L"(?:[\\s,]+\"(.*?)\")?", // Tooltip text + _T("^\\s*Smiley(\\*)?\\s*=") // Is Hidden + _T("(?:\\s*\"(.*)\")") // Smiley file name + _T("(?:[\\s,]+(\\-?\\d+))") // Icon resource id + _T("(?:[\\s,]+(R|S)?\"(.*?)\")") // Trigger text + _T("(?:[\\s,]+\"(.*?)\")?") // Tooltip or insert text + _T("(?:[\\s,]+\"(.*?)\")?"), // Tooltip text _TPattern::MULTILINE_MATCHING); _TMatcher * m0 = smiley->createTMatcher(tbuf); @@ -450,7 +450,7 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& while (m0->findNextMatch()) { bkstring resname = m0->getGroup(2); - if (resname.find(L"http://") != resname.npos) + if (resname.find(_T("http://")) != resname.npos) { if (GetSmileyFile(resname, packstr)) continue; } @@ -466,8 +466,8 @@ bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& dat->SetHidden(m0->getStartingIndex(1) >= 0); if (m0->getStartingIndex(4) >= 0) { - dat->SetRegEx(m0->getGroup(4) == L"R"); - dat->SetService(m0->getGroup(4) == L"S"); + dat->SetRegEx(m0->getGroup(4) == _T("R")); + dat->SetService(m0->getGroup(4) == _T("S")); } dat->m_TriggerText = m0->getGroup(5); if (dat->IsRegEx()) @@ -531,8 +531,8 @@ static void DecodeHTML(bkstring& str) { if (str.find('&') != str.npos) { - str = _TPattern::replace(bkstring(L"<"), str, bkstring(L"<")); - str = _TPattern::replace(bkstring(L">"), str, bkstring(L">")); + str = _TPattern::replace(bkstring(_T("<")), str, bkstring(_T("<"))); + str = _TPattern::replace(bkstring(_T(">")), str, bkstring(_T(">"))); } } @@ -565,11 +565,11 @@ bool SmileyPackType::LoadSmileyFileXEP(bkstring& tbuf, bool onlyInfo, bkstring& { _TMatcher *m0, *m1, *m2; - _TPattern * dbname_re = _TPattern::compile(L"\\s*\"(.*?)\"\\s*", + _TPattern * dbname_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), _TPattern::MULTILINE_MATCHING); - _TPattern * author_re = _TPattern::compile(L"\\s*\"(.*?)\"\\s*", + _TPattern * author_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), _TPattern::MULTILINE_MATCHING); - _TPattern * settings_re = _TPattern::compile(L"(.*?)", + _TPattern * settings_re = _TPattern::compile(_T("(.*?)"), _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); m0 = settings_re->createTMatcher(tbuf); @@ -601,17 +601,17 @@ bool SmileyPackType::LoadSmileyFileXEP(bkstring& tbuf, bool onlyInfo, bkstring& if (!onlyInfo) { - _TPattern * record_re = _TPattern::compile(L"(?:\\s*\"(.*?)\")?(.*?)", + _TPattern * record_re = _TPattern::compile(_T("(?:\\s*\"(.*?)\")?(.*?)"), _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); - _TPattern * expression_re = _TPattern::compile(L"\\s*\"(.*?)\"\\s*", + _TPattern * expression_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), _TPattern::MULTILINE_MATCHING); - _TPattern * pastetext_re = _TPattern::compile(L"\\s*\"(.*?)\"\\s*", + _TPattern * pastetext_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), _TPattern::MULTILINE_MATCHING); - _TPattern * images_re = _TPattern::compile(L"(.*?)", + _TPattern * images_re = _TPattern::compile(_T("(.*?)"), _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); - _TPattern * image_re = _TPattern::compile(L"(.*?)", + _TPattern * image_re = _TPattern::compile(_T("(.*?)"), _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); - _TPattern * imagedt_re = _TPattern::compile(L"", + _TPattern * imagedt_re = _TPattern::compile(_T(""), _TPattern::MULTILINE_MATCHING ); m0 = images_re->createTMatcher(tbuf); @@ -1036,7 +1036,7 @@ SmileyLookup::SmileyLookup(const bkstring& str, const bool regexs, const int ind m_ind = ind; if (regexs) { - static const bkstring testString(L"Test String"); + static const bkstring testString(_T("Test String")); m_pattern = _TPattern::compile(str); m_valid = m_pattern != NULL; if (m_valid) -- cgit v1.2.3