X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d0d154068a92fbb3666314481deaf09262a749e..30928f55c46eea3e83c110cfb0bc7f0ee7b583e7:/utils/HelpGen/src/HelpGen.cpp diff --git a/utils/HelpGen/src/HelpGen.cpp b/utils/HelpGen/src/HelpGen.cpp index edff307413..57cdad6802 100644 --- a/utils/HelpGen/src/HelpGen.cpp +++ b/utils/HelpGen/src/HelpGen.cpp @@ -6,7 +6,7 @@ // Created: 06/01/99 // RCS-ID: $Id$ // Copyright: (c) 1999 VZ -// Licence: GPL +// Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// /* @@ -55,6 +55,10 @@ #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" @@ -422,6 +426,8 @@ protected: // information about all functions documented in the TeX file(s) // ------------------------------------------------------------- +public: // Note: Sun C++ 5.5 requires TypeInfo and ParamInfo to be public + // info about a type: for now stored as text string, but must be parsed // further later (to know that "char *" == "char []" - TODO) class TypeInfo @@ -669,7 +675,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 '/': @@ -729,7 +735,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; @@ -775,7 +781,7 @@ int main(int argc, char **argv) } } - if ( !!ignoreFile ) + if ( !ignoreFile.IsEmpty() ) docman.GetIgnoreHandler().AddNamesFromFile(ignoreFile); docman.DumpDifferences(ctxTop); @@ -877,10 +883,10 @@ void HelpGenVisitor::CloseClass() { CloseFunction(); - if ( m_inClass ) + if ( m_inClass ) { size_t count = m_arrayFuncDocs.GetCount(); - if ( count ) + if ( count ) { size_t n; FunctionDocEntry::classname = m_classname; @@ -1858,7 +1864,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const spParameter *ctxParam = (spParameter *)ctx; const ParamInfo& param = method.GetParam(nParam); if ( m_checkParamNames && - (param.GetName() != ctxParam->mName) ) { + (param.GetName() != ctxParam->mName.c_str()) ) { foundDiff = true; wxLogError("Parameter #%d of '%s::%s' should be " @@ -1886,7 +1892,7 @@ bool DocManager::DumpDifferences(spContext *ctxTop) const continue; } - if ( param.GetDefValue() != ctxParam->mInitVal ) { + if ( param.GetDefValue() != ctxParam->mInitVal.c_str() ) { wxLogWarning("Default value of parameter '%s' of " "'%s::%s' should be '%s' and not " "'%s'.", @@ -2186,6 +2192,25 @@ static const wxString GetVersionString() /* $Log$ + Revision 1.36 2005/04/07 19:54:58 MW + Workarounds to allow compilation by Sun C++ 5.5 + + 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.