#include "corner2.xpm"
#include "corner3.xpm"
#include "corner4.xpm"
+#include "wxpoem.xpm"
#endif
#define buf_size 10000
#include "wx/clipbrd.h"
#endif
+#ifdef __WXWINCE__
+ STDAPI_(__int64) CeGetRandomSeed();
+#endif
+
IMPLEMENT_APP(MyApp)
MainWindow *TheMainWindow = NULL;
while (((ch = poem_buffer[i]) != 10) && (ch != 0))
#endif
{
- line[j] = ch;
+ line[j] = (wxChar)ch;
j ++;
i ++;
}
{
s.MakeLower();
if (search_string) delete[] search_string;
- search_string = copystring(s);
+ search_string = wxStrcpy(new wxChar[wxStrlen(s.c_str()) + 1], s.c_str());
search_ok = true;
} else search_ok = false;
}
ReadPreferences();
// Seed the random number generator
+#ifdef __WXWINCE__
+ srand((unsigned) CeGetRandomSeed());
+#else
time_t current_time;
(void)time(¤t_time);
srand((unsigned int)current_time);
+#endif
// randomize();
pages[0] = 0;
if (argc > 1)
{
- index_filename = copystring(argv[1]);
- data_filename = copystring(argv[1]);
+ index_filename = wxStrcpy(new wxChar[wxStrlen(argv[1]) + 1], argv[1]);
+ data_filename = wxStrcpy(new wxChar[wxStrlen(argv[1]) + 1], argv[1]);
}
else
{
TheMainWindow->GetClientSize(&xx, &yy);
dc.DrawBitmap(* backingBitmap, 0, 0);
-#if 0
+#if 0
wxMemoryDC memDC;
memDC.SelectObject(* backingBitmap);
dc.Blit(0, 0, backingBitmap->GetWidth(), backingBitmap->GetHeight(), &memDC, 0, 0);
i++;
}
- poem_buffer[i] = ch;
+ poem_buffer[i] = (wxChar)ch;
i ++;
if (i == buf_size)
nitems ++;
// Do rest
-
+
do {
ch = getc(file);
if (ch == '#')