wxHTML compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-07-24 22:44:22 +00:00
parent 3bcf00abd7
commit 259d1674f2
7 changed files with 19 additions and 17 deletions

View File

@@ -158,7 +158,8 @@ bool wxFTP::SendCommand(const wxString& command, char exp_ret)
bool wxFTP::GetResult(char exp) bool wxFTP::GetResult(char exp)
{ {
if ((m_lastError = GetLine(this, m_lastResult))) m_lastError = GetLine(this, m_lastResult);
if ( m_lastError )
return FALSE; return FALSE;
if (m_lastResult.GetChar(0) != exp) { if (m_lastResult.GetChar(0) != exp) {
m_lastError = wxPROTO_PROTERR; m_lastError = wxPROTO_PROTERR;
@@ -171,7 +172,8 @@ bool wxFTP::GetResult(char exp)
key += _T(' '); key += _T(' ');
while (m_lastResult.Index(key) != 0) { while (m_lastResult.Index(key) != 0) {
if ((m_lastError = GetLine(this, m_lastResult))) m_lastError = GetLine(this, m_lastResult);
if ( m_lastError )
return FALSE; return FALSE;
} }
} }

View File

@@ -601,7 +601,7 @@ GSocketEventFlags wxSocketBase::EventToNotify(GSocketEvent evt)
return GSOCK_OUTPUT_FLAG; return GSOCK_OUTPUT_FLAG;
case GSOCK_CONNECTION: case GSOCK_CONNECTION:
return GSOCK_CONNECTION_FLAG; return GSOCK_CONNECTION_FLAG;
case GSOCK_LOST_FLAG: case GSOCK_LOST:
return GSOCK_LOST_FLAG; return GSOCK_LOST_FLAG;
default: default:
return 0; return 0;

View File

@@ -294,9 +294,9 @@ wxHelpControllerHtml::SetFrameParameters(const wxString &title,
} }
wxFrame * wxFrame *
wxHelpControllerHtml::GetFrameParameters(wxSize *size = NULL, wxHelpControllerHtml::GetFrameParameters(wxSize *size,
wxPoint *pos = NULL, wxPoint *pos,
bool *newframe = NULL) bool *newframe)
{ {
if(size) *size = m_FrameSize; if(size) *size = m_FrameSize;
if(pos) *pos = m_FramePosition; if(pos) *pos = m_FramePosition;

View File

@@ -57,9 +57,9 @@ wxString wxHtmlFilterPlainText::ReadFile(const wxFSFile& file)
wxString doc, doc2; wxString doc, doc2;
if (s == NULL) return wxEmptyString; if (s == NULL) return wxEmptyString;
src = new char[s -> StreamSize()+1]; src = new char[s -> GetSize()+1];
src[s -> StreamSize()] = 0; src[s -> GetSize()] = 0;
s -> Read(src, s -> StreamSize()); s -> Read(src, s -> GetSize());
doc = src; doc = src;
delete [] src; delete [] src;
@@ -137,9 +137,9 @@ wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file)
wxString doc; wxString doc;
if (s == NULL) return wxEmptyString; if (s == NULL) return wxEmptyString;
src = (char*) malloc(s -> StreamSize() + 1); src = (char*) malloc(s -> GetSize() + 1);
src[s -> StreamSize()] = 0; src[s -> GetSize()] = 0;
s -> Read(src, s -> StreamSize()); s -> Read(src, s -> GetSize());
doc = src; doc = src;
free(src); free(src);

View File

@@ -243,7 +243,7 @@ bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg)
if (fi == NULL) return FALSE; if (fi == NULL) return FALSE;
fsys.ChangePathTo(bookFull); fsys.ChangePathTo(bookFull);
s = fi -> GetStream(); s = fi -> GetStream();
sz = s -> StreamSize(); sz = s -> GetSize();
buff = (char*) malloc(sz+1); buff = (char*) malloc(sz+1);
buff[sz] = 0; buff[sz] = 0;
s -> Read(buff, sz); s -> Read(buff, sz);
@@ -724,7 +724,7 @@ void wxHtmlHelpController::ReadCustomization(wxConfigBase *cfg, wxString path)
cfg -> SetPath(path); cfg -> SetPath(path);
} }
m_Cfg.navig_on = (bool) cfg -> Read("hcNavigPanel", m_Cfg.navig_on); m_Cfg.navig_on = cfg -> Read("hcNavigPanel", m_Cfg.navig_on) != 0;
m_Cfg.sashpos = cfg -> Read("hcSashPos", m_Cfg.sashpos); m_Cfg.sashpos = cfg -> Read("hcSashPos", m_Cfg.sashpos);
m_Cfg.x = cfg -> Read("hcX", m_Cfg.x); m_Cfg.x = cfg -> Read("hcX", m_Cfg.x);
m_Cfg.y = cfg -> Read("hcY", m_Cfg.y); m_Cfg.y = cfg -> Read("hcY", m_Cfg.y);

View File

@@ -129,7 +129,7 @@ void wxHtmlHelpController::LoadMSProject(HtmlBookRecord *book, wxFileSystem& fsy
f = fsys.OpenFile(contentsfile); f = fsys.OpenFile(contentsfile);
if (f) { if (f) {
sz = f -> GetStream() -> StreamSize(); sz = f -> GetStream() -> GetSize();
buf = (char*) malloc(sz+1); buf = (char*) malloc(sz+1);
buf[sz] = 0; buf[sz] = 0;
f -> GetStream() -> Read(buf, sz); f -> GetStream() -> Read(buf, sz);
@@ -142,7 +142,7 @@ void wxHtmlHelpController::LoadMSProject(HtmlBookRecord *book, wxFileSystem& fsy
f = fsys.OpenFile(indexfile); f = fsys.OpenFile(indexfile);
if (f) { if (f) {
sz = f -> GetStream() -> StreamSize(); sz = f -> GetStream() -> GetSize();
buf = (char*) malloc(sz+1); buf = (char*) malloc(sz+1);
buf[sz] = 0; buf[sz] = 0;
f -> GetStream() -> Read(buf, sz); f -> GetStream() -> Read(buf, sz);

View File

@@ -50,7 +50,7 @@ bool wxSearchEngine::Scan(wxInputStream *stream)
wxASSERT_MSG(m_Keyword != NULL, _("wxSearchEngine::LookFor must be called before scanning!")); wxASSERT_MSG(m_Keyword != NULL, _("wxSearchEngine::LookFor must be called before scanning!"));
int i, j; int i, j;
int lng = stream -> StreamSize(); int lng = stream ->GetSize();
int wrd = strlen(m_Keyword); int wrd = strlen(m_Keyword);
bool found = FALSE; bool found = FALSE;
char *buf = (char*) malloc(lng + 1); char *buf = (char*) malloc(lng + 1);