X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef5eca7acc0a177b1d87aa6e84bc04fb998b78ee..1a8e309166de13278b719b3dd8b9db73d4750bb2:/src/common/ftp.cpp diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index dbc0669ab5..c7318863ee 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -19,10 +19,6 @@ // declarations // ============================================================================ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "ftp.h" -#endif - // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- @@ -348,7 +344,7 @@ char wxFTP::GetResult() } // if we got here we must have a non empty code string - return code[0u]; + return (char)code[0u]; } // ---------------------------------------------------------------------------- @@ -387,7 +383,7 @@ bool wxFTP::SetTransferMode(TransferMode transferMode) return false; } - // If we get here the operation has been succesfully completed + // If we get here the operation has been successfully completed // Set the status-member m_currentTransfermode = transferMode; @@ -645,8 +641,8 @@ wxSocketBase *wxFTP::AcceptIfActive(wxSocketBase *sock) return sock; } -wxString wxFTP::GetPortCmdArgument(wxIPV4address addrLocal, - wxIPV4address addrNew) +wxString wxFTP::GetPortCmdArgument(const wxIPV4address& addrLocal, + const wxIPV4address& addrNew) { // Just fills in the return value with the local IP // address of the current socket. Also it fill in the @@ -728,7 +724,7 @@ wxSocketBase *wxFTP::GetPassivePort() (wxUint16)a[3] << 16 | (wxUint16)a[4] << 8 | a[5]; - wxUint16 port = (wxUint16)a[0] << 8 | a[1]; + wxUint16 port = (wxUint16)(a[0] << 8 | a[1]); wxIPV4address addr; addr.Hostname(hostaddr); @@ -771,7 +767,7 @@ wxInputStream *wxFTP::GetInputStream(const wxString& path) return NULL; } - wxString tmp_str = wxT("RETR ") + wxURL::ConvertFromURI(path); + wxString tmp_str = wxT("RETR ") + wxURI::Unescape(path); if ( !CheckCommand(tmp_str, '1') ) return NULL; @@ -824,7 +820,7 @@ bool wxFTP::GetList(wxArrayString& files, // - Windows : like "dir" command // - others : ? wxString line(details ? _T("LIST") : _T("NLST")); - if ( !wildcard.IsEmpty() ) + if ( !wildcard.empty() ) { line << _T(' ') << wildcard; } @@ -865,7 +861,7 @@ bool wxFTP::FileExists(const wxString& fileName) if ( GetList(fileList, fileName, false) ) { // Some ftp-servers (Ipswitch WS_FTP Server 1.0.5 does this) - // displays this behaviour when queried on a non-existing file: + // displays this behaviour when queried on a nonexistent file: // NLST this_file_does_not_exist // 150 Opening ASCII data connection for directory listing // (no data transferred)