]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/HelpGen/src/HelpGen.cpp
Fixed condition not to be always false.
[wxWidgets.git] / utils / HelpGen / src / HelpGen.cpp
index e283903f8adbceb601c8a958ffc31d23e558636b..3f8541a125f1295c8d6dfea6683190fc433c3643 100644 (file)
 // wxWindows
 #include "wx/wxprec.h"
 
-#if wxUSE_GUI
-    #error "This is a console program and can be only compiled using wxBase"
-#endif
-
 #ifndef WX_PRECOMP
     #include "wx/string.h"
     #include "wx/log.h"
     #include "wx/dynarray.h"
-    #include "wx/wx.h"
+    #include "wx/app.h"
 #endif // WX_PRECOMP
 
 #include "wx/file.h"
@@ -264,8 +260,10 @@ protected:
                                         IgnoreListEntry *second);
 
     // for efficiency, let's sort it
+public: // FIXME: macro requires it
     WX_DEFINE_SORTED_ARRAY(IgnoreListEntry *, ArrayNamesToIgnore);
 
+protected:
     ArrayNamesToIgnore m_ignore;
 
 private:
@@ -441,6 +439,8 @@ protected:
         wxString m_type;
     };
 
+    friend class ParamInfo; // for access to TypeInfo
+
     // info abotu a function parameter
     class ParamInfo
     {
@@ -462,6 +462,7 @@ protected:
         wxString m_value;     // default value
     };
 
+public: // FIXME: macro requires it
     WX_DEFINE_ARRAY(ParamInfo *, ArrayParamInfo);
 
     // info about a function
@@ -507,6 +508,7 @@ protected:
     WX_DEFINE_ARRAY(MethodInfo *, ArrayMethodInfo);
     WX_DEFINE_ARRAY(ArrayMethodInfo *, ArrayMethodInfos);
 
+private:
     // first array contains the names of all classes we found, the second has a
     // pointer to the array of methods of the given class at the same index as
     // the class name appears in m_classes
@@ -525,10 +527,12 @@ private:
 // implementation
 // =============================================================================
 
+static char **g_argv = NULL;
+
 // this function never returns
 static void usage()
 {
-    wxString prog = wxTheApp->argv[0];
+    wxString prog = g_argv[0];
     wxString basename = prog.AfterLast('/');
 #ifdef __WXMSW__
     if ( !basename )
@@ -566,6 +570,8 @@ static void usage()
 
 int main(int argc, char **argv)
 {
+    g_argv = argv;
+
     wxInitializer initializer;
     if ( !initializer )
     {
@@ -1272,7 +1278,7 @@ void HelpGenVisitor::VisitOperation( spOperation& op )
 
     // check for the special case of dtor
     wxString dtor;
-    if ( (funcname[0] == '~') && (m_classname == funcname.c_str() + 1) ) {
+    if ( (funcname[0u] == '~') && (m_classname == funcname.c_str() + 1) ) {
         dtor.Printf("\\destruct{%s}", m_classname.c_str());
         funcname = dtor;
     }
@@ -2179,6 +2185,18 @@ static const wxString GetVersionString()
 
 /*
    $Log$
+   Revision 1.27  2003/10/13 17:21:30  MBN
+     Compilation fixes.
+
+   Revision 1.26  2003/09/29 15:18:35  MBN
+     (Blind) compilation fix for Sun compiler.
+
+   Revision 1.25  2003/09/03 17:39:27  MBN
+     Compilation fixes.
+
+   Revision 1.24  2003/08/13 22:59:37  VZ
+   compilation fix
+
    Revision 1.23  2003/06/13 17:05:43  VZ
    quote '|' inside regexes (fixes dump mode); fixed crash due to strange HelpGenApp code