]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/HelpGen/src/HelpGen.cpp
update from Martin Srebotnjak
[wxWidgets.git] / utils / HelpGen / src / HelpGen.cpp
index 607f62d51ea7cefa2a9f43771fab18f0ad0c821d..01ca91cc7532bda2b80834ae545e715aca00fae0 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     06/01/99
 // RCS-ID:      $Id$
 // Copyright:   (c) 1999 VZ
-// Licence:     GPL
+// Licence:     wxWindows Licence
 /////////////////////////////////////////////////////////////////////////////
 
 /*
 // headers
 // -----------------------------------------------------------------------------
 
-// wxWindows
+// wxWidgets
 #include "wx/wxprec.h"
 
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#if wxUSE_UNICODE
+    #error "HelpGen doesn't build in Unicode mode"
+#endif
+
 #ifndef WX_PRECOMP
     #include "wx/string.h"
     #include "wx/log.h"
     #include "wx/dynarray.h"
+    #include "wx/app.h"
 #endif // WX_PRECOMP
 
 #include "wx/file.h"
 #include <stdio.h>
 #include <time.h>
 
-// argh, Windows defines this
-#ifdef GetCurrentTime
-#undef GetCurrentTime
-#endif
-
 // -----------------------------------------------------------------------------
 // private functions
 // -----------------------------------------------------------------------------
 
 // return the label for the given function name (i.e. argument of \label)
-static wxString MakeLabel(const char *classname, const char *funcname = NULL);
+static wxString MakeLabel(const wxChar *classname, const wxChar *funcname = NULL);
 
 // return the whole \helpref{arg}{arg_label} string
-static wxString MakeHelpref(const char *argument);
+static wxString MakeHelpref(const wxChar *argument);
 
 // [un]quote special TeX characters (in place)
 static void TeXFilter(wxString* str);
@@ -92,7 +96,7 @@ static wxString GetAllComments(const spContext& ctx);
 
 // get the string with current time (returns pointer to static buffer)
 // timeFormat is used for the call of strftime(3)
-static const char *GetCurrentTime(const char *timeFormat);
+static const char *GetCurrentTimeFormatted(const char *timeFormat);
 
 // get the string containing the program version
 static const wxString GetVersionString();
@@ -136,7 +140,7 @@ struct FunctionDocEntry
                 return 1;
             }
 
-            wxString dtorname = wxString('~') + classname;
+            wxString dtorname = wxString(_T("~")) + classname;
 
             // there is only one dtor, so the logic here is simpler
             if ( (*pp1)->name == dtorname ) {
@@ -147,7 +151,7 @@ struct FunctionDocEntry
             }
 
             // two normal methods
-            return strcmp((*pp1)->name, (*pp2)->name);
+            return wxStrcmp((*pp1)->name, (*pp2)->name);
         }
     }
 
@@ -190,17 +194,17 @@ public:
     bool FlushAll()
     {
         if ( m_text.empty() )
-            return TRUE;
+            return true;
 
         if ( !Write(m_text) ) {
-            wxLogError("Failed to output generated documentation.");
+            wxLogError(_T("Failed to output generated documentation."));
 
-            return FALSE;
+            return false;
         }
 
         m_text.clear();
 
-        return TRUE;
+        return true;
     }
 
 private:
@@ -222,22 +226,22 @@ public:
     // already have)
     bool AddNamesFromFile(const wxString& filename);
 
-    // return TRUE if we ignore this function
+    // return true if we ignore this function
     bool IgnoreMethod(const wxString& classname,
                       const wxString& funcname) const
     {
         if ( IgnoreClass(classname) )
-            return TRUE;
+            return true;
 
         IgnoreListEntry ignore(classname, funcname);
 
         return m_ignore.Index(&ignore) != wxNOT_FOUND;
     }
 
-    // return TRUE if we ignore this class entirely
+    // return true if we ignore this class entirely
     bool IgnoreClass(const wxString& classname) const
     {
-        IgnoreListEntry ignore(classname, "");
+        IgnoreListEntry ignore(classname, _T(""));
 
         return m_ignore.Index(&ignore) != wxNOT_FOUND;
     }
@@ -259,8 +263,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:
@@ -318,7 +324,7 @@ protected:
     wxTeXFile m_file;           // file we're writing to now
 
     // state variables
-    bool m_inClass,         // TRUE after file successfully opened
+    bool m_inClass,         // true after file successfully opened
          m_inTypesSection,  // enums & typedefs go there
          m_inMethodSection, // functions go here
          m_isFirstParam;    // first parameter of current function?
@@ -364,10 +370,10 @@ public:
     DocManager(bool checkParamNames);
     ~DocManager();
 
-    // returns FALSE on failure
+    // returns false on failure
     bool ParseTeXFile(const wxString& filename);
 
-    // returns FALSE if there were any differences
+    // returns false if there were any differences
     bool DumpDifferences(spContext *ctxTop) const;
 
     // get our `ignore' object
@@ -379,7 +385,7 @@ protected:
 
     // returns the length of 'match' if the string 'str' starts with it or 0
     // otherwise
-    static size_t TryMatch(const char *str, const char *match);
+    static size_t TryMatch(const wxChar *str, const wxChar *match);
 
     // skip spaces: returns pointer to first non space character (also
     // updates the value of m_line)
@@ -394,12 +400,12 @@ protected:
     }
 
     // skips characters until the next 'c' in '*pp' unless it ends before in
-    // which case FALSE is returned and pp points to '\0', otherwise TRUE is
+    // which case false is returned and pp points to '\0', otherwise true is
     // returned and pp points to 'c'
     bool SkipUntil(const char **pp, char c);
 
     // the same as SkipUntil() but only spaces are skipped: on first non space
-    // character different from 'c' the function stops and returns FALSE
+    // character different from 'c' the function stops and returns false
     bool SkipSpaceUntil(const char **pp, char c);
 
     // extract the string between {} and modify '*pp' to point at the
@@ -436,6 +442,8 @@ protected:
         wxString m_type;
     };
 
+    friend class ParamInfo; // for access to TypeInfo
+
     // info abotu a function parameter
     class ParamInfo
     {
@@ -457,7 +465,8 @@ protected:
         wxString m_value;     // default value
     };
 
-    WX_DEFINE_ARRAY(ParamInfo *, ArrayParamInfo);
+public: // FIXME: macro requires it
+    WX_DEFINE_ARRAY_PTR(ParamInfo *, ArrayParamInfo);
 
     // info about a function
     struct MethodInfo
@@ -499,9 +508,10 @@ protected:
         ArrayParamInfo m_params;
     };
 
-    WX_DEFINE_ARRAY(MethodInfo *, ArrayMethodInfo);
-    WX_DEFINE_ARRAY(ArrayMethodInfo *, ArrayMethodInfos);
+    WX_DEFINE_ARRAY_PTR(MethodInfo *, ArrayMethodInfo);
+    WX_DEFINE_ARRAY_PTR(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
@@ -568,7 +578,7 @@ int main(int argc, char **argv)
     wxInitializer initializer;
     if ( !initializer )
     {
-        fprintf(stderr, "Failed to initialize the wxWindows library, aborting.");
+        fprintf(stderr, "Failed to initialize the wxWidgets library, aborting.");
 
         return -1;
     }
@@ -587,8 +597,8 @@ int main(int argc, char **argv)
     wxArrayString filesH, filesTeX;
     wxString directoryOut,      // directory for 'dmup' output
              ignoreFile;        // file with classes/functions to ignore
-    bool overwrite = FALSE,     // overwrite existing files during 'dump'?
-         paramNames = FALSE;    // check param names during 'diff'?
+    bool overwrite = false,     // overwrite existing files during 'dump'?
+         paramNames = false;    // check param names during 'diff'?
 
     for ( int current = 1; current < argc ; current++ ) {
         // all options have one letter
@@ -602,7 +612,7 @@ int main(int argc, char **argv)
 
                     case 'q':
                         // be quiet
-                        wxLog::GetActiveTarget()->SetVerbose(FALSE);
+                        wxLog::GetActiveTarget()->SetVerbose(false);
                         continue;
 
                     case 'H':
@@ -635,7 +645,7 @@ int main(int argc, char **argv)
                             break;
                         }
 
-                        paramNames = TRUE;
+                        paramNames = true;
                         continue;
 
                     case 'f':
@@ -645,7 +655,7 @@ int main(int argc, char **argv)
                             break;
                         }
 
-                        overwrite = TRUE;
+                        overwrite = true;
                         continue;
 
                     case 'o':
@@ -663,7 +673,7 @@ int main(int argc, char **argv)
                         }
 
                         directoryOut = argv[current];
-                        if ( !!directoryOut ) {
+                        if ( !directoryOut.IsEmpty() ) {
                             // terminate with a '/' if it doesn't have it
                             switch ( directoryOut.Last() ) {
                                 case '/':
@@ -723,7 +733,7 @@ int main(int argc, char **argv)
     // create a parser object and a visitor derivation
     CJSourceParser parser;
     HelpGenVisitor visitor(directoryOut, overwrite);
-    if ( !!ignoreFile && mode == Mode_Dump )
+    if ( !ignoreFile.IsEmpty() && mode == Mode_Dump )
         visitor.GetIgnoreHandler().AddNamesFromFile(ignoreFile);
 
     spContext *ctxTop = NULL;
@@ -755,7 +765,7 @@ int main(int argc, char **argv)
             wxLogError("Can't complete diff.");
 
             // failure
-            return FALSE;
+            return false;
         }
 
         DocManager docman(paramNames);
@@ -769,7 +779,7 @@ int main(int argc, char **argv)
             }
         }
 
-        if ( !!ignoreFile )
+        if ( !ignoreFile.IsEmpty() )
             docman.GetIgnoreHandler().AddNamesFromFile(ignoreFile);
 
         docman.DumpDifferences(ctxTop);
@@ -795,7 +805,7 @@ void HelpGenVisitor::Reset()
 {
     m_inClass =
     m_inTypesSection =
-    m_inMethodSection = FALSE;
+    m_inMethodSection = false;
 
     m_classname =
     m_funcName =
@@ -832,7 +842,7 @@ void HelpGenVisitor::InsertEnumDocs()
 void HelpGenVisitor::InsertDataStructuresHeader()
 {
     if ( !m_inTypesSection ) {
-        m_inTypesSection = TRUE;
+        m_inTypesSection = true;
 
         m_file.WriteVerbatim("\\wxheading{Data structures}\n\n");
     }
@@ -841,7 +851,7 @@ void HelpGenVisitor::InsertDataStructuresHeader()
 void HelpGenVisitor::InsertMethodsHeader()
 {
     if ( !m_inMethodSection ) {
-        m_inMethodSection = TRUE;
+        m_inMethodSection = true;
 
         m_file.WriteVerbatim( "\\latexignore{\\rtfignore{\\wxheading{Members}}}\n\n");
     }
@@ -869,40 +879,42 @@ void HelpGenVisitor::CloseFunction()
 
 void HelpGenVisitor::CloseClass()
 {
-       CloseFunction();
+    CloseFunction();
 
-    if ( m_inClass ) {
+    if ( m_inClass )
+    {
         size_t count = m_arrayFuncDocs.GetCount();
-        if ( count ) {
-                       size_t n;
+        if ( count )
+        {
+            size_t n;
             FunctionDocEntry::classname = m_classname;
 
             m_arrayFuncDocs.Sort(FunctionDocEntry::Compare);
 
-                       // Now examine each first line and if it's been seen, cut it
-                       // off (it's a duplicate \membersection)
-                       wxHashTable membersections(wxKEY_STRING);
+            // Now examine each first line and if it's been seen, cut it
+            // off (it's a duplicate \membersection)
+            wxHashTable membersections(wxKEY_STRING);
 
             for ( n = 0; n < count; n++ )
-                       {
+            {
                 wxString section(m_arrayFuncDocs[n].text);
 
-                               // Strip leading whitespace
-                               int pos = section.Find("\\membersection");
-                               if (pos > -1)
-                               {
-                                       section = section.Mid(pos);
-                               }
-
-                               wxString ms(section.BeforeFirst(wxT('\n')));
-                               if (membersections.Get(ms))
-                               {
-                                       m_arrayFuncDocs[n].text = section.AfterFirst(wxT('\n'));
-                               }
-                               else
-                               {
-                                       membersections.Put(ms, & membersections);
-                               }
+                // Strip leading whitespace
+                int pos = section.Find("\\membersection");
+                if (pos > -1)
+                {
+                    section = section.Mid(pos);
+                }
+
+                wxString ms(section.BeforeFirst(wxT('\n')));
+                if (membersections.Get(ms))
+                {
+                    m_arrayFuncDocs[n].text = section.AfterFirst(wxT('\n'));
+                }
+                else
+                {
+                    membersections.Put(ms, & membersections);
+                }
             }
 
             for ( n = 0; n < count; n++ ) {
@@ -912,10 +924,10 @@ void HelpGenVisitor::CloseClass()
             m_arrayFuncDocs.Empty();
         }
 
-        m_inClass = FALSE;
+        m_inClass = false;
         m_classname.clear();
     }
-       m_file.FlushAll();
+    m_file.FlushAll();
 }
 
 void HelpGenVisitor::EndVisit()
@@ -927,32 +939,32 @@ void HelpGenVisitor::EndVisit()
     m_fileHeader.Empty();
 
     m_file.FlushAll();
-       if (m_file.IsOpened())
-       {
-               m_file.Flush();
-               m_file.Close();
-       }
+    if (m_file.IsOpened())
+    {
+        m_file.Flush();
+        m_file.Close();
+    }
 
     wxLogVerbose("%s: finished generating for the current file.",
-                 GetCurrentTime("%H:%M:%S"));
+                 GetCurrentTimeFormatted("%H:%M:%S"));
 }
 
 void HelpGenVisitor::VisitFile( spFile& file )
 {
     m_fileHeader = file.mFileName;
     wxLogVerbose("%s: started generating docs for classes from file '%s'...",
-                 GetCurrentTime("%H:%M:%S"), m_fileHeader.c_str());
+                 GetCurrentTimeFormatted("%H:%M:%S"), m_fileHeader.c_str());
 }
 
 void HelpGenVisitor::VisitClass( spClass& cl )
 {
     CloseClass();
 
-       if (m_file.IsOpened())
-       {
-               m_file.Flush();
-               m_file.Close();
-       }
+    if (m_file.IsOpened())
+    {
+        m_file.Flush();
+        m_file.Close();
+    }
 
     wxString name = cl.GetName();
 
@@ -992,7 +1004,7 @@ void HelpGenVisitor::VisitClass( spClass& cl )
     }
 
     m_inMethodSection =
-    m_inTypesSection = FALSE;
+    m_inTypesSection = false;
 
     wxLogInfo("Created new file '%s' for class '%s'.",
               filename.c_str(), name.c_str());
@@ -1008,7 +1020,7 @@ void HelpGenVisitor::VisitClass( spClass& cl )
                   "\\section{\\class{%s}}\\label{%s}\n\n",
                   GetVersionString().c_str(),
                   m_fileHeader.c_str(),
-                  GetCurrentTime("%d/%b/%y %H:%M:%S"),
+                  GetCurrentTimeFormatted("%d/%b/%y %H:%M:%S"),
                   name.c_str(),
                   wxString(name).MakeLower().c_str());
 
@@ -1020,7 +1032,7 @@ void HelpGenVisitor::VisitClass( spClass& cl )
     // if the header includes other headers they must be related to it... try to
     // automatically generate the "See also" clause
     if ( !m_headers.IsEmpty() ) {
-        // correspondence between wxWindows headers and class names
+        // correspondence between wxWidgets headers and class names
         static const char *headers[] = {
             "object",
             "defs",
@@ -1096,7 +1108,7 @@ void HelpGenVisitor::VisitClass( spClass& cl )
         derived << "No base class";
     }
     else {
-        bool first = TRUE;
+        bool first = true;
         for ( StrListT::const_iterator i = baseClasses.begin();
               i != baseClasses.end();
               i++ ) {
@@ -1105,7 +1117,7 @@ void HelpGenVisitor::VisitClass( spClass& cl )
                 derived << "\\\\\n";
             }
             else {
-                first = FALSE;
+                first = false;
             }
 
             wxString baseclass = *i;
@@ -1129,7 +1141,7 @@ void HelpGenVisitor::VisitClass( spClass& cl )
     InsertTypedefDocs();
     InsertEnumDocs();
 
-       //m_file.Flush();
+    //m_file.Flush();
 }
 
 void HelpGenVisitor::VisitEnumeration( spEnumeration& en )
@@ -1262,7 +1274,7 @@ void HelpGenVisitor::VisitOperation( spOperation& op )
 
     // save state info
     m_funcName = funcname;
-    m_isFirstParam = TRUE;
+    m_isFirstParam = true;
 
     m_textStoredFunctionComment = GetAllComments(op);
 
@@ -1271,24 +1283,24 @@ 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;
     }
 
-       m_textFunc.Printf("\n"
-               "\\membersection{%s::%s}\\label{%s}\n",
-               m_classname.c_str(), funcname.c_str(),
-               MakeLabel(m_classname, funcname).c_str());
+    m_textFunc.Printf("\n"
+        "\\membersection{%s::%s}\\label{%s}\n",
+        m_classname.c_str(), funcname.c_str(),
+        MakeLabel(m_classname, funcname).c_str());
 
-       wxString func;
-       func.Printf("\n"
+    wxString func;
+    func.Printf("\n"
                       "\\%sfunc{%s%s}{%s}{",
                       op.mIsConstant ? "const" : "",
                       op.mIsVirtual ? "virtual " : "",
                       op.mRetType.c_str(),
                       funcname.c_str());
-       m_textFunc += func;
+    m_textFunc += func;
 }
 
 void HelpGenVisitor::VisitParameter( spParameter& param )
@@ -1297,7 +1309,7 @@ void HelpGenVisitor::VisitParameter( spParameter& param )
         return;
 
     if ( m_isFirstParam ) {
-        m_isFirstParam = FALSE;
+        m_isFirstParam = false;
     }
     else {
         m_textFunc << ", ";
@@ -1400,11 +1412,11 @@ bool DocManager::ParseTeXFile(const wxString& filename)
 
     wxFile file(m_filename, wxFile::read);
     if ( !file.IsOpened() )
-        return FALSE;
+        return false;
 
     off_t len = file.Length();
     if ( len == wxInvalidOffset )
-        return FALSE;
+        return false;
 
     char *buf = new char[len + 1];
     buf[len] = '\0';
@@ -1412,18 +1424,18 @@ bool DocManager::ParseTeXFile(const wxString& filename)
     if ( file.Read(buf, len) == wxInvalidOffset ) {
         delete [] buf;
 
-        return FALSE;
+        return false;
     }
 
     // reinit everything
     m_line = 1;
 
     wxLogVerbose("%s: starting to parse doc file '%s'.",
-                 GetCurrentTime("%H:%M:%S"), m_filename.c_str());
+                 GetCurrentTimeFormatted("%H:%M:%S"), m_filename.c_str());
 
     // the name of the class from the last "\membersection" command: we assume
     // that the following "\func" or "\constfunc" always documents a method of
-    // this class (and it should always be like that in wxWindows documentation)
+    // this class (and it should always be like that in wxWidgets documentation)
     wxString classname;
 
     for ( const char *current = buf; current - buf < len; current++ ) {
@@ -1518,7 +1530,7 @@ bool DocManager::ParseTeXFile(const wxString& filename)
         TeXUnfilter(&returnType);
 
         current++;
-        if ( !SkipSpaceUntil(&current, '{') ) { 
+        if ( !SkipSpaceUntil(&current, '{') ) {
             wxLogWarning("file %s(%d): '{' expected after return type",
                          m_filename.c_str(), m_line);
 
@@ -1538,8 +1550,8 @@ bool DocManager::ParseTeXFile(const wxString& filename)
         current = funcEnd + 1;
 
         // trim spaces from both sides
-        funcName.Trim(FALSE);
-        funcName.Trim(TRUE);
+        funcName.Trim(false);
+        funcName.Trim(true);
 
         // special cases: '$...$' may be used for LaTeX inline math, remove the
         // '$'s
@@ -1590,7 +1602,7 @@ bool DocManager::ParseTeXFile(const wxString& filename)
 
         wxArrayString paramNames, paramTypes, paramValues;
 
-        bool isVararg = FALSE;
+        bool isVararg = false;
 
         current++; // skip '\\'
         lenMatch = TryMatch(current, "void");
@@ -1622,7 +1634,7 @@ bool DocManager::ParseTeXFile(const wxString& filename)
                     // vararg function?
                     wxString paramText = ExtractStringBetweenBraces(&current);
                     if ( paramText == "..." ) {
-                        isVararg = TRUE;
+                        isVararg = true;
                     }
                     else {
                         wxLogWarning("Parameters of '%s::%s' are in "
@@ -1706,22 +1718,22 @@ bool DocManager::ParseTeXFile(const wxString& filename)
     delete [] buf;
 
     wxLogVerbose("%s: finished parsing doc file '%s'.\n",
-                 GetCurrentTime("%H:%M:%S"), m_filename.c_str());
+                 GetCurrentTimeFormatted("%H:%M:%S"), m_filename.c_str());
 
-    return TRUE;
+    return true;
 }
 
 bool DocManager::DumpDifferences(spContext *ctxTop) const
 {
     typedef MMemberListT::const_iterator MemberIndex;
 
-    bool foundDiff = FALSE;
+    bool foundDiff = false;
 
     // flag telling us whether the given class was found at all in the header
     size_t nClass, countClassesInDocs = m_classes.GetCount();
     bool *classExists = new bool[countClassesInDocs];
     for ( nClass = 0; nClass < countClassesInDocs; nClass++ ) {
-        classExists[nClass] = FALSE;
+        classExists[nClass] = false;
     }
 
     // ctxTop is normally an spFile
@@ -1740,7 +1752,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
         int index = m_classes.Index(nameClass);
         if ( index == wxNOT_FOUND ) {
             if ( !m_ignoreNames.IgnoreClass(nameClass) ) {
-                foundDiff = TRUE;
+                foundDiff = true;
 
                 wxLogError("Class '%s' is not documented at all.",
                            nameClass.c_str());
@@ -1750,7 +1762,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
             continue;
         }
         else {
-            classExists[index] = TRUE;
+            classExists[index] = true;
         }
 
         // array of method descriptions for this class
@@ -1760,7 +1772,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
         // flags telling if we already processed given function
         bool *methodExists = new bool[countMethods];
         for ( nMethod = 0; nMethod < countMethods; nMethod++ ) {
-            methodExists[nMethod] = FALSE;
+            methodExists[nMethod] = false;
         }
 
         wxArrayString aOverloadedMethods;
@@ -1783,7 +1795,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
 
             if ( aMethodsWithSameName.IsEmpty() && ctxMethod->IsPublic() ) {
                 if ( !m_ignoreNames.IgnoreMethod(nameClass, nameMethod) ) {
-                    foundDiff = TRUE;
+                    foundDiff = true;
 
                     wxLogError("'%s::%s' is not documented.",
                                nameClass.c_str(),
@@ -1795,7 +1807,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
             }
             else if ( aMethodsWithSameName.GetCount() == 1 ) {
                 index = (size_t)aMethodsWithSameName[0u];
-                methodExists[index] = TRUE;
+                methodExists[index] = true;
 
                 if ( m_ignoreNames.IgnoreMethod(nameClass, nameMethod) )
                     continue;
@@ -1851,7 +1863,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
                         const ParamInfo& param = method.GetParam(nParam);
                         if ( m_checkParamNames &&
                              (param.GetName() != ctxParam->mName) ) {
-                            foundDiff = TRUE;
+                            foundDiff = true;
 
                             wxLogError("Parameter #%d of '%s::%s' should be "
                                        "'%s' and not '%s'.",
@@ -1865,7 +1877,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
                         }
 
                         if ( param.GetType() != ctxParam->mType ) {
-                            foundDiff = TRUE;
+                            foundDiff = true;
 
                             wxLogError("Type of parameter '%s' of '%s::%s' "
                                        "should be '%s' and not '%s'.",
@@ -1901,7 +1913,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
                     // mark all methods with this name as existing
                     for ( nMethod = 0; nMethod < countMethods; nMethod++ ) {
                         if ( methods[nMethod]->GetName() == nameMethod )
-                            methodExists[nMethod] = TRUE;
+                            methodExists[nMethod] = true;
                     }
 
                     aOverloadedMethods.Add(nameMethod);
@@ -1920,7 +1932,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
             if ( !methodExists[nMethod] ) {
                 const wxString& nameMethod = methods[nMethod]->GetName();
                 if ( !m_ignoreNames.IgnoreMethod(nameClass, nameMethod) ) {
-                    foundDiff = TRUE;
+                    foundDiff = true;
 
                     wxLogError("'%s::%s' is documented but doesn't exist.",
                                nameClass.c_str(),
@@ -1935,7 +1947,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const
     // check that all classes we found in the docs really exist
     for ( nClass = 0; nClass < countClassesInDocs; nClass++ ) {
         if ( !classExists[nClass] ) {
-            foundDiff = TRUE;
+            foundDiff = true;
 
             wxLogError("Class '%s' is documented but doesn't exist.",
                        m_classes[nClass].c_str());
@@ -1971,11 +1983,11 @@ bool IgnoreNamesHandler::AddNamesFromFile(const wxString& filename)
 {
     wxFile file(filename, wxFile::read);
     if ( !file.IsOpened() )
-        return FALSE;
+        return false;
 
     off_t len = file.Length();
     if ( len == wxInvalidOffset )
-        return FALSE;
+        return false;
 
     char *buf = new char[len + 1];
     buf[len] = '\0';
@@ -1983,7 +1995,7 @@ bool IgnoreNamesHandler::AddNamesFromFile(const wxString& filename)
     if ( file.Read(buf, len) == wxInvalidOffset ) {
         delete [] buf;
 
-        return FALSE;
+        return false;
     }
 
     wxString line;
@@ -2020,7 +2032,7 @@ bool IgnoreNamesHandler::AddNamesFromFile(const wxString& filename)
 
     delete [] buf;
 
-    return TRUE;
+    return true;
 }
 
 // -----------------------------------------------------------------------------
@@ -2108,7 +2120,7 @@ static wxString MakeHelpref(const char *argument)
 static void TeXFilter(wxString* str)
 {
     // TeX special which can be quoted (don't include backslash nor braces as
-    // we generate them 
+    // we generate them
     static wxRegEx reNonSpecialSpecials("[#$%&_]"),
                    reAccents("[~^]");
 
@@ -2123,8 +2135,8 @@ static void TeXFilter(wxString* str)
 static void TeXUnfilter(wxString* str)
 {
     // FIXME may be done much more quickly
-    str->Trim(TRUE);
-    str->Trim(FALSE);
+    str->Trim(true);
+    str->Trim(false);
 
     // undo TeXFilter
     static wxRegEx reNonSpecialSpecials("\\\\([#$%&_{}])"),
@@ -2144,7 +2156,7 @@ static wxString GetAllComments(const spContext& ctx)
         wxString comment = (*i)->GetText();
 
         // don't take comments like "// ----------" &c
-        comment.Trim(FALSE);
+        comment.Trim(false);
         if ( !!comment &&
               comment == wxString(comment[0u], comment.length() - 1) + '\n' )
             comments << "\n";
@@ -2155,7 +2167,7 @@ static wxString GetAllComments(const spContext& ctx)
     return comments;
 }
 
-static const char *GetCurrentTime(const char *timeFormat)
+static const char *GetCurrentTimeFormatted(const char *timeFormat)
 {
     static char s_timeBuffer[128];
     time_t timeNow;
@@ -2178,6 +2190,40 @@ static const wxString GetVersionString()
 
 /*
    $Log$
+   Revision 1.35  2004/12/12 11:03:31  VZ
+   give an error message if we're built in Unicode mode (in response to bug 1079224)
+
+   Revision 1.34  2004/11/23 09:53:31  JS
+   Changed GPL to wxWindows Licence
+
+   Revision 1.33  2004/11/12 03:30:07  RL
+
+   Cruft cleanup from MJW, strip the tabs out of sound.cpp
+
+   Revision 1.32  2004/11/10 21:02:58  VZ
+   new set of fixes for problems due to huge files support: drop wxFileSize_t, use wxFileOffset only, make wxInvalidOffset an int (main part of the patch 1063498)
+
+   Revision 1.31  2004/10/05 15:38:29  ABX
+   Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC.
+
+   Revision 1.30  2004/06/18 19:25:50  ABX
+   Small step in making HelpGen up to date unicode application.
+
+   Revision 1.29  2004/06/17 19:00:22  ABX
+   Warning fixes. Code cleanup. Whitespaces and tabs removed.
+
+   Revision 1.28  2004/05/25 11:19:57  JS
+   More name changes
+
+   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
 
@@ -2283,7 +2329,7 @@ static const wxString GetVersionString()
     date: 1999/01/08 17:45:55;  author: VZ;  state: Exp;
 
     HelpGen is a prototype of the tool for automatic generation of the .tex files
-    for wxWindows documentation from C++ headers
+    for wxWidgets documentation from C++ headers
 */
 
 /* vi: set tw=80 et ts=4 sw=4: */