Source cleaning: whitespaces, tabs, FALSE/false, TRUE/true, -1/wxDefaultCoord, !!/!IsEmpty().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-15 13:20:18 +00:00
parent 9eace708fc
commit 5d3e7b52d8
16 changed files with 259 additions and 259 deletions

View File

@@ -33,7 +33,7 @@
#include "wx/sckstrm.h"
IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol)
IMPLEMENT_PROTOCOL(wxHTTP, wxT("http"), wxT("80"), TRUE)
IMPLEMENT_PROTOCOL(wxHTTP, wxT("http"), wxT("80"), true)
#define HTTP_BSIZE 2048
@@ -41,8 +41,8 @@ wxHTTP::wxHTTP()
: wxProtocol()
{
m_addr = NULL;
m_read = FALSE;
m_proxy_mode = FALSE;
m_read = false;
m_proxy_mode = false;
m_post_buf = wxEmptyString;
m_http_response = 0;
@@ -99,7 +99,7 @@ void wxHTTP::SetHeader(const wxString& header, const wxString& h_data)
{
if (m_read) {
ClearHeaders();
m_read = FALSE;
m_read = false;
}
wxHeaderIterator it = FindHeader(header);
@@ -141,11 +141,11 @@ bool wxHTTP::ParseHeaders()
wxStringTokenizer tokenzr;
ClearHeaders();
m_read = TRUE;
m_read = true;
#if defined(__VISAGECPP__)
// VA just can't stand while(1)
bool bOs2var = TRUE;
bool bOs2var = true;
while(bOs2var)
#else
while (1)
@@ -153,7 +153,7 @@ bool wxHTTP::ParseHeaders()
{
m_perr = GetLine(this, line);
if (m_perr != wxPROTO_NOERR)
return FALSE;
return false;
if (line.Length() == 0)
break;
@@ -161,7 +161,7 @@ bool wxHTTP::ParseHeaders()
wxString left_str = line.BeforeFirst(':');
m_headers[left_str] = line.AfterFirst(':').Strip(wxString::both);
}
return TRUE;
return true;
}
bool wxHTTP::Connect(const wxString& host, unsigned short port)
@@ -180,7 +180,7 @@ bool wxHTTP::Connect(const wxString& host, unsigned short port)
delete m_addr;
m_addr = NULL;
m_perr = wxPROTO_NETERR;
return FALSE;
return false;
}
if ( port ) addr->Service(port);
@@ -189,7 +189,7 @@ bool wxHTTP::Connect(const wxString& host, unsigned short port)
SetHeader(wxT("Host"), host);
return TRUE;
return true;
}
bool wxHTTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait))
@@ -205,7 +205,7 @@ bool wxHTTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait))
if (ipv4addr)
SetHeader(wxT("Host"), ipv4addr->OrigHostname());
return TRUE;
return true;
}
bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
@@ -222,7 +222,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
SetHeader( wxT("Content-Length"), wxString::Format( wxT("%lu"), (unsigned long)m_post_buf.Len() ) );
break;
default:
return FALSE;
return false;
}
m_http_response = 0;
@@ -237,7 +237,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
#else
SetFlags( wxSOCKET_NONE );
#endif
Notify(FALSE);
Notify(false);
wxString buf;
buf.Printf(wxT("%s %s HTTP/1.0\r\n"), request, path.c_str());
@@ -255,7 +255,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
m_perr = GetLine(this, tmp_str);
if (m_perr != wxPROTO_NOERR) {
RestoreState();
return FALSE;
return false;
}
if (!tmp_str.Contains(wxT("HTTP/"))) {
@@ -264,7 +264,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
SetHeader(wxT("Content-Length"), wxT("-1"));
SetHeader(wxT("Content-Type"), wxT("none/none"));
RestoreState();
return TRUE;
return true;
}
wxStringTokenizer token(tmp_str,wxT(' '));
@@ -289,7 +289,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
default:
m_perr = wxPROTO_NOFILE;
RestoreState();
return FALSE;
return false;
}
ret_value = ParseHeaders();
@@ -343,9 +343,9 @@ wxInputStream *wxHTTP::GetInputStream(const wxString& path)
if (!m_addr)
return NULL;
// We set m_connected back to FALSE so wxSocketBase will know what to do.
// We set m_connected back to false so wxSocketBase will know what to do.
#ifdef __WXMAC__
wxSocketClient::Connect(*m_addr , FALSE );
wxSocketClient::Connect(*m_addr , false );
wxSocketClient::WaitOnConnect(10);
if (!wxSocketClient::IsConnected())
@@ -367,7 +367,7 @@ wxInputStream *wxHTTP::GetInputStream(const wxString& path)
inp_stream->m_read_bytes = 0;
Notify(FALSE);
Notify(false);
SetFlags(wxSOCKET_BLOCK | wxSOCKET_WAITALL);
return inp_stream;