From f2de79cb2eb8247548650ee80d75be109ac66ee7 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 23 May 2015 16:25:49 +0000 Subject: replace strcat to mir_strcat git-svn-id: http://svn.miranda-ng.org/main/trunk@13777 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Non-IM Contact/src/contactinfo.cpp | 32 ++++++++++++++-------------- plugins/Non-IM Contact/src/namereplacing.cpp | 24 ++++++++++----------- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'plugins/Non-IM Contact') diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp index ccaa13d0b9..ea085b986c 100644 --- a/plugins/Non-IM Contact/src/contactinfo.cpp +++ b/plugins/Non-IM Contact/src/contactinfo.cpp @@ -276,7 +276,7 @@ char* copyReplaceString(char* oldStr, char* newStr, char* findStr, char* replace while (oldStr[i] != '\0') { // msg(&oldStr[i],""); if (!strncmp(&oldStr[i], findStr, mir_strlen(findStr))) { - strcat(newStr, replaceWithStr); + mir_strcat(newStr, replaceWithStr); i += (int)mir_strlen(findStr); } else { @@ -532,7 +532,7 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam) mir_strcpy(tooltip, &line[i]); fgets(line, 2000, file); while (!strstr(line, "\r\n")) { - strcat(tooltip, line); + mir_strcat(tooltip, line); fgets(line, 2000, file); } // the line that has the @@ -561,27 +561,27 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam) mir_snprintf(msg, size, "Do you want to import this Non-IM Contact?\r\n\r\nName: %s\r\n", name); if (program) { msg = (char*)realloc(msg, mir_strlen(msg) + mir_strlen(program) + mir_strlen("Program: \r\n") + 1); - strcat(msg, "Program: "); - strcat(msg, program); - strcat(msg, "\r\n"); + mir_strcat(msg, "Program: "); + mir_strcat(msg, program); + mir_strcat(msg, "\r\n"); } if (programparam) { msg = (char*)realloc(msg, mir_strlen(msg) + mir_strlen(programparam) + mir_strlen("Program Parameters: \r\n") + 1); - strcat(msg, "Program Parameters: "); - strcat(msg, programparam); - strcat(msg, "\r\n"); + mir_strcat(msg, "Program Parameters: "); + mir_strcat(msg, programparam); + mir_strcat(msg, "\r\n"); } if (tooltip) { msg = (char*)realloc(msg, mir_strlen(msg) + mir_strlen(tooltip) + mir_strlen("ToolTip: \r\n") + 1); - strcat(msg, "ToolTip: "); - strcat(msg, tooltip); - strcat(msg, "\r\n"); + mir_strcat(msg, "ToolTip: "); + mir_strcat(msg, tooltip); + mir_strcat(msg, "\r\n"); } if (group) { msg = (char*)realloc(msg, mir_strlen(msg) + mir_strlen(group) + mir_strlen("Group: \r\n") + 1); - strcat(msg, "Group: "); - strcat(msg, group); - strcat(msg, "\r\n"); + mir_strcat(msg, "Group: "); + mir_strcat(msg, group); + mir_strcat(msg, "\r\n"); } if (icon) { char tmp[64]; @@ -610,7 +610,7 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam) char *msgtemp = (char*)realloc(msg, mir_strlen(msg) + mir_strlen(tmp) + 1); if (msgtemp) { msg = msgtemp; - strcat(msg, tmp); + mir_strcat(msg, tmp); } } if (usetimer && timer) { @@ -622,7 +622,7 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam) char *msgtemp = (char*)realloc(msg, mir_strlen(msg) + mir_strlen(tmp) + 1); if (msgtemp) { msg = msgtemp; - strcat(msg, tmp); + mir_strcat(msg, tmp); } } diff --git a/plugins/Non-IM Contact/src/namereplacing.cpp b/plugins/Non-IM Contact/src/namereplacing.cpp index f04e290da0..a1737b6eda 100644 --- a/plugins/Non-IM Contact/src/namereplacing.cpp +++ b/plugins/Non-IM Contact/src/namereplacing.cpp @@ -220,8 +220,8 @@ void checkStringForcompare(char *str) j = Y - ©OfStr[i] + (int)mir_strlen(Y) + 1; if (A && B && X && Y) { if (!mir_strcmp(A, B)) - strcat(newStr, X); - else strcat(newStr, Y); + mir_strcat(newStr, X); + else mir_strcat(newStr, Y); } else strncat(newStr, &str[i], j); i += j; @@ -274,7 +274,7 @@ void checkStringForLoad(MCONTACT hContact, char* str) if (A) { DBVARIANT dbv; if (!db_get_s(hContact, MODNAME, A, &dbv)) { - strcat(newStr, dbv.pszVal); + mir_strcat(newStr, dbv.pszVal); db_free(&dbv); } } @@ -351,16 +351,16 @@ void checkStringForLoadN(char* str) if (!db_get(NULL, A, B, &dbv)) { switch (dbv.type) { case DBVT_BYTE: - strcat(newStr, _itoa(dbv.bVal, temp, 10)); + mir_strcat(newStr, _itoa(dbv.bVal, temp, 10)); break; case DBVT_WORD: - strcat(newStr, _itoa(dbv.wVal, temp, 10)); + mir_strcat(newStr, _itoa(dbv.wVal, temp, 10)); break; case DBVT_DWORD: - strcat(newStr, _itoa(dbv.dVal, temp, 10)); + mir_strcat(newStr, _itoa(dbv.dVal, temp, 10)); break; case DBVT_ASCIIZ: - strcat(newStr, dbv.pszVal); + mir_strcat(newStr, dbv.pszVal); break; } db_free(&dbv); @@ -425,7 +425,7 @@ int lastChecked(char *newStr, const char *str) if (GetLastWriteTime(hFile, tszFileName)) { CloseHandle(hFile); - strcat(newStr, tszFileName); + mir_strcat(newStr, tszFileName); mir_snprintf(tszFileName, SIZEOF(tszFileName), "%s%d))", szPattern, file); return (int)mir_strlen(tszFileName); } @@ -520,7 +520,7 @@ int stringReplacer(const char* oldString, char* newString, MCONTACT hContact) if (!strstr(oldString, "start(")) startLine = endLine; if (!strstr(oldString, "end(")) endLine = startLine; // after all the options copy the line across and add 2 to positionInOldString for the file(print(....)) - if (wholeLine >= 0) strcat(newString, fileContents[wholeLine]); + if (wholeLine >= 0) mir_strcat(newString, fileContents[wholeLine]); else { // only copying from 1 line if (startLine == endLine) @@ -528,10 +528,10 @@ int stringReplacer(const char* oldString, char* newString, MCONTACT hContact) else { int i; // copy the whole first line from startChar - strcat(newString, &fileContents[startLine][startChar]); + mir_strcat(newString, &fileContents[startLine][startChar]); // copy the middle lines across for (i = (startLine + 1); i < endLine; i++) { - strcat(newString, fileContents[i]); + mir_strcat(newString, fileContents[i]); } // copy the last line untill endChar strncat(newString, fileContents[endLine], endChar); @@ -548,7 +548,7 @@ int stringReplacer(const char* oldString, char* newString, MCONTACT hContact) else { mir_snprintf(tempString, SIZEOF(tempString), "fn%d", tempInt); if (db_get_static(NULL, MODNAME, tempString, tempString, SIZEOF(tempString))) - strcat(newString, tempString); + mir_strcat(newString, tempString); else return ERROR_NO_FILE; positionInOldString += (int)mir_strlen(_itoa(tempInt, tempString, 10)) + 1; } -- cgit v1.2.3