summaryrefslogtreecommitdiff
path: root/plugins/Non-IM Contact
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-08-28 16:22:41 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-08-28 16:22:41 +0000
commitc370af60855db957c5b200914bf0bde743845528 (patch)
tree0bd2ef127097c9e937c2650e8b202c3f09453323 /plugins/Non-IM Contact
parent7f082bd5d4865c30b313661b7a02f048b4b137be (diff)
mir_sntprintf / mir_snprintf: obsoleted second parameter removed wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@15064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Non-IM Contact')
-rw-r--r--plugins/Non-IM Contact/src/contactinfo.cpp4
-rw-r--r--plugins/Non-IM Contact/src/dialog.cpp2
-rw-r--r--plugins/Non-IM Contact/src/files.cpp6
-rw-r--r--plugins/Non-IM Contact/src/namereplacing.cpp12
-rw-r--r--plugins/Non-IM Contact/src/timer.cpp2
5 files changed, 13 insertions, 13 deletions
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp
index 33c9778e0f..855d2eef6f 100644
--- a/plugins/Non-IM Contact/src/contactinfo.cpp
+++ b/plugins/Non-IM Contact/src/contactinfo.cpp
@@ -157,7 +157,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
if (!db_get_w(NULL, MODNAME, "Timer", 1))
SetDlgItemText(hwnd, IDC_TIMER_INTERVAL_MSG, TranslateT("Non-IM Contact protocol timer is Disabled"));
else {
- mir_sntprintf(string, _countof(string), TranslateT("Timer intervals... Non-IM Contact Protocol timer is %d seconds"), db_get_w(NULL, MODNAME, "Timer", 1));
+ mir_sntprintf(string, TranslateT("Timer intervals... Non-IM Contact Protocol timer is %d seconds"), db_get_w(NULL, MODNAME, "Timer", 1));
SetDlgItemText(hwnd, IDC_TIMER_INTERVAL_MSG, string);
}
}
@@ -200,7 +200,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
case IDC_OPEN_FOLDER:
if (BrowseForFolder(hwnd, szFileName)) {
- mir_snprintf(szFileName, _countof(szFileName), "%s ,/e", szFileName);
+ mir_snprintf(szFileName, "%s ,/e", szFileName);
SetDlgItemTextA(hwnd, IDC_LINK, "explorer.exe");
SetDlgItemTextA(hwnd, IDC_PARAMS, szFileName);
}
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp
index c5fdf36770..469fd1ee73 100644
--- a/plugins/Non-IM Contact/src/dialog.cpp
+++ b/plugins/Non-IM Contact/src/dialog.cpp
@@ -288,7 +288,7 @@ void DoPropertySheet(MCONTACT hContact)
psh.hInstance = g_hInst;
psh.pszIcon = MAKEINTRESOURCEA(IDI_MAIN);
db_get_static(hContact, MODNAME, "Nick", nick, _countof(nick));
- mir_snprintf(title, _countof(title), Translate("Edit Non-IM Contact \"%s\""), nick);
+ mir_snprintf(title, Translate("Edit Non-IM Contact \"%s\""), nick);
psh.pszCaption = title;
psh.nPages = _countof(psp);
psh.ppsp = (LPCPROPSHEETPAGEA)&psp;
diff --git a/plugins/Non-IM Contact/src/files.cpp b/plugins/Non-IM Contact/src/files.cpp
index c97369d641..9f37274b1f 100644
--- a/plugins/Non-IM Contact/src/files.cpp
+++ b/plugins/Non-IM Contact/src/files.cpp
@@ -114,7 +114,7 @@ void readFile(HWND hwnd)
}
if (!strncmp("http://", szFileName, mir_strlen("http://")) || !strncmp("https://", szFileName, mir_strlen("https://")))
- mir_snprintf(szFileName, _countof(szFileName), "%s\\plugins\\fn%d.html", getMimDir(temp), fileNumber);
+ mir_snprintf(szFileName, "%s\\plugins\\fn%d.html", getMimDir(temp), fileNumber);
FILE *filen = fopen(szFileName, "r");
if (!filen) {
@@ -130,7 +130,7 @@ void readFile(HWND hwnd)
else if (temp[mir_strlen(temp) - 1] == '\n')
temp[mir_strlen(temp) - 1] = '\0';
else temp[mir_strlen(temp)] = '\0';
- mir_snprintf(temp1, _countof(temp1), Translate("line(%-3d) = | %s"), lineNumber, temp);
+ mir_snprintf(temp1, Translate("line(%-3d) = | %s"), lineNumber, temp);
SendDlgItemMessageA(hwnd, IDC_FILE_CONTENTS, LB_ADDSTRING, 0, (LPARAM)temp1);
lineNumber++;
fileLength++;
@@ -186,7 +186,7 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
if (!db_get_static(NULL, MODNAME, fn, text, _countof(text)))
break;
}
- mir_snprintf(szFileName, _countof(szFileName), "%s\\plugins\\%s.html", getMimDir(temp), fn);
+ mir_snprintf(szFileName, "%s\\plugins\\%s.html", getMimDir(temp), fn);
if (savehtml(szFileName)) {
mir_snprintf(fn, "fn%d", i);
db_set_s(NULL, MODNAME, fn, url);
diff --git a/plugins/Non-IM Contact/src/namereplacing.cpp b/plugins/Non-IM Contact/src/namereplacing.cpp
index 973d689ee3..32237af843 100644
--- a/plugins/Non-IM Contact/src/namereplacing.cpp
+++ b/plugins/Non-IM Contact/src/namereplacing.cpp
@@ -3,7 +3,7 @@
int readFileIntoArray(int fileNumber, char *FileContents[])
{
char dbSetting[20], temp[MAX_STRING_LENGTH];
- mir_snprintf(dbSetting, _countof(dbSetting), "fn%d", fileNumber);
+ mir_snprintf(dbSetting, "fn%d", fileNumber);
char *szVar = db_get_sa(NULL, MODNAME, dbSetting);
if (szVar == NULL)
@@ -11,7 +11,7 @@ int readFileIntoArray(int fileNumber, char *FileContents[])
char tszFileName[MAX_PATH];
if (!strncmp("http://", szVar, 7) || !strncmp("https://", szVar, 7))
- mir_snprintf(tszFileName, _countof(tszFileName), "%s\\plugins\\fn%d.html", getMimDir(temp), fileNumber);
+ mir_snprintf(tszFileName, "%s\\plugins\\fn%d.html", getMimDir(temp), fileNumber);
else
mir_strncpy(tszFileName, szVar, _countof(tszFileName));
mir_free(szVar);
@@ -405,7 +405,7 @@ int lastChecked(CMStringA &szNewStr, const char *str)
return 0;
if (!strncmp("http://", szVar, 7) || !strncmp("https://", szVar, 8))
- mir_snprintf(tszFileName, _countof(tszFileName), "%s\\plugins\\fn%d.html", getMimDir(temp), file);
+ mir_snprintf(tszFileName, "%s\\plugins\\fn%d.html", getMimDir(temp), file);
else
mir_strncpy(tszFileName, szVar, _countof(tszFileName));
mir_free(szVar);
@@ -417,7 +417,7 @@ int lastChecked(CMStringA &szNewStr, const char *str)
if (GetLastWriteTime(hFile, tszFileName)) {
CloseHandle(hFile);
szNewStr.Append(tszFileName);
- mir_snprintf(tszFileName, _countof(tszFileName), "%s%d))", szPattern, file);
+ mir_snprintf(tszFileName, "%s%d))", szPattern, file);
return (int)mir_strlen(tszFileName);
}
CloseHandle(hFile);
@@ -540,7 +540,7 @@ int stringReplacer(const char *oldString, CMStringA &szNewString, MCONTACT hCont
return ERROR_NO_FILE;
}
else {
- mir_snprintf(tempString, _countof(tempString), "fn%d", tempInt);
+ mir_snprintf(tempString, "fn%d", tempInt);
if (db_get_static(NULL, MODNAME, tempString, tempString, _countof(tempString)))
szNewString.Append(tempString);
else return ERROR_NO_FILE;
@@ -623,7 +623,7 @@ void replaceAllStrings(MCONTACT hContact)
/* tooltips*/
WriteSetting(hContact, MODNAME, "ToolTip", "UserInfo", "MyNotes");
if (db_get_static(hContact, MODNAME, "Program", tmp1, _countof(tmp1)) && db_get_static(hContact, MODNAME, "ProgramParams", tmp2, _countof(tmp2))) {
- mir_snprintf(tmp3, _countof(tmp3), "%s %s", tmp1, tmp2);
+ mir_snprintf(tmp3, "%s %s", tmp1, tmp2);
db_set_s(hContact, "UserInfo", "FirstName", tmp3);
}
else if (db_get_static(hContact, MODNAME, "Program", tmp1, _countof(tmp1))) {
diff --git a/plugins/Non-IM Contact/src/timer.cpp b/plugins/Non-IM Contact/src/timer.cpp
index 3bf775e6fa..b7851eb1d1 100644
--- a/plugins/Non-IM Contact/src/timer.cpp
+++ b/plugins/Non-IM Contact/src/timer.cpp
@@ -32,7 +32,7 @@ void timerFunc(void*)
int timer = db_get_w(NULL, MODNAME, fn, 60);
if (timer && !(timerCount % timer)) {
if (!InternetDownloadFile(text)) {
- mir_snprintf(szFileName, _countof(szFileName), "%s\\plugins\\fn%d.html", getMimDir(temp), i);
+ mir_snprintf(szFileName, "%s\\plugins\\fn%d.html", getMimDir(temp), i);
savehtml(szFileName);
}
}