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 /utils/mir_options.cpp | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'utils/mir_options.cpp')
-rw-r--r-- | utils/mir_options.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/utils/mir_options.cpp b/utils/mir_options.cpp index 90bf27c3e8..dcba3e6b26 100644 --- a/utils/mir_options.cpp +++ b/utils/mir_options.cpp @@ -38,12 +38,12 @@ static wchar_t* MyDBGetContactSettingTString(MCONTACT hContact, char* module, ch out[0] = '\0'; if (!db_get_ts(hContact, module, setting, &dbv)) { - mir_tstrncpy(out, dbv.ptszVal, (int)len); + mir_wstrncpy(out, dbv.ptszVal, (int)len); db_free(&dbv); } else { if (def != NULL) - mir_tstrncpy(out, def, (int)len); + mir_wstrncpy(out, def, (int)len); } return out; @@ -55,7 +55,7 @@ static wchar_t dbPath[MAX_PATH] = { 0 }; // database profile path (read at star static int PathIsAbsolute(const wchar_t *path) { - if (!path || !(mir_tstrlen(path) > 2)) + if (!path || !(mir_wstrlen(path) > 2)) return 0; if ((path[1] == ':' && path[2] == '\\') || (path[0] == '\\' && path[1] == '\\')) return 1; @@ -65,33 +65,33 @@ static int PathIsAbsolute(const wchar_t *path) static void PathToRelative(wchar_t *pOut, size_t outSize, const wchar_t *pSrc) { if (!PathIsAbsolute(pSrc)) - mir_tstrncpy(pOut, pSrc, (int)outSize); + mir_wstrncpy(pOut, pSrc, (int)outSize); else { if (dbPath[0] == '\0') { char tmp[1024]; CallService(MS_DB_GETPROFILEPATH, _countof(tmp), (LPARAM)tmp); - mir_sntprintf(dbPath, L"%S\\", tmp); + mir_snwprintf(dbPath, L"%S\\", tmp); } - size_t len = mir_tstrlen(dbPath); + size_t len = mir_wstrlen(dbPath); if (!wcsnicmp(pSrc, dbPath, len)) len = 0; - mir_tstrncpy(pOut, pSrc + len, outSize); + mir_wstrncpy(pOut, pSrc + len, outSize); } } static void PathToAbsolute(wchar_t *pOut, size_t outSize, const wchar_t *pSrc) { if (PathIsAbsolute(pSrc) || !isalnum(pSrc[0])) - mir_tstrncpy(pOut, pSrc, (int)outSize); + mir_wstrncpy(pOut, pSrc, (int)outSize); else { if (dbPath[0] == '\0') { char tmp[1024]; CallService(MS_DB_GETPROFILEPATH, _countof(tmp), (LPARAM)tmp); - mir_sntprintf(dbPath, L"%S\\", tmp); + mir_snwprintf(dbPath, L"%S\\", tmp); } - mir_sntprintf(pOut, outSize, L"%s%s", dbPath, pSrc); + mir_snwprintf(pOut, outSize, L"%s%s", dbPath, pSrc); } } @@ -267,7 +267,7 @@ INT_PTR CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, cha int k; for (k = 0; k < count; k++) { wchar_t *id = (wchar_t *)SendDlgItemMessage(hwndDlg, ctrl->nID, CB_GETITEMDATA, (WPARAM)k, 0); - if (mir_tstrcmp(id, tmp) == 0) + if (mir_wstrcmp(id, tmp) == 0) break; } if (k < count) |