From d3d7e45df205bd22d6fbeaba853354b097034719 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Thu, 13 Oct 2011 19:51:18 +0200 Subject: Remove trailing white-spaces. --- Source/CPack/cmCPackNSISGenerator.h | 12 +-- Source/CPack/cpack.cxx | 10 +- Source/CTest/cmCTestSubmitHandler.h | 24 ++--- Source/CursesDialog/ccmake.cxx | 34 +++---- Source/CursesDialog/cmCursesMainForm.cxx | 132 +++++++++++++-------------- Source/cmCommandArgumentLexer.cxx | 100 ++++++++++---------- Source/cmDependsJavaLexer.cxx | 56 ++++++------ Source/cmDocumentation.cxx | 152 +++++++++++++++---------------- Source/cmDocumentationFormatter.h | 10 +- Source/cmExprLexer.cxx | 62 ++++++------- Source/cmGlobalKdevelopGenerator.h | 20 ++-- Source/cmGlobalVisualStudio7Generator.h | 30 +++--- Source/cmLocalGenerator.h | 48 +++++----- Source/cmLocalUnixMakefileGenerator3.h | 46 +++++----- Source/cmMakefile.h | 144 ++++++++++++++--------------- Source/ctest.cxx | 6 +- 16 files changed, 443 insertions(+), 443 deletions(-) diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h index 6ad103f..dde1bbb 100644 --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -46,10 +46,10 @@ protected: virtual bool SupportsComponentInstallation() const; - /// Produce a string that contains the NSIS code to describe a - /// particular component. Any added macros will be emitted via + /// Produce a string that contains the NSIS code to describe a + /// particular component. Any added macros will be emitted via /// macrosOut. - std::string + std::string CreateComponentDescription(cmCPackComponent *component, cmOStringStream& macrosOut); @@ -65,14 +65,14 @@ protected: (cmCPackComponent *component, std::set& visited); - /// Produce a string that contains the NSIS code to describe a + /// Produce a string that contains the NSIS code to describe a /// particular component group, including its components. Any /// added macros will be emitted via macrosOut. - std::string + std::string CreateComponentGroupDescription(cmCPackComponentGroup *group, cmOStringStream& macrosOut); - /// Translations any newlines found in the string into \r\n, so that the + /// Translations any newlines found in the string into \r\n, so that the /// resulting string can be used within NSIS. static std::string TranslateNewlines(std::string str); }; diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 9163af81..71ba118 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -244,7 +244,7 @@ int main (int argc, char *argv[]) // find out which system cpack is running on, so it can setup the search // paths, so FIND_XXX() commands can be used in scripts cminst.AddCMakePaths(); - std::string systemFile = + std::string systemFile = globalMF->GetModulesFile("CMakeDetermineSystem.cmake"); if (!globalMF->ReadListFile(0, systemFile.c_str())) { @@ -253,7 +253,7 @@ int main (int argc, char *argv[]) return 1; } - systemFile = + systemFile = globalMF->GetModulesFile("CMakeSystemSpecificInformation.cmake"); if (!globalMF->ReadListFile(0, systemFile.c_str())) { @@ -264,7 +264,7 @@ int main (int argc, char *argv[]) if ( cmSystemTools::FileExists(cpackConfigFile.c_str()) ) { - cpackConfigFile = + cpackConfigFile = cmSystemTools::CollapseFullPath(cpackConfigFile.c_str()); cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, "Read CPack configuration file: " << cpackConfigFile.c_str() @@ -410,7 +410,7 @@ int main (int argc, char *argv[]) cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, "For project: " << projName << std::endl); - const char* projVersion = + const char* projVersion = mf->GetDefinition("CPACK_PACKAGE_VERSION"); if ( !projVersion ) { @@ -423,7 +423,7 @@ int main (int argc, char *argv[]) cmOStringStream ostr; ostr << projVersionMajor << "." << projVersionMinor << "." << projVersionPatch; - mf->AddDefinition("CPACK_PACKAGE_VERSION", + mf->AddDefinition("CPACK_PACKAGE_VERSION", ostr.str().c_str()); } diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index e7755b1..9cfd7df 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -18,7 +18,7 @@ * \brief Helper class for CTest * * Submit testing results - * + * */ class cmCTestSubmitHandler : public cmCTestGenericHandler { @@ -47,32 +47,32 @@ private: /** * Submit file using various ways */ - bool SubmitUsingFTP(const cmStdString& localprefix, + bool SubmitUsingFTP(const cmStdString& localprefix, const std::set& files, - const cmStdString& remoteprefix, + const cmStdString& remoteprefix, const cmStdString& url); - bool SubmitUsingHTTP(const cmStdString& localprefix, + bool SubmitUsingHTTP(const cmStdString& localprefix, const std::set& files, - const cmStdString& remoteprefix, + const cmStdString& remoteprefix, const cmStdString& url); bool SubmitUsingSCP(const cmStdString& scp_command, - const cmStdString& localprefix, + const cmStdString& localprefix, const std::set& files, - const cmStdString& remoteprefix, + const cmStdString& remoteprefix, const cmStdString& url); - bool SubmitUsingCP( const cmStdString& localprefix, + bool SubmitUsingCP( const cmStdString& localprefix, const std::set& files, - const cmStdString& remoteprefix, + const cmStdString& remoteprefix, const cmStdString& url); bool TriggerUsingHTTP(const std::set& files, - const cmStdString& remoteprefix, + const cmStdString& remoteprefix, const cmStdString& url); - bool SubmitUsingXMLRPC(const cmStdString& localprefix, + bool SubmitUsingXMLRPC(const cmStdString& localprefix, const std::set& files, - const cmStdString& remoteprefix, + const cmStdString& remoteprefix, const cmStdString& url); void ParseResponse(std::vector); diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 9ede7a6..7cf1071 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -76,11 +76,11 @@ void onsig(int) if (cmCursesForm::CurrentForm) { endwin(); - initscr(); /* Initialization */ - noecho(); /* Echo off */ - cbreak(); /* nl- or cr not needed */ - keypad(stdscr,TRUE); /* Use key symbols as - KEY_DOWN*/ + initscr(); /* Initialization */ + noecho(); /* Echo off */ + cbreak(); /* nl- or cr not needed */ + keypad(stdscr,TRUE); /* Use key symbols as + KEY_DOWN*/ refresh(); int x,y; getmaxyx(stdscr, y, x); @@ -89,7 +89,7 @@ void onsig(int) } signal(SIGWINCH, onsig); } - + } void CMakeErrorHandler(const char* message, const char* title, bool&, void* clientData) @@ -121,8 +121,8 @@ int main(int argc, char** argv) doc.SetSection("Compatibility Commands",compatCommands); doc.SetSeeAlsoList(cmDocumentationSeeAlso); return doc.PrintRequestedDocumentation(std::cout)? 0:1; - } - + } + bool debug = false; unsigned int i; int j; @@ -156,22 +156,22 @@ int main(int argc, char** argv) cmCursesForm::DebugStart(); } - initscr(); /* Initialization */ - noecho(); /* Echo off */ - cbreak(); /* nl- or cr not needed */ - keypad(stdscr,TRUE); /* Use key symbols as - KEY_DOWN*/ + initscr(); /* Initialization */ + noecho(); /* Echo off */ + cbreak(); /* nl- or cr not needed */ + keypad(stdscr,TRUE); /* Use key symbols as + KEY_DOWN*/ signal(SIGWINCH, onsig); int x,y; getmaxyx(stdscr, y, x); - if ( x < cmCursesMainForm::MIN_WIDTH || + if ( x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT ) { endwin(); std::cerr << "Window is too small. A size of at least " - << cmCursesMainForm::MIN_WIDTH << " x " + << cmCursesMainForm::MIN_WIDTH << " x " << cmCursesMainForm::MIN_HEIGHT << " is required to run ccmake." << std::endl; return 1; @@ -201,7 +201,7 @@ int main(int argc, char** argv) myform->Render(1, 1, x, y); myform->HandleInput(); } - + // Need to clean-up better curses_clear(); touchwin(stdscr); @@ -210,7 +210,7 @@ int main(int argc, char** argv) cmCursesForm::CurrentForm = 0; std::cout << std::endl << std::endl; - + return 0; } diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index e1876b9..17fa0ff 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -27,7 +27,7 @@ inline int ctrl(int z) { return (z&037); -} +} cmCursesMainForm::cmCursesMainForm(std::vector const& args, int initWidth) : @@ -80,7 +80,7 @@ cmCursesMainForm::~cmCursesMainForm() { delete this->CMakeInstance; this->CMakeInstance = 0; - } + } } // See if a cache entry is in the list of entries in the ui. @@ -99,7 +99,7 @@ bool cmCursesMainForm::LookForCacheEntry(const char* key) return true; } } - + return false; } @@ -114,7 +114,7 @@ void cmCursesMainForm::InitializeUI() // Count non-internal and non-static entries int count=0; - for(cmCacheManager::CacheIterator i = + for(cmCacheManager::CacheIterator i = this->CMakeInstance->GetCacheManager()->NewIterator(); !i.IsAtEnd(); i.Next()) { @@ -142,12 +142,12 @@ void cmCursesMainForm::InitializeUI() // Create the composites. // First add entries which are new - for(cmCacheManager::CacheIterator i = + for(cmCacheManager::CacheIterator i = this->CMakeInstance->GetCacheManager()->NewIterator(); !i.IsAtEnd(); i.Next()) { const char* key = i.GetName(); - if ( i.GetType() == cmCacheManager::INTERNAL || + if ( i.GetType() == cmCacheManager::INTERNAL || i.GetType() == cmCacheManager::STATIC || i.GetType() == cmCacheManager::UNINITIALIZED ) { @@ -164,12 +164,12 @@ void cmCursesMainForm::InitializeUI() } // then add entries which are old - for(cmCacheManager::CacheIterator i = + for(cmCacheManager::CacheIterator i = this->CMakeInstance->GetCacheManager()->NewIterator(); !i.IsAtEnd(); i.Next()) { const char* key = i.GetName(); - if ( i.GetType() == cmCacheManager::INTERNAL || + if ( i.GetType() == cmCacheManager::INTERNAL || i.GetType() == cmCacheManager::STATIC || i.GetType() == cmCacheManager::UNINITIALIZED ) { @@ -184,7 +184,7 @@ void cmCursesMainForm::InitializeUI() } } } - + // Clean old entries if (this->Entries) { @@ -197,7 +197,7 @@ void cmCursesMainForm::InitializeUI() } delete this->Entries; this->Entries = newEntries; - + // Compute fields from composites this->RePost(); } @@ -224,7 +224,7 @@ void cmCursesMainForm::RePost() std::vector::iterator it; for (it = this->Entries->begin(); it != this->Entries->end(); ++it) { - cmCacheManager::CacheIterator mit = + cmCacheManager::CacheIterator mit = this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue()); if (mit.IsAtEnd() || (!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED"))) @@ -253,7 +253,7 @@ void cmCursesMainForm::RePost() std::vector::iterator it; for (it = this->Entries->begin(); it != this->Entries->end(); ++it) { - cmCacheManager::CacheIterator mit = + cmCacheManager::CacheIterator mit = this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue()); if (mit.IsAtEnd() || (!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED"))) @@ -301,7 +301,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) } // Wrong window size - if ( width < cmCursesMainForm::MIN_WIDTH || + if ( width < cmCursesMainForm::MIN_WIDTH || width < this->InitialWidth || height < cmCursesMainForm::MIN_HEIGHT ) { @@ -322,7 +322,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) std::vector::iterator it; for (it = this->Entries->begin(); it != this->Entries->end(); ++it) { - cmCacheManager::CacheIterator mit = + cmCacheManager::CacheIterator mit = this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue()); if (mit.IsAtEnd() || (!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED"))) @@ -372,7 +372,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) this->UpdateStatusBar(); this->PrintKeys(); - touchwin(stdscr); + touchwin(stdscr); refresh(); } @@ -380,7 +380,7 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) { int x,y; getmaxyx(stdscr, y, x); - if ( x < cmCursesMainForm::MIN_WIDTH || + if ( x < cmCursesMainForm::MIN_WIDTH || x < this->InitialWidth || y < cmCursesMainForm::MIN_HEIGHT ) { @@ -399,7 +399,7 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) { cw->PrintKeys(); } - + // { // } // else @@ -409,18 +409,18 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) char thirdLine[512]=""; if (process) { - sprintf(firstLine, - " "); - sprintf(secondLine, - " "); - sprintf(thirdLine, - " "); + sprintf(firstLine, + " "); + sprintf(secondLine, + " "); + sprintf(thirdLine, + " "); } else { if (this->OkToGenerate) { - sprintf(firstLine, + sprintf(firstLine, "Press [c] to configure Press [g] to generate and exit"); } else @@ -435,8 +435,8 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) { sprintf(thirdLine, "Press [t] to toggle advanced mode (Currently Off)"); } - - sprintf(secondLine, + + sprintf(secondLine, "Press [h] for help Press [q] to quit without generating"); } @@ -463,7 +463,7 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) // } pos_form_cursor(this->Form); - + } // Print the key of the current entry and the CMake version @@ -473,7 +473,7 @@ void cmCursesMainForm::UpdateStatusBar(const char* message) int x,y; getmaxyx(stdscr, y, x); // If window size is too small, display error and return - if ( x < cmCursesMainForm::MIN_WIDTH || + if ( x < cmCursesMainForm::MIN_WIDTH || x < this->InitialWidth || y < cmCursesMainForm::MIN_HEIGHT ) { @@ -482,10 +482,10 @@ void cmCursesMainForm::UpdateStatusBar(const char* message) char fmt[] = "Window is too small. A size of at least %dx%d is required."; printw(fmt, (cmCursesMainForm::MIN_WIDTH < this->InitialWidth ? - this->InitialWidth : cmCursesMainForm::MIN_WIDTH), + this->InitialWidth : cmCursesMainForm::MIN_WIDTH), cmCursesMainForm::MIN_HEIGHT); - touchwin(stdscr); - wrefresh(stdscr); + touchwin(stdscr); + wrefresh(stdscr); return; } @@ -502,10 +502,10 @@ void cmCursesMainForm::UpdateStatusBar(const char* message) if ( lbl ) { curField = lbl->GetValue(); - + // Get the help string of the current entry // and add it to the help string - cmCacheManager::CacheIterator it = + cmCacheManager::CacheIterator it = this->CMakeInstance->GetCacheManager()->GetCacheIterator(curField); if (!it.IsAtEnd()) { @@ -549,9 +549,9 @@ void cmCursesMainForm::UpdateStatusBar(const char* message) if ( curFieldLen < width ) { strcpy(bar, curField); - for(i=curFieldLen; i < width; ++i) - { - bar[i] = ' '; + for(i=curFieldLen; i < width; ++i) + { + bar[i] = ' '; } } else @@ -578,14 +578,14 @@ void cmCursesMainForm::UpdateStatusBar(const char* message) else { strcpy(bar+curFieldLen+2, help); - for(i=curFieldLen+helpLen+2; i < width; ++i) - { - bar[i] = ' '; + for(i=curFieldLen+helpLen+2; i < width; ++i) + { + bar[i] = ' '; } } } } - + bar[width] = '\0'; @@ -605,7 +605,7 @@ void cmCursesMainForm::UpdateStatusBar(const char* message) attron(A_STANDOUT); char format[] = "%s"; printw(format, bar); - attroff(A_STANDOUT); + attroff(A_STANDOUT); curses_move(y-4,0); printw(version); pos_form_cursor(this->Form); @@ -631,7 +631,7 @@ void cmCursesMainForm::UpdateProgress(const char *msg, float prog, void* vp) cm->UpdateStatusBar(cmsg); cm->PrintKeys(1); curses_move(1,1); - touchwin(stdscr); + touchwin(stdscr); refresh(); } @@ -643,7 +643,7 @@ int cmCursesMainForm::Configure(int noconfigure) curses_move(1,1); this->UpdateStatusBar("Configuring, please wait..."); this->PrintKeys(1); - touchwin(stdscr); + touchwin(stdscr); refresh(); this->CMakeInstance->SetProgressCallback(cmCursesMainForm::UpdateProgress, this); @@ -652,7 +652,7 @@ int cmCursesMainForm::Configure(int noconfigure) this->CMakeInstance->GetCacheManager()->SaveCache( this->CMakeInstance->GetHomeOutputDirectory()); this->LoadCache(0); - + // Get rid of previous errors this->Errors = std::vector(); @@ -674,8 +674,8 @@ int cmCursesMainForm::Configure(int noconfigure) } this->CMakeInstance->SetProgressCallback(0, 0); - keypad(stdscr,TRUE); /* Use key symbols as - KEY_DOWN*/ + keypad(stdscr,TRUE); /* Use key symbols as + KEY_DOWN*/ if( retVal != 0 || !this->Errors.empty()) { @@ -705,10 +705,10 @@ int cmCursesMainForm::Configure(int noconfigure) CurrentForm = this; this->Render(1,1,xx,yy); } - + this->InitializeUI(); this->Render(1, 1, xi, yi); - + return 0; } @@ -731,8 +731,8 @@ int cmCursesMainForm::Generate() int retVal = this->CMakeInstance->Generate(); this->CMakeInstance->SetProgressCallback(0, 0); - keypad(stdscr,TRUE); /* Use key symbols as - KEY_DOWN*/ + keypad(stdscr,TRUE); /* Use key symbols as + KEY_DOWN*/ if( retVal != 0 || !this->Errors.empty()) { @@ -764,10 +764,10 @@ int cmCursesMainForm::Generate() CurrentForm = this; this->Render(1,1,xx,yy); } - + this->InitializeUI(); this->Render(1, 1, xi, yi); - + return 0; } @@ -798,11 +798,11 @@ void cmCursesMainForm::RemoveEntry(const char* value) // copy from the list box to the cache manager void cmCursesMainForm::FillCacheManagerFromUI() -{ +{ size_t size = this->Entries->size(); for(size_t i=0; i < size; i++) { - cmCacheManager::CacheIterator it = + cmCacheManager::CacheIterator it = this->CMakeInstance->GetCacheManager()->GetCacheIterator( (*this->Entries)[i]->Key.c_str()); if (!it.IsAtEnd()) @@ -872,14 +872,14 @@ void cmCursesMainForm::HandleInput() this->PrintKeys(1); curses_move(y-5,static_cast(searchstr.size())); //curses_move(1,1); - touchwin(stdscr); + touchwin(stdscr); refresh(); } int key = getch(); getmaxyx(stdscr, y, x); // If window too small, handle 'q' only - if ( x < cmCursesMainForm::MIN_WIDTH || + if ( x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT ) { // quit @@ -948,7 +948,7 @@ void cmCursesMainForm::HandleInput() } if ((!currentWidget || !widgetHandled) && !this->SearchMode) { - // If the current widget does not want to handle input, + // If the current widget does not want to handle input, // we handle it. sprintf(debugMessage, "Main form handling input, key: %d", key); cmCursesForm::LogMessage(debugMessage); @@ -1028,7 +1028,7 @@ void cmCursesMainForm::HandleInput() this->Fields[findex-2])); const char* curField = lbl->GetValue(); const char* helpString=0; - cmCacheManager::CacheIterator it = + cmCacheManager::CacheIterator it = this->CMakeInstance->GetCacheManager()->GetCacheIterator(curField); if (!it.IsAtEnd()) { @@ -1052,7 +1052,7 @@ void cmCursesMainForm::HandleInput() CurrentForm = msgs; msgs->Render(1,1,x,y); msgs->HandleInput(); - CurrentForm = this; + CurrentForm = this; this->Render(1,1,x,y); set_current_field(this->Form, cur); } @@ -1137,7 +1137,7 @@ void cmCursesMainForm::HandleInput() // each entry consists of fields: label, isnew, value // therefore, the label field for the is findex-2 // (findex always corresponds to the value field) - cmCursesWidget* lbl + cmCursesWidget* lbl = reinterpret_cast( field_userptr(this->Fields[findex-2])); if ( lbl ) @@ -1177,15 +1177,15 @@ void cmCursesMainForm::HandleInput() } } - touchwin(stdscr); - wrefresh(stdscr); + touchwin(stdscr); + wrefresh(stdscr); } } int cmCursesMainForm::LoadCache(const char *) { - int r = this->CMakeInstance->LoadCache(); + int r = this->CMakeInstance->LoadCache(); if(r < 0) { return r; @@ -1194,7 +1194,7 @@ int cmCursesMainForm::LoadCache(const char *) this->CMakeInstance->PreLoadCMakeFiles(); return r; } - + void cmCursesMainForm::JumpToCacheEntry(const char* astr) { std::string str; @@ -1247,7 +1247,7 @@ void cmCursesMainForm::JumpToCacheEntry(const char* astr) /* char buffer[1024]; sprintf(buffer, "Line: %d != %d / %d\n", findex, idx, this->NumberOfVisibleEntries); - touchwin(stdscr); + touchwin(stdscr); refresh(); this->UpdateStatusBar( buffer ); usleep(100000); @@ -1262,7 +1262,7 @@ void cmCursesMainForm::JumpToCacheEntry(const char* astr) } -const char* cmCursesMainForm::s_ConstHelpMessage = +const char* cmCursesMainForm::s_ConstHelpMessage = "CMake is used to configure and generate build files for software projects. " "The basic steps for configuring a project with ccmake are as follows:\n\n" "1. Run ccmake in the directory where you want the object and executable files to be placed (build directory). If the source directory is not the same as this build directory, you have to specify it as an argument on the command line.\n\n" diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx index 1367945..89819ce 100644 --- a/Source/cmCommandArgumentLexer.cxx +++ b/Source/cmCommandArgumentLexer.cxx @@ -47,7 +47,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -64,7 +64,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -189,7 +189,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -251,7 +251,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -832,25 +832,25 @@ YY_RULE_SETUP case 2: YY_RULE_SETUP #line 72 "cmCommandArgumentLexer.in.l" -{ +{ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); - return cal_NCURLY; -} + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_NCURLY; +} case 3: YY_RULE_SETUP #line 78 "cmCommandArgumentLexer.in.l" -{ +{ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); - return cal_ATNAME; -} + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_ATNAME; +} case 4: YY_RULE_SETUP #line 84 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->DCURLYVariable; return cal_DCURLY; } @@ -859,7 +859,7 @@ YY_RULE_SETUP #line 91 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->RCURLYVariable; return cal_RCURLY; } @@ -868,17 +868,17 @@ YY_RULE_SETUP #line 98 "cmCommandArgumentLexer.in.l" { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->ATVariable; return cal_AT; } case 7: YY_RULE_SETUP #line 105 "cmCommandArgumentLexer.in.l" -{ +{ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return cal_NAME; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_NAME; } case 8: YY_RULE_SETUP @@ -888,40 +888,40 @@ YY_RULE_SETUP { return cal_ERROR; } - return cal_SYMBOL; + return cal_SYMBOL; } case 9: /* rule 9 can match eol */ YY_RULE_SETUP #line 119 "cmCommandArgumentLexer.in.l" -{ +{ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return cal_SYMBOL; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_SYMBOL; } case 10: YY_RULE_SETUP #line 125 "cmCommandArgumentLexer.in.l" { - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->DOLLARVariable; - return cal_DOLLAR; + return cal_DOLLAR; } case 11: YY_RULE_SETUP #line 131 "cmCommandArgumentLexer.in.l" { - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->LCURLYVariable; - return cal_LCURLY; + return cal_LCURLY; } case 12: YY_RULE_SETUP #line 137 "cmCommandArgumentLexer.in.l" { - //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); yylvalp->str = yyextra->BSLASHVariable; - return cal_BSLASH; + return cal_BSLASH; } case 13: YY_RULE_SETUP @@ -1419,7 +1419,7 @@ static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner) YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" ); @@ -1463,7 +1463,7 @@ static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner) #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ - + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a cmCommandArgument_yyrestart() or at EOF. @@ -1489,7 +1489,7 @@ extern int isatty (int ); } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - + errno = oerrno; } @@ -1595,9 +1595,9 @@ static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1626,12 +1626,12 @@ static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1667,7 +1667,7 @@ YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char * base, yy_size_t size */ YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) { - + return cmCommandArgument_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); } @@ -1684,7 +1684,7 @@ YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char * yybytes, int _ char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) cmCommandArgument_yyalloc(n ,yyscanner ); @@ -1752,10 +1752,10 @@ YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner) int cmCommandArgument_yyget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yylineno; } @@ -1765,10 +1765,10 @@ int cmCommandArgument_yyget_lineno (yyscan_t yyscanner) int cmCommandArgument_yyget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yycolumn; } @@ -1829,8 +1829,8 @@ void cmCommandArgument_yyset_lineno (int line_number , yyscan_t yyscanner) /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "cmCommandArgument_yyset_lineno called with no buffer" , yyscanner); - + yy_fatal_error( "cmCommandArgument_yyset_lineno called with no buffer" , yyscanner); + yylineno = line_number; } @@ -1844,8 +1844,8 @@ void cmCommandArgument_yyset_column (int column_no , yyscan_t yyscanner) /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "cmCommandArgument_yyset_column called with no buffer" , yyscanner); - + yy_fatal_error( "cmCommandArgument_yyset_column called with no buffer" , yyscanner); + yycolumn = column_no; } @@ -1928,20 +1928,20 @@ int cmCommandArgument_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* p errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + cmCommandArgument_yyset_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx index d7149c7..e4487f8 100644 --- a/Source/cmDependsJavaLexer.cxx +++ b/Source/cmDependsJavaLexer.cxx @@ -48,7 +48,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -169,7 +169,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -234,7 +234,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -1428,9 +1428,9 @@ YY_RULE_SETUP case 107: YY_RULE_SETUP #line 200 "cmDependsJavaLexer.in.l" -{ - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); - return jp_NAME; +{ + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return jp_NAME; } case 108: /* rule 108 can match eol */ @@ -1447,11 +1447,11 @@ YY_RULE_SETUP case 110: YY_RULE_SETUP #line 207 "cmDependsJavaLexer.in.l" -{ - std::cerr << "Unknown character: " << yytext[0] - << " (" << (int)yytext[0] << ")" << std::endl; - yyextra->Error("Unknown character"); - return jp_ERROR; +{ + std::cerr << "Unknown character: " << yytext[0] + << " (" << (int)yytext[0] << ")" << std::endl; + yyextra->Error("Unknown character"); + return jp_ERROR; } case 111: YY_RULE_SETUP @@ -1933,7 +1933,7 @@ static void cmDependsJava_yy_load_buffer_state (yyscan_t yyscanner) YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) cmDependsJava_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_create_buffer()" ); @@ -1977,7 +1977,7 @@ static void cmDependsJava_yy_load_buffer_state (yyscan_t yyscanner) #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ - + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a cmDependsJava_yyrestart() or at EOF. @@ -2003,7 +2003,7 @@ extern int isatty (int ); } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - + errno = oerrno; } @@ -2107,9 +2107,9 @@ static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner) yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyalloc (nuto_alloc * sizeof(struct yy_buffer_state*) , yyscanner); - + memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = nuto_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -2136,12 +2136,12 @@ static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -2177,7 +2177,7 @@ YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char * base, yy_size_t size , yy */ YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner) { - + return cmDependsJava_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner); } @@ -2194,7 +2194,7 @@ YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char * bytes, int len , y char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) cmDependsJava_yyalloc(n ,yyscanner ); @@ -2262,10 +2262,10 @@ YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner) int cmDependsJava_yyget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yylineno; } @@ -2275,10 +2275,10 @@ int cmDependsJava_yyget_lineno (yyscan_t yyscanner) int cmDependsJava_yyget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yycolumn; } @@ -2339,8 +2339,8 @@ void cmDependsJava_yyset_lineno (int line_number , yyscan_t yyscanner) /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "cmDependsJava_yyset_lineno called with no buffer" , yyscanner); - + yy_fatal_error( "cmDependsJava_yyset_lineno called with no buffer" , yyscanner); + yylineno = line_number; } @@ -2354,8 +2354,8 @@ void cmDependsJava_yyset_column (int column_no , yyscan_t yyscanner) /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "cmDependsJava_yyset_column called with no buffer" , yyscanner); - + yy_fatal_error( "cmDependsJava_yyset_column called with no buffer" , yyscanner); + yycolumn = column_no; } diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index bfe11c1..5e56b29 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -235,24 +235,24 @@ cmDocumentation::cmDocumentation() sec = new cmDocumentationSection("See Also","SEE ALSO"); sec->Append(cmDocumentationStandardSeeAlso); - this->AllSections["Standard See Also"] = sec; + this->AllSections["Standard See Also"] = sec; sec = new cmDocumentationSection("Options","OPTIONS"); sec->Append(cmDocumentationStandardOptions); - this->AllSections["Options"] = sec; + this->AllSections["Options"] = sec; sec = new cmDocumentationSection("Properties","PROPERTIES"); sec->Append(cmPropertiesDocumentationDescription); - this->AllSections["Properties Description"] = sec; + this->AllSections["Properties Description"] = sec; sec = new cmDocumentationSection("Generators","GENERATORS"); sec->Append(cmDocumentationGeneratorsHeader); - this->AllSections["Generators"] = sec; + this->AllSections["Generators"] = sec; sec = new cmDocumentationSection("Compatibility Commands", "COMPATIBILITY COMMANDS"); sec->Append(cmCompatCommandsDocumentationDescription); - this->AllSections["Compatibility Commands"] = sec; + this->AllSections["Compatibility Commands"] = sec; this->PropertySections.push_back("Properties of Global Scope"); @@ -279,7 +279,7 @@ cmDocumentation::~cmDocumentation() { delete [] *i; } - for(std::map::iterator i = + for(std::map::iterator i = this->AllSections.begin(); i != this->AllSections.end(); ++i) { @@ -314,7 +314,7 @@ bool cmDocumentation::PrintCopyright(std::ostream& os) //---------------------------------------------------------------------------- bool cmDocumentation::PrintVersion(std::ostream& os) { - os << this->GetNameString() << " version " + os << this->GetNameString() << " version " << cmVersion::GetCMakeVersion() << "\n"; return true; } @@ -331,7 +331,7 @@ void cmDocumentation::AddSectionToPrint(const char *section) //---------------------------------------------------------------------------- void cmDocumentation::ClearSections() { - this->PrintSections.erase(this->PrintSections.begin(), + this->PrintSections.erase(this->PrintSections.begin(), this->PrintSections.end()); this->ModulesFound.clear(); } @@ -359,7 +359,7 @@ void cmDocumentation::AddDocumentIntroToPrint(const char* intro[2]) bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os, const char* docname) { - if ((this->CurrentFormatter->GetForm() != HTMLForm) + if ((this->CurrentFormatter->GetForm() != HTMLForm) && (this->CurrentFormatter->GetForm() != DocbookForm) && (this->CurrentFormatter->GetForm() != ManForm)) { @@ -394,8 +394,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os, this->PrintDocumentationList(os,"Commands"); this->PrintDocumentationList(os,"Compatibility Commands"); return true; - case cmDocumentation::ModuleList: - // find the modules first, print the custom module docs only if + case cmDocumentation::ModuleList: + // find the modules first, print the custom module docs only if // any custom modules have been found actually, Alex this->CreateCustomModulesSection(); this->CreateModulesSection(); @@ -406,43 +406,43 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os, } this->PrintDocumentationList(os,"Modules"); return true; - case cmDocumentation::PropertyList: + case cmDocumentation::PropertyList: this->PrintDocumentationList(os,"Properties Description"); - for (std::vector::iterator i = + for (std::vector::iterator i = this->PropertySections.begin(); i != this->PropertySections.end(); ++i) { this->PrintDocumentationList(os,i->c_str()); } return true; - case cmDocumentation::VariableList: - for (std::vector::iterator i = + case cmDocumentation::VariableList: + for (std::vector::iterator i = this->VariableSections.begin(); i != this->VariableSections.end(); ++i) { this->PrintDocumentationList(os,i->c_str()); } return true; - case cmDocumentation::Full: + case cmDocumentation::Full: return this->PrintDocumentationFull(os); - case cmDocumentation::Modules: + case cmDocumentation::Modules: return this->PrintDocumentationModules(os); - case cmDocumentation::CustomModules: + case cmDocumentation::CustomModules: return this->PrintDocumentationCustomModules(os); - case cmDocumentation::Policies: + case cmDocumentation::Policies: return this->PrintDocumentationPolicies(os); - case cmDocumentation::Properties: + case cmDocumentation::Properties: return this->PrintDocumentationProperties(os); - case cmDocumentation::Variables: + case cmDocumentation::Variables: return this->PrintDocumentationVariables(os); - case cmDocumentation::Commands: + case cmDocumentation::Commands: return this->PrintDocumentationCurrentCommands(os); - case cmDocumentation::CompatCommands: + case cmDocumentation::CompatCommands: return this->PrintDocumentationCompatCommands(os); - case cmDocumentation::Copyright: + case cmDocumentation::Copyright: return this->PrintCopyright(os); - case cmDocumentation::Version: + case cmDocumentation::Version: return true; default: return false; } @@ -451,7 +451,7 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os, //---------------------------------------------------------------------------- bool cmDocumentation::CreateModulesSection() { - cmDocumentationSection *sec = + cmDocumentationSection *sec = new cmDocumentationSection("Standard CMake Modules", "MODULES"); this->AllSections["Modules"] = sec; std::string cmakeModules = this->CMakeRoot; @@ -485,7 +485,7 @@ bool cmDocumentation::CreateCustomModulesSection() { if (!sectionHasHeader) { - cmDocumentationSection *sec = + cmDocumentationSection *sec = new cmDocumentationSection("Custom CMake Modules","CUSTOM MODULES"); this->AllSections["Custom CMake Modules"] = sec; sec->Append(cmDocumentationCustomModulesHeader[0]); @@ -502,10 +502,10 @@ bool cmDocumentation::CreateCustomModulesSection() //---------------------------------------------------------------------------- void cmDocumentation -::CreateModuleDocsForDir(cmsys::Directory& dir, +::CreateModuleDocsForDir(cmsys::Directory& dir, cmDocumentationSection &moduleSection) { - // sort the files alphabetically, so the docs for one module are easier + // sort the files alphabetically, so the docs for one module are easier // to find than if they are in random order std::vector sortedFiles; for(unsigned int i = 0; i < dir.GetNumberOfFiles(); ++i) @@ -530,7 +530,7 @@ void cmDocumentation std::string path = dir.GetPath(); path += "/"; path += (*fname); - this->CreateSingleModule(path.c_str(), moduleName.c_str(), + this->CreateSingleModule(path.c_str(), moduleName.c_str(), moduleSection); } } @@ -539,7 +539,7 @@ void cmDocumentation } //---------------------------------------------------------------------------- -bool cmDocumentation::CreateSingleModule(const char* fname, +bool cmDocumentation::CreateSingleModule(const char* fname, const char* moduleName, cmDocumentationSection &moduleSection) { @@ -548,7 +548,7 @@ bool cmDocumentation::CreateSingleModule(const char* fname, { std::cerr << "Internal error: can not open module." << fname << std::endl; return false; - } + } std::string line; std::string text; std::string brief; @@ -561,14 +561,14 @@ bool cmDocumentation::CreateSingleModule(const char* fname, // blank line if(line.size() <= 2) { - text += "\n"; + text += "\n"; newParagraph = true; } - else if(line[2] == '-') + else if(line[2] == '-') { brief = line.c_str()+4; } - else + else { // two spaces if(line[1] == ' ' && line[2] == ' ') @@ -630,11 +630,11 @@ bool cmDocumentation::CreateSingleModule(const char* fname, bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os) { bool result = true; - + // Loop over requested documentation types. - for(std::vector::const_iterator + for(std::vector::const_iterator i = this->RequestedHelpItems.begin(); - i != this->RequestedHelpItems.end(); + i != this->RequestedHelpItems.end(); ++i) { this->SetForm(i->HelpForm); @@ -660,13 +660,13 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os) docname = cmSystemTools::GetFilenameWithoutLastExtension(i->Filename); } } - + // Print this documentation type to the stream. if(!this->PrintDocumentation(i->HelpType, *s, docname.c_str()) || !*s) { result = false; } - + // Close the file if we wrote one. if(fout) { @@ -876,8 +876,8 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv, GET_OPT_ARGUMENT(help.Filename); help.HelpForm = cmDocumentation::UsageForm; } - else if((strcmp(argv[i], "--version") == 0) || - (strcmp(argv[i], "-version") == 0) || + else if((strcmp(argv[i], "--version") == 0) || + (strcmp(argv[i], "-version") == 0) || (strcmp(argv[i], "/V") == 0)) { help.HelpType = cmDocumentation::Version; @@ -904,14 +904,14 @@ void cmDocumentation::Print(Form f, std::ostream& os) //---------------------------------------------------------------------------- void cmDocumentation::Print(std::ostream& os) { - // if the formatter supports it, print a master index for + // if the formatter supports it, print a master index for // all sections this->CurrentFormatter->PrintIndex(os, this->PrintSections); for(unsigned int i=0; i < this->PrintSections.size(); ++i) { std::string name = this->PrintSections[i]-> GetName((this->CurrentFormatter->GetForm())); - this->CurrentFormatter->PrintSection(os,*this->PrintSections[i], + this->CurrentFormatter->PrintSection(os,*this->PrintSections[i], name.c_str()); } } @@ -929,7 +929,7 @@ void cmDocumentation::SetDocName(const char *docname) } //---------------------------------------------------------------------------- -void cmDocumentation::SetSection(const char *name, +void cmDocumentation::SetSection(const char *name, cmDocumentationSection *section) { if (this->AllSections.find(name) != this->AllSections.end()) @@ -940,22 +940,22 @@ void cmDocumentation::SetSection(const char *name, } //---------------------------------------------------------------------------- -void cmDocumentation::SetSection(const char *name, +void cmDocumentation::SetSection(const char *name, std::vector &docs) { - cmDocumentationSection *sec = - new cmDocumentationSection(name, + cmDocumentationSection *sec = + new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str()); sec->Append(docs); this->SetSection(name,sec); } //---------------------------------------------------------------------------- -void cmDocumentation::SetSection(const char *name, +void cmDocumentation::SetSection(const char *name, const char *docs[][3]) { - cmDocumentationSection *sec = - new cmDocumentationSection(name, + cmDocumentationSection *sec = + new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str()); sec->Append(docs); this->SetSection(name,sec); @@ -965,15 +965,15 @@ void cmDocumentation::SetSection(const char *name, void cmDocumentation ::SetSections(std::map §ions) { - for (std::map::const_iterator + for (std::map::const_iterator it = sections.begin(); it != sections.end(); ++it) { this->SetSection(it->first.c_str(),it->second); - } + } } //---------------------------------------------------------------------------- -void cmDocumentation::PrependSection(const char *name, +void cmDocumentation::PrependSection(const char *name, const char *docs[][3]) { cmDocumentationSection *sec = 0; @@ -991,7 +991,7 @@ void cmDocumentation::PrependSection(const char *name, } //---------------------------------------------------------------------------- -void cmDocumentation::PrependSection(const char *name, +void cmDocumentation::PrependSection(const char *name, std::vector &docs) { cmDocumentationSection *sec = 0; @@ -1009,7 +1009,7 @@ void cmDocumentation::PrependSection(const char *name, } //---------------------------------------------------------------------------- -void cmDocumentation::AppendSection(const char *name, +void cmDocumentation::AppendSection(const char *name, const char *docs[][3]) { cmDocumentationSection *sec = 0; @@ -1027,7 +1027,7 @@ void cmDocumentation::AppendSection(const char *name, } //---------------------------------------------------------------------------- -void cmDocumentation::AppendSection(const char *name, +void cmDocumentation::AppendSection(const char *name, std::vector &docs) { cmDocumentationSection *sec = 0; @@ -1045,7 +1045,7 @@ void cmDocumentation::AppendSection(const char *name, } //---------------------------------------------------------------------------- -void cmDocumentation::AppendSection(const char *name, +void cmDocumentation::AppendSection(const char *name, cmDocumentationEntry &docs) { @@ -1055,7 +1055,7 @@ void cmDocumentation::AppendSection(const char *name, } //---------------------------------------------------------------------------- -void cmDocumentation::PrependSection(const char *name, +void cmDocumentation::PrependSection(const char *name, cmDocumentationEntry &docs) { @@ -1067,7 +1067,7 @@ void cmDocumentation::PrependSection(const char *name, //---------------------------------------------------------------------------- void cmDocumentation::SetSeeAlsoList(const char *data[][3]) { - cmDocumentationSection *sec = + cmDocumentationSection *sec = new cmDocumentationSection("See Also", "SEE ALSO"); this->AllSections["See Also"] = sec; this->SeeAlsoString = ".B "; @@ -1075,7 +1075,7 @@ void cmDocumentation::SetSeeAlsoList(const char *data[][3]) while(data[i][1]) { this->SeeAlsoString += data[i][1]; - this->SeeAlsoString += data[i+1][1]? "(1), ":"(1)"; + this->SeeAlsoString += data[i+1][1]? "(1), ":"(1)"; ++i; } sec->Append(0,this->SeeAlsoString.c_str(),0); @@ -1096,9 +1096,9 @@ bool cmDocumentation::PrintDocumentationGeneric(std::ostream& os, os << "Required argument missing.\n"; return false; } - const std::vector &entries = + const std::vector &entries = this->AllSections[section]->GetEntries(); - for(std::vector::const_iterator ei = + for(std::vector::const_iterator ei = entries.begin(); ei != entries.end(); ++ei) { @@ -1138,7 +1138,7 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os) os << "Argument --help-module needs a module name.\n"; return false; } - + std::string moduleName; // find the module std::vector dirs; @@ -1172,10 +1172,10 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os) if(!moduleName.empty()) { - cmDocumentationSection *sec = + cmDocumentationSection *sec = new cmDocumentationSection("Standard CMake Modules", "MODULES"); this->AllSections["Modules"] = sec; - if (this->CreateSingleModule(moduleName.c_str(), + if (this->CreateSingleModule(moduleName.c_str(), this->CurrentArgument.c_str(), *this->AllSections["Modules"])) { @@ -1204,7 +1204,7 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os) bool cmDocumentation::PrintDocumentationSingleProperty(std::ostream& os) { bool done = false; - for (std::vector::iterator i = + for (std::vector::iterator i = this->PropertySections.begin(); !done && i != this->PropertySections.end(); ++i) { @@ -1241,7 +1241,7 @@ bool cmDocumentation::PrintDocumentationSinglePolicy(std::ostream& os) bool cmDocumentation::PrintDocumentationSingleVariable(std::ostream& os) { bool done = false; - for (std::vector::iterator i = + for (std::vector::iterator i = this->VariableSections.begin(); !done && i != this->VariableSections.end(); ++i) { @@ -1270,9 +1270,9 @@ bool cmDocumentation::PrintDocumentationList(std::ostream& os, return false; } - const std::vector &entries = + const std::vector &entries = this->AllSections[section]->GetEntries(); - for(std::vector::const_iterator ei = + for(std::vector::const_iterator ei = entries.begin(); ei != entries.end(); ++ei) { @@ -1364,7 +1364,7 @@ bool cmDocumentation::PrintDocumentationProperties(std::ostream& os) this->ClearSections(); this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Properties)); this->AddSectionToPrint("Properties Description"); - for (std::vector::iterator i = + for (std::vector::iterator i = this->PropertySections.begin(); i != this->PropertySections.end(); ++i) { @@ -1383,7 +1383,7 @@ bool cmDocumentation::PrintDocumentationVariables(std::ostream& os) { this->ClearSections(); this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Variables)); - for (std::vector::iterator i = + for (std::vector::iterator i = this->VariableSections.begin(); i != this->VariableSections.end(); ++i) { @@ -1464,10 +1464,10 @@ void cmDocumentation::CreateFullDocumentation() this->AddSectionToPrint("Commands"); emitted.insert("Commands"); - + this->AddSectionToPrint("Properties Description"); emitted.insert("Properties Description"); - for (std::vector::iterator i = + for (std::vector::iterator i = this->PropertySections.begin(); i != this->PropertySections.end(); ++i) { @@ -1481,7 +1481,7 @@ void cmDocumentation::CreateFullDocumentation() emitted.insert("Author"); // add any sections not yet written out, or to be written out - for (std::map::iterator i = + for (std::map::iterator i = this->AllSections.begin(); i != this->AllSections.end(); ++i) { @@ -1579,6 +1579,6 @@ const char* cmDocumentation::GetDefaultDocName(Type ht) const //---------------------------------------------------------------------------- bool cmDocumentation::IsOption(const char* arg) const { - return ((arg[0] == '-') || (strcmp(arg, "/V") == 0) || + return ((arg[0] == '-') || (strcmp(arg, "/V") == 0) || (strcmp(arg, "/?") == 0)); } diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index f8cdc96..1dcff1a 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -16,7 +16,7 @@ /** This is just a helper class to make it build with MSVC 6.0. Actually the enums and internal classes could directly go into -cmDocumentation, but then MSVC6 complains in RequestedHelpItem that +cmDocumentation, but then MSVC6 complains in RequestedHelpItem that cmDocumentation is an undefined type and so it doesn't know the enums. Moving the enums to a class which is then already completely parsed helps against this. */ @@ -24,10 +24,10 @@ class cmDocumentationEnums { public: /** Types of help provided. */ - enum Type + enum Type { None, Usage, Single, SingleModule, SingleProperty, SingleVariable, List, ModuleList, PropertyList, VariableList, - Full, Properties, Variables, Modules, CustomModules, Commands, + Full, Properties, Variables, Modules, CustomModules, Commands, CompatCommands, Copyright, Version, Policies, SinglePolicy }; /** Forms of documentation output. */ @@ -36,7 +36,7 @@ public: class cmDocumentationSection; -/** Base class for printing the documentation in the various supported +/** Base class for printing the documentation in the various supported formats. */ class cmDocumentationFormatter { @@ -46,7 +46,7 @@ public: void PrintFormatted(std::ostream& os, const char* text); virtual cmDocumentationEnums::Form GetForm() const = 0; - + virtual void PrintHeader(const char* /*docname*/, const char* /*appname*/, std::ostream& /*os*/) {} diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx index a642f55..cd0530d 100644 --- a/Source/cmExprLexer.cxx +++ b/Source/cmExprLexer.cxx @@ -44,7 +44,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -165,7 +165,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -231,7 +231,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -787,7 +787,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP #line 88 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ yylvalp->Number = atoi(yytext); return exp_NUMBER; } +{ yylvalp->Number = atoi(yytext); return exp_NUMBER; } case 2: YY_RULE_SETUP #line 90 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" @@ -795,43 +795,43 @@ YY_RULE_SETUP case 3: YY_RULE_SETUP #line 91 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ return exp_MINUS; } +{ return exp_MINUS; } case 4: YY_RULE_SETUP #line 92 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ return exp_TIMES; } +{ return exp_TIMES; } case 5: YY_RULE_SETUP #line 93 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ return exp_DIVIDE; } +{ return exp_DIVIDE; } case 6: YY_RULE_SETUP #line 94 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ return exp_MOD; } +{ return exp_MOD; } case 7: YY_RULE_SETUP #line 95 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ return exp_OR; } +{ return exp_OR; } case 8: YY_RULE_SETUP #line 96 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ return exp_AND; } +{ return exp_AND; } case 9: YY_RULE_SETUP #line 97 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ return exp_XOR; } +{ return exp_XOR; } case 10: YY_RULE_SETUP #line 98 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ return exp_NOT; } +{ return exp_NOT; } case 11: YY_RULE_SETUP #line 99 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ return exp_SHIFTLEFT; } +{ return exp_SHIFTLEFT; } case 12: YY_RULE_SETUP #line 100 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" -{ return exp_SHIFTRIGHT; } +{ return exp_SHIFTRIGHT; } case 13: YY_RULE_SETUP #line 101 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" @@ -1319,7 +1319,7 @@ static void cmExpr_yy_load_buffer_state (yyscan_t yyscanner) YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) cmExpr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_create_buffer()" ); @@ -1363,7 +1363,7 @@ static void cmExpr_yy_load_buffer_state (yyscan_t yyscanner) #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ - + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a cmExpr_yyrestart() or at EOF. @@ -1389,7 +1389,7 @@ extern int isatty (int ); } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - + errno = oerrno; } @@ -1493,9 +1493,9 @@ static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner) yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyalloc (nuto_alloc * sizeof(struct yy_buffer_state*) , yyscanner); - + memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = nuto_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1522,12 +1522,12 @@ static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE cmExpr_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1564,7 +1564,7 @@ YY_BUFFER_STATE cmExpr_yy_scan_buffer (char * base, yy_size_t size , yyscan_t */ YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner) { - + return cmExpr_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner); } @@ -1581,7 +1581,7 @@ YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char * bytes, int len , yyscan_t char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) cmExpr_yyalloc(n ,yyscanner ); @@ -1649,10 +1649,10 @@ YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner) int cmExpr_yyget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yylineno; } @@ -1662,10 +1662,10 @@ int cmExpr_yyget_lineno (yyscan_t yyscanner) int cmExpr_yyget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yycolumn; } @@ -1726,8 +1726,8 @@ void cmExpr_yyset_lineno (int line_number , yyscan_t yyscanner) /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "cmExpr_yyset_lineno called with no buffer" , yyscanner); - + yy_fatal_error( "cmExpr_yyset_lineno called with no buffer" , yyscanner); + yylineno = line_number; } @@ -1741,8 +1741,8 @@ void cmExpr_yyset_column (int column_no , yyscan_t yyscanner) /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "cmExpr_yyset_column called with no buffer" , yyscanner); - + yy_fatal_error( "cmExpr_yyset_column called with no buffer" , yyscanner); + yycolumn = column_no; } diff --git a/Source/cmGlobalKdevelopGenerator.h b/Source/cmGlobalKdevelopGenerator.h index 63f7c1f..f276943 100644 --- a/Source/cmGlobalKdevelopGenerator.h +++ b/Source/cmGlobalKdevelopGenerator.h @@ -36,19 +36,19 @@ public: virtual const char* GetName() const { return cmGlobalKdevelopGenerator::GetActualName();} static const char* GetActualName() { return "KDevelop3";} - static cmExternalMakefileProjectGenerator* New() + static cmExternalMakefileProjectGenerator* New() { return new cmGlobalKdevelopGenerator; } /** Get the documentation entry for this generator. */ - virtual void GetDocumentation(cmDocumentationEntry& entry, + virtual void GetDocumentation(cmDocumentationEntry& entry, const char* fullName) const; virtual void Generate(); private: /*** Create the foo.kdevelop.filelist file, return false if it doesn't - succeed. If the file already exists the contents will be merged. + succeed. If the file already exists the contents will be merged. */ bool CreateFilelistFile(const std::vector& lgs, - const std::string& outputDir, + const std::string& outputDir, const std::string& projectDirIn, const std::string& projectname, std::string& cmakeFilePattern, @@ -62,13 +62,13 @@ private: listfiles used by this CMakeLists.txt */ void CreateProjectFile(const std::string& outputDir, const std::string& projectDir, - const std::string& projectname, - const std::string& executable, + const std::string& projectname, + const std::string& executable, const std::string& cmakeFilePattern, const std::string& fileToOpen); /*** Reads the old foo.kdevelop line by line and only replaces the - "important" lines + "important" lines */ void MergeProjectFiles(const std::string& outputDir, const std::string& projectDir, @@ -78,10 +78,10 @@ private: const std::string& fileToOpen, const std::string& sessionFilename); ///! Creates a new foo.kdevelop and a new foo.kdevses file - void CreateNewProjectFile(const std::string& outputDir, - const std::string& projectDir, + void CreateNewProjectFile(const std::string& outputDir, + const std::string& projectDir, const std::string& filename, - const std::string& executable, + const std::string& executable, const std::string& cmakeFilePattern, const std::string& fileToOpen, const std::string& sessionFilename); diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 7f19d83..ebb6fe4 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -26,9 +26,9 @@ class cmGlobalVisualStudio7Generator : public cmGlobalVisualStudioGenerator { public: cmGlobalVisualStudio7Generator(); - static cmGlobalGenerator* New() { + static cmGlobalGenerator* New() { return new cmGlobalVisualStudio7Generator; } - + ///! Get the name for the generator. virtual const char* GetName() const { return cmGlobalVisualStudio7Generator::GetActualName();} @@ -39,12 +39,12 @@ public: /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; - + /** * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. + * extension, pthreads, byte order etc. */ - virtual void EnableLanguage(std::vectorconst& languages, + virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); /** @@ -52,8 +52,8 @@ public: * loaded commands, not as part of the usual build process. */ virtual std::string GenerateBuildCommand(const char* makeProgram, - const char *projectName, - const char* additionalOptions, + const char *projectName, + const char* additionalOptions, const char *targetName, const char* config, bool ignoreErrors, @@ -62,7 +62,7 @@ public: /** * Generate the all required files for building this project/tree. This * basically creates a series of LocalGenerators for each directory and - * requests that they Generate. + * requests that they Generate. */ virtual void Generate(); @@ -75,7 +75,7 @@ public: * Get the list of configurations */ std::vector *GetConfigurations(); - + ///! Create a GUID or get an existing one. void CreateGUID(const char* name); std::string GetGUID(const char* name); @@ -97,13 +97,13 @@ protected: virtual const char* GetIDEVersion() { return "7.0"; } static cmIDEFlagTable const* GetExtraFlagTableVS7(); - virtual void OutputSLNFile(cmLocalGenerator* root, + virtual void OutputSLNFile(cmLocalGenerator* root, std::vector& generators); virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, std::vector& generators); - virtual void WriteProject(std::ostream& fout, + virtual void WriteProject(std::ostream& fout, const char* name, const char* path, cmTarget &t); - virtual void WriteProjectDepends(std::ostream& fout, + virtual void WriteProjectDepends(std::ostream& fout, const char* name, const char* path, cmTarget &t); virtual void WriteProjectConfigurations(std::ostream& fout, const char* name, @@ -124,11 +124,11 @@ protected: std::ostream& fout, cmLocalGenerator* root, OrderedTargetDependSet const& projectTargets); - + void GenerateConfigurations(cmMakefile* mf); - virtual void WriteExternalProject(std::ostream& fout, - const char* name, + virtual void WriteExternalProject(std::ostream& fout, + const char* name, const char* path, const std::set& dependencies); diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index c0fe886..3d96f01 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -33,19 +33,19 @@ class cmLocalGenerator public: cmLocalGenerator(); virtual ~cmLocalGenerator(); - + /** - * Generate the makefile for this directory. + * Generate the makefile for this directory. */ virtual void Generate() {} /** * Process the CMakeLists files for this directory to fill in the - * Makefile ivar + * Makefile ivar */ virtual void Configure(); - /** + /** * Calls TraceVSDependencies() on all targets of this generator. */ virtual void TraceDependencies(); @@ -75,11 +75,11 @@ public: ///! Get the makefile for this generator cmMakefile *GetMakefile() { return this->Makefile; }; - + ///! Get the makefile for this generator, const version const cmMakefile *GetMakefile() const { return this->Makefile; }; - + ///! Get the GlobalGenerator this is associated with cmGlobalGenerator *GetGlobalGenerator() { return this->GlobalGenerator; }; @@ -89,10 +89,10 @@ public: ///! Set the Global Generator, done on creation by the GlobalGenerator void SetGlobalGenerator(cmGlobalGenerator *gg); - /** + /** * Convert something to something else. This is a centralized coversion * routine used by the generators to handle relative paths and the like. - * The flags determine what is actually done. + * The flags determine what is actually done. * * relative: treat the argument as a directory and convert it to make it * relative or full or unchanged. If relative (HOME, START etc) then that @@ -117,7 +117,7 @@ public: * Get path for the specified relative root. */ const char* GetRelativeRootPath(RelativeRoot relroot); - + /** * Convert the given path to an output path that is optionally * relative based on the cache option CMAKE_USE_RELATIVE_PATHS. The @@ -126,14 +126,14 @@ public: */ std::string ConvertToOptionallyRelativeOutputPath(const char* remote); - ///! set/get the parent generator + ///! set/get the parent generator cmLocalGenerator* GetParent(){return this->Parent;} void SetParent(cmLocalGenerator* g) { this->Parent = g; g->AddChild(this); } ///! set/get the children void AddChild(cmLocalGenerator* g) { this->Children.push_back(g); } std::vector& GetChildren() { return this->Children; }; - + void AddArchitectureFlags(std::string& flags, cmTarget* target, const char *lang, const char* config); @@ -183,9 +183,9 @@ public: virtual std::string ConvertToIncludeReference(std::string const& path); /** Called from command-line hook to clear dependencies. */ - virtual void ClearDependencies(cmMakefile* /* mf */, + virtual void ClearDependencies(cmMakefile* /* mf */, bool /* verbose */) {} - + /** Called from command-line hook to update dependencies. */ virtual bool UpdateDependencies(const char* /* tgtInfo */, bool /*verbose*/, @@ -259,11 +259,11 @@ public: /** Return the directories into which object files will be put. * There maybe more than one for fat binary systems like OSX. */ - virtual void + virtual void GetTargetObjectFileDirectories(cmTarget* target, - std::vector& + std::vector& dirs); - + /** * Convert the given remote path to a relative path with respect to * the given local path. The local path must be given in component @@ -321,15 +321,15 @@ public: /** Fill out these strings for the given target. Libraries to link, * flags, and linkflags. */ - void GetTargetFlags(std::string& linkLibs, + void GetTargetFlags(std::string& linkLibs, std::string& flags, std::string& linkFlags, cmTarget&target); - + protected: ///! put all the libraries for a target on into the given stream virtual void OutputLinkLibraries(std::ostream&, cmTarget&, bool relink); - + // Expand rule variables in CMake of the type found in language rules void ExpandRuleVariables(std::string& string, const RuleVariables& replaceValues); @@ -341,13 +341,13 @@ protected: void InsertRuleLauncher(std::string& s, cmTarget* target, const char* prop); - - /** Convert a target to a utility target for unsupported + + /** Convert a target to a utility target for unsupported * languages of a generator */ void AddBuildTargetRule(const char* llang, cmTarget& target); - ///! add a custom command to build a .o file that is part of a target - void AddCustomCommandToCreateObject(const char* ofname, - const char* lang, + ///! add a custom command to build a .o file that is part of a target + void AddCustomCommandToCreateObject(const char* ofname, + const char* lang, cmSourceFile& source, cmTarget& target); // Create Custom Targets and commands for unsupported languages diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 0994222..1fd1aa7 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -38,21 +38,21 @@ public: /** * Process the CMakeLists files for this directory to fill in the - * Makefile ivar + * Makefile ivar */ virtual void Configure(); /** - * Generate the makefile for this directory. + * Generate the makefile for this directory. */ virtual void Generate(); - + // this returns the relative path between the HomeOutputDirectory and this // local generators StartOutputDirectory const std::string &GetHomeRelativeOutputPath(); - // Write out a make rule + // Write out a make rule void WriteMakeRule(std::ostream& os, const char* comment, const char* target, @@ -60,7 +60,7 @@ public: const std::vector& commands, bool symbolic, bool in_help = false); - + // write the main variables used by the makefiles void WriteMakeVariables(std::ostream& makefileStream); @@ -71,7 +71,7 @@ public: */ void SetPassMakeflags(bool s){this->PassMakeflags = s;} bool GetPassMakeflags() { return this->PassMakeflags; } - + /** * Set the flag used to keep the make program silent. */ @@ -115,7 +115,7 @@ public: void SetDefineWindowsNULL(bool v) {this->DefineWindowsNULL = v;} /** - * If set to true, cd dir && command is used to + * If set to true, cd dir && command is used to * run commands in a different directory. */ void SetUnixCD(bool v) {this->UnixCD = v;} @@ -168,8 +168,8 @@ public: void WriteDivider(std::ostream& os); /** used to create a recursive make call */ - std::string GetRecursiveMakeCall(const char *makefile, const char* tgt); - + std::string GetRecursiveMakeCall(const char *makefile, const char* tgt); + // append flags to a string virtual void AppendFlags(std::string& flags, const char* newFlags); @@ -185,7 +185,7 @@ public: virtual std::string GetTargetDirectory(cmTarget const& target) const; // create a command that cds to the start dir then runs the commands - void CreateCDCommand(std::vector& commands, + void CreateCDCommand(std::vector& commands, const char *targetDir, cmLocalGenerator::RelativeRoot returnDir); @@ -200,7 +200,7 @@ public: /** Called from command-line hook to clear dependencies. */ virtual void ClearDependencies(cmMakefile* mf, bool verbose); - + /** write some extra rules such as make test etc */ void WriteSpecialTargetsTop(std::ostream& makefileStream); void WriteSpecialTargetsBottom(std::ostream& makefileStream); @@ -224,7 +224,7 @@ public: // write the target rules for the local Makefile into the stream void WriteLocalAllRules(std::ostream& ruleFileStream); - + struct LocalObjectEntry { cmTarget* Target; @@ -238,7 +238,7 @@ public: bool HasSourceExtension; bool HasPreprocessRule; bool HasAssembleRule; - LocalObjectInfo():HasSourceExtension(false), HasPreprocessRule(false), + LocalObjectInfo():HasSourceExtension(false), HasPreprocessRule(false), HasAssembleRule(false) {} }; std::map const& GetLocalObjectFiles() @@ -261,15 +261,15 @@ public: void GetTargetObjectFileDirectories(cmTarget* target, std::vector& dirs); - // Fill the vector with the target names for the object files, - // preprocessed files and assembly files. Currently only used by the + // Fill the vector with the target names for the object files, + // preprocessed files and assembly files. Currently only used by the // Eclipse generator. void GetIndividualFileTargets(std::vector& targets); - + protected: void WriteLocalMakefile(); - - + + // write the target rules for the local Makefile into the stream void WriteLocalMakefileTargets(std::ostream& ruleFileStream, std::set &emitted); @@ -278,17 +278,17 @@ protected: void WriteDirectoryInformationFile(); - // write the depend info + // write the depend info void WriteDependLanguageInfo(std::ostream& cmakefileStream, cmTarget &tgt); - + // write the local help rule void WriteHelpRule(std::ostream& ruleFileStream); - + // this converts a file name that is relative to the StartOuputDirectory // into a full path std::string ConvertToFullPath(const std::string& localPath); - + void WriteConvenienceRule(std::ostream& ruleFileStream, const char* realTarget, const char* helpTarget); @@ -304,7 +304,7 @@ protected: void WriteObjectConvenienceRule(std::ostream& ruleFileStream, const char* comment, const char* output, LocalObjectInfo const& info); - + std::string GetObjectFileName(cmTarget& target, const cmSourceFile& source, std::string* nameWithoutTargetDir = 0, diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 618f4f3..c80d4cc 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -72,7 +72,7 @@ public: /** Return whether compatibility features needed for a version of the cache or lower should be enabled. */ bool NeedCacheCompatibility(int major, int minor); - + /** * Construct an empty makefile. */ @@ -87,8 +87,8 @@ public: /** * Read and parse a CMakeLists.txt file. */ - bool ReadListFile(const char* listfile, - const char* external= 0, + bool ReadListFile(const char* listfile, + const char* external= 0, std::string* fullPath= 0, bool noPolicyScope = true); @@ -121,21 +121,21 @@ public: * Try running cmake and building a file. This is used for dynalically * loaded commands, not as part of the usual build process. */ - int TryCompile(const char *srcdir, const char *bindir, + int TryCompile(const char *srcdir, const char *bindir, const char *projectName, const char *targetName, bool fast, const std::vector *cmakeArgs, std::string *output); - + /** * Specify the makefile generator. This is platform/compiler * dependent, although the interface is through a generic * superclass. */ void SetLocalGenerator(cmLocalGenerator*); - + ///! Get the current makefile generator. - cmLocalGenerator* GetLocalGenerator() + cmLocalGenerator* GetLocalGenerator() { return this->LocalGenerator;} /** @@ -153,15 +153,15 @@ public: /** * Perform FinalPass, Library dependency analysis etc before output of the - * makefile. + * makefile. */ void ConfigureFinalPass(); - + /** * run the final pass on all commands. */ void FinalPass(); - + /** * Print the object state to std::cout. */ @@ -205,11 +205,11 @@ public: cmTarget* AddImportedTarget(const char* name, cmTarget::TargetType type); cmTarget* AddNewTarget(cmTarget::TargetType type, const char* name); - + /** * Add an executable to the build. */ - cmTarget* AddExecutable(const char *exename, + cmTarget* AddExecutable(const char *exename, const std::vector &srcs, bool excludeFromAll = false); @@ -237,7 +237,7 @@ public: */ void AddLinkLibrary(const char*); void AddLinkLibrary(const char*, cmTarget::LinkLibraryType type); - void AddLinkLibraryForTarget(const char *tgt, const char*, + void AddLinkLibraryForTarget(const char *tgt, const char*, cmTarget::LinkLibraryType type); void AddLinkDirectoryForTarget(const char *tgt, const char* d); @@ -265,9 +265,9 @@ public: /** * Add a subdirectory to the build. */ - void AddSubDirectory(const char*, bool excludeFromAll=false, + void AddSubDirectory(const char*, bool excludeFromAll=false, bool preorder = false); - void AddSubDirectory(const char* fullSrcDir,const char *fullBinDir, + void AddSubDirectory(const char* fullSrcDir,const char *fullBinDir, bool excludeFromAll, bool preorder, bool immediate); @@ -275,7 +275,7 @@ public: * Configure a subdirectory */ void ConfigureSubDirectory(cmLocalGenerator *); - + /** * Add an include directory to the build. */ @@ -287,13 +287,13 @@ public: */ void AddDefinition(const char* name, const char* value); ///! Add a definition to this makefile and the global cmake cache. - void AddCacheDefinition(const char* name, const char* value, + void AddCacheDefinition(const char* name, const char* value, const char* doc, cmCacheManager::CacheEntryType type, bool force = false); /** - * Add bool variable definition to the build. + * Add bool variable definition to the build. */ void AddDefinition(const char* name, bool); @@ -304,7 +304,7 @@ public: void RemoveDefinition(const char* name); ///! Remove a definition from the cache. void RemoveCacheDefinition(const char* name); - + /** * Specify the name of the project for this build. */ @@ -339,14 +339,14 @@ public: * Add a source group for consideration when adding a new source. * name is tokenized. */ - void AddSourceGroup(const std::vector& name, + void AddSourceGroup(const std::vector& name, const char* regex=0); #endif //@{ /** - * Set, Push, Pop policy values for CMake. + * Set, Push, Pop policy values for CMake. */ bool SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); bool SetPolicy(const char *id, cmPolicies::PolicyStatus status); @@ -374,31 +374,31 @@ public: * Get the Policies Instance */ cmPolicies *GetPolicies(); - + /** * Add an auxiliary directory to the build. */ void AddExtraDirectory(const char* dir); - + /** * Add an auxiliary directory to the build. */ void MakeStartDirectoriesCurrent() { - this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", + this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", this->cmStartDirectory.c_str()); - this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", + this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", this->StartOutputDirectory.c_str()); } - + //@{ /** * Set/Get the home directory (or output directory) in the project. The * home directory is the top directory of the project. It is where * CMakeSetup or configure was run. Remember that CMake processes * CMakeLists files by recursing up the tree starting at the StartDirectory - * and going up until it reaches the HomeDirectory. + * and going up until it reaches the HomeDirectory. */ void SetHomeDirectory(const char* dir); const char* GetHomeDirectory() const @@ -428,15 +428,15 @@ public: * is the directory of the CMakeLists.txt file that started the current * round of processing. Remember that CMake processes CMakeLists files by * recursing up the tree starting at the StartDirectory and going up until - * it reaches the HomeDirectory. + * it reaches the HomeDirectory. */ - void SetStartDirectory(const char* dir) + void SetStartDirectory(const char* dir) { this->cmStartDirectory = dir; cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory); - this->cmStartDirectory = + this->cmStartDirectory = cmSystemTools::CollapseFullPath(this->cmStartDirectory.c_str()); - this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", + this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", this->cmStartDirectory.c_str()); } const char* GetStartDirectory() const @@ -447,10 +447,10 @@ public: { this->StartOutputDirectory = lib; cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory); - this->StartOutputDirectory = + this->StartOutputDirectory = cmSystemTools::CollapseFullPath(this->StartOutputDirectory.c_str()); cmSystemTools::MakeDirectory(this->StartOutputDirectory.c_str()); - this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", + this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", this->StartOutputDirectory.c_str()); } const char* GetStartOutputDirectory() const @@ -459,7 +459,7 @@ public: } //@} - const char* GetCurrentDirectory() const + const char* GetCurrentDirectory() const { return this->cmStartDirectory.c_str(); } @@ -478,7 +478,7 @@ public: //@} - /** + /** * Set a regular expression that include files must match * in order to be considered as part of the depend information. */ @@ -487,11 +487,11 @@ public: this->IncludeFileRegularExpression = regex; } const char* GetIncludeRegularExpression() - { + { return this->IncludeFileRegularExpression.c_str(); } - /** + /** * Set a regular expression that include files that are not found * must match in order to be considered a problem. */ @@ -523,11 +523,11 @@ public: * Get a list of include directories in the build. */ std::vector& GetIncludeDirectories() - { + { return this->IncludeDirectories; } const std::vector& GetIncludeDirectories() const - { + { return this->IncludeDirectories; } void SetIncludeDirectories(const std::vector& vec) @@ -542,7 +542,7 @@ public: bool IsSystemIncludeDirectory(const char* dir); /** Expand out any arguements in the vector that have ; separated - * strings into multiple arguements. A new vector is created + * strings into multiple arguements. A new vector is created * containing the expanded versions of all arguments in argsIn. * This method differes from the one in cmSystemTools in that if * the CmakeLists file is version 1.2 or earlier it will check for @@ -558,7 +558,7 @@ public: cmSourceFile* GetSource(const char* sourceName); /** Get a cmSourceFile pointer for a given source name, if the name is - * not found, then create the source file and return it. generated + * not found, then create the source file and return it. generated * indicates if it is a generated file, this is used in determining * how to create the source file instance e.g. name */ @@ -597,8 +597,8 @@ public: * variables will be listed. */ std::vector GetDefinitions(int cacheonly=0) const; - - /** Test a boolean cache entry to see if it is true or false, + + /** Test a boolean cache entry to see if it is true or false, * returns false if no entry defined. */ bool IsOn(const char* name) const; @@ -617,13 +617,13 @@ public: * Make sure CMake can write this file */ bool CanIWriteThisFile(const char* fileName); - + /** * Get the vector of used command instances. */ const std::vector& GetUsedCommands() const {return this->UsedCommands;} - + #if defined(CMAKE_BUILD_WITH_CMAKE) /** * Get the vector source groups. @@ -663,9 +663,9 @@ public: { return this->OutputFiles; } void AddCMakeOutputFile(const char* file) { this->OutputFiles.push_back(file);} - + /** - * Expand all defined variables in the string. + * Expand all defined variables in the string. * Defined variables come from the this->Definitions map. * They are expanded with ${var} where var is the * entry in the this->Definitions map. Also @var@ is @@ -682,15 +682,15 @@ public: /** * Remove any remaining variables in the string. Anything with ${var} or - * @var@ will be removed. + * @var@ will be removed. */ - void RemoveVariablesInString(std::string& source, + void RemoveVariablesInString(std::string& source, bool atOnly = false) const; /** * Expand variables in the makefiles ivars such as link directories etc */ - void ExpandVariables(); + void ExpandVariables(); /** * Replace variables and #cmakedefine lines in the given string. @@ -702,7 +702,7 @@ public: /** * Copy file but change lines acording to ConfigureString */ - int ConfigureFile(const char* infile, const char* outfile, + int ConfigureFile(const char* infile, const char* outfile, bool copyonly, bool atOnly, bool escapeQuotes); #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -717,12 +717,12 @@ public: * Execute a single CMake command. Returns true if the command * succeeded or false if it failed. */ - bool ExecuteCommand(const cmListFileFunction& lff, + bool ExecuteCommand(const cmListFileFunction& lff, cmExecutionStatus &status); /** Check if a command exists. */ bool CommandExists(const char* name) const; - + /** * Add a command to this cmake instance */ @@ -748,7 +748,7 @@ public: ///! Display progress or status message. void DisplayStatus(const char*, float); - + /** * Expand the given list file arguments into the full set after * variable replacement and list expansion. @@ -757,13 +757,13 @@ public: std::vector& outArgs); /** * Get the instance - */ + */ cmake *GetCMakeInstance() const; /** * Get all the source files this makefile knows about */ - const std::vector &GetSourceFiles() const + const std::vector &GetSourceFiles() const {return this->SourceFiles;} std::vector &GetSourceFiles() {return this->SourceFiles;} @@ -775,7 +775,7 @@ public: /** * Add a macro to the list of macros. The arguments should be name of the - * macro and a documentation signature of it + * macro and a documentation signature of it */ void AddMacro(const char* name, const char* signature); @@ -797,7 +797,7 @@ public: */ std::string GetModulesFile(const char* name); - ///! Set/Get a property of this directory + ///! Set/Get a property of this directory void SetProperty(const char *prop, const char *value); void AppendProperty(const char *prop, const char *value,bool asString=false); const char *GetProperty(const char *prop); @@ -812,7 +812,7 @@ public: ///! Initialize a makefile from its parent void InitializeFromParent(); - + ///! Set/Get the preorder flag void SetPreOrder(bool p) { this->PreOrder = p; } bool GetPreOrder() const { return this->PreOrder; } @@ -859,11 +859,11 @@ protected: void CheckForUnused(const char* reason, const char* name) const; std::string Prefix; - std::vector AuxSourceDirectories; // + std::vector AuxSourceDirectories; // - std::string cmStartDirectory; - std::string StartOutputDirectory; - std::string cmHomeDirectory; + std::string cmStartDirectory; + std::string StartOutputDirectory; + std::string cmHomeDirectory; std::string HomeOutputDirectory; std::string cmCurrentListFile; @@ -875,7 +875,7 @@ protected: // Tests std::map Tests; - + // The include and link-library paths. These may have order // dependency, so they must be vectors (not set). std::vector IncludeDirectories; @@ -887,8 +887,8 @@ protected: std::vector ListFiles; // list of command files loaded std::vector OutputFiles; // list of command files loaded - - + + cmTarget::LinkLibraryVectorType LinkLibraries; std::vector InstallGenerators; @@ -911,9 +911,9 @@ protected: std::vector UsedCommands; cmLocalGenerator* LocalGenerator; - bool IsFunctionBlocked(const cmListFileFunction& lff, + bool IsFunctionBlocked(const cmListFileFunction& lff, cmExecutionStatus &status); - + private: void Initialize(); @@ -923,10 +923,10 @@ private: void ReadSources(std::ifstream& fin, bool t); friend class cmMakeDepend; // make depend needs direct access - // to the Sources array - void PrintStringVector(const char* s, const + // to the Sources array + void PrintStringVector(const char* s, const std::vector >& v) const; - void PrintStringVector(const char* s, + void PrintStringVector(const char* s, const std::vector& v) const; void AddDefaultDefinitions(); @@ -954,7 +954,7 @@ private: bool WarnUnused; bool CheckSystemVars; - // stack of list files being read + // stack of list files being read std::deque ListFileStack; // stack of commands being invoked. diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 3937d8d..cc11686 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -180,8 +180,8 @@ static const char * cmDocumentationOptions[][3] = {"--build-project", "Specify the name of the project to build.", "" }, {"--build-makeprogram", "Specify the make program to use.", "" }, {"--build-noclean", "Skip the make clean step.", "" }, - {"--build-config-sample", - "A sample executable to use to determine the configuration", + {"--build-config-sample", + "A sample executable to use to determine the configuration", "A sample executable to use to determine the configuration that " "should be used. e.g. Debug/Release/etc" }, {"--build-options", "Add extra options to the build step.", @@ -276,7 +276,7 @@ int main (int argc, char *argv[]) // If there is a testing input file, check for documentation options // only if there are actually arguments. We want running without // arguments to run tests. - if(argc > 1 || !(cmSystemTools::FileExists("CTestTestfile.cmake") || + if(argc > 1 || !(cmSystemTools::FileExists("CTestTestfile.cmake") || cmSystemTools::FileExists("DartTestfile.txt"))) { if(argc == 1) -- cgit v0.12 From d0b3a7fa48e000996775516f9ed0d78386c262de Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Sat, 19 Mar 2011 11:41:00 +0100 Subject: Fix typo. --- Source/cmGlobalGenerator.h | 2 +- Source/cmGlobalUnixMakefileGenerator3.h | 2 +- Source/cmGlobalVisualStudio7Generator.h | 2 +- Source/cmLocalGenerator.h | 4 ++-- Source/cmLocalUnixMakefileGenerator3.h | 2 +- Source/cmake.cxx | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 9f140a9..ded3345 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -90,7 +90,7 @@ public: cmMakefile* mf); /** - * Try running cmake and building a file. This is used for dynalically + * Try running cmake and building a file. This is used for dynamically * loaded commands, not as part of the usual build process. */ virtual int TryCompile(const char *srcdir, const char *bindir, diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 481640b..7566afa 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -90,7 +90,7 @@ public: void WriteHelpRule(std::ostream& ruleFileStream, cmLocalUnixMakefileGenerator3 *); - // write the top lvel target rules + // write the top level target rules void WriteConvenienceRules(std::ostream& ruleFileStream, std::set &emitted); diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index ebb6fe4..adfb757 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -48,7 +48,7 @@ public: cmMakefile *, bool optional); /** - * Try running cmake and building a file. This is used for dynalically + * Try running cmake and building a file. This is used for dynamically * loaded commands, not as part of the usual build process. */ virtual std::string GenerateBuildCommand(const char* makeProgram, diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 3d96f01..7fe5d93 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -25,7 +25,7 @@ class cmCustomCommand; * \brief Create required build files for a directory. * * Subclasses of this abstract class generate makefiles, DSP, etc for various - * platforms. This class should never be constructued directly. A + * platforms. This class should never be constructed directly. A * GlobalGenerator will create it and invoke the appropriate commands on it. */ class cmLocalGenerator @@ -90,7 +90,7 @@ public: void SetGlobalGenerator(cmGlobalGenerator *gg); /** - * Convert something to something else. This is a centralized coversion + * Convert something to something else. This is a centralized conversion * routine used by the generators to handle relative paths and the like. * The flags determine what is actually done. * diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h index 1fd1aa7..fab98da 100644 --- a/Source/cmLocalUnixMakefileGenerator3.h +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -161,7 +161,7 @@ public: // used in writing out Cmake files such as WriteDirectoryInformation static void WriteCMakeArgument(std::ostream& os, const char* s); - /** creates the common disclainer text at the top of each makefile */ + /** creates the common disclaimer text at the top of each makefile */ void WriteDisclaimer(std::ostream& os); // write a comment line #====... in the stream diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 05699da..d691f46 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2881,7 +2881,7 @@ int cmake::CheckBuildSystem() return 1; } - // Find find the newest dependency. + // Find the newest dependency. std::vector::iterator dep = depends.begin(); std::string dep_newest = *dep++; for(;dep != depends.end(); ++dep) @@ -2907,7 +2907,7 @@ int cmake::CheckBuildSystem() } } - // Find find the oldest output. + // Find the oldest output. std::vector::iterator out = outputs.begin(); std::string out_oldest = *out++; for(;out != outputs.end(); ++out) -- cgit v0.12 From dd13ecd00528b8d8041145e278cb7590d943f9de Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Sun, 20 Mar 2011 12:16:43 +0100 Subject: Doxygen: Improve code documentation. --- Source/cmLocalGenerator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 7fe5d93..0c5b9d0 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -143,6 +143,7 @@ public: void AddSharedFlags(std::string& flags, const char* lang, bool shared); void AddConfigVariableFlags(std::string& flags, const char* var, const char* config); + ///! Append flags to a string. virtual void AppendFlags(std::string& flags, const char* newFlags); ///! Get the include flags for the current makefile and language const char* GetIncludeFlags(const char* lang, -- cgit v0.12 From faede37b79ef0c4dee9cce67ab57499ddf46b47f Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Sun, 20 Mar 2011 13:41:06 +0100 Subject: Doxygen: Generate call graph and relationships. It helps code browsing and understanding for new developers. --- Utilities/Doxygen/doxyfile.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Utilities/Doxygen/doxyfile.in b/Utilities/Doxygen/doxyfile.in index c3d3a38..9743af7 100644 --- a/Utilities/Doxygen/doxyfile.in +++ b/Utilities/Doxygen/doxyfile.in @@ -28,6 +28,8 @@ INCLUDED_BY_GRAPH = YES CLASS_DIAGRAMS = YES GENERATE_LEGEND = YES GRAPHICAL_HIERARCHY = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES ALLEXTERNALS = NO @@ -61,7 +63,7 @@ SORT_MEMBER_DOCS = NO DISTRIBUTE_GROUP_DOC = YES TAB_SIZE = 3 -FILE_PATTERNS = *.h *.hxx +FILE_PATTERNS = *.h *.hxx *.cxx RECURSIVE = NO EXCLUDE_PATTERNS = -- cgit v0.12 From a92f14f3386e8dee055fe0c3eb624bfb833ee350 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Sun, 20 Mar 2011 14:22:39 +0100 Subject: Doxygen: Fix warnings. --- Source/CPack/cmCPackNSISGenerator.h | 2 +- Source/CTest/cmCTestLaunch.h | 2 +- Source/CTest/cmCTestSubmitHandler.h | 4 +++- Source/cmCommandArgumentLexer.cxx | 8 ++++---- Source/cmDependsFortranLexer.cxx | 8 ++++---- Source/cmDependsJavaLexer.cxx | 6 +++--- Source/cmDocumentationFormatter.h | 2 +- Source/cmExprLexer.cxx | 5 ++--- Source/cmGlobalKdevelopGenerator.h | 4 ++-- Source/cmGlobalUnixMakefileGenerator3.h | 2 +- Source/cmMakefile.h | 4 ++-- 11 files changed, 24 insertions(+), 23 deletions(-) diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h index dde1bbb..7bccb89 100644 --- a/Source/CPack/cmCPackNSISGenerator.h +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -72,7 +72,7 @@ protected: CreateComponentGroupDescription(cmCPackComponentGroup *group, cmOStringStream& macrosOut); - /// Translations any newlines found in the string into \r\n, so that the + /// Translations any newlines found in the string into \\r\\n, so that the /// resulting string can be used within NSIS. static std::string TranslateNewlines(std::string str); }; diff --git a/Source/CTest/cmCTestLaunch.h b/Source/CTest/cmCTestLaunch.h index cd876d0..7457e83 100644 --- a/Source/CTest/cmCTestLaunch.h +++ b/Source/CTest/cmCTestLaunch.h @@ -24,7 +24,7 @@ class cmCTestLaunch { public: /** Entry point from ctest executable main(). */ - static int Main(int argc, const char* const* argv); + static int Main(int argc, const char* const argv[]); private: // Initialize the launcher from its command line. cmCTestLaunch(int argc, const char* const* argv); diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index 9cfd7df..14eac80 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -75,7 +75,9 @@ private: const cmStdString& remoteprefix, const cmStdString& url); - void ParseResponse(std::vector); + typedef std::vector cmCTestSubmitHandlerVectorOfChar; + + void ParseResponse(cmCTestSubmitHandlerVectorOfChar chunk); std::string GetSubmitResultsPrefix(); diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx index 89819ce..1d7140b 100644 --- a/Source/cmCommandArgumentLexer.cxx +++ b/Source/cmCommandArgumentLexer.cxx @@ -1672,9 +1672,9 @@ YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char * yystr , yyscan_ } /** Setup the input buffer state to scan the given bytes. The next call to cmCommandArgument_yylex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * scan from a @e copy of @a yybytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ @@ -1835,7 +1835,7 @@ void cmCommandArgument_yyset_lineno (int line_number , yyscan_t yyscanner) } /** Set the current column. - * @param line_number + * @param column_no * @param yyscanner The scanner object. */ void cmCommandArgument_yyset_column (int column_no , yyscan_t yyscanner) diff --git a/Source/cmDependsFortranLexer.cxx b/Source/cmDependsFortranLexer.cxx index a488884..438af2d 100644 --- a/Source/cmDependsFortranLexer.cxx +++ b/Source/cmDependsFortranLexer.cxx @@ -1991,9 +1991,9 @@ YY_BUFFER_STATE cmDependsFortran_yy_scan_string (yyconst char * yystr , yyscan_t } /** Setup the input buffer state to scan the given bytes. The next call to cmDependsFortran_yylex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * scan from a @e copy of @a yybytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ @@ -2154,7 +2154,7 @@ void cmDependsFortran_yyset_lineno (int line_number , yyscan_t yyscanner) } /** Set the current column. - * @param line_number + * @param column_no * @param yyscanner The scanner object. */ void cmDependsFortran_yyset_column (int column_no , yyscan_t yyscanner) diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx index e4487f8..63cfebc 100644 --- a/Source/cmDependsJavaLexer.cxx +++ b/Source/cmDependsJavaLexer.cxx @@ -2168,8 +2168,8 @@ YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char * base, yy_size_t size , yy } /** Setup the input buffer state to scan a string. The next call to cmDependsJava_yylex() will - * scan from a @e copy of @a str. - * @param str a NUL-terminated string to scan + * scan from a @e copy of @a yy_str. + * @param yy_str a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use @@ -2345,7 +2345,7 @@ void cmDependsJava_yyset_lineno (int line_number , yyscan_t yyscanner) } /** Set the current column. - * @param line_number + * @param column_no * @param yyscanner The scanner object. */ void cmDependsJava_yyset_column (int column_no , yyscan_t yyscanner) diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index 1dcff1a..665b9b6 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -60,7 +60,7 @@ public: std::vector&) {} - /** Compute a prefix for links into a section (#_SOMETHING). */ + /** Compute a prefix for links into a section (#\_SOMETHING). */ std::string ComputeSectionLinkPrefix(std::string const& name); }; diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx index cd0530d..53dfca7 100644 --- a/Source/cmExprLexer.cxx +++ b/Source/cmExprLexer.cxx @@ -1554,8 +1554,7 @@ YY_BUFFER_STATE cmExpr_yy_scan_buffer (char * base, yy_size_t size , yyscan_t } /** Setup the input buffer state to scan a string. The next call to cmExpr_yylex() will - * scan from a @e copy of @a str. - * @param str a NUL-terminated string to scan + * scan from a @e copy of @a yy_str. * @param yy_str a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. @@ -1732,7 +1731,7 @@ void cmExpr_yyset_lineno (int line_number , yyscan_t yyscanner) } /** Set the current column. - * @param line_number + * @param column_no * @param yyscanner The scanner object. */ void cmExpr_yyset_column (int column_no , yyscan_t yyscanner) diff --git a/Source/cmGlobalKdevelopGenerator.h b/Source/cmGlobalKdevelopGenerator.h index f276943..a1ad39d 100644 --- a/Source/cmGlobalKdevelopGenerator.h +++ b/Source/cmGlobalKdevelopGenerator.h @@ -23,8 +23,8 @@ class cmLocalGenerator; * cmGlobalKdevelopGenerator produces a project file for KDevelop 3 (KDevelop * > 3.1.1). The project is based on the "Custom Makefile based C/C++" * project of KDevelop. Such a project consists of Unix Makefiles in the - * build directory together with a .kdevelop project file, - * which contains the project settings and a .kdevelop.filelist + * build directory together with a \.kdevelop project file, + * which contains the project settings and a \.kdevelop.filelist * file, which lists the source files relative to the kdevelop project * directory. The kdevelop project directory is the base source directory. */ diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 7566afa..9663b55 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -36,7 +36,7 @@ class cmLocalUnixMakefileGenerator3; targets that are required to make the process work. Makefile2 in turn will recursively make targets in the correct order. Each - target has its own directory .dir and its own makefile build.make in + target has its own directory \.dir and its own makefile build.make in that directory. Also in that directory is a couple makefiles per source file used by the target. Typically these are named source.obj.build.make and source.obj.build.depend.make. The source.obj.build.make contains the rules diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index c80d4cc..7c3e4ee 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -668,7 +668,7 @@ public: * Expand all defined variables in the string. * Defined variables come from the this->Definitions map. * They are expanded with ${var} where var is the - * entry in the this->Definitions map. Also @var@ is + * entry in the this->Definitions map. Also \@var\@ is * expanded to match autoconf style expansions. */ const char *ExpandVariablesInString(std::string& source); @@ -682,7 +682,7 @@ public: /** * Remove any remaining variables in the string. Anything with ${var} or - * @var@ will be removed. + * \@var\@ will be removed. */ void RemoveVariablesInString(std::string& source, bool atOnly = false) const; -- cgit v0.12 From 6be15ed58b463b61c0ae99ccc960932c202d8605 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Fri, 25 Mar 2011 14:06:43 +0100 Subject: Doxygen: Remove dependency on VTK when building doxygen. --- Utilities/Doxygen/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt index 5d076e0..2430391 100644 --- a/Utilities/Doxygen/CMakeLists.txt +++ b/Utilities/Doxygen/CMakeLists.txt @@ -17,8 +17,6 @@ INCLUDE (${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL) IF (BUILD_DOCUMENTATION) - INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake) - # # Configure the script and the doxyfile, then add target # -- cgit v0.12 From 1b612caafe6ffb8804fb8deac6cf877a9e7c5565 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Wed, 12 Oct 2011 15:39:46 +0200 Subject: Usage: Document -j|--parallel option in help message. --- Source/ctest.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/ctest.cxx b/Source/ctest.cxx index cc11686..e168fb8 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -68,6 +68,10 @@ static const char * cmDocumentationOptions[][3] = {"-F", "Enable failover.", "This option allows ctest to resume a test " "set execution that was previously interrupted. If no interruption " "occurred, the -F option will have no effect."}, + {"-j , --parallel ", "Run the tests in parallel using the" + "given number of jobs.", + "This option tells ctest to run the tests in parallel using given " + "number of jobs."}, {"-Q,--quiet", "Make ctest quiet.", "This option will suppress all the output. The output log file will " "still be generated if the --output-log is specified. Options such " -- cgit v0.12 From 3353d84c14c5421bf4a6a1b013652b1f6c6917df Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Wed, 12 Oct 2011 15:52:20 +0200 Subject: Usage: Document all options printing usage information. --- Source/cmDocumentation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 5e56b29..ef53d4a 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -21,7 +21,7 @@ static const char *cmDocumentationStandardOptions[][3] = { {"--copyright [file]", "Print the CMake copyright and exit.", "If a file is specified, the copyright is written into it."}, - {"--help", "Print usage information and exit.", + {"--help,-help,-usage,-h,-H,/?", "Print usage information and exit.", "Usage describes the basic command line interface and its options."}, {"--help-full [file]", "Print full help and exit.", "Full help displays most of the documentation provided by the UNIX " -- cgit v0.12 From 9ae0604a623edba6f7e9598c66ae77b30adfccd5 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Wed, 12 Oct 2011 15:57:22 +0200 Subject: Usage: Document all options printing the version number. --- Source/cmDocumentation.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index ef53d4a..07683d0 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -34,7 +34,8 @@ static const char *cmDocumentationStandardOptions[][3] = {"--help-man [file]", "Print full help as a UNIX man page and exit.", "This option is used by the cmake build to generate the UNIX man page. " "If a file is specified, the help is written into it."}, - {"--version [file]", "Show program name/version banner and exit.", + {"--version,-version,/V [file]", + "Show program name/version banner and exit.", "If a file is specified, the version is written into it."}, {0,0,0} }; -- cgit v0.12 From de512644d8b6c79b348e13e4affa25627040c597 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Wed, 12 Oct 2011 16:24:04 +0200 Subject: Usage: Print help, version and copyright options in usage information. There were missing for ctest, cpack and ccmake. --- Source/CPack/cpack.cxx | 2 +- Source/CursesDialog/ccmake.cxx | 2 +- Source/ctest.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 71ba118..b1706e3 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -448,7 +448,7 @@ int main (int argc, char *argv[]) doc.SetSection("Name",cmDocumentationName); doc.SetSection("Usage",cmDocumentationUsage); doc.SetSection("Description",cmDocumentationDescription); - doc.SetSection("Options",cmDocumentationOptions); + doc.PrependSection("Options",cmDocumentationOptions); std::vector v; cmCPackGeneratorFactory::DescriptionsMap::const_iterator generatorIt; diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 7cf1071..b1a72af 100644 --- a/Source/CursesDialog/ccmake.cxx +++ b/Source/CursesDialog/ccmake.cxx @@ -116,7 +116,7 @@ int main(int argc, char** argv) doc.SetSection("Usage",cmDocumentationUsage); doc.SetSection("Description",cmDocumentationDescription); doc.SetSection("Generators",generators); - doc.SetSection("Options",cmDocumentationOptions); + doc.PrependSection("Options",cmDocumentationOptions); doc.SetSection("Command",commands); doc.SetSection("Compatibility Commands",compatCommands); doc.SetSeeAlsoList(cmDocumentationSeeAlso); diff --git a/Source/ctest.cxx b/Source/ctest.cxx index e168fb8..85cecea 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -305,7 +305,7 @@ int main (int argc, char *argv[]) doc.SetSection("Name",cmDocumentationName); doc.SetSection("Usage",cmDocumentationUsage); doc.SetSection("Description",cmDocumentationDescription); - doc.SetSection("Options",cmDocumentationOptions); + doc.PrependSection("Options",cmDocumentationOptions); doc.SetSection("Commands",commands); doc.SetSeeAlsoList(cmDocumentationSeeAlso); #ifdef cout -- cgit v0.12 From bfb0ed4293c3a25c47d2fef7b9f19c25b8f5a477 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Wed, 12 Oct 2011 16:28:03 +0200 Subject: Usage: Add missing exepath argument in get_prerequisites documentation. --- Modules/GetPrerequisites.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 023b8b5..2efa079 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -24,7 +24,7 @@ # PARENT_SCOPE. # # GET_PREREQUISITES( -# ) +# ) # Get the list of shared library files required by . The list in # the variable named should be empty on first entry to # this function. On exit, will contain the list of -- cgit v0.12 From fd63219557c4acc6e474263302ab9c78985f6d91 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Fri, 7 Jan 2011 14:48:35 +0100 Subject: ccmake: Align 'g' and 'q' key instructions. They were miss-aligned with the 'enter' key instruction. Before: ---- Press [enter] to edit option CMake Version 2.8.3.20110107-g4b05a-dirty Press [c] to configure Press [h] for help Press [q] to quit without generating ---- After: ---- Press [enter] to edit option CMake Version 2.8.3.20110107-g4b05a-dirty Press [c] to configure Press [h] for help Press [q] to quit without generating ---- --- Source/CursesDialog/cmCursesMainForm.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 17fa0ff..faaac8b 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -421,7 +421,7 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) if (this->OkToGenerate) { sprintf(firstLine, - "Press [c] to configure Press [g] to generate and exit"); + "Press [c] to configure Press [g] to generate and exit"); } else { @@ -437,7 +437,8 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) } sprintf(secondLine, - "Press [h] for help Press [q] to quit without generating"); + "Press [h] for help " + "Press [q] to quit without generating"); } curses_move(y-4,0); -- cgit v0.12 From 19da10629d96333b2cdae8c0fa926a354fc9d79e Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Fri, 7 Jan 2011 16:34:27 +0100 Subject: ccmake: Document '/' key. --- Source/CursesDialog/cmCursesMainForm.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index faaac8b..735854d 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -1302,6 +1302,5 @@ const char* cmCursesMainForm::s_ConstHelpMessage = " g : generate build files and exit, only available when there are no " "new options and no errors have been detected during last configuration.\n" " l : shows last errors\n" -" t : toggles advanced mode. In normal mode, only the most important options are shown. In advanced mode, all options are shown. We recommend using normal mode unless you are an expert.\n"; - - +" t : toggles advanced mode. In normal mode, only the most important options are shown. In advanced mode, all options are shown. We recommend using normal mode unless you are an expert.\n" +" / : search for a variable name.\n"; -- cgit v0.12 From ceff6ec5254bbee898ac6a193624dba5ccf18e56 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Fri, 7 Jan 2011 14:57:46 +0100 Subject: ccmake: Factor toggle key help instructions. --- Source/CursesDialog/cmCursesMainForm.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 735854d..6c7627f 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -427,15 +427,13 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) { sprintf(firstLine, "Press [c] to configure "); } - if (this->AdvancedMode) - { - sprintf(thirdLine, "Press [t] to toggle advanced mode (Currently On)"); - } - else - { - sprintf(thirdLine, "Press [t] to toggle advanced mode (Currently Off)"); - } - + { + const char* toggleKeyInstruction = + "Press [t] to toggle advanced mode (Currently %s)"; + sprintf(thirdLine, + toggleKeyInstruction, + this->AdvancedMode ? "On" : "Off"); + } sprintf(secondLine, "Press [h] for help " "Press [q] to quit without generating"); -- cgit v0.12