summaryrefslogtreecommitdiff
path: root/plugins/Non-IM Contact/src/namereplacing.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-07-23 19:23:02 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-07-23 19:23:02 +0000
commit90e458dac28dc98d60ab00b35ddcfd09fb46811a (patch)
treedc598dd8f32d8ecf14989d54d325ae11502bb8d8 /plugins/Non-IM Contact/src/namereplacing.cpp
parent3b05e84e27e50e8b44cb86cbc0a8eb1b639d7223 (diff)
replace sprintf to mir_snprintf (part 3)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5461 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Non-IM Contact/src/namereplacing.cpp')
-rw-r--r--plugins/Non-IM Contact/src/namereplacing.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Non-IM Contact/src/namereplacing.cpp b/plugins/Non-IM Contact/src/namereplacing.cpp
index 757a55f0b9..5643a03849 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];
- wsprintfA(dbSetting, "fn%d", fileNumber);
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "fn%d", fileNumber);
DBVARIANT dbv;
char tszFileName[MAX_PATH];
@@ -390,7 +390,7 @@ BOOL GetLastWriteTime(HANDLE hFile, LPSTR lpszString)
// Build a string showing the date and time.
wsprintfA(lpszString, "%02d/%02d/%d %02d:%02d",
stLocal.wDay, stLocal.wMonth, stLocal.wYear,
- stLocal.wHour, stLocal.wMinute);
+ stLocal.wHour, stLocal.wMinute); //!!!!!!!!!!!!!!!
return TRUE;
}
@@ -422,7 +422,7 @@ int lastChecked(char *newStr, const char *str)
if (GetLastWriteTime(hFile, tszFileName)) {
CloseHandle(hFile);
strcat(newStr, tszFileName);
- _snprintf(tszFileName, MAX_PATH, "%s%d))", szPattern, file);
+ mir_snprintf(tszFileName, MAX_PATH, "%s%d))", szPattern, file);
return (int)strlen(tszFileName);
}
CloseHandle(hFile);
@@ -555,7 +555,7 @@ int stringReplacer(const char* oldString, char* newString, HANDLE hContact)
}
else
{
- wsprintfA(tempString, "fn%d", tempInt);
+ mir_snprintf(tempString, SIZEOF(tempString), "fn%d", tempInt);
if (db_get_static(NULL, MODNAME,tempString, tempString))
strcat(newString, tempString);
else return ERROR_NO_FILE;
@@ -609,15 +609,15 @@ void WriteSetting(HANDLE hContact, char* module1, char* setting1 , char* module2
if (db_get_static(hContact, module1, setting1, text)) {
switch (stringReplacer(text, newString, hContact)) {
case ERROR_NO_LINE_AFTER_VAR_F:
- wsprintfA(newString, Translate("%s - ERROR: no line specified or line not found (in %s)"),text, setting1);
+ mir_snprintf(newString, SIZEOF(newString), Translate("%s - ERROR: no line specified or line not found (in %s)"),text, setting1);
error = 1;
break;
case ERROR_LINE_NOT_READ:
- wsprintfA(newString, Translate("%s - ERROR: file couldnt be opened (in %s)"), text, setting1);
+ mir_snprintf(newString, SIZEOF(newString), Translate("%s - ERROR: file couldnt be opened (in %s)"), text, setting1);
error = 1;
break;
case ERROR_NO_FILE:
- wsprintfA(newString, Translate("%s - ERROR: no file specified in settings (in %s)"), text, setting1);
+ mir_snprintf(newString, SIZEOF(newString), Translate("%s - ERROR: no file specified in settings (in %s)"), text, setting1);
error = 1;
break;
default:
@@ -650,7 +650,7 @@ void replaceAllStrings(HANDLE hContact)
/* tooltips*/
WriteSetting(hContact, MODNAME, "ToolTip", "UserInfo", "MyNotes");
if (db_get_static(hContact, MODNAME, "Program", tmp1) && db_get_static(hContact, MODNAME, "ProgramParams", tmp2)) {
- wsprintfA(tmp3, "%s %s", tmp1, tmp2);
+ mir_snprintf(tmp3, SIZEOF(tmp3), "%s %s", tmp1, tmp2);
db_set_s(hContact, "UserInfo", "FirstName", tmp3);
}
else if (db_get_static(hContact, MODNAME, "Program", tmp1))