X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c5d3e1ccd1d27ab0cf913ddbffb1b54b5802f3a..12db77cab1054d288a2b3e2d07e58ad1d6386a53:/src/html/helpdata.cpp?ds=sidebyside diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index df9d785d79..e558e2fb8a 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -4,14 +4,13 @@ // Notes: Based on htmlhelp.cpp, implementing a monolithic // HTML Help controller class, by Vaclav Slavik // Author: Harm van der Heijden and Vaclav Slavik -// Created: -// RCS-ID: +// RCS-ID: $Id$ // Copyright: (c) Harm van der Heijden and Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -#pragma implementation "helpdata.h" +#pragma implementation #endif // For compilers that support precompilation, includes "wx.h". @@ -33,7 +32,7 @@ #include "wx/tokenzr.h" #include "wx/wfstream.h" #include "wx/busyinfo.h" -#include "wx/html/htmlparser.h" +#include "wx/html/htmlpars.h" #include "wx/html/htmldefs.h" #include "wx/arrimpl.cpp" @@ -124,8 +123,8 @@ bool HP_TagHandler::HandleTag(const wxHtmlTag& tag) m_Name = m_Page = wxEmptyString; ParseInner(tag); if (m_Page != wxEmptyString) { - if (m_ItemsCnt % HTML_REALLOC_STEP == 0) - m_Items = (wxHtmlContentsItem*) realloc(m_Items, (m_ItemsCnt + HTML_REALLOC_STEP) * sizeof(wxHtmlContentsItem)); + if (m_ItemsCnt % wxHTML_REALLOC_STEP == 0) + m_Items = (wxHtmlContentsItem*) realloc(m_Items, (m_ItemsCnt + wxHTML_REALLOC_STEP) * sizeof(wxHtmlContentsItem)); m_Items[m_ItemsCnt].m_Level = m_Level; m_Items[m_ItemsCnt].m_ID = m_ID; m_Items[m_ItemsCnt].m_Page = new char[m_Page.Length() + 1]; @@ -249,7 +248,7 @@ bool wxHtmlHelpData::LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f) f -> Read(&x, sizeof(x)); st = m_ContentsCnt; m_ContentsCnt += x; - m_Contents = (wxHtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt / HTML_REALLOC_STEP + 1) * HTML_REALLOC_STEP * sizeof(wxHtmlContentsItem)); + m_Contents = (wxHtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt / wxHTML_REALLOC_STEP + 1) * wxHTML_REALLOC_STEP * sizeof(wxHtmlContentsItem)); for (i = st; i < m_ContentsCnt; i++) { f -> Read(&x, sizeof(x)); m_Contents[i].m_Level = x; @@ -269,7 +268,7 @@ bool wxHtmlHelpData::LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f) f -> Read(&x, sizeof(x)); st = m_IndexCnt; m_IndexCnt += x; - m_Index = (wxHtmlContentsItem*) realloc(m_Index, (m_IndexCnt / HTML_REALLOC_STEP + 1) * HTML_REALLOC_STEP * sizeof(wxHtmlContentsItem)); + m_Index = (wxHtmlContentsItem*) realloc(m_Index, (m_IndexCnt / wxHTML_REALLOC_STEP + 1) * wxHTML_REALLOC_STEP * sizeof(wxHtmlContentsItem)); for (i = st; i < m_IndexCnt; i++) { f -> Read(&x, sizeof(x)); m_Index[i].m_Name = new char[x]; @@ -353,8 +352,8 @@ bool wxHtmlHelpData::AddBookParam(const wxString& title, const wxString& contfil bookr = new wxHtmlBookRecord(path+'/', title, deftopic); - if (m_ContentsCnt % HTML_REALLOC_STEP == 0) - m_Contents = (wxHtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt + HTML_REALLOC_STEP) * sizeof(wxHtmlContentsItem)); + if (m_ContentsCnt % wxHTML_REALLOC_STEP == 0) + m_Contents = (wxHtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt + wxHTML_REALLOC_STEP) * sizeof(wxHtmlContentsItem)); m_Contents[m_ContentsCnt].m_Level = 0; m_Contents[m_ContentsCnt].m_ID = 0; m_Contents[m_ContentsCnt].m_Page = new char[deftopic.Length() + 1]; @@ -565,7 +564,7 @@ bool wxHtmlSearchStatus::Search() if (m_Engine.Scan(file -> GetStream())) { m_Name = m_Data->m_Contents[i].m_Name; m_ContentsItem = m_Data->m_Contents + i; - found = true; + found = TRUE; } } delete file;