summaryrefslogtreecommitdiff
path: root/protocols/Xfire
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-23 16:25:49 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-23 16:25:49 +0000
commitf2de79cb2eb8247548650ee80d75be109ac66ee7 (patch)
tree5f6ae43436ad92857bc3361556e581dea0a28270 /protocols/Xfire
parent83810fbdf96dc0a842bf149cfa40749e95b0fe63 (diff)
replace strcat to mir_strcat
git-svn-id: http://svn.miranda-ng.org/main/trunk@13777 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire')
-rw-r--r--protocols/Xfire/src/SHA1.cpp8
-rw-r--r--protocols/Xfire/src/SHA1.h2
-rw-r--r--protocols/Xfire/src/Xfire_game.cpp2
-rw-r--r--protocols/Xfire/src/clientloginpacket.cpp2
-rw-r--r--protocols/Xfire/src/main.cpp40
-rw-r--r--protocols/Xfire/src/options.cpp4
-rw-r--r--protocols/Xfire/src/processbuddyinfo.cpp10
-rw-r--r--protocols/Xfire/src/searching4games.cpp44
-rw-r--r--protocols/Xfire/src/tools.cpp8
-rw-r--r--protocols/Xfire/src/variables.cpp18
10 files changed, 69 insertions, 69 deletions
diff --git a/protocols/Xfire/src/SHA1.cpp b/protocols/Xfire/src/SHA1.cpp
index 0c1dc41a5b..49ac7ab1aa 100644
--- a/protocols/Xfire/src/SHA1.cpp
+++ b/protocols/Xfire/src/SHA1.cpp
@@ -230,23 +230,23 @@ void CSHA1::ReportHash(char *szReport, unsigned char uReportType)
if (uReportType == REPORT_HEX)
{
mir_snprintf(szTemp, SIZEOF(szTemp), "%02X", m_digest[0]);
- strcat(szReport, szTemp);
+ mir_strcat(szReport, szTemp);
for(i = 1; i < 20; i++)
{
mir_snprintf(szTemp, SIZEOF(szTemp), " %02X", m_digest[i]);
- strcat(szReport, szTemp);
+ mir_strcat(szReport, szTemp);
}
}
else if (uReportType == REPORT_DIGIT)
{
mir_snprintf(szTemp, SIZEOF(szTemp), "%u", m_digest[0]);
- strcat(szReport, szTemp);
+ mir_strcat(szReport, szTemp);
for(i = 1; i < 20; i++)
{
mir_snprintf(szTemp, SIZEOF(szTemp), " %u", m_digest[i]);
- strcat(szReport, szTemp);
+ mir_strcat(szReport, szTemp);
}
}
else mir_strcpy(szReport, "Error: Unknown report type!");
diff --git a/protocols/Xfire/src/SHA1.h b/protocols/Xfire/src/SHA1.h
index a64c8b589b..c1d720d8a5 100644
--- a/protocols/Xfire/src/SHA1.h
+++ b/protocols/Xfire/src/SHA1.h
@@ -27,7 +27,7 @@
#include <stdio.h> // Needed for file access
#include <memory.h> // Needed for memset and memcpy
-#include <string.h> // Needed for strcat and mir_strcpy
+#include <string.h> // Needed for mir_strcat and mir_strcpy
#include <iostream>
#include <stdlib.h>
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp
index 31d43319e5..87c0a4d2b9 100644
--- a/protocols/Xfire/src/Xfire_game.cpp
+++ b/protocols/Xfire/src/Xfire_game.cpp
@@ -430,7 +430,7 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid)
{
char servicefunction[100];
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "StartGame%d");
+ mir_strcat(servicefunction, "StartGame%d");
if (dbid < 0)
dbid = pos;
diff --git a/protocols/Xfire/src/clientloginpacket.cpp b/protocols/Xfire/src/clientloginpacket.cpp
index 97c1478ceb..75ccf09e2d 100644
--- a/protocols/Xfire/src/clientloginpacket.cpp
+++ b/protocols/Xfire/src/clientloginpacket.cpp
@@ -113,7 +113,7 @@ void ClientLoginPacket::hashSha1(const char *string, unsigned char *sha){
char szTemp[16];
for(int i = 0 ; i < 20 ; i++) {
mir_snprintf(szTemp, SIZEOF(szTemp), "%02x", temp[i]);
- strcat(result,szTemp);
+ mir_strcat(result,szTemp);
}
memcpy(sha,result,40);
sha[40] = 0x00;
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp
index 5b23f979f2..0978600aaf 100644
--- a/protocols/Xfire/src/main.cpp
+++ b/protocols/Xfire/src/main.cpp
@@ -1092,7 +1092,7 @@ extern "C" __declspec(dllexport) int Load(void)
char CurProfileF[MAX_PATH] = "";
char CurProfile[MAX_PATH] = "";
CallService(MS_DB_GETPROFILEPATH, (WPARAM)MAX_PATH, (LPARAM)AvatarsFolder);
- strcat(AvatarsFolder, "\\");
+ mir_strcat(AvatarsFolder, "\\");
CallService(MS_DB_GETPROFILENAME, (WPARAM)MAX_PATH, (LPARAM)CurProfileF);
int i;
@@ -1103,15 +1103,15 @@ extern "C" __declspec(dllexport) int Load(void)
}
}
memcpy(CurProfile, CurProfileF, i);
- strcat(AvatarsFolder, CurProfile);
- strcat(AvatarsFolder, "\\");
- strcat(AvatarsFolder, "XFire");
+ mir_strcat(AvatarsFolder, CurProfile);
+ mir_strcat(AvatarsFolder, "\\");
+ mir_strcat(AvatarsFolder, "XFire");
XFireWorkingFolder = FoldersRegisterCustomPath(protocolname, "Working Folder", AvatarsFolder);
if (!(XFireIconFolder = FoldersRegisterCustomPath(protocolname, "Game Icon Folder", AvatarsFolder)))
CreateDirectoryA(AvatarsFolder, NULL);
- strcat(AvatarsFolder, "\\Avatars");
+ mir_strcat(AvatarsFolder, "\\Avatars");
if (!(XFireAvatarFolder = FoldersRegisterCustomPath(protocolname, "Avatars", AvatarsFolder)))
CreateDirectoryA(AvatarsFolder, NULL);
@@ -1124,7 +1124,7 @@ extern "C" __declspec(dllexport) int Load(void)
//gotoprofilemenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoProfile");
+ mir_strcat(servicefunction, "GotoProfile");
CreateServiceFunction(servicefunction, GotoProfile);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1135,7 +1135,7 @@ extern "C" __declspec(dllexport) int Load(void)
//gotoxfireclansitemenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoXFireClanSite");
+ mir_strcat(servicefunction, "GotoXFireClanSite");
CreateServiceFunction(servicefunction, GotoXFireClanSite);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1146,7 +1146,7 @@ extern "C" __declspec(dllexport) int Load(void)
//kopiermenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GetIPPort");
+ mir_strcat(servicefunction, "GetIPPort");
CreateServiceFunction(servicefunction, GetIPPort);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1157,7 +1157,7 @@ extern "C" __declspec(dllexport) int Load(void)
//kopiermenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "VoiceIPPort");
+ mir_strcat(servicefunction, "VoiceIPPort");
CreateServiceFunction(servicefunction, GetVIPPort);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1168,7 +1168,7 @@ extern "C" __declspec(dllexport) int Load(void)
//joinmenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "JoinGame");
+ mir_strcat(servicefunction, "JoinGame");
CreateServiceFunction(servicefunction, JoinGame);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1179,7 +1179,7 @@ extern "C" __declspec(dllexport) int Load(void)
//joinmenüpunkt
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "StartThisGame");
+ mir_strcat(servicefunction, "StartThisGame");
CreateServiceFunction(servicefunction, StartThisGame);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1190,7 +1190,7 @@ extern "C" __declspec(dllexport) int Load(void)
//remove friend
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "RemoveFriend");
+ mir_strcat(servicefunction, "RemoveFriend");
CreateServiceFunction(servicefunction, RemoveFriend);
mi.pszService = servicefunction;
mi.position = 2000070000;
@@ -1201,7 +1201,7 @@ extern "C" __declspec(dllexport) int Load(void)
//block user
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "BlockFriend");
+ mir_strcat(servicefunction, "BlockFriend");
CreateServiceFunction(servicefunction, BlockFriend);
mi.pszService = servicefunction;
mi.position = 2000070000;
@@ -1212,7 +1212,7 @@ extern "C" __declspec(dllexport) int Load(void)
//my fire profile
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoProfile2");
+ mir_strcat(servicefunction, "GotoProfile2");
CreateServiceFunction(servicefunction, GotoProfile2);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1223,7 +1223,7 @@ extern "C" __declspec(dllexport) int Load(void)
//my activity protocol
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "GotoProfileAct");
+ mir_strcat(servicefunction, "GotoProfileAct");
CreateServiceFunction(servicefunction, GotoProfileAct);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1234,7 +1234,7 @@ extern "C" __declspec(dllexport) int Load(void)
//rescan my games
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "ReScanMyGames");
+ mir_strcat(servicefunction, "ReScanMyGames");
CreateServiceFunction(servicefunction, ReScanMyGames);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1244,7 +1244,7 @@ extern "C" __declspec(dllexport) int Load(void)
Menu_AddMainMenuItem(&mi);
mir_strcpy(servicefunction, protocolname);
- strcat(servicefunction, "SetNick");
+ mir_strcat(servicefunction, "SetNick");
CreateServiceFunction(servicefunction, SetNickDlg);
mi.pszService = servicefunction;
mi.position = 500090000;
@@ -1876,7 +1876,7 @@ BOOL GetAvatar(char* username, XFireAvatar* av)
{
char filename[512];
mir_strcpy(filename, XFireGetFoldersPath("Avatar"));
- strcat(filename, username);
+ mir_strcat(filename, username);
pos++;
//gif?!?!
@@ -1885,12 +1885,12 @@ BOOL GetAvatar(char* username, XFireAvatar* av)
*(pos + 2) == 'f')
{
av->type = PA_FORMAT_GIF;
- strcat(filename, ".gif");
+ mir_strcat(filename, ".gif");
}
else//dann kanns nur jpg sein
{
av->type = PA_FORMAT_JPEG;
- strcat(filename, ".jpg");
+ mir_strcat(filename, ".jpg");
}
//verusch das bild runterladen
diff --git a/protocols/Xfire/src/options.cpp b/protocols/Xfire/src/options.cpp
index e57aee4848..4ac8fd4cd4 100644
--- a/protocols/Xfire/src/options.cpp
+++ b/protocols/Xfire/src/options.cpp
@@ -579,7 +579,7 @@ static INT_PTR CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
TranslateDialogDefault(hwndDlg);
mir_strcpy(inipath, XFireGetFoldersPath("IniFile"));
- strcat(inipath, "xfire_games.ini");
+ mir_strcat(inipath, "xfire_games.ini");
FILE * f = fopen(inipath, "r");
if (f != NULL)
@@ -595,7 +595,7 @@ static INT_PTR CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
}
mir_strcpy(inipath, XFireGetFoldersPath("IconsFile"));
- strcat(inipath, "icons.dll");
+ mir_strcat(inipath, "icons.dll");
f = fopen(inipath, "r");
if (f != NULL)
diff --git a/protocols/Xfire/src/processbuddyinfo.cpp b/protocols/Xfire/src/processbuddyinfo.cpp
index c0fd32c751..a788f2e7ca 100644
--- a/protocols/Xfire/src/processbuddyinfo.cpp
+++ b/protocols/Xfire/src/processbuddyinfo.cpp
@@ -54,8 +54,8 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact, c
switch (buddyinfo->avatarmode) {
case 1:
- strcat(filename, username);
- strcat(filename, ".gif");
+ mir_strcat(filename, username);
+ mir_strcat(filename, ".gif");
type = PA_FORMAT_GIF;
mir_snprintf(temp, SIZEOF(temp), "/xfire/xf/images/avatars/gallery/default/%03d.gif", buddyinfo->avatarid);
@@ -63,8 +63,8 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact, c
dl = GetWWWContent("media.xfire.com", temp, filename, FALSE);
break;
case 2:
- strcat(filename, username);
- strcat(filename, ".jpg");
+ mir_strcat(filename, username);
+ mir_strcat(filename, ".jpg");
type = PA_FORMAT_JPEG;
mir_snprintf(temp, SIZEOF(temp), "/avatar/100/%s.jpg?%d", username, buddyinfo->avatarid);
@@ -73,7 +73,7 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact, c
break;
case 3:
type = PA_FORMAT_GIF;
- strcat(filename, "xfire.gif");
+ mir_strcat(filename, "xfire.gif");
mir_snprintf(temp, SIZEOF(temp), "/xfire/xf/images/avatars/gallery/default/xfire.gif", buddyinfo->avatarid);
diff --git a/protocols/Xfire/src/searching4games.cpp b/protocols/Xfire/src/searching4games.cpp
index 80bf55faf0..d04686ea12 100644
--- a/protocols/Xfire/src/searching4games.cpp
+++ b/protocols/Xfire/src/searching4games.cpp
@@ -243,7 +243,7 @@ void Scan4Games(LPVOID lparam)
}
mir_strcpy(inipath, XFireGetFoldersPath("IniFile"));
- strcat(inipath, "xfire_games.ini");
+ mir_strcat(inipath, "xfire_games.ini");
//erstmal db säubern
xgamelist.clearDatabase();
@@ -329,9 +329,9 @@ void Scan4Games(LPVOID lparam)
if (xfire_GetPrivateProfileString(temp, "LauncherDirAppend", "", ret2, 255, inipath))
{
if (*(path + mir_strlen(path) - 1) == '\\'&&*(ret2) == '\\')
- strcat(path, (ret2 + 1));
+ mir_strcat(path, (ret2 + 1));
else
- strcat(path, ret2);
+ mir_strcat(path, ret2);
}
if (xfire_GetPrivateProfileString(temp, "LauncherDirTruncAt", "", ret2, 255, inipath))
@@ -355,7 +355,7 @@ void Scan4Games(LPVOID lparam)
}
if (*(path + mir_strlen(path) - 1) != '\\')
- strcat(path, "\\");
+ mir_strcat(path, "\\");
//dateiname auslesen
@@ -363,7 +363,7 @@ void Scan4Games(LPVOID lparam)
{
char pathtemp[XFIRE_MAX_STATIC_STRING_LEN];
mir_strcpy(pathtemp, path);
- strcat(pathtemp, ret2);
+ mir_strcat(pathtemp, ret2);
if (CheckPath(pathtemp))
{
@@ -375,11 +375,11 @@ void Scan4Games(LPVOID lparam)
//wenn backslash bei detectexe, dann diesen skippen (eveonline bug)
if (ret[0] == '\\')
{
- strcat(pathtemp, (char*)&ret[1]);
+ mir_strcat(pathtemp, (char*)&ret[1]);
}
else
{
- strcat(pathtemp, ret);
+ mir_strcat(pathtemp, ret);
}
if (CheckPath(pathtemp))
@@ -394,7 +394,7 @@ void Scan4Games(LPVOID lparam)
else if (xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret2, 255, inipath))
{
cutforlaunch = path + mir_strlen(path);
- strcat(path, ret2);
+ mir_strcat(path, ret2);
}
}
else
@@ -405,7 +405,7 @@ void Scan4Games(LPVOID lparam)
else if (xfire_GetPrivateProfileString(temp, "DetectExe[0]", "", ret2, 255, inipath))
{
cutforlaunch = path + mir_strlen(path);
- strcat(path, ret2);
+ mir_strcat(path, ret2);
multiexe = TRUE;
if (!CheckPath(path, path_r))
{
@@ -419,11 +419,11 @@ void Scan4Games(LPVOID lparam)
//wenn backslash bei detectexe, dann diesen skippen (eveonline bug)
if (ret2[0] == '\\')
{
- strcat(path, (char*)&ret2[1]);
+ mir_strcat(path, (char*)&ret2[1]);
}
else
{
- strcat(path, ret2);
+ mir_strcat(path, ret2);
}
if (!CheckPath(path, path_r))
@@ -434,7 +434,7 @@ void Scan4Games(LPVOID lparam)
else if (xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret2, 255, inipath))
{
cutforlaunch = path + mir_strlen(path);
- strcat(path, ret2);
+ mir_strcat(path, ret2);
}
@@ -476,7 +476,7 @@ void Scan4Games(LPVOID lparam)
pos++;
*pos = 0;
}
- strcat(path, ret2);
+ mir_strcat(path, ret2);
if (!CheckPath(path))
{
*(path) = 0;
@@ -510,7 +510,7 @@ void Scan4Games(LPVOID lparam)
//letzten backslash entfernen
if (launchpath[mir_strlen(launchpath) - 1] == '\\') launchpath[mir_strlen(launchpath) - 1] = 0;
- strcat(path, ret2);
+ mir_strcat(path, ret2);
newgame->setString(path, &newgame->launchparams);
newgame->appendString(" ", &newgame->launchparams);
@@ -566,10 +566,10 @@ void Scan4Games(LPVOID lparam)
newgame->setNameandIcon();
- strcat(gamelist, gamename);
- strcat(gamelist, ", ");
+ mir_strcat(gamelist, gamename);
+ mir_strcat(gamelist, ", ");
if (foundgames % 2 == 1)
- strcat(gamelist, "\r\n");
+ mir_strcat(gamelist, "\r\n");
xgamelist.Addgame(newgame);
@@ -589,8 +589,8 @@ void Scan4Games(LPVOID lparam)
{
if (xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret, 255, inipath))
{
- strcat(ret2, "\\");
- strcat(ret2, ret);
+ mir_strcat(ret2, "\\");
+ mir_strcat(ret2, ret);
}
str_replace(ret2, "%WINDIR%", getenv("WINDIR"));
@@ -668,10 +668,10 @@ void Scan4Games(LPVOID lparam)
newgame->setNameandIcon();
- strcat(gamelist, gamename);
- strcat(gamelist, ", ");
+ mir_strcat(gamelist, gamename);
+ mir_strcat(gamelist, ", ");
if (foundgames % 2 == 1)
- strcat(gamelist, "\r\n");
+ mir_strcat(gamelist, "\r\n");
xgamelist.Addgame(newgame);
diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp
index 3b1427d3af..05658e1ac8 100644
--- a/protocols/Xfire/src/tools.cpp
+++ b/protocols/Xfire/src/tools.cpp
@@ -70,8 +70,8 @@ BOOL str_replace(char*src, char*find, char*rep)
mir_strcpy(temp, src);
*(temp + pos) = 0;
- strcat(temp, rep);
- strcat(temp, (src + pos + mir_strlen(find)));
+ mir_strcat(temp, rep);
+ mir_strcat(temp, (src + pos + mir_strlen(find)));
mir_strcpy(src, temp);
delete[] temp;
@@ -995,8 +995,8 @@ BOOL GetWWWContent2(char*address, char*filename, BOOL dontoverwrite, char**tobuf
//eigener www downloader, da winet exceptions erzeugt
BOOL GetWWWContent(char*host, char* request, char*filename, BOOL dontoverwrite) {
char add[1024] = "http://";
- strcat(add, host);
- strcat(add, request);
+ mir_strcat(add, host);
+ mir_strcat(add, request);
return GetWWWContent2(add, filename, dontoverwrite);
}
diff --git a/protocols/Xfire/src/variables.cpp b/protocols/Xfire/src/variables.cpp
index 1cf26c35be..70f167e933 100644
--- a/protocols/Xfire/src/variables.cpp
+++ b/protocols/Xfire/src/variables.cpp
@@ -174,7 +174,7 @@ char* XFireGetFoldersPath(char * pathtype)
if (!mir_strcmp(pathtype, "IconsFile")){
FoldersGetCustomPath(XFireIconFolder, path, 1024, "");
}
- strcat(path, "\\");
+ mir_strcat(path, "\\");
return path;
}
else {
@@ -183,7 +183,7 @@ char* XFireGetFoldersPath(char * pathtype)
char CurProfileF[MAX_PATH] = "";
char CurProfile[MAX_PATH] = "";
CallService(MS_DB_GETPROFILEPATH, (WPARAM)MAX_PATH, (LPARAM)BaseFolder);
- strcat(BaseFolder, "\\");
+ mir_strcat(BaseFolder, "\\");
CallService(MS_DB_GETPROFILENAME, (WPARAM)MAX_PATH, (LPARAM)CurProfileF);
int i;
for (i = MAX_PATH - 1; i > 5; i--){
@@ -193,16 +193,16 @@ char* XFireGetFoldersPath(char * pathtype)
}
}
memcpy(CurProfile, CurProfileF, i);
- strcat(BaseFolder, CurProfile);
- strcat(BaseFolder, "\\");
- strcat(BaseFolder, "XFire");
- strcat(BaseFolder, "\\");
+ mir_strcat(BaseFolder, CurProfile);
+ mir_strcat(BaseFolder, "\\");
+ mir_strcat(BaseFolder, "XFire");
+ mir_strcat(BaseFolder, "\\");
/*******BASE********/
if (!mir_strcmp(pathtype, "Avatar")){
- strcat(BaseFolder, "Avatars");
- strcat(BaseFolder, "\\");
+ mir_strcat(BaseFolder, "Avatars");
+ mir_strcat(BaseFolder, "\\");
}
- strcat(path, BaseFolder);
+ mir_strcat(path, BaseFolder);
}
return path;
}