summaryrefslogtreecommitdiff
path: root/HTTPServer/HttpUser.cpp
diff options
context:
space:
mode:
authormataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2012-01-14 19:18:42 +0000
committermataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2012-01-14 19:18:42 +0000
commit0aafc6c4b2e485f5ee9bb0bdf3e687525859cb03 (patch)
tree73230de5fcc8ba7a89a8185f49dfb74313e02558 /HTTPServer/HttpUser.cpp
parent03d88e9750c2d983318035dcd33da24875799b4c (diff)
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
Diffstat (limited to 'HTTPServer/HttpUser.cpp')
-rw-r--r--HTTPServer/HttpUser.cpp30
1 files changed, 8 insertions, 22 deletions
diff --git a/HTTPServer/HttpUser.cpp b/HTTPServer/HttpUser.cpp
index 2e10fc1..0dd9ad9 100644
--- a/HTTPServer/HttpUser.cpp
+++ b/HTTPServer/HttpUser.cpp
@@ -15,26 +15,12 @@
//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 "IndexCreation.h"
-#include "Glob.h"
-#include <stdio.h>
-#include <time.h>
-
-#pragma warning( push, 3 )
-
-#include "newpluginapi.h"
-#include "m_langpack.h"
-#include "m_netlib.h"
-#pragma warning( pop )
/////////////////////////////////////////////////////////////////////
@@ -251,7 +237,7 @@ void CLHttpUser::SendError(int iErrorCode, const char * pszError, const char * p
pszDescription = pszError;
char szBuf[1000];
- DWORD dwBytesToWrite = _snprintf(szBuf, sizeof(szBuf) ,
+ DWORD dwBytesToWrite = mir_snprintf(szBuf, sizeof(szBuf) ,
"HTTP/1.1 %i %s\r\n"
"Date: %s\r\n"
"Server: MirandaWeb/%s\r\n"
@@ -301,7 +287,7 @@ void CLHttpUser::SendRedir(int iErrorCode, const char * pszError, const char * p
pszDescription = pszError;
char szBuff[1000];
- DWORD dwBytesToWrite = _snprintf(szBuff, sizeof(szBuff) ,
+ DWORD dwBytesToWrite = mir_snprintf(szBuff, sizeof(szBuff) ,
"HTTP/1.1 %i %s\r\n"
"Date: %s\r\n"
"Server: MirandaWeb/%s\r\n"
@@ -566,7 +552,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) {
char szETag[ 50 ];
{
- int nETagLen = _snprintf(szETag, sizeof(szETag), "\"%x-%x-%x\"",
+ int nETagLen = mir_snprintf(szETag, sizeof(szETag), "\"%x-%x-%x\"",
nDataSize, stFileTime.dwHighDateTime, stFileTime.dwLowDateTime);
if (!apszParam[eIfRange] || (strncmp(szETag, apszParam[eIfRange], nETagLen) == 0)) {
@@ -636,7 +622,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) {
"Last-Modified: %s\r\n"
"\r\n";
- dwBytesToWrite = _snprintf(szBuf, sizeof(szBuf), szHttpPartial ,
+ dwBytesToWrite = mir_snprintf(szBuf, sizeof(szBuf), szHttpPartial ,
szCurTime ,
pszVersion,
szETag ,
@@ -658,7 +644,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) {
"Last-Modified: %s\r\n"
"\r\n";
- dwBytesToWrite = _snprintf(szBuf, sizeof(szBuf), szHttpOk ,
+ dwBytesToWrite = mir_snprintf(szBuf, sizeof(szBuf), szHttpOk ,
szCurTime ,
pszVersion,
szETag ,
@@ -693,7 +679,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) {
DWORD dwCurTick = GetTickCount();
if (dwCurTick - dwLastUpdate >= 1000) {/*
char szTmp[200];
- _snprintf( szTmp, sizeof( szTmp ), "Bytes tr %d Time %d Tick %d\n", dwCurrentDL - dwLastCurrentDL, dwCurTick - dwLastUpdate, dwCurTick );
+ mir_snprintf( szTmp, sizeof( szTmp ), "Bytes tr %d Time %d Tick %d\n", dwCurrentDL - dwLastCurrentDL, dwCurTick - dwLastUpdate, dwCurTick );
OutputDebugString( szTmp );
*/
dwSpeed = ((dwCurrentDL - dwLastCurrentDL) * 1000) / (dwCurTick - dwLastUpdate);
@@ -745,7 +731,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) {
}
/*
char szTmp[200];
- _snprintf( szTmp, sizeof( szTmp ), "Current status : %d %% pos %d size %d\n", (dwCurrentDL * 100) / dwTotalSize, dwCurrentDL , dwTotalSize );
+ mir_snprintf( szTmp, sizeof( szTmp ), "Current status : %d %% pos %d size %d\n", (dwCurrentDL * 100) / dwTotalSize, dwCurrentDL , dwTotalSize );
OutputDebugString( szTmp );
*/
}
@@ -761,7 +747,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) {
/*
{
char szBuf[200];
- _snprintf( szBuf, sizeof( szBuf ), "File Transfer stoped %d transfer complete %d\n", GetTickCount(), dwCurrentDL == nDataSize);
+ mir_snprintf( szBuf, sizeof( szBuf ), "File Transfer stoped %d transfer complete %d\n", GetTickCount(), dwCurrentDL == nDataSize);
OutputDebugString( szBuf );
}
*/