Misc small mods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2001-05-07 09:57:45 +00:00
parent 1c84ee88f6
commit e96360efd9
11 changed files with 56 additions and 15 deletions

View File

@@ -138,10 +138,27 @@ bool HP_TagHandler::HandleTag(const wxHtmlTag& tag)
#endif
if (tag.GetParam(wxT("TYPE")) == wxT("text/sitemap"))
{
/*
// We're reading in items at level zero, which must mean we want to specify
// our own 'books', so chuck out the first (empty) one that AddBook already
// created
if (m_firstTime && (m_Level == 0) && (m_ItemsCnt > 0))
{
delete[] m_Items[0].m_Name;
delete[] m_Items[0].m_Page;
m_ItemsCnt --;
}
else
{
if (m_ItemsCnt % wxHTML_REALLOC_STEP == 0)
m_Items = (wxHtmlContentsItem*) realloc(m_Items, (m_ItemsCnt + wxHTML_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 wxChar[m_Page.Length() + 1];