#ifdef __GNUG__
#pragma implementation "ftp.h"
#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef __MWERKS__
#include <memory.h>
+#endif
+#if defined(__WXMAC__)
+#include "/wx/mac/macsock.h"
+#endif
+
#include <stdlib.h>
#include "wx/string.h"
#include "wx/utils.h"
////////////////////////////////////////////////////////////////
////// wxFTP connect and login methods /////////////////////////
////////////////////////////////////////////////////////////////
-bool wxFTP::Connect(wxSockAddress& addr)
+bool wxFTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait))
{
if (!m_handler) {
m_lastError = wxPROTO_NOHNDLR;
{
if ((m_lastError = GetLine(this, m_lastResult)))
return FALSE;
- if (m_lastResult[0UL] != exp) {
+ if (m_lastResult.GetChar(0) != exp) {
m_lastError = wxPROTO_PROTERR;
return FALSE;
}
- if (m_lastResult[3UL] == '-') {
+ if (m_lastResult.GetChar(3) == '-') {
wxString key = m_lastResult.Left((size_t)3);
key += ' ';
: wxSocketInputStream(*sock), m_ftp(ftp_clt) {}
virtual ~wxInputFTPStream(void)
{
- if (Eof())
+ if (LastError() != wxStream_NOERROR)
m_ftp->GetResult('2');
else
m_ftp->Abort();
: wxSocketOutputStream(*sock), m_ftp(ftp_clt) {}
virtual ~wxOutputFTPStream(void)
{
- if (Bad())
+ if (LastError() != wxStream_NOERROR)
m_ftp->GetResult('2');
else
m_ftp->Abort();