From a757184e5db3112d3de0b69eec7d39b937e396bc Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 25 Jul 2013 15:32:06 +0000 Subject: replace sprintf to mir_snprintf (part 5) git-svn-id: http://svn.miranda-ng.org/main/trunk@5481 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HTTPServer/src/IndexHTML.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'plugins/HTTPServer/src') diff --git a/plugins/HTTPServer/src/IndexHTML.cpp b/plugins/HTTPServer/src/IndexHTML.cpp index 2a5f70f341..651b74c867 100644 --- a/plugins/HTTPServer/src/IndexHTML.cpp +++ b/plugins/HTTPServer/src/IndexHTML.cpp @@ -223,10 +223,6 @@ bool LoadIndexHTMLTemplate() { break; // Error - End missing } - //char Temp[100]; - //sprintf(Temp, "Tag: %i Begin: %i End: %i", *(pszBuf-1), pszBuf-szDestBuf, pszBuf-szDestBuf+pszLevelEnd-pszBuf); - //LogEvent("Jump", Temp); - // write jump address *((WORD*)(pszBuf)) = (WORD)((pszLevelEnd - pszBuf - 1) | 0x8000); pszBuf += 2; @@ -414,13 +410,13 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, case SY_FILE_NAME: case SY_DIR_NAME: { - pszBuffer += _snprintf(pszBuffer, 250, "%s", szName); + pszBuffer += mir_snprintf(pszBuffer, 250, "%s", szName); break; } case SY_DIR_URL: { case SY_FILE_URL: - pszBuffer += _snprintf(pszBuffer, 250, "%s", szURL); + pszBuffer += mir_snprintf(pszBuffer, 250, "%s", szURL); break; } @@ -431,7 +427,7 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, (*pszPos == SY_FILE_CREATE_TIME) ? &ftFileCreateTime : &ftFileModifyTime, &systemTime); - pszBuffer += _snprintf(pszBuffer, 100, "%i/%02i/%02i %i:%02i:%02i", + pszBuffer += mir_snprintf(pszBuffer, 100, "%i/%02i/%02i %i:%02i:%02i", systemTime.wYear, systemTime.wMonth, systemTime.wDay, systemTime.wHour, systemTime.wMinute, systemTime.wSecond); break; @@ -439,11 +435,11 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, case SY_FILE_SIZE: { if ((iFileSize >> 10) == 0) - pszBuffer += _snprintf(pszBuffer, 100, "%i Byte", iFileSize); + pszBuffer += mir_snprintf(pszBuffer, 100, "%i Byte", iFileSize); else if ((iFileSize >> 20) == 0) - pszBuffer += _snprintf(pszBuffer, 100, "%.1f KB", (float)(iFileSize) / 1024.0f); + pszBuffer += mir_snprintf(pszBuffer, 100, "%.1f KB", (float)(iFileSize) / 1024.0f); else - pszBuffer += _snprintf(pszBuffer, 100, "%.1f MB", (float)(iFileSize) / (1024.0f * 1024.0f)); + pszBuffer += mir_snprintf(pszBuffer, 100, "%.1f MB", (float)(iFileSize) / (1024.0f * 1024.0f)); break; } -- cgit v1.2.3