summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/dialogs.cpp14
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp10
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp10
-rw-r--r--protocols/Gadu-Gadu/src/import.cpp26
-rw-r--r--protocols/Gadu-Gadu/src/services.cpp2
7 files changed, 35 insertions, 35 deletions
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index cfbb68266d..c026f4afc6 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -638,7 +638,7 @@ retry:
_tcsncpy_s(strFmt2, pcli->pfnGetStatusModeDescription( status_gg2m(atoi(__status)), 0), _TRUNCATE);
if (__city) {
mir_sntprintf(strFmt1, SIZEOF(strFmt1), _T(", %s %s"), TranslateT("City:"), __city);
- _tcsncat(strFmt2, strFmt1, SIZEOF(strFmt2) - _tcslen(strFmt2));
+ _tcsncat(strFmt2, strFmt1, SIZEOF(strFmt2) - mir_tstrlen(strFmt2));
}
if (__birthyear) {
time_t t = time(NULL);
@@ -647,7 +647,7 @@ retry:
if (br < (lt->tm_year + 1900) && br > 1900) {
mir_sntprintf(strFmt1, SIZEOF(strFmt1), _T(", %s %d"), TranslateT("Age:"), (lt->tm_year + 1900) - br);
- _tcsncat(strFmt2, strFmt1, SIZEOF(strFmt2) - _tcslen(strFmt2));
+ _tcsncat(strFmt2, strFmt1, SIZEOF(strFmt2) - mir_tstrlen(strFmt2));
}
}
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp
index 82a635c024..50616a407b 100644
--- a/protocols/Gadu-Gadu/src/dialogs.cpp
+++ b/protocols/Gadu-Gadu/src/dialogs.cpp
@@ -832,28 +832,28 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam,
req = gg_pubdir50_new(GG_PUBDIR50_WRITE);
GetDlgItemText(hwndDlg, IDC_FIRSTNAME, text, SIZEOF(text));
- if (_tcslen(text)){
+ if (mir_tstrlen(text)){
char* text_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_FIRSTNAME, text_utf8);
mir_free(text_utf8);
}
GetDlgItemText(hwndDlg, IDC_LASTNAME, text, SIZEOF(text));
- if (_tcslen(text)){
+ if (mir_tstrlen(text)){
char* text_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_LASTNAME, text_utf8);
mir_free(text_utf8);
}
GetDlgItemText(hwndDlg, IDC_NICKNAME, text, SIZEOF(text));
- if (_tcslen(text)){
+ if (mir_tstrlen(text)){
char* text_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_NICKNAME, text_utf8);
mir_free(text_utf8);
}
GetDlgItemText(hwndDlg, IDC_CITY, text, SIZEOF(text));
- if (_tcslen(text)){
+ if (mir_tstrlen(text)){
char* text_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_CITY, text_utf8);
mir_free(text_utf8);
@@ -872,21 +872,21 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam,
}
GetDlgItemText(hwndDlg, IDC_BIRTHYEAR, text, SIZEOF(text));
- if (_tcslen(text)){
+ if (mir_tstrlen(text)){
char* text_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_BIRTHYEAR, text_utf8);
mir_free(text_utf8);
}
GetDlgItemText(hwndDlg, IDC_FAMILYNAME, text, SIZEOF(text));
- if (_tcslen(text)){
+ if (mir_tstrlen(text)){
char* text_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_FAMILYNAME, text_utf8);
mir_free(text_utf8);
}
GetDlgItemText(hwndDlg, IDC_CITYORIGIN, text, SIZEOF(text));
- if (_tcslen(text)){
+ if (mir_tstrlen(text)){
char* text_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_FAMILYCITY, text_utf8);
mir_free(text_utf8);
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp
index bb8facc711..9f93b0c6f7 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.cpp
+++ b/protocols/Gadu-Gadu/src/gg_proto.cpp
@@ -405,7 +405,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
// Fetch search data
GetDlgItemText(hwndDlg, IDC_FIRSTNAME, text, SIZEOF(text));
- if (_tcslen(text))
+ if (mir_tstrlen(text))
{
char *firstName_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_FIRSTNAME, firstName_utf8);
@@ -415,7 +415,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
/* 1 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_LASTNAME, text, SIZEOF(text));
- if (_tcslen(text))
+ if (mir_tstrlen(text))
{
char *lastName_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_LASTNAME, lastName_utf8);
@@ -425,7 +425,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
/* 2 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_NICKNAME, text, SIZEOF(text));
- if (_tcslen(text))
+ if (mir_tstrlen(text))
{
char *nickName_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_NICKNAME, nickName_utf8);
@@ -435,7 +435,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
/* 3 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_CITY, text, SIZEOF(text));
- if (_tcslen(text))
+ if (mir_tstrlen(text))
{
char *city_utf8 = mir_utf8encodeT(text);
gg_pubdir50_add(req, GG_PUBDIR50_CITY, city_utf8);
@@ -445,7 +445,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg)
/* 4 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_AGEFROM, text, SIZEOF(text));
- if (_tcslen(text))
+ if (mir_tstrlen(text))
{
int yearTo = _tstoi(text);
int yearFrom;
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 070f28cb57..5386d62273 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -170,7 +170,7 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam)
gce.ptszNick = nickT;
// Get rid of CRLF at back
- int lc = (int)_tcslen(gch->ptszText) - 1;
+ int lc = (int)mir_tstrlen(gch->ptszText) - 1;
while(lc >= 0 && (gch->ptszText[lc] == '\n' || gch->ptszText[lc] == '\r'))
gch->ptszText[lc --] = 0;
@@ -316,7 +316,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count
gcwindow.ptszStatusbarText = status;
// Here we put nice new hash sign
- TCHAR *name = (TCHAR*)calloc(_tcslen(gcwindow.ptszName) + 2, sizeof(TCHAR));
+ TCHAR *name = (TCHAR*)calloc(mir_tstrlen(gcwindow.ptszName) + 2, sizeof(TCHAR));
*name = '#'; _tcscpy(name + 1, gcwindow.ptszName);
gcwindow.ptszName = name;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index 61452bb6fc..a93de45b5a 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -227,10 +227,10 @@ TCHAR *gg_img_getfilter(TCHAR *szFilter, int nSize)
// Make up filter
_tcsncpy(pFilter, szFilterName, nSize);
- pFilter += _tcslen(pFilter) + 1;
+ pFilter += mir_tstrlen(pFilter) + 1;
if (pFilter >= szFilter + nSize) return NULL;
_tcsncpy(pFilter, szFilterMask, nSize - (pFilter - szFilter));
- pFilter += _tcslen(pFilter) + 1;
+ pFilter += mir_tstrlen(pFilter) + 1;
if (pFilter >= szFilter + nSize) return NULL;
*pFilter = 0;
@@ -787,7 +787,7 @@ TCHAR *gg_img_hasextension(TCHAR *filename)
TCHAR *imgtype = _tcsrchr(filename, '.');
if (imgtype != NULL)
{
- size_t len = _tcslen(imgtype);
+ size_t len = mir_tstrlen(imgtype);
imgtype++;
if (len == 4 && (_tcsicmp(imgtype, _T("bmp")) == 0 ||
_tcsicmp(imgtype, _T("gif")) == 0 ||
@@ -818,7 +818,7 @@ int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img)
}
else {
_tcscpy(szPath, path);
- tPathLen = _tcslen(szPath);
+ tPathLen = mir_tstrlen(szPath);
}
if ( _taccess(szPath, 0)){
@@ -835,7 +835,7 @@ int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img)
mir_sntprintf(szPath + tPathLen, MAX_PATH - tPathLen, _T("\\%s"), dat->lpszFileName);
if ((pImgext = gg_img_hasextension(szPath)) == NULL)
- pImgext = szPath + _tcslen(szPath);
+ pImgext = szPath + mir_tstrlen(szPath);
_tcsncpy_s(imgext, pImgext, _TRUNCATE);
for (i = 1; ; ++i)
{
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp
index 536da7cb30..9a7a880e50 100644
--- a/protocols/Gadu-Gadu/src/import.cpp
+++ b/protocols/Gadu-Gadu/src/import.cpp
@@ -337,24 +337,24 @@ INT_PTR GGPROTO::import_text(WPARAM wParam, LPARAM lParam)
OPENFILENAME ofn = {0};
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
_tcsncpy(filter, TranslateT("Text files"), SIZEOF(filter));
- _tcsncat(filter, _T(" (*.txt)"), SIZEOF(filter) - _tcslen(filter));
- pfilter = filter + _tcslen(filter) + 1;
+ _tcsncat(filter, _T(" (*.txt)"), SIZEOF(filter) - mir_tstrlen(filter));
+ pfilter = filter + mir_tstrlen(filter) + 1;
if (pfilter >= filter + SIZEOF(filter))
return 0;
_tcsncpy(pfilter, _T("*.TXT"), SIZEOF(filter) - (pfilter - filter));
- pfilter = pfilter + _tcslen(pfilter) + 1;
+ pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + SIZEOF(filter))
return 0;
_tcsncpy(pfilter, TranslateT("All Files"), SIZEOF(filter) - (pfilter - filter));
- _tcsncat(pfilter, _T(" (*)"), SIZEOF(filter) - (pfilter - filter) - _tcslen(pfilter));
- pfilter = pfilter + _tcslen(pfilter) + 1;
+ _tcsncat(pfilter, _T(" (*)"), SIZEOF(filter) - (pfilter - filter) - mir_tstrlen(pfilter));
+ pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + SIZEOF(filter))
return 0;
_tcsncpy(pfilter, _T("*"), SIZEOF(filter) - (pfilter - filter));
- pfilter = pfilter + _tcslen(pfilter) + 1;
+ pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + SIZEOF(filter))
return 0;
@@ -404,25 +404,25 @@ INT_PTR GGPROTO::export_text(WPARAM wParam, LPARAM lParam)
TCHAR filter[512], *pfilter;
_tcsncpy(str, TranslateT("contacts"), SIZEOF(str));
- _tcsncat(str, _T(".txt"), SIZEOF(str) - _tcslen(str));
+ _tcsncat(str, _T(".txt"), SIZEOF(str) - mir_tstrlen(str));
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
_tcsncpy(filter, TranslateT("Text files"), SIZEOF(filter));
- _tcsncat(filter, _T(" (*.txt)"), SIZEOF(filter) - _tcslen(filter));
- pfilter = filter + _tcslen(filter) + 1;
+ _tcsncat(filter, _T(" (*.txt)"), SIZEOF(filter) - mir_tstrlen(filter));
+ pfilter = filter + mir_tstrlen(filter) + 1;
if (pfilter >= filter + SIZEOF(filter))
return 0;
_tcsncpy(pfilter, _T("*.TXT"), SIZEOF(filter) - (pfilter - filter));
- pfilter = pfilter + _tcslen(pfilter) + 1;
+ pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + SIZEOF(filter))
return 0;
_tcsncpy(pfilter, TranslateT("All Files"), SIZEOF(filter) - (pfilter - filter));
- _tcsncat(pfilter, _T(" (*)"), SIZEOF(filter) - (pfilter - filter) - _tcslen(pfilter));
- pfilter = pfilter + _tcslen(pfilter) + 1;
+ _tcsncat(pfilter, _T(" (*)"), SIZEOF(filter) - (pfilter - filter) - mir_tstrlen(pfilter));
+ pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + SIZEOF(filter))
return 0;
_tcsncpy(pfilter, _T("*"), SIZEOF(filter) - (pfilter - filter));
- pfilter = pfilter + _tcslen(pfilter) + 1;
+ pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + SIZEOF(filter))
return 0;
*pfilter = '\0';
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp
index be57b3020f..1d8994cc44 100644
--- a/protocols/Gadu-Gadu/src/services.cpp
+++ b/protocols/Gadu-Gadu/src/services.cpp
@@ -193,7 +193,7 @@ INT_PTR GGPROTO::getavatarinfo(WPARAM wParam, LPARAM lParam)
//directly check if contact has protected user avatar set by AVS, and if yes return it as protocol avatar
DBVARIANT dbv;
if (!db_get_ts(pai->hContact, "ContactPhoto", "Backup", &dbv)) {
- if ((_tcslen(dbv.ptszVal)>0) && db_get_b(pai->hContact, "ContactPhoto", "Locked", 0)){
+ if ((mir_tstrlen(dbv.ptszVal)>0) && db_get_b(pai->hContact, "ContactPhoto", "Locked", 0)){
debugLogA("getavatarinfo(): Incoming request for avatar information. Contact has assigned Locked ContactPhoto. return GAIR_SUCCESS");
_tcscpy_s(pai->filename, SIZEOF(pai->filename) ,dbv.ptszVal);
pai->format = ProtoGetAvatarFormat(pai->filename);