#ifdef __GNUG__
-#pragma implementation
+#pragma implementation "htmlhelp.h"
#endif
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
-#include "wx/defs.h"
#if wxUSE_HTML
#ifdef __BORDLANDC__
delete m_ContentsImageList;
if (m_Contents) {
for (i = 0; i < m_ContentsCnt; i++) {
- free(m_Contents[i].m_Page);
- free(m_Contents[i].m_Name);
+ delete[] m_Contents[i].m_Page;
+ delete[] m_Contents[i].m_Name;
}
free(m_Contents);
}
if (m_Index) {
for (i = 0; i < m_IndexCnt; i++) {
- free(m_Index[i].m_Page);
- free(m_Index[i].m_Name);
+ delete[] m_Index[i].m_Page;
+ delete[] m_Index[i].m_Name;
}
free(m_Index);
}
fsys.ChangePathTo(bookFull);
s = fi -> GetStream();
sz = s -> GetSize();
- buff = (char*) malloc(sz+1);
+ buff = new char[sz+1];
buff[sz] = 0;
s -> Read(buff, sz);
lineptr = buff;
if (strstr(linebuf, "Contents file=") == linebuf)
contents = linebuf + strlen("Contents file=");
}
- free(buff);
+ delete[] buff;
bookr = new HtmlBookRecord(fsys.GetPath(), title, start);
m_Contents = (HtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt + HTML_REALLOC_STEP) * sizeof(HtmlContentsItem));
m_Contents[m_ContentsCnt].m_Level = 0;
m_Contents[m_ContentsCnt].m_ID = 0;
- m_Contents[m_ContentsCnt].m_Page = (char*) malloc(start.Length() + 1);
+ m_Contents[m_ContentsCnt].m_Page = new char[start.Length() + 1];
strcpy(m_Contents[m_ContentsCnt].m_Page, start.c_str());
- m_Contents[m_ContentsCnt].m_Name = (char*) malloc(title.Length() + 1);
+ m_Contents[m_ContentsCnt].m_Name = new char [title.Length() + 1];
strcpy(m_Contents[m_ContentsCnt].m_Name, title.c_str());
m_Contents[m_ContentsCnt].m_Book = bookr;
m_ContentsCnt++;
if (m_Frame) {
m_Frame -> Raise();
- m_Frame -> Show(TRUE);
+ m_Frame -> Show(TRUE);
return;
}