summaryrefslogtreecommitdiff
path: root/protocols/Xfire
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Xfire')
-rw-r--r--protocols/Xfire/src/Xfire_base.cpp18
-rw-r--r--protocols/Xfire/src/Xfire_game.cpp18
-rw-r--r--protocols/Xfire/src/addgamedialog.cpp16
-rw-r--r--protocols/Xfire/src/clientinformationpacket.cpp12
-rw-r--r--protocols/Xfire/src/clientloginpacket.cpp2
-rw-r--r--protocols/Xfire/src/main.cpp26
-rw-r--r--protocols/Xfire/src/options.cpp4
-rw-r--r--protocols/Xfire/src/searching4games.cpp34
-rw-r--r--protocols/Xfire/src/tools.cpp16
-rw-r--r--protocols/Xfire/src/userdetails.cpp4
-rw-r--r--protocols/Xfire/src/xfireparse.cpp2
-rw-r--r--protocols/Xfire/src/xfireutils.cpp8
12 files changed, 80 insertions, 80 deletions
diff --git a/protocols/Xfire/src/Xfire_base.cpp b/protocols/Xfire/src/Xfire_base.cpp
index 6cf65879c9..a3247c4301 100644
--- a/protocols/Xfire/src/Xfire_base.cpp
+++ b/protocols/Xfire/src/Xfire_base.cpp
@@ -11,7 +11,7 @@ BYTE Xfire_base::accStringByte(char* str){
if (str == NULL)
return 0;
- for (unsigned int i = 0; i < (int)strlen(str); i++)
+ for (unsigned int i = 0; i < (int)mir_strlen(str); i++)
{
temp += str[i];
}
@@ -27,7 +27,7 @@ void Xfire_base::strtolower(char*str)
return;
//lowercase it :)
- for (unsigned int i = 0; i < (int)strlen(str); i++)
+ for (unsigned int i = 0; i < (int)mir_strlen(str); i++)
{
str[i] = tolower(str[i]);
}
@@ -54,7 +54,7 @@ void Xfire_base::strtoupper(char*str)
return;
//lowercase it :)
- for (unsigned int i = 0; i < (int)strlen(str); i++)
+ for (unsigned int i = 0; i < (int)mir_strlen(str); i++)
{
str[i] = toupper(str[i]);
}
@@ -68,7 +68,7 @@ void Xfire_base::setString(char*from, char**to)
return;
//stringgröße auslesen
- int size = strlen(from);
+ int size = mir_strlen(from);
//bestehenden zielpointer leeren
if (*to != NULL)
@@ -89,8 +89,8 @@ void Xfire_base::appendString(char*from, char**to)
return;
//stringgröße auslesen
- int size = strlen(from);
- int size2 = strlen(*to);
+ int size = mir_strlen(from);
+ int size2 = mir_strlen(*to);
//temporären pointer anlegen
char* append = new char[size + size2 + 1];
@@ -329,8 +329,8 @@ BOOL Xfire_base::inString(char*str, char*search, char**pos) {
}
//ist der gesuchte string größer, wie der string wo gesucht werden soll? dann FALSE zurück
- unsigned int sizeofsearch = strlen(search);
- if (sizeofsearch > strlen(str))
+ unsigned int sizeofsearch = mir_strlen(search);
+ if (sizeofsearch > mir_strlen(str))
{
//poszeiger, falls übergeben, auf NULL setzen
if (pos) *pos = NULL;
@@ -389,7 +389,7 @@ void Xfire_base::strreplace(char*search, char*replace, char**data) {
//ersetzendes anhängen
this->appendString(replace, &newdata);
//poszeiger um die größe des zusuchenden strings erhöhen
- pos += strlen(search);
+ pos += mir_strlen(search);
//rest anhängen
this->appendString(pos, &newdata);
//alten string löschen
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp
index 12acb76b07..167495b2d6 100644
--- a/protocols/Xfire/src/Xfire_game.cpp
+++ b/protocols/Xfire/src/Xfire_game.cpp
@@ -23,7 +23,7 @@ BOOL Xfire_game::start_game(char*ip, unsigned int port, char*pw) {
return FALSE;
//ist launchparam großgenug für eibne urlprüfung?
- if (strlen(this->launchparams) > 5)
+ if (mir_strlen(this->launchparams) > 5)
{
//launchparams ne url? dann openurl funktion von miranda verwenden
if (this->launchparams[0] == 'h'&&
@@ -49,10 +49,10 @@ BOOL Xfire_game::start_game(char*ip, unsigned int port, char*pw) {
//größe des netzwerparams berechnen
if (this->pwparams)
- pwsize += strlen(this->pwparams);
+ pwsize += mir_strlen(this->pwparams);
- mynetworkparams = new char[strlen(this->networkparams) + pwsize];
- strcpy_s(mynetworkparams, strlen(this->networkparams) + pwsize, this->networkparams);
+ mynetworkparams = new char[mir_strlen(this->networkparams) + pwsize];
+ strcpy_s(mynetworkparams, mir_strlen(this->networkparams) + pwsize, this->networkparams);
//port begrenzen
port = port % 65535;
@@ -92,19 +92,19 @@ BOOL Xfire_game::start_game(char*ip, unsigned int port, char*pw) {
}
if (mynetworkparams)
- networksize = strlen(mynetworkparams) + strlen(this->networkparams);
+ networksize = mir_strlen(mynetworkparams) + mir_strlen(this->networkparams);
}
//extra parameter
int extraparamssize = 0;
if (this->extraparams)
{
- extraparamssize = strlen(this->extraparams);
+ extraparamssize = mir_strlen(this->extraparams);
}
//temporäres array anlegen
char*temp = NULL;
- temp = new char[strlen(this->launchparams) + networksize + extraparamssize + 1];
+ temp = new char[mir_strlen(this->launchparams) + networksize + extraparamssize + 1];
if (temp == NULL)
{
@@ -116,7 +116,7 @@ BOOL Xfire_game::start_game(char*ip, unsigned int port, char*pw) {
}
//launcherstring ins temporäre array
- strcpy_s(temp, strlen(this->launchparams) + 1, this->launchparams);
+ strcpy_s(temp, mir_strlen(this->launchparams) + 1, this->launchparams);
//netzwerkparameter ?
if (mynetworkparams)
@@ -289,7 +289,7 @@ void Xfire_game::readFromDB(unsigned dbid)
if (this->path)
{
BOOL found = FALSE;
- for (unsigned int i = 0; i < strlen(this->path); i++)
+ for (unsigned int i = 0; i < mir_strlen(this->path); i++)
{
if (this->path[i] == '~')
{
diff --git a/protocols/Xfire/src/addgamedialog.cpp b/protocols/Xfire/src/addgamedialog.cpp
index 7d1aefb1c0..3c8f50ada9 100644
--- a/protocols/Xfire/src/addgamedialog.cpp
+++ b/protocols/Xfire/src/addgamedialog.cpp
@@ -267,7 +267,7 @@ BOOL OpenFileDialog(HWND hwndDlg, OPENFILENAMEA*ofn, char*exe) {
//filterstring aufbauen
mir_snprintf(szFilter, SIZEOF(szFilter), "%s|%s|%s|*.*|", exename, exename, Translate("All Files"));
//umbruch in 0 wandeln
- unsigned int sizeFilter = strlen(szFilter);
+ unsigned int sizeFilter = mir_strlen(szFilter);
for (unsigned int i = 0; i < sizeFilter; i++)
if (szFilter[i] == '|') szFilter[i] = 0;
//openfiledia vorbereiten
@@ -629,7 +629,7 @@ INT_PTR CALLBACK DlgAddGameProc2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
//Spielname
GetDlgItemTextA(hwndDlg, IDC_ADD_NAME, temp, SIZEOF(temp));
- if (!strlen(temp))
+ if (!mir_strlen(temp))
{
if (!editgame) delete newgame;
return MessageBox(hwndDlg, TranslateT("Please enter a game name."), TranslateT("XFire Options"), MB_OK | MB_ICONEXCLAMATION);
@@ -644,7 +644,7 @@ INT_PTR CALLBACK DlgAddGameProc2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
//spielid nur setzen/prüfen, wenn kein editgame
if (!editgame) {
GetDlgItemTextA(hwndDlg, IDC_ADD_ID, temp, SIZEOF(temp));
- if (!strlen(temp))
+ if (!mir_strlen(temp))
{
if (!editgame) delete newgame;
return MessageBox(hwndDlg, TranslateT("Please enter a game ID."), TranslateT("XFire Options"), MB_OK | MB_ICONEXCLAMATION);
@@ -672,7 +672,7 @@ INT_PTR CALLBACK DlgAddGameProc2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
}
//zu sendene spielid
GetDlgItemTextA(hwndDlg, IDC_ADD_SENDID, temp, SIZEOF(temp));
- if (strlen(temp))
+ if (mir_strlen(temp))
{
//standardmäßig wird bei einem customeintrag keine id versendet
int sendid = atoi(temp);
@@ -682,7 +682,7 @@ INT_PTR CALLBACK DlgAddGameProc2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
//launcher exe
GetDlgItemTextA(hwndDlg, IDC_ADD_LAUNCHEREXE, temp, SIZEOF(temp));
- if (strlen(temp))
+ if (mir_strlen(temp))
{
//lowercase pfad
newgame->strtolower(temp);
@@ -691,7 +691,7 @@ INT_PTR CALLBACK DlgAddGameProc2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
}
//detectexe
GetDlgItemTextA(hwndDlg, IDC_ADD_DETECTEXE, temp, SIZEOF(temp));
- if (!strlen(temp))
+ if (!mir_strlen(temp))
{
if (!editgame) delete newgame;
return MessageBox(hwndDlg, TranslateT("Please select a game exe. Note: If you don't select a launcher exe, the game exe will be used in the game start menu."), TranslateT("XFire Options"), MB_OK | MB_ICONEXCLAMATION);
@@ -709,13 +709,13 @@ INT_PTR CALLBACK DlgAddGameProc2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
}
//mustcontain parameter
GetDlgItemTextA(hwndDlg, IDC_ADD_CUSTOMPARAMS, temp, SIZEOF(temp));
- if (strlen(temp))
+ if (mir_strlen(temp))
{
newgame->setString(temp, &newgame->mustcontain);
}
//statusmsg speichern
GetDlgItemTextA(hwndDlg, IDC_ADD_STATUSMSG, temp, SIZEOF(temp));
- if (strlen(temp))
+ if (mir_strlen(temp))
{
newgame->setString(temp, &newgame->statusmsg);
newgame->setstatusmsg = 1;
diff --git a/protocols/Xfire/src/clientinformationpacket.cpp b/protocols/Xfire/src/clientinformationpacket.cpp
index f0d65e8a00..7843c6d8a8 100644
--- a/protocols/Xfire/src/clientinformationpacket.cpp
+++ b/protocols/Xfire/src/clientinformationpacket.cpp
@@ -39,17 +39,17 @@ namespace xfirelib {
packet[index++] = 0x01;
packet[index++] = (char)skins;
packet[index++] = 0x00;
- packet[index++] = strlen("Standard");
+ packet[index++] = mir_strlen("Standard");
packet[index++] = 0x00;
- memcpy(packet+index,"Standard",strlen("Standard"));/*add first skin name*/
- index += strlen("Standard");
+ memcpy(packet+index,"Standard",mir_strlen("Standard"));/*add first skin name*/
+ index += mir_strlen("Standard");
- packet[index++] = strlen("XFire");
+ packet[index++] = mir_strlen("XFire");
packet[index++] = 0x00;
- memcpy(packet+index,"XFire",strlen("XFire"));/*add second skin name*/
- index += strlen("XFire");
+ memcpy(packet+index,"XFire",mir_strlen("XFire"));/*add second skin name*/
+ index += mir_strlen("XFire");
VariableValue val;
val.setName( "version" );
diff --git a/protocols/Xfire/src/clientloginpacket.cpp b/protocols/Xfire/src/clientloginpacket.cpp
index f46b0cd21e..97c1478ceb 100644
--- a/protocols/Xfire/src/clientloginpacket.cpp
+++ b/protocols/Xfire/src/clientloginpacket.cpp
@@ -105,7 +105,7 @@ void ClientLoginPacket::hashSha1(const char *string, unsigned char *sha){
unsigned char temp[1024];
CSHA1 sha1;
sha1.Reset();
- sha1.Update((UINT_8 *)string, strlen(string));
+ sha1.Update((UINT_8 *)string, mir_strlen(string));
sha1.Final();
sha1.GetHash(temp);
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp
index ff8e1b947d..f2aac56cde 100644
--- a/protocols/Xfire/src/main.cpp
+++ b/protocols/Xfire/src/main.cpp
@@ -274,7 +274,7 @@ void XFireClient::handlingBuddy(MCONTACT handle)
}
void XFireClient::setNick(char*nnick) {
- /*if (strlen(nnick)==0)
+ /*if (mir_strlen(nnick)==0)
return;*/
SendNickChangePacket nick;
nick.nick = nnick;
@@ -284,7 +284,7 @@ void XFireClient::setNick(char*nnick) {
void XFireClient::sendmsg(char*usr, char*cmsg) {
SendMessagePacket msg;
- // if (strlen(cmsg)>255)
+ // if (mir_strlen(cmsg)>255)
// *(cmsg+255)=0;
msg.init(client, usr, cmsg);
client->send(&msg);
@@ -845,7 +845,7 @@ INT_PTR UrlCall(WPARAM wparam, LPARAM lparam) {
//tempbuffer für die frage and en user
char temp[100];
- if (strlen(g) > 25) //zugroße abschneiden
+ if (mir_strlen(g) > 25) //zugroße abschneiden
*(g + 25) = 0;
mir_snprintf(temp, SIZEOF(temp), Translate("Do you really want to add %s to your friend list?"), g);
@@ -1601,10 +1601,10 @@ MCONTACT CList_AddContact(XFireContact xfc, bool InList, bool SetOnline, int cla
db_set_b(hContact, "CList", "NotOnList", 1);
db_unset(hContact, "CList", "Hidden");
- if (strlen(xfc.nick) > 0) {
+ if (mir_strlen(xfc.nick) > 0) {
db_set_utf(hContact, protocolname, "Nick", xfc.nick);
}
- else if (strlen(xfc.username) > 0) {
+ else if (mir_strlen(xfc.username) > 0) {
db_set_s(hContact, protocolname, "Nick", xfc.username);
}
@@ -1624,7 +1624,7 @@ MCONTACT CList_AddContact(XFireContact xfc, bool InList, bool SetOnline, int cla
{
XFire_SetAvatar* xsa = new XFire_SetAvatar;
xsa->hContact = hContact;
- xsa->username = new char[strlen(xfc.username) + 1];
+ xsa->username = new char[mir_strlen(xfc.username) + 1];
strcpy(xsa->username, xfc.username);
mir_forkthread(SetAvatar, (LPVOID)xsa);
}
@@ -1925,7 +1925,7 @@ static INT_PTR GetIPPort(WPARAM hContact, LPARAM lParam)
if (OpenClipboard(NULL)) {
EmptyClipboard();
- HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(temp) + 1);
+ HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, mir_strlen(temp) + 1);
char *buffer = (char*)GlobalLock(clipbuffer);
strcpy(buffer, LPCSTR(temp));
GlobalUnlock(clipbuffer);
@@ -1953,7 +1953,7 @@ static INT_PTR GetVIPPort(WPARAM hContact, LPARAM lParam)
if (OpenClipboard(NULL)) {
EmptyClipboard();
- HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(temp) + 1);
+ HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, mir_strlen(temp) + 1);
char *buffer = (char*)GlobalLock(clipbuffer);
strcpy(buffer, LPCSTR(temp));
GlobalUnlock(clipbuffer);
@@ -2612,7 +2612,7 @@ if (db_get(entry->hcontact,"ContactPhoto", "File",&dbv))
{
XFire_SetAvatar* xsa=new XFire_SetAvatar;
xsa->hContact=entry->hcontact;
-xsa->username=new char[strlen(entry->username.c_str())+1];
+xsa->username=new char[mir_strlen(entry->username.c_str())+1];
strcpy(xsa->username,entry->username.c_str());
mir_forkthread(SetAvatar,(LPVOID)xsa);
@@ -2703,7 +2703,7 @@ MCONTACT handlingBuddys(BuddyListEntry *entry, int clan, char*group, BOOL dontsc
DummyXFireGame *gameob;
- if (strlen(entry->gameinfo.c_str()) > 0)
+ if (mir_strlen(entry->gameinfo.c_str()) > 0)
db_set_s(hContact, protocolname, "GameInfo", entry->gameinfo.c_str());
//beim voicechat foglendes machn
@@ -2790,7 +2790,7 @@ MCONTACT handlingBuddys(BuddyListEntry *entry, int clan, char*group, BOOL dontsc
if (entry->lastpopup == NULL)
{
//größe des popupstrings
- int size = strlen(temp) + 1;
+ int size = mir_strlen(temp) + 1;
//popup darstellen
displayPopup(NULL, temp, PLUGIN_TITLE, 0, hicongame);
//letzten popup definieren
@@ -2806,7 +2806,7 @@ MCONTACT handlingBuddys(BuddyListEntry *entry, int clan, char*group, BOOL dontsc
entry->lastpopup = NULL;
//größe des popupstrings
- int size = strlen(temp) + 1;
+ int size = mir_strlen(temp) + 1;
//popup darstellen
displayPopup(NULL, temp, PLUGIN_TITLE, 0, hicongame);
//letzten popup definieren
@@ -3140,7 +3140,7 @@ INT_PTR SetAwayMsg(WPARAM wParam, LPARAM lParam)
strcpy(statusmessage[0], (char*)lParam);
}
else if (wParam != ID_STATUS_OFFLINE) {
- if (db_get_b(NULL, protocolname, "nocustomaway", 0) == 0 && strlen((char*)lParam) > 0) {
+ if (db_get_b(NULL, protocolname, "nocustomaway", 0) == 0 && mir_strlen((char*)lParam) > 0) {
mir_snprintf(statusmessage[1], SIZEOF(statusmessage[1]), "(AFK) %s", (char*)lParam);
//strcpy(statusmessage[1],( char* )lParam);
}
diff --git a/protocols/Xfire/src/options.cpp b/protocols/Xfire/src/options.cpp
index 127f789b19..c108822805 100644
--- a/protocols/Xfire/src/options.cpp
+++ b/protocols/Xfire/src/options.cpp
@@ -104,7 +104,7 @@ static mytreeitem mytree[] = {
//funktion zum auslesen aller einträge unter XFireBlock
static int enumSettingsProc(const char *szSetting, LPARAM lParam)
{
- if (strlen(szSetting) > 0)
+ if (mir_strlen(szSetting) > 0)
{
SendDlgItemMessageA((HWND)lParam, IDC_BLOCKUSER, LB_ADDSTRING, 0, (LPARAM)szSetting);
}
@@ -895,7 +895,7 @@ static INT_PTR CALLBACK DlgProcOpts6(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
char* buffer;
EmptyClipboard();
- clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(out)+1);
+ clipbuffer = GlobalAlloc(GMEM_DDESHARE, mir_strlen(out)+1);
buffer = (char*)GlobalLock(clipbuffer);
strcpy(buffer, LPCSTR(out));
GlobalUnlock(clipbuffer);
diff --git a/protocols/Xfire/src/searching4games.cpp b/protocols/Xfire/src/searching4games.cpp
index 9796d02414..a73e624d56 100644
--- a/protocols/Xfire/src/searching4games.cpp
+++ b/protocols/Xfire/src/searching4games.cpp
@@ -68,7 +68,7 @@ BOOL CheckPath(char*ppath, char*pathwildcard = NULL)
char temp[XFIRE_MAX_STATIC_STRING_LEN];
strncpy(temp, ppath,XFIRE_MAX_STATIC_STRING_LEN-1);
- *(temp + strlen(temp) - 1) = 0;
+ *(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));
@@ -328,7 +328,7 @@ void Scan4Games(LPVOID lparam)
//zusätzlichen pfad anhängen
if (xfire_GetPrivateProfileString(temp, "LauncherDirAppend", "", ret2, 255, inipath))
{
- if (*(path + strlen(path) - 1) == '\\'&&*(ret2) == '\\')
+ if (*(path + mir_strlen(path) - 1) == '\\'&&*(ret2) == '\\')
strcat(path, (ret2 + 1));
else
strcat(path, ret2);
@@ -350,11 +350,11 @@ void Scan4Games(LPVOID lparam)
if (pos != 0)
*pos = 0;
- if (*(path + strlen(path) - 1) != '\\')
- *(path + strlen(path) - strlen(ret2)) = 0;
+ if (*(path + mir_strlen(path) - 1) != '\\')
+ *(path + mir_strlen(path) - mir_strlen(ret2)) = 0;
}
- if (*(path + strlen(path) - 1) != '\\')
+ if (*(path + mir_strlen(path) - 1) != '\\')
strcat(path, "\\");
@@ -369,7 +369,7 @@ void Scan4Games(LPVOID lparam)
{
if (xfire_GetPrivateProfileString(temp, "DetectExe", "", ret, 255, inipath))
{
- cutforlaunch = path + strlen(path);
+ cutforlaunch = path + mir_strlen(path);
strcpy(pathtemp, path);
//wenn backslash bei detectexe, dann diesen skippen (eveonline bug)
@@ -393,7 +393,7 @@ void Scan4Games(LPVOID lparam)
}
else if (xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret2, 255, inipath))
{
- cutforlaunch = path + strlen(path);
+ cutforlaunch = path + mir_strlen(path);
strcat(path, ret2);
}
}
@@ -404,7 +404,7 @@ void Scan4Games(LPVOID lparam)
}
else if (xfire_GetPrivateProfileString(temp, "DetectExe[0]", "", ret2, 255, inipath))
{
- cutforlaunch = path + strlen(path);
+ cutforlaunch = path + mir_strlen(path);
strcat(path, ret2);
multiexe = TRUE;
if (!CheckPath(path, path_r))
@@ -414,7 +414,7 @@ void Scan4Games(LPVOID lparam)
}
else if (xfire_GetPrivateProfileString(temp, "DetectExe", "", ret2, 255, inipath))
{
- cutforlaunch = path + strlen(path);
+ cutforlaunch = path + mir_strlen(path);
//wenn backslash bei detectexe, dann diesen skippen (eveonline bug)
if (ret2[0] == '\\')
@@ -433,7 +433,7 @@ void Scan4Games(LPVOID lparam)
}
else if (xfire_GetPrivateProfileString(temp, "LauncherExe", "", ret2, 255, inipath))
{
- cutforlaunch = path + strlen(path);
+ cutforlaunch = path + mir_strlen(path);
strcat(path, ret2);
}
@@ -448,7 +448,7 @@ void Scan4Games(LPVOID lparam)
//GetLongPathNameA(path,path,sizeof(path));
//lowercase pfad
- for (unsigned int ii = 0; ii < strlen(path); ii++)
+ for (unsigned int ii = 0; ii < mir_strlen(path); ii++)
path[ii] = tolower(path[ii]);
if (path_r[0] == 0)
@@ -456,7 +456,7 @@ void Scan4Games(LPVOID lparam)
else
{
//lowercase wildcard pfad
- for (unsigned int ii = 0; ii < strlen(path_r); ii++)
+ for (unsigned int ii = 0; ii < mir_strlen(path_r); ii++)
path_r[ii] = tolower(path_r[ii]);
newgame->setString(path_r, &newgame->path);
}
@@ -483,10 +483,10 @@ void Scan4Games(LPVOID lparam)
}
else
{
- for (unsigned int i2 = 0; i2 < strlen(path); i2++)
+ for (unsigned int i2 = 0; i2 < mir_strlen(path); i2++)
path[i2] = tolower(path[i2]);
- char* mpathtemp = new char[strlen(path) + 1];
+ char* mpathtemp = new char[mir_strlen(path) + 1];
strcpy(mpathtemp, path);
newgame->mpath.push_back(mpathtemp);
}
@@ -508,7 +508,7 @@ void Scan4Games(LPVOID lparam)
char launchpath[XFIRE_MAX_STATIC_STRING_LEN] = "";
strcpy(launchpath, path);
//letzten backslash entfernen
- if (launchpath[strlen(launchpath) - 1] == '\\') launchpath[strlen(launchpath) - 1] = 0;
+ if (launchpath[mir_strlen(launchpath) - 1] == '\\') launchpath[mir_strlen(launchpath) - 1] = 0;
strcat(path, ret2);
@@ -608,7 +608,7 @@ void Scan4Games(LPVOID lparam)
//GetLongPathNameA(ret2,ret2,sizeof(ret2));
//lowercase pfad
- for (unsigned int i = 0; i < strlen(ret2); i++)
+ for (unsigned int i = 0; i < mir_strlen(ret2); i++)
ret2[i] = tolower(ret2[i]);
newgame->setString(ret2, &newgame->path);
@@ -722,7 +722,7 @@ void Scan4Games(LPVOID lparam)
if (!db_get_b(NULL, protocolname, "dontdisresults", 0))
{
- int p = strlen(gamelist) - 2;
+ int p = mir_strlen(gamelist) - 2;
if (p > -1)
gamelist[p] = 0; //letztes koma killen
mir_snprintf(ret, SIZEOF(ret), Translate("Games found:%s%s"), "\r\n\r\n", gamelist);
diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp
index 7675e55762..f2783b6be3 100644
--- a/protocols/Xfire/src/tools.cpp
+++ b/protocols/Xfire/src/tools.cpp
@@ -65,13 +65,13 @@ BOOL str_replace(char*src, char*find, char*rep)
if (pos > -1)
{
- char *temp = new char[strlen(src) + strlen(rep) + 1];
+ char *temp = new char[mir_strlen(src) + mir_strlen(rep) + 1];
strcpy(temp, src);
*(temp + pos) = 0;
strcat(temp, rep);
- strcat(temp, (src + pos + strlen(find)));
+ strcat(temp, (src + pos + mir_strlen(find)));
strcpy(src, temp);
delete[] temp;
@@ -134,7 +134,7 @@ char*menuitemtext(char*mtext)
if (!mtext)
return NULL;
- int size = strlen(mtext);
+ int size = mir_strlen(mtext);
if (!size || size > 255)
return mtext;
@@ -739,7 +739,7 @@ char * getItem(char * string, char delim, int count)
if (count > 1)
item[0] = 0;
- for (unsigned int i = 0; i < strlen(item); i++)
+ for (unsigned int i = 0; i < mir_strlen(item); i++)
{
item[i] = tolower(item[i]);
}
@@ -831,19 +831,19 @@ BOOL checkCommandLine(HANDLE hProcess, char * mustcontain, char * mustnotcontain
buffer2[correctsize - 1] = 0;
- for (unsigned int i = 0; i < strlen(buffer2); i++)
+ for (unsigned int i = 0; i < mir_strlen(buffer2); i++)
{
buffer2[i] = tolower(buffer2[i]);
}
//lowercase mustcontain/mustnotcontain
if (mustcontain)
- for (unsigned int i = 0; i < strlen(mustcontain); i++)
+ for (unsigned int i = 0; i < mir_strlen(mustcontain); i++)
{
mustcontain[i] = tolower(mustcontain[i]);
}
if (mustnotcontain)
- for (unsigned int i = 0; i < strlen(mustnotcontain); i++)
+ for (unsigned int i = 0; i < mir_strlen(mustnotcontain); i++)
{
mustnotcontain[i] = tolower(mustnotcontain[i]);
}
@@ -1015,7 +1015,7 @@ unsigned int getfilesize(char*path)
//funktion soll erst in der userini suchen, danach in der xfire_games.ini
DWORD xfire_GetPrivateProfileString(__in LPCSTR lpAppName, __in LPCSTR lpKeyName, __in LPCSTR lpDefault, __out LPSTR lpReturnedString, __in DWORD nSize, __in LPCSTR lpFileName) {
//xfire_games.ini
- int size = strlen(lpFileName);
+ int size = mir_strlen(lpFileName);
if (size > 15)
{
char*file = (char*)lpFileName;
diff --git a/protocols/Xfire/src/userdetails.cpp b/protocols/Xfire/src/userdetails.cpp
index 2b3cdb9681..4a38300ca6 100644
--- a/protocols/Xfire/src/userdetails.cpp
+++ b/protocols/Xfire/src/userdetails.cpp
@@ -101,7 +101,7 @@ static int GetIPPortUDetails(MCONTACT hContact, char* feld1, char* feld2)
if (OpenClipboard(NULL)) {
EmptyClipboard();
- HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(temp) + 1);
+ HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, mir_strlen(temp) + 1);
char *buffer = (char*)GlobalLock(clipbuffer);
strcpy(buffer, LPCSTR(temp));
GlobalUnlock(clipbuffer);
@@ -254,7 +254,7 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam
DBVARIANT dbv;
if (!db_get(hContact, protocolname, "Username", &dbv))
{
- int usernamesize = strlen(dbv.pszVal) + 1;
+ int usernamesize = mir_strlen(dbv.pszVal) + 1;
char* username = new char[usernamesize];
if (username)
{
diff --git a/protocols/Xfire/src/xfireparse.cpp b/protocols/Xfire/src/xfireparse.cpp
index 4f872f4401..382901f853 100644
--- a/protocols/Xfire/src/xfireparse.cpp
+++ b/protocols/Xfire/src/xfireparse.cpp
@@ -32,7 +32,7 @@ XFireParse::XFireParse() {
/*void XFireParse::readVariableAttribut( char *value, char *packet, char *attr,int packet_length,int attr_length, int start,int max_length ) {
-int length_index = findString2(packet,attr, packet_length,strlen(attr),start)+attr_length+1;
+int length_index = findString2(packet,attr, packet_length,mir_strlen(attr),start)+attr_length+1;
unsigned int length = xfire_hex_to_intC(packet[length_index]);
diff --git a/protocols/Xfire/src/xfireutils.cpp b/protocols/Xfire/src/xfireutils.cpp
index 5df7ba314b..93793c72e7 100644
--- a/protocols/Xfire/src/xfireutils.cpp
+++ b/protocols/Xfire/src/xfireutils.cpp
@@ -36,9 +36,9 @@ using namespace std;
}
int XFireUtils::addAttributName(char *packet,int packet_length, char *att){
- XDEBUG3( "Adding %d chars at position %d\n",strlen(att),packet_length);
- packet[packet_length] = (char)strlen(att);//set att length
- memcpy(packet+packet_length+1,att,strlen(att)); //set attname
- return packet_length+1+strlen(att);
+ XDEBUG3( "Adding %d chars at position %d\n",mir_strlen(att),packet_length);
+ packet[packet_length] = (char)mir_strlen(att);//set att length
+ memcpy(packet+packet_length+1,att,mir_strlen(att)); //set attname
+ return packet_length+1+mir_strlen(att);
}
};