From 0aafc6c4b2e485f5ee9bb0bdf3e687525859cb03 Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Sat, 14 Jan 2012 19:18:42 +0000 Subject: HTTPServer (patch from FREAK_THEMIGHTY): code cleanup header reorganisation MM_INTERFACE support new langpacks support rather technical changes git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@258 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- HTTPServer/IndexXML.cpp | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'HTTPServer/IndexXML.cpp') diff --git a/HTTPServer/IndexXML.cpp b/HTTPServer/IndexXML.cpp index 6806670..634ce72 100644 --- a/HTTPServer/IndexXML.cpp +++ b/HTTPServer/IndexXML.cpp @@ -15,16 +15,9 @@ //along with this program; if not, write to the Free Software //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#ifdef NDEBUG //release -#include "AggressiveOptimize.h" //create small code -#endif - #include "HttpUser.h" #include "MimeHandling.h" #include "GuiElements.h" -#include "Glob.h" -#include -#include #include "IndexCreation.h" @@ -78,7 +71,7 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, strcpy(szMask, pszRealPath); strcat(szMask, "*"); - WIN32_FIND_DATAA fdFindFileData; + WIN32_FIND_DATA fdFindFileData; HANDLE hFind = FindFirstFile(szMask, &fdFindFileData); if (hFind == INVALID_HANDLE_VALUE) @@ -133,7 +126,7 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, // Write dirname ReplaceSign(szFileName, MAX_PATH, '&', "&"); - pszBuffer += _snprintf(pszBuffer, BUFFER_SIZE - (pszBuffer - szBuffer), + pszBuffer += mir_snprintf(pszBuffer, BUFFER_SIZE - (pszBuffer - szBuffer), " %s\r\n", szFileName); WriteFile(hFile, szBuffer, pszBuffer - szBuffer, &dwBytesWritten, NULL); @@ -148,7 +141,7 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, ReplaceSign(szFileName, MAX_PATH, '&', "&"); if (fdFindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - pszBuffer += _snprintf(pszBuffer, BUFFER_SIZE - (pszBuffer - szBuffer), + pszBuffer += mir_snprintf(pszBuffer, BUFFER_SIZE - (pszBuffer - szBuffer), " \r\n", szFileName); } else { pszExt = strrchr(szFileName, '.'); @@ -158,24 +151,24 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, pszExt++; } - pszBuffer += _snprintf(pszBuffer, BUFFER_SIZE - (pszBuffer - szBuffer), + pszBuffer += mir_snprintf(pszBuffer, BUFFER_SIZE - (pszBuffer - szBuffer), " \r\n"); } @@ -202,7 +195,7 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, if (pclCur->bIsDirectory()) { szFileName[strlen(szFileName)-1] = '\0'; if (!strchr(szFileName, '/')) { // only one level deeper - pszBuffer += _snprintf(pszBuffer, BUFFER_SIZE - (pszBuffer - szBuffer), + pszBuffer += mir_snprintf(pszBuffer, BUFFER_SIZE - (pszBuffer - szBuffer), " \r\n", szFileName); if (!WriteFile(hFile, szBuffer, pszBuffer - szBuffer, &dwBytesWritten, NULL)) @@ -230,24 +223,24 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, CloseHandle(hFileS); } - pszBuffer += _snprintf(pszBuffer, BUFFER_SIZE - (pszBuffer - szBuffer), + pszBuffer += mir_snprintf(pszBuffer, BUFFER_SIZE - (pszBuffer - szBuffer), " \r\n"); if (!WriteFile(hFile, szBuffer, pszBuffer - szBuffer, &dwBytesWritten, NULL)) -- cgit v1.2.3