diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 17:01:01 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 17:01:01 +0000 |
commit | d5ee0fc23bdc1a194774591eb4ce63b8bebb8d6e (patch) | |
tree | 47da9333297ad6bd11d88762adba1ad5d55fa940 /protocols | |
parent | ab13aa962b5064fe85ec0562c04d16e8920e92e0 (diff) |
replace strncat to mir_strncat
git-svn-id: http://svn.miranda-ng.org/main/trunk@13780 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Gadu-Gadu/src/filetransfer.cpp | 12 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 42 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/oauth.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/services.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_clients.cpp | 18 | ||||
-rw-r--r-- | protocols/Twitter/src/ui.cpp | 4 | ||||
-rw-r--r-- | protocols/Xfire/src/searching4games.cpp | 6 |
7 files changed, 43 insertions, 43 deletions
diff --git a/protocols/Gadu-Gadu/src/filetransfer.cpp b/protocols/Gadu-Gadu/src/filetransfer.cpp index 7cf7f5f319..3d23d0a9a5 100644 --- a/protocols/Gadu-Gadu/src/filetransfer.cpp +++ b/protocols/Gadu-Gadu/src/filetransfer.cpp @@ -270,7 +270,7 @@ void __cdecl GGPROTO::dccmainthread(void*) PROTOFILETRANSFERSTATUS pfts;
local_dcc->tick = tick;
strncpy(filename, local_dcc->folder, sizeof(filename));
- strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - mir_strlen(filename));
+ mir_strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - mir_strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts.hContact = (MCONTACT)local_dcc->contact;
@@ -301,7 +301,7 @@ void __cdecl GGPROTO::dccmainthread(void*) {
PROTOFILETRANSFERSTATUS pfts;
strncpy(filename, local_dcc->folder, sizeof(filename));
- strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - mir_strlen(filename));
+ mir_strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - mir_strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts.hContact = (MCONTACT)local_dcc->contact;
@@ -500,7 +500,7 @@ void __cdecl GGPROTO::dccmainthread(void*) PROTOFILETRANSFERSTATUS pfts;
local_dcc7->tick = tick;
strncpy(filename, local_dcc7->folder, sizeof(filename));
- strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - mir_strlen(filename));
+ mir_strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - mir_strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts.hContact = (MCONTACT)local_dcc7->contact;
@@ -531,7 +531,7 @@ void __cdecl GGPROTO::dccmainthread(void*) {
PROTOFILETRANSFERSTATUS pfts;
strncpy(filename, local_dcc7->folder, sizeof(filename));
- strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - mir_strlen(filename));
+ mir_strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - mir_strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts.hContact = (MCONTACT)local_dcc7->contact;
@@ -667,7 +667,7 @@ HANDLE GGPROTO::dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath) struct gg_dcc *dcc = (struct gg_dcc *) hTransfer;
char fileName[MAX_PATH], *path = mir_t2a(szPath);
strncpy(fileName, path, sizeof(fileName));
- strncat(fileName, (char*)dcc->file_info.filename, sizeof(fileName) - mir_strlen(fileName));
+ mir_strncat(fileName, (char*)dcc->file_info.filename, sizeof(fileName) - mir_strlen(fileName));
dcc->folder = _strdup((char *) path);
dcc->tick = 0;
mir_free(path);
@@ -709,7 +709,7 @@ HANDLE GGPROTO::dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath) char fileName[MAX_PATH], *path = mir_t2a(szPath);
int iFtRemoveRes;
strncpy(fileName, path, sizeof(fileName));
- strncat(fileName, (char*)dcc7->filename, sizeof(fileName) - mir_strlen(fileName));
+ mir_strncat(fileName, (char*)dcc7->filename, sizeof(fileName) - mir_strlen(fileName));
dcc7->folder = _strdup((char *) path);
dcc7->tick = 0;
mir_free(path);
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 2b6d0db04a..34f27f4514 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -328,25 +328,25 @@ HANDLE GGPROTO::SearchByName(const PROTOCHAR *nick, const PROTOCHAR *firstName, {
T2Utf nick_utf8(nick);
gg_pubdir50_add(req, GG_PUBDIR50_NICKNAME, nick_utf8);
- strncat(data, nick_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, nick_utf8, sizeof(data) - mir_strlen(data));
}
- strncat(data, ".", sizeof(data) - mir_strlen(data));
+ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
if (firstName)
{
T2Utf firstName_utf8(firstName);
gg_pubdir50_add(req, GG_PUBDIR50_FIRSTNAME, firstName_utf8);
- strncat(data, firstName_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, firstName_utf8, sizeof(data) - mir_strlen(data));
}
- strncat(data, ".", sizeof(data) - mir_strlen(data));
+ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
if (lastName)
{
T2Utf lastName_utf8(lastName);
gg_pubdir50_add(req, GG_PUBDIR50_LASTNAME, lastName_utf8);
- strncat(data, lastName_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, lastName_utf8, sizeof(data) - mir_strlen(data));
}
- strncat(data, ".", sizeof(data) - mir_strlen(data));
+ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
// Count crc & check if the data was equal if yes do same search with shift
crc = crc_get(data);
@@ -402,36 +402,36 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg) {
T2Utf firstName_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_FIRSTNAME, firstName_utf8);
- strncat(data, firstName_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, firstName_utf8, sizeof(data) - mir_strlen(data));
}
- /* 1 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 1 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_LASTNAME, text, SIZEOF(text));
if (mir_tstrlen(text))
{
T2Utf lastName_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_LASTNAME, lastName_utf8);
- strncat(data, lastName_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, lastName_utf8, sizeof(data) - mir_strlen(data));
}
- /* 2 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 2 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_NICKNAME, text, SIZEOF(text));
if (mir_tstrlen(text))
{
T2Utf nickName_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_NICKNAME, nickName_utf8);
- strncat(data, nickName_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, nickName_utf8, sizeof(data) - mir_strlen(data));
}
- /* 3 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 3 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_CITY, text, SIZEOF(text));
if (mir_tstrlen(text))
{
T2Utf city_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_CITY, city_utf8);
- strncat(data, city_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, city_utf8, sizeof(data) - mir_strlen(data));
}
- /* 4 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 4 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
GetDlgItemText(hwndDlg, IDC_AGEFROM, text, SIZEOF(text));
if (mir_tstrlen(text))
@@ -459,29 +459,29 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg) T2Utf age_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_BIRTHYEAR, age_utf8);
- strncat(data, age_utf8, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, age_utf8, sizeof(data) - mir_strlen(data));
}
- /* 5 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 5 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
switch(SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_GETCURSEL, 0, 0))
{
case 1:
gg_pubdir50_add(req, GG_PUBDIR50_GENDER, GG_PUBDIR50_GENDER_FEMALE);
- strncat(data, GG_PUBDIR50_GENDER_MALE, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, GG_PUBDIR50_GENDER_MALE, sizeof(data) - mir_strlen(data));
break;
case 2:
gg_pubdir50_add(req, GG_PUBDIR50_GENDER, GG_PUBDIR50_GENDER_MALE);
- strncat(data, GG_PUBDIR50_GENDER_FEMALE, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, GG_PUBDIR50_GENDER_FEMALE, sizeof(data) - mir_strlen(data));
break;
}
- /* 6 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 6 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
if (IsDlgButtonChecked(hwndDlg, IDC_ONLYCONNECTED))
{
gg_pubdir50_add(req, GG_PUBDIR50_ACTIVE, GG_PUBDIR50_ACTIVE_TRUE);
- strncat(data, GG_PUBDIR50_ACTIVE_TRUE, sizeof(data) - mir_strlen(data));
+ mir_strncat(data, GG_PUBDIR50_ACTIVE_TRUE, sizeof(data) - mir_strlen(data));
}
- /* 7 */ strncat(data, ".", sizeof(data) - mir_strlen(data));
+ /* 7 */ mir_strncat(data, ".", sizeof(data) - mir_strlen(data));
// No data entered
if (mir_strlen(data) <= 7 || (mir_strlen(data) == 8 && IsDlgButtonChecked(hwndDlg, IDC_ONLYCONNECTED))) return (HWND)0;
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp index f949bd7479..7990753277 100644 --- a/protocols/Gadu-Gadu/src/oauth.cpp +++ b/protocols/Gadu-Gadu/src/oauth.cpp @@ -228,7 +228,7 @@ char *oauth_generate_nonce() int strSizeB = int(mir_strlen(timestamp) + sizeof(randnum));
ptrA str((char *)mir_calloc(strSizeB + 1));
mir_strcpy(str, timestamp);
- strncat(str, randnum, sizeof(randnum));
+ mir_strncat(str, randnum, sizeof(randnum));
BYTE digest[16];
mir_md5_hash((BYTE*)(char*)str, strSizeB, digest);
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index af998847a4..d0f442d872 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -43,7 +43,7 @@ char *gg_status2db(int status, const char *suffix) default: return NULL;
}
strncpy(str, prefix, sizeof(str));
- strncat(str, suffix, sizeof(str) - mir_strlen(str));
+ mir_strncat(str, suffix, sizeof(str) - mir_strlen(str));
return str;
}
diff --git a/protocols/IcqOscarJ/src/icq_clients.cpp b/protocols/IcqOscarJ/src/icq_clients.cpp index 79f6e6d9e9..275dce0f04 100644 --- a/protocols/IcqOscarJ/src/icq_clients.cpp +++ b/protocols/IcqOscarJ/src/icq_clients.cpp @@ -514,12 +514,12 @@ const char* CIcqProto::detectUserClient( }
else if (capId = MatchCapability(caps, wLen, &capmChat, 0xA)) {
mir_strcpy(szClientBuf, "mChat ");
- strncat(szClientBuf, (char*)(*capId) + 0xA, 6);
+ mir_strncat(szClientBuf, (char*)(*capId) + 0xA, 6);
szClient = szClientBuf;
}
else if (capId = MatchCapability(caps, wLen, &capJimm, 5)) {
mir_strcpy(szClientBuf, "Jimm ");
- strncat(szClientBuf, (char*)(*capId) + 5, 11);
+ mir_strncat(szClientBuf, (char*)(*capId) + 5, 11);
szClient = szClientBuf;
}
// http://corepager.net.ru/index/0-2
@@ -538,7 +538,7 @@ const char* CIcqProto::detectUserClient( // http://darkjimm.ucoz.ru/
else if (capId = MatchCapability(caps, wLen, &capDiChat, 9)) {
mir_strcpy(szClientBuf, "D[i]Chat");
- strncat(szClientBuf, (char*)(*capId) + 8, 8);
+ mir_strncat(szClientBuf, (char*)(*capId) + 8, 8);
szClient = szClientBuf;
}
else if (MatchCapability(caps, wLen, &capMacIcq))
@@ -569,31 +569,31 @@ const char* CIcqProto::detectUserClient( makeClientVersion(szClientBuf, "MIP ", ver1, ver2, ver3, ver4);
else {
mir_strcpy(szClientBuf, "MIP ");
- strncat(szClientBuf, (char*)(*capId) + 11, 5);
+ mir_strncat(szClientBuf, (char*)(*capId) + 11, 5);
}
szClient = szClientBuf;
}
//http://mip.rufon.net - new signature
else if (capId = MatchCapability(caps, wLen, &capMipClient, 0x04)) {
mir_strcpy(szClientBuf, "MIP ");
- strncat(szClientBuf, (char*)(*capId) + 4, 12);
+ mir_strncat(szClientBuf, (char*)(*capId) + 4, 12);
szClient = szClientBuf;
}
else if (capId = MatchCapability(caps, wLen, &capVmIcq, 0x06)) {
mir_strcpy(szClientBuf, "VmICQ");
- strncat(szClientBuf, (char*)(*capId) + 5, 11);
+ mir_strncat(szClientBuf, (char*)(*capId) + 5, 11);
szClient = szClientBuf;
}
// http://www.smape.com/smaper
else if (capId = MatchCapability(caps, wLen, &capSmapeR, 0x07)) {
mir_strcpy(szClientBuf, "SmapeR");
- strncat(szClientBuf, (char*)(*capId) + 6, 10);
+ mir_strncat(szClientBuf, (char*)(*capId) + 6, 10);
szClient = szClientBuf;
}
// http://yapp.ru
else if (capId = MatchCapability(caps, wLen, &capYapp, 0x04)) {
mir_strcpy(szClientBuf, "Yapp! v");
- strncat(szClientBuf, (char*)(*capId) + 8, 5);
+ mir_strncat(szClientBuf, (char*)(*capId) + 8, 5);
szClient = szClientBuf;
}
// http://www.dibsby.com (newer builds)
@@ -640,7 +640,7 @@ const char* CIcqProto::detectUserClient( // http://www.barobin.com/bayanICQ.html
else if (capId = MatchCapability(caps, wLen, &capBayan, 8)) {
mir_strcpy(szClientBuf, "bayanICQ ");
- strncat(szClientBuf, (char*)(*capId) + 8, 5);
+ mir_strncat(szClientBuf, (char*)(*capId) + 8, 5);
szClient = szClientBuf;
}
else if (capId = MatchCapability(caps, wLen, &capJabberJIT, 0x04))
diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index 00ed1aab76..a0232d5da2 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -84,7 +84,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM GetDlgItemTextA(hwndDlg, IDC_SERVER, str, SIZEOF(str) - 1);
if (str[mir_strlen(str) - 1] != '/')
- strncat(str, "/", SIZEOF(str) - mir_strlen(str));
+ mir_strncat(str, "/", SIZEOF(str) - mir_strlen(str));
db_set_s(0, proto->ModuleName(), TWITTER_KEY_BASEURL, str);
GetDlgItemText(hwndDlg, IDC_GROUP, tstr, SIZEOF(tstr));
@@ -231,7 +231,7 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar GetDlgItemTextA(hwndDlg, IDC_BASEURL, str, SIZEOF(str) - 1);
if (str[mir_strlen(str) - 1] != '/')
- strncat(str, "/", SIZEOF(str) - mir_strlen(str));
+ mir_strncat(str, "/", SIZEOF(str) - mir_strlen(str));
db_set_s(0, proto->ModuleName(), TWITTER_KEY_BASEURL, str);
db_set_b(0, proto->ModuleName(), TWITTER_KEY_CHATFEED, IsDlgButtonChecked(hwndDlg, IDC_CHATFEED) != 0);
diff --git a/protocols/Xfire/src/searching4games.cpp b/protocols/Xfire/src/searching4games.cpp index d04686ea12..01fb52f082 100644 --- a/protocols/Xfire/src/searching4games.cpp +++ b/protocols/Xfire/src/searching4games.cpp @@ -69,9 +69,9 @@ BOOL CheckPath(char*ppath, char*pathwildcard = NULL) strncpy(temp, ppath,XFIRE_MAX_STATIC_STRING_LEN-1);
*(temp + mir_strlen(temp) - 1) = 0;
- strncat(temp, wfd.cFileName, SIZEOF(temp) - mir_strlen(temp));
- strncat(temp, "\\", SIZEOF(temp) - mir_strlen(temp));
- strncat(temp, pos, SIZEOF(temp) - mir_strlen(temp));
+ mir_strncat(temp, wfd.cFileName, SIZEOF(temp) - mir_strlen(temp));
+ mir_strncat(temp, "\\", SIZEOF(temp) - mir_strlen(temp));
+ mir_strncat(temp, pos, SIZEOF(temp) - mir_strlen(temp));
if (GetFileAttributesA(temp) != 0xFFFFFFFF) { //exe vorhanden???? unt hint?
//gefundenes in path kopieren
|