]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/helphtml.cpp
Don't do the wx cleanup if wxPython didn't do the initialization.
[wxWidgets.git] / src / generic / helphtml.cpp
index 2005af7c14775efb8196e8092f699ea363d2c820..8aa2840806b67fd6d615803337122ee5bfd190c9 100644 (file)
     #include   <unistd.h>
 #endif
 
     #include   <unistd.h>
 #endif
 
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+/// Name for map file.
+#define WXEXTHELP_MAPFILE   _T("wxhelp.map")
+/// Maximum line length in map file.
+#define WXEXTHELP_BUFLEN 512
+/// Character introducing comments/documentation field in map file.
+#define WXEXTHELP_COMMENTCHAR   ';'
+
 #define CONTENTS_ID   0
 
 class wxExtHelpMapEntry : public wxObject
 #define CONTENTS_ID   0
 
 class wxExtHelpMapEntry : public wxObject
@@ -122,7 +133,11 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
          wxChar* f = wxGetWorkingDirectory();
          file = f;
          delete[] f; // wxGetWorkingDirectory returns new memory
          wxChar* f = wxGetWorkingDirectory();
          file = f;
          delete[] f; // wxGetWorkingDirectory returns new memory
+#ifdef __WXMAC__
+         file << ifile;
+#else
          file << WXEXTHELP_SEPARATOR << ifile;
          file << WXEXTHELP_SEPARATOR << ifile;
+#endif
       }
       else
          file = ifile;
       }
       else
          file = ifile;
@@ -166,7 +181,7 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
    m_MapList = new wxList;
    m_NumOfEntries = 0;
 
    m_MapList = new wxList;
    m_NumOfEntries = 0;
 
-   FILE *input = wxFopen(mapFile.fn_str(),wxT("rt"));
+   FILE *input = wxFopen(mapFile,wxT("rt"));
    if(! input)
       return FALSE;
    do
    if(! input)
       return FALSE;
    do