diff options
Diffstat (limited to 'plugins/Boltun/src')
-rw-r--r-- | plugins/Boltun/src/Engine/Mind.cpp | 14 | ||||
-rw-r--r-- | plugins/Boltun/src/Engine/TalkEngine.cpp | 2 | ||||
-rw-r--r-- | plugins/Boltun/src/boltun.cpp | 16 | ||||
-rw-r--r-- | plugins/Boltun/src/config.cpp | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/plugins/Boltun/src/Engine/Mind.cpp b/plugins/Boltun/src/Engine/Mind.cpp index 120dbc85ef..cfee26fbf0 100644 --- a/plugins/Boltun/src/Engine/Mind.cpp +++ b/plugins/Boltun/src/Engine/Mind.cpp @@ -129,7 +129,7 @@ void Mind::Load(wstring filename) format(st);
count = st.length();
c = co = new wchar_t[count + 1];
- mir_tstrcpy(c, st.c_str());
+ mir_wstrcpy(c, st.c_str());
size_t pos = 0;
while (pos < count && iswspace(*c)) {
++pos;
@@ -209,25 +209,25 @@ void Mind::Load(wstring filename) ++c;
count -= 2;
c[count] = '\0';
- if (mir_tstrcmp(c, L"QUESTION") == 0) {
+ if (mir_wstrcmp(c, L"QUESTION") == 0) {
toLowerStr(c);
data->question.insert(s1);
}
- else if (mir_tstrcmp(c, L"IGNORED") == 0) {
+ else if (mir_wstrcmp(c, L"IGNORED") == 0) {
toLowerStr(c);
data->special.insert(s1);
}
- else if (mir_tstrcmp(c, L"ESCAPE") == 0) {
+ else if (mir_wstrcmp(c, L"ESCAPE") == 0) {
data->escape.push_back(s1);
}
- else if (mir_tstrcmp(c, L"FAILURE") == 0) {
+ else if (mir_wstrcmp(c, L"FAILURE") == 0) {
data->failure.push_back(s1);
}
- else if (mir_tstrcmp(c, L"REPEAT") == 0) {
+ else if (mir_wstrcmp(c, L"REPEAT") == 0) {
data->repeats.push_back(s1);
}
else {
- if (mir_tstrcmp(c, L"INITIAL") != 0)
+ if (mir_wstrcmp(c, L"INITIAL") != 0)
throw error;
data->initial.push_back(s1);
}
diff --git a/plugins/Boltun/src/Engine/TalkEngine.cpp b/plugins/Boltun/src/Engine/TalkEngine.cpp index 0f53403003..7d1ca265ed 100644 --- a/plugins/Boltun/src/Engine/TalkEngine.cpp +++ b/plugins/Boltun/src/Engine/TalkEngine.cpp @@ -264,7 +264,7 @@ wstring TalkBot::AllReplies(const wstring &incomingMessage, ContactData *contact TalkBot::MessageInfo* TalkBot::Reply(MCONTACT contact, wstring incomingMessage, bool saveChoice)
{
wchar_t* str = new wchar_t[incomingMessage.length() + 1];
- mir_tstrcpy(str, incomingMessage.c_str());
+ mir_wstrcpy(str, incomingMessage.c_str());
CharLower(str);
incomingMessage = str;
delete[] str;
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 100c18b144..ebe6dd21d6 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -65,14 +65,14 @@ void UpdateEngine() wchar_t* GetFullName(const wchar_t *filename)
{
- size_t flen = mir_tstrlen(filename);
+ size_t flen = mir_wstrlen(filename);
wchar_t* fullname = const_cast<wchar_t*>(filename);
if (!wcschr(filename, ':')) {
- size_t plen = mir_tstrlen(tszPath);
+ size_t plen = mir_wstrlen(tszPath);
fullname = new wchar_t[plen + flen + 1];
fullname[0] = NULL;
- mir_tstrcat(fullname, tszPath);
- mir_tstrcat(fullname, filename);
+ mir_wstrcat(fullname, tszPath);
+ mir_wstrcat(fullname, filename);
}
return fullname;
}
@@ -361,7 +361,7 @@ static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP const size_t fileNameSize = 5000;
wchar_t *filename = new wchar_t[fileNameSize];
wchar_t *fullname = GetFullName(Config.MindFileName);
- mir_tstrcpy(filename, fullname);
+ mir_wstrcpy(filename, fullname);
if (fullname != Config.MindFileName)
delete[] fullname;
@@ -407,7 +407,7 @@ static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP bTranslated = blInit = LoadMind(c, line);
if (!bTranslated) {
wchar_t message[5000];
- mir_sntprintf(message, TranslateTS(FAILED_TO_LOAD_BASE), line, c);
+ mir_snwprintf(message, TranslateTS(FAILED_TO_LOAD_BASE), line, c);
MessageBox(NULL, message, TranslateTS(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
}
}
@@ -575,7 +575,7 @@ extern "C" int __declspec(dllexport) Load(void) blInit = LoadMind(Config.MindFileName, line);
if (!blInit) {
wchar_t path[2000];
- mir_sntprintf(path, TranslateTS(FAILED_TO_LOAD_BASE), line, (const wchar_t*)Config.MindFileName);
+ mir_snwprintf(path, TranslateTS(FAILED_TO_LOAD_BASE), line, (const wchar_t*)Config.MindFileName);
MessageBox(NULL, path, TranslateTS(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
}
return 0;
@@ -593,7 +593,7 @@ extern "C" int __declspec(dllexport) Unload(void) //So in case of saving error we will remain silent
#if 0
wchar_t path[MAX_PATH];
- mir_sntprintf(path, TranslateTS(FAILED_TO_SAVE_BASE), (const wchar_t*)Config.MindFileName);
+ mir_snwprintf(path, TranslateTS(FAILED_TO_SAVE_BASE), (const wchar_t*)Config.MindFileName);
wchar_t* err = TranslateTS(BOLTUN_ERROR);
MessageBox(NULL, path, err, MB_ICONERROR | MB_TASKMODAL | MB_OK); */
#endif
diff --git a/plugins/Boltun/src/config.cpp b/plugins/Boltun/src/config.cpp index dd821a886b..68d6035315 100644 --- a/plugins/Boltun/src/config.cpp +++ b/plugins/Boltun/src/config.cpp @@ -58,7 +58,7 @@ inline wchar_t* GetString(char* key, const wchar_t* def) inline const wchar_t* SetString(char* key, const wchar_t* value)
{
- size_t len = mir_tstrlen(value) + 1;
+ size_t len = mir_wstrlen(value) + 1;
wchar_t* val = new wchar_t[len];
wcscpy_s(val, len, value);
db_set_ts(NULL, BOLTUN_KEY, key, val);
|