diff options
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 14 | ||||
-rw-r--r-- | plugins/TipperYM/src/skin_parser.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/str_utils.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.cpp | 28 |
4 files changed, 23 insertions, 23 deletions
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 23eccb1026..495957a6ae 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -28,7 +28,7 @@ __inline void AddRow(PopupWindowData *pwd, TCHAR *swzLabel, TCHAR *swzValue, cha pwd->rows = pRows; pwd->rows[pwd->iRowCount].swzLabel = swzLabel ? mir_tstrdup(swzLabel) : NULL; pwd->rows[pwd->iRowCount].swzValue = swzValue ? mir_tstrdup(swzValue) : NULL; - pwd->rows[pwd->iRowCount].spi = bParseSmileys ? Smileys_PreParse(swzValue, (int)_tcslen(swzValue), szProto) : NULL; + pwd->rows[pwd->iRowCount].spi = bParseSmileys ? Smileys_PreParse(swzValue, (int)mir_tstrlen(swzValue), szProto) : NULL; pwd->rows[pwd->iRowCount].bValueNewline = bNewline; pwd->rows[pwd->iRowCount].bLineAbove = bLineAbove; pwd->rows[pwd->iRowCount].bIsTitle = bIsTitle; @@ -76,7 +76,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa _tcscpy(pwd->swzTitle, pa->tszAccountName); } - if (_tcslen(pwd->swzTitle) == 0) + if (mir_tstrlen(pwd->swzTitle) == 0) a2t(pwd->clcit.szProto, pwd->swzTitle, TITLE_TEXT_LEN); if (CallService(MS_PROTO_ISACCOUNTLOCKED, 0, (LPARAM)pwd->clcit.szProto)) @@ -225,7 +225,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa } else { TCHAR buff[2048], *swzText = pwd->clcit.swzText; - size_t iBuffPos, i = 0, iSize = _tcslen(pwd->clcit.swzText); + size_t iBuffPos, i = 0, iSize = mir_tstrlen(pwd->clcit.swzText); bool bTopMessage = false; while (i < iSize && swzText[i] != _T('<')) { @@ -772,7 +772,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa for (int i = 0; i < pwd->iRowCount; i++) { if (pwd->rows[i].swzValue) { TCHAR buff[128]; - int iLen = (int)_tcslen(pwd->rows[i].swzValue); + int iLen = (int)mir_tstrlen(pwd->rows[i].swzValue); if (iLen) { if (iLen > MAX_VALUE_LEN) { _tcsncpy(buff, pwd->rows[i].swzValue, MAX_VALUE_LEN); @@ -1066,7 +1066,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pwd->rows[pwd->iRowCount].swzLabel = mir_tstrdup(buff_label); pwd->rows[pwd->iRowCount].swzValue = mir_tstrdup(buff); - pwd->rows[pwd->iRowCount].spi = Smileys_PreParse(buff, (int)_tcslen(buff), szProto); + pwd->rows[pwd->iRowCount].spi = Smileys_PreParse(buff, (int)mir_tstrlen(buff), szProto); pwd->rows[pwd->iRowCount].bValueNewline = node->di.bValueNewline; pwd->rows[pwd->iRowCount].bLineAbove = node->di.bLineAbove; pwd->iRowCount++; @@ -1183,7 +1183,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa else if (hFontLabels) SelectObject(hdc, (HGDIOBJ)hFontLabels); - GetTextExtentPoint32(hdc, pwd->rows[i].swzLabel, (int)_tcslen(pwd->rows[i].swzLabel), &sz); + GetTextExtentPoint32(hdc, pwd->rows[i].swzLabel, (int)mir_tstrlen(pwd->rows[i].swzLabel), &sz); if (sz.cx > pwd->iLabelWidth) pwd->iLabelWidth = sz.cx; } @@ -1198,7 +1198,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa SelectObject(hdc, (HGDIOBJ)hFontLabels); if (pwd->rows[i].swzLabel && pwd->rows[i].swzLabel[0]) - GetTextExtentPoint32(hdc, pwd->rows[i].swzLabel, (int)_tcslen(pwd->rows[i].swzLabel), &sz); + GetTextExtentPoint32(hdc, pwd->rows[i].swzLabel, (int)mir_tstrlen(pwd->rows[i].swzLabel), &sz); else sz.cy = sz.cx = 0; diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp index f93448d397..a36d2fed36 100644 --- a/plugins/TipperYM/src/skin_parser.cpp +++ b/plugins/TipperYM/src/skin_parser.cpp @@ -206,7 +206,7 @@ void ParseFontPart(FILE *fp, TCHAR *buff) {
if (GetSettingName(buff, "", szSetting, sizeof(szSetting) - 1))
{
- if (_tcslen(pch) > 32)
+ if (mir_tstrlen(pch) > 32)
pch[32] = 0;
db_set_ts(0, MODULE, szSetting, pch);
diff --git a/plugins/TipperYM/src/str_utils.cpp b/plugins/TipperYM/src/str_utils.cpp index a79cb3b351..b6b605c7de 100644 --- a/plugins/TipperYM/src/str_utils.cpp +++ b/plugins/TipperYM/src/str_utils.cpp @@ -195,7 +195,7 @@ char *t2utf(const TCHAR *ts) TCHAR *myfgets(TCHAR *Buf, int MaxCount, FILE *File)
{
_fgetts(Buf, MaxCount, File);
- for (size_t i = _tcslen(Buf) - 1; ; i--)
+ for (size_t i = mir_tstrlen(Buf) - 1; ; i--)
{
if (Buf[i] == '\n' || Buf[i] == ' ')
Buf[i] = 0;
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 9d4c23a4ec..31fa26a4a3 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -85,7 +85,7 @@ void StripBBCodesInPlace(TCHAR *swzText) return; size_t iRead = 0, iWrite = 0; - size_t iLen = _tcslen(swzText); + size_t iLen = mir_tstrlen(swzText); while(iRead <= iLen) { // copy terminating null too while (iRead <= iLen && swzText[iRead] != '[') { @@ -225,7 +225,7 @@ TCHAR* GetStatusMessageText(MCONTACT hContact) return NULL; if (!db_get_ts(hContact, MODULE, "TempStatusMsg", &dbv)) { - if (_tcslen(dbv.ptszVal) != 0) + if (mir_tstrlen(dbv.ptszVal) != 0) swzMsg = mir_tstrdup(dbv.ptszVal); db_free(&dbv); } @@ -237,7 +237,7 @@ TCHAR* GetStatusMessageText(MCONTACT hContact) return NULL; if (!db_get_ts(hContact, "CList", "StatusMsg", &dbv)) { - if (_tcslen(dbv.ptszVal) != 0) + if (mir_tstrlen(dbv.ptszVal) != 0) swzMsg = mir_tstrdup(dbv.ptszVal); db_free(&dbv); } @@ -480,7 +480,7 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF // pass to variables plugin if available TCHAR *swzVarSrc = (parseTipperVarsFirst ? mir_tstrdup(swzSource) : variables_parsedup((TCHAR *)swzSource, 0, hContact)); - size_t iSourceLen = _tcslen(swzVarSrc); + size_t iSourceLen = mir_tstrlen(swzVarSrc); size_t si = 0, di = 0, v = 0; TCHAR swzVName[LABEL_LEN], swzRep[VALUE_LEN], swzAlt[VALUE_LEN]; @@ -558,13 +558,13 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF if (p) { *p = 0; // clip swzAlt from swzVName p++; - if (_tcslen(p) > 4 && _tcsncmp(p, _T("raw:"), 4) == 0) { // raw db substitution + if (mir_tstrlen(p) > 4 && _tcsncmp(p, _T("raw:"), 4) == 0) { // raw db substitution char raw_spec[LABEL_LEN]; p += 4; t2a(p, raw_spec, LABEL_LEN); GetRawSubstText(hContact, raw_spec, swzAlt, VALUE_LEN); } - else if (_tcslen(p) > 4 && _tcsncmp(p, _T("sys:"), 4) == 0) { // 'system' substitution + else if (mir_tstrlen(p) > 4 && _tcsncmp(p, _T("sys:"), 4) == 0) { // 'system' substitution p += 4; GetSysSubstText(hContact, p, swzAlt, VALUE_LEN); } @@ -586,7 +586,7 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF } } swzAlt[VALUE_LEN - 1] = 0; - if (_tcslen(swzAlt) != 0) + if (mir_tstrlen(swzAlt) != 0) bAltSubst = true; } @@ -618,12 +618,12 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF } if (bSubst) { - size_t rep_len = _tcslen(swzRep); + size_t rep_len = mir_tstrlen(swzRep); _tcsncpy(&swzDest[di], swzRep, min(rep_len, iDestLen - di)); di += rep_len - 1; // -1 because we inc at bottom of loop } else if (bAltSubst) { - size_t alt_len = _tcslen(swzAlt); + size_t alt_len = mir_tstrlen(swzAlt); _tcsncpy(&swzDest[di], swzAlt, min(alt_len, iDestLen - di)); di += alt_len - 1; // -1 because we inc at bottom of loop } @@ -680,7 +680,7 @@ bool GetValueText(MCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, size_t void TruncateString(TCHAR *swzText) { if (swzText && opt.iLimitCharCount > 3) { - if ((int)_tcslen(swzText) > opt.iLimitCharCount) { + if ((int)mir_tstrlen(swzText) > opt.iLimitCharCount) { swzText[opt.iLimitCharCount - 3] = 0; _tcscat(swzText, _T("...")); } @@ -731,7 +731,7 @@ TCHAR *GetProtoExtraStatusTitle(char *szProto) return NULL; if (!db_get_ts(0, szProto, "XStatusName", &dbv)) { - if (_tcslen(dbv.ptszVal) != 0) + if (mir_tstrlen(dbv.ptszVal) != 0) swzText = mir_tstrdup(dbv.ptszVal); db_free(&dbv); } @@ -756,7 +756,7 @@ TCHAR *GetProtoExtraStatusMessage(char *szProto) TCHAR *swzText = NULL; DBVARIANT dbv; if (!db_get_ts(0, szProto, "XStatusMsg", &dbv)) { - if (_tcslen(dbv.ptszVal) != 0) + if (mir_tstrlen(dbv.ptszVal) != 0) swzText = mir_tstrdup(dbv.ptszVal); db_free(&dbv); @@ -794,7 +794,7 @@ TCHAR *GetListeningTo(char *szProto) return NULL; if (!db_get_ts(0, szProto, "ListeningTo", &dbv)) { - if (_tcslen(dbv.ptszVal) != 0) + if (mir_tstrlen(dbv.ptszVal) != 0) swzText = mir_tstrdup(dbv.ptszVal); db_free(&dbv); } @@ -816,7 +816,7 @@ TCHAR *GetJabberAdvStatusText(char *szProto, const char *szSlot, const char *szV char szSetting[128]; mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", szProto, szSlot, szValue); if (!db_get_ts(0, "AdvStatus", szSetting, &dbv)) { - if (_tcslen(dbv.ptszVal) != 0) + if (mir_tstrlen(dbv.ptszVal) != 0) swzText = mir_tstrdup(dbv.ptszVal); db_free(&dbv); } |