summaryrefslogtreecommitdiff
path: root/plugins/CrashDumper/src/utils.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-07-25 20:15:05 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-07-25 20:15:05 +0000
commit9d32b9cd791fb5f51dad17567152c70a8511a500 (patch)
treefd7aa3250ed409e720f26c341c0a5d736ed8083c /plugins/CrashDumper/src/utils.cpp
parent125a25c86eed41352d45eb8fb6f994f65700c3ec (diff)
replace sprintf to mir_snprintf (part 6)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5485 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CrashDumper/src/utils.cpp')
-rw-r--r--plugins/CrashDumper/src/utils.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp
index 1bb3b770aa..f7d1e5d8a1 100644
--- a/plugins/CrashDumper/src/utils.cpp
+++ b/plugins/CrashDumper/src/utils.cpp
@@ -329,7 +329,7 @@ void GetISO8061Time(SYSTEMTIME* stLocal, LPTSTR lpszString, DWORD dwSize)
int offset = GetTZOffset();
// Build a string showing the date and time.
- crs_sntprintf(lpszString, dwSize, TEXT("%d-%02d-%02d %02d:%02d:%02d%+03d%02d"),
+ mir_sntprintf(lpszString, dwSize, TEXT("%d-%02d-%02d %02d:%02d:%02d%+03d%02d"),
stLocal->wYear, stLocal->wMonth, stLocal->wDay,
stLocal->wHour, stLocal->wMinute, stLocal->wSecond,
offset / 60, offset % 60);
@@ -695,14 +695,14 @@ void GetLanguagePackString(bkstring& buffer)
LPTSTR fname = _tcsrchr(path, TEXT('\\'));
if (fname == NULL) fname = path;
- crs_sntprintf(fname, MAX_PATH-(fname-path), TEXT("\\langpack_*.txt"));
+ mir_sntprintf(fname, MAX_PATH-(fname-path), TEXT("\\langpack_*.txt"));
WIN32_FIND_DATA FindFileData;
HANDLE hFind = FindFirstFile(path, &FindFileData);
if (hFind == INVALID_HANDLE_VALUE) return;
FindClose(hFind);
- crs_sntprintf(fname, MAX_PATH-(fname-path), TEXT("\\%s"), FindFileData.cFileName);
+ mir_sntprintf(fname, MAX_PATH-(fname-path), TEXT("\\%s"), FindFileData.cFileName);
HANDLE hDumpFile = CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -768,18 +768,6 @@ bool CreateDirectoryTree(LPTSTR szDir)
return res;
}
-int crs_sntprintf(TCHAR *buffer, size_t count, const TCHAR* fmt, ...)
-{
- va_list va;
- va_start(va, fmt);
-
- int len = _vsntprintf(buffer, count-1, fmt, va);
- buffer[len] = 0;
-
- va_end(va);
- return len;
-}
-
void GetVersionInfo(HMODULE hLib, bkstring& buffer)
{
HRSRC hVersion = FindResource(hLib, MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION);