]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpdata.cpp
wrong directory
[wxWidgets.git] / src / html / helpdata.cpp
index 97dd46a709b255060392dada6236f9e4131ab806..11af5d51dc81a27e1d7ac9004af5cd73fd2056bc 100644 (file)
@@ -38,6 +38,7 @@
 #include "wx/log.h"
 #include "wx/html/htmlpars.h"
 #include "wx/html/htmldefs.h"
+#include "wx/filename.h"
 
 #include "wx/arrimpl.cpp"
 WX_DEFINE_OBJARRAY(wxHtmlBookRecArray)
@@ -62,7 +63,7 @@ static char* ReadLine(char *line, char *buf)
 
 static int LINKAGEMODE IndexCompareFunc(const void *a, const void *b)
 {
-    return wxStrcmp(((wxHtmlContentsItem*)a)->m_Name, ((wxHtmlContentsItem*)b)->m_Name);
+    return wxStricmp(((wxHtmlContentsItem*)a)->m_Name, ((wxHtmlContentsItem*)b)->m_Name);
 }
 
 
@@ -72,9 +73,10 @@ static int LINKAGEMODE IndexCompareFunc(const void *a, const void *b)
 
 class HP_Parser : public wxHtmlParser
 {
-    public:
-        void AddText(const char* WXUNUSED(text)) { }
-        wxObject* GetProduct() { return NULL; }
+public:
+    wxObject* GetProduct() { return NULL; }
+protected:
+    virtual void AddText(const wxChar* WXUNUSED(txt)) {}
 };
 
 
@@ -567,8 +569,15 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
                  index = wxEmptyString,
                  charset = wxEmptyString;
 
+#if defined(__WXMAC__) && !defined(__DARWIN__)
+        if (wxIsAbsolutePath(book)) bookFull = book;
+        else bookFull = wxGetCwd() + book; // no slash or dot
+        wxFileName fn( bookFull );
+        bookFull = fn.GetFullPath( wxPATH_UNIX );
+#else
         if (wxIsAbsolutePath(book)) bookFull = book;
         else bookFull = wxGetCwd() + "/" + book;
+#endif
 
         fi = fsys.OpenFile(bookFull);
         if (fi == NULL)