#include "wxpoem.h"
-#if defined(__WXGTK__) || defined(__WXMOTIF__)
+#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
#include "corner1.xpm"
#include "corner2.xpm"
#include "corner3.xpm"
while (ch != 0 && !page_break)
{
j = 0;
-#ifdef __WXMSW__
+#if defined(__WXMSW__) || defined(__WXMAC__)
while (((ch = poem_buffer[i]) != 13) && (ch != 0))
#else
while (((ch = poem_buffer[i]) != 10) && (ch != 0))
i ++;
}
-#ifdef __WXMSW__
+#if defined(__WXMSW__) || defined(__WXMAC__)
if (ch == 13)
#else
if (ch == 10)
Corner3 = new wxIcon("icon_3");
Corner4 = new wxIcon("icon_4");
#endif
-#if defined(__WXGTK__) || defined(__WXMOTIF__)
+#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
Corner1 = new wxIcon( corner1_xpm );
Corner2 = new wxIcon( corner2_xpm );
Corner3 = new wxIcon( corner3_xpm );
delete NormalFont;
delete BoldFont;
delete ItalicFont;
- delete poem_buffer;
+ delete[] poem_buffer;
+ if (search_string)
+ delete[] search_string;
return 0;
}
// Load index (or compile it if none found)
void TryLoadIndex()
{
- index_ok = LoadIndex(index_filename);
+ index_ok = (LoadIndex(index_filename) != 0);
if (!index_ok || (nitems == 0))
{
PoetryError("Index file not found; will compile new one", "wxPoem");