From babf7873a3fe373d60ef22b1b671d98e014d8819 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 19:52:29 +0000 Subject: replace strcpy to mir_strcpy git-svn-id: http://svn.miranda-ng.org/main/trunk@13763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Non-IM Contact/src/contactinfo.cpp | 16 ++++++++-------- plugins/Non-IM Contact/src/files.cpp | 6 +++--- plugins/Non-IM Contact/src/main.cpp | 2 +- plugins/Non-IM Contact/src/namereplacing.cpp | 12 ++++++------ 4 files changed, 18 insertions(+), 18 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 24703b4c93..ccaa13d0b9 100644 --- a/plugins/Non-IM Contact/src/contactinfo.cpp +++ b/plugins/Non-IM Contact/src/contactinfo.cpp @@ -340,7 +340,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) CallService(MS_IGNORE_IGNORE, (WPARAM)hContact2, IGNOREEVENT_USERONLINE); db_set_s(hContact2, MODNAME, "Nick", Translate("New Non-IM Contact")); // blank dbVar2 so the replaceing doesnt crash.. - strcpy(dbVar2, ""); + mir_strcpy(dbVar2, ""); // copy the name (dbVar1 is the name) for (i = 0; i <= k; i++) copyReplaceString(dbVar1, dbVar2, oldString[i], newString[i]); @@ -348,7 +348,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) db_set_s(hContact2, MODNAME, "Name", dbVar2); // copy the ProgramString if (db_get_static(hContact1, MODNAME, "ProgramString", dbVar1, SIZEOF(dbVar1))) { - strcpy(dbVar2, ""); + mir_strcpy(dbVar2, ""); for (i = 0; i <= k; i++) copyReplaceString(dbVar1, dbVar2, oldString[i], newString[i]); @@ -356,7 +356,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) } // copy the ProgramParamString if (db_get_static(hContact1, MODNAME, "ProgramParamString", dbVar1, SIZEOF(dbVar1))) { - strcpy(dbVar2, ""); + mir_strcpy(dbVar2, ""); for (i = 0; i <= k; i++) copyReplaceString(dbVar1, dbVar2, oldString[i], newString[i]); @@ -364,7 +364,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) } // copy the group if (db_get_static(hContact1, "CList", "Group", dbVar1, SIZEOF(dbVar1))) { - strcpy(dbVar2, ""); + mir_strcpy(dbVar2, ""); for (i = 0; i <= k; i++) copyReplaceString(dbVar1, dbVar2, oldString[i], newString[i]); @@ -372,7 +372,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) } // copy the ToolTip if (db_get_static(hContact1, MODNAME, "ToolTip", dbVar1, SIZEOF(dbVar1))) { - strcpy(dbVar2, ""); + mir_strcpy(dbVar2, ""); for (i = 0; i <= k; i++) copyReplaceString(dbVar1, dbVar2, oldString[i], newString[i]); @@ -529,7 +529,7 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam) } else if (!strncmp(line, "ToolTip=", mir_strlen("ToolTip="))) { i = (int)mir_strlen("ToolTip="); - strcpy(tooltip, &line[i]); + mir_strcpy(tooltip, &line[i]); fgets(line, 2000, file); while (!strstr(line, "\r\n")) { strcat(tooltip, line); @@ -616,8 +616,8 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam) if (usetimer && timer) { char tmp[64], tmp2[8]; if (minutes) - strcpy(tmp2, "Minutes"); - else strcpy(tmp2, "Seconds"); + mir_strcpy(tmp2, "Minutes"); + else mir_strcpy(tmp2, "Seconds"); mir_snprintf(tmp, SIZEOF(tmp), "UseTimer: Yes\r\nTimer: %d %s", timer, tmp2); char *msgtemp = (char*)realloc(msg, mir_strlen(msg) + mir_strlen(tmp) + 1); if (msgtemp) { diff --git a/plugins/Non-IM Contact/src/files.cpp b/plugins/Non-IM Contact/src/files.cpp index d91012ab1c..5f7044cf12 100644 --- a/plugins/Non-IM Contact/src/files.cpp +++ b/plugins/Non-IM Contact/src/files.cpp @@ -49,8 +49,8 @@ int Openfile(char *outputFile, int saveOpen) //0=save, 1=open int r; char title[16]; if (saveOpen) - strcpy(title, "Open file"); - else strcpy(title, "Save to file"); + mir_strcpy(title, "Open file"); + else mir_strcpy(title, "Save to file"); OPENFILENAMEA ofn = { sizeof(ofn) }; ofn.lpstrFile = filename; @@ -173,7 +173,7 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) char text[512], url[512], fn[10] = "fn0", szFileName[MAX_PATH], temp[512]; int i, timer; GetDlgItemTextA(hwnd, IDC_URL, text, SIZEOF(text)); - strcpy(url, text); + mir_strcpy(url, text); if (!InternetDownloadFile(text)) { for (i = 0;; i++) { mir_snprintf(fn, SIZEOF(fn), "fn%d", i); diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 3956f03fe1..08143c5f62 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -34,7 +34,7 @@ INT_PTR doubleClick(WPARAM wParam, LPARAM lParam) editContact(wParam, 0); // for later when i add a second double click setting else if (db_get_static(wParam, MODNAME, "Program", program, SIZEOF(program)) && mir_strcmp(program, "")) { if (!db_get_static(wParam, MODNAME, "ProgramParams", params, SIZEOF(params))) - strcpy(params, ""); + mir_strcpy(params, ""); if (strstr(program, "http://") || strstr(program, "https://")) CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)program); else shellEXEerror = (int)ShellExecuteA(NULL, NULL, program, params, NULL, SW_SHOW); //ignore the warning, its M$'s backwards compatabilty screwup :) diff --git a/plugins/Non-IM Contact/src/namereplacing.cpp b/plugins/Non-IM Contact/src/namereplacing.cpp index 091b9e3718..f04e290da0 100644 --- a/plugins/Non-IM Contact/src/namereplacing.cpp +++ b/plugins/Non-IM Contact/src/namereplacing.cpp @@ -30,7 +30,7 @@ int readFileIntoArray(int fileNumber, char *FileContents[]) FileContents[i] = (char*)malloc(mir_strlen(temp) + 1); if (FileContents[i] == NULL) break; - strcpy(FileContents[i], temp); + mir_strcpy(FileContents[i], temp); } fclose(file); return i; @@ -228,7 +228,7 @@ void checkStringForcompare(char *str) } else strncat(newStr, &str[i], 1); } - strcpy(str, newStr); + mir_strcpy(str, newStr); free(newStr); free(copyOfStr); } @@ -254,7 +254,7 @@ void checkStringForSave(MCONTACT hContact, char* str) } else strncat(newStr, &str[i], 1); } - strcpy(str, newStr); + mir_strcpy(str, newStr); free(newStr); free(copyOfStr); } @@ -283,7 +283,7 @@ void checkStringForLoad(MCONTACT hContact, char* str) } else strncat(newStr, &str[i], 1); } - strcpy(str, newStr); + mir_strcpy(str, newStr); free(newStr); free(copyOfStr); } @@ -328,7 +328,7 @@ void checkStringForSaveN(char* str) } else strncat(newStr, &str[i], 1); } - strcpy(str, newStr); + mir_strcpy(str, newStr); free(newStr); free(copyOfStr); } @@ -371,7 +371,7 @@ void checkStringForLoadN(char* str) } else strncat(newStr, &str[i], 1); } - strcpy(str, newStr); + mir_strcpy(str, newStr); free(newStr); free(copyOfStr); } -- cgit v1.2.3