From 000bce884dacc774ef50a76714bc1e7d2687a90a Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Mon, 15 May 2006 10:19:57 -0400 Subject: STYLE: fix line length --- Source/cmDependsFortranParser.h | 7 ++- Source/cmDependsJavaParser.cxx | 14 ++++-- Source/cmExprParser.cxx | 4 +- Source/cmLocalUnixMakefileGenerator3.cxx | 85 ++++++++++++++++++-------------- Source/cmQTWrapCPPCommand.h | 3 +- 5 files changed, 66 insertions(+), 47 deletions(-) diff --git a/Source/cmDependsFortranParser.h b/Source/cmDependsFortranParser.h index 468682f..362c5d8 100644 --- a/Source/cmDependsFortranParser.h +++ b/Source/cmDependsFortranParser.h @@ -69,17 +69,20 @@ union cmDependsFortran_yystype_u /* Setup the proper yylex interface. */ #define YY_EXTRA_TYPE cmDependsFortranParser* -#define YY_DECL int cmDependsFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner) +#define YY_DECL \ +int cmDependsFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner) #define YYSTYPE cmDependsFortran_yystype #define YYSTYPE_IS_DECLARED 1 #if !defined(cmDependsFortranLexer_cxx) # include "cmDependsFortranLexer.h" #endif -#if !defined(cmDependsFortranLexer_cxx) && !defined(cmDependsFortranParser_cxx) +#if !defined(cmDependsFortranLexer_cxx) +#if !defined(cmDependsFortranParser_cxx) # undef YY_EXTRA_TYPE # undef YY_DECL # undef YYSTYPE # undef YYSTYPE_IS_DECLARED #endif +#endif #endif diff --git a/Source/cmDependsJavaParser.cxx b/Source/cmDependsJavaParser.cxx index fd4bb2f..2b1690c 100644 --- a/Source/cmDependsJavaParser.cxx +++ b/Source/cmDependsJavaParser.cxx @@ -1,7 +1,7 @@ /* A Bison parser, made by GNU Bison 1.875d. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, + 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -299,7 +299,9 @@ This file must be translated to C and modified to build everywhere. Run bison like this: - bison --yacc --name-prefix=cmDependsJava_yy --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx cmDependsJavaParser.y + bison --yacc --name-prefix=cmDependsJava_yy + --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx + cmDependsJavaParser.y Modify cmDependsJavaParser.c: - remove TABs @@ -331,14 +333,16 @@ static void cmDependsJavaError(yyscan_t yyscanner, const char* message); #define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp); #define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval) -#define jpStoreClass(str) yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str)) +#define jpStoreClass(str) \ +yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str)) /* Disable some warnings in the generated code. */ #ifdef __BORLANDC__ # pragma warn -8004 /* Variable assigned a value that is not used. */ #endif #ifdef _MSC_VER # pragma warning (disable: 4102) /* Unused goto label. */ -# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ +# pragma warning (disable: 4065) /* Switch statement contains default but + no case. */ #endif diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx index a389c7c..e973d1c 100644 --- a/Source/cmExprParser.cxx +++ b/Source/cmExprParser.cxx @@ -1,7 +1,7 @@ /* A Bison parser, made by GNU Bison 1.875d. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, + 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 165c997..66a69b5 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -111,12 +111,14 @@ void cmLocalUnixMakefileGenerator3::Generate() void cmLocalUnixMakefileGenerator3::ConfigureOutputPaths() { // Format the library and executable output paths. - if(const char* libOut = this->Makefile->GetDefinition("LIBRARY_OUTPUT_PATH")) + if(const char* libOut = + this->Makefile->GetDefinition("LIBRARY_OUTPUT_PATH")) { this->LibraryOutputPath = libOut; this->FormatOutputPath(this->LibraryOutputPath, "LIBRARY"); } - if(const char* exeOut = this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH")) + if(const char* exeOut = + this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH")) { this->ExecutableOutputPath = exeOut; this->FormatOutputPath(this->ExecutableOutputPath, "EXECUTABLE"); @@ -144,9 +146,8 @@ void cmLocalUnixMakefileGenerator3::FormatOutputPath(std::string& path, // Convert the output path to a full path in case it is // specified as a relative path. Treat a relative path as // relative to the current output directory for this makefile. - path = - cmSystemTools::CollapseFullPath(path.c_str(), - this->Makefile->GetStartOutputDirectory()); + path = cmSystemTools::CollapseFullPath + (path.c_str(), this->Makefile->GetStartOutputDirectory()); // Add a trailing slash for easy appending later. if(path.empty() || path[path.size()-1] != '/') @@ -227,8 +228,8 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile() commands.push_back(this->GetRecursiveMakeCall (tgtMakefileName.c_str(),targetName.c_str())); this->CreateCDCommand(commands, - this->Makefile->GetHomeOutputDirectory(), - this->Makefile->GetStartOutputDirectory()); + this->Makefile->GetHomeOutputDirectory(), + this->Makefile->GetStartOutputDirectory()); } this->WriteMakeRule(ruleFileStream, "target for object file", @@ -342,7 +343,8 @@ void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile() // Store the include regular expressions for this directory. infoFileStream << "\n" - << "# The C and CXX include file regular expressions for this directory.\n"; + << "# The C and CXX include file regular expressions for " + << "this directory.\n"; infoFileStream << "SET(CMAKE_C_INCLUDE_REGEX_SCAN "; this->WriteCMakeArgument(infoFileStream, @@ -358,8 +360,9 @@ void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile() infoFileStream << "SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})\n"; infoFileStream - << "SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})\n"; - + << "SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN " + "${CMAKE_C_INCLUDE_REGEX_COMPLAIN})\n"; + // Store the set of available generated files. infoFileStream << "\n" @@ -579,7 +582,8 @@ cmLocalUnixMakefileGenerator3 std::vector commands; std::vector no_depends; commands.clear(); - if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) || (this->ForceVerboseMakefiles)) + if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) + || (this->ForceVerboseMakefiles)) { makefileStream << "# Produce verbose output by default.\n" @@ -601,21 +605,20 @@ cmLocalUnixMakefileGenerator3 // Special target to cleanup operation of make tool. std::vector depends; - this->WriteMakeRule(makefileStream, - "Disable implicit rules so canoncical targets will work.", - ".SUFFIXES", - depends, - commands, false); + this->WriteMakeRule + (makefileStream, + "Disable implicit rules so canoncical targets will work.", + ".SUFFIXES", + depends, commands, false); + // Add a fake suffix to keep HP happy. Must be max 32 chars for SGI make. depends.push_back(".hpux_make_needs_suffix_list"); this->WriteMakeRule(makefileStream, 0, ".SUFFIXES", depends, commands, false); - } //---------------------------------------------------------------------------- -void -cmLocalUnixMakefileGenerator3 +void cmLocalUnixMakefileGenerator3 ::WriteSpecialTargetsBottom(std::ostream& makefileStream) { this->WriteDivider(makefileStream); @@ -655,7 +658,6 @@ cmLocalUnixMakefileGenerator3 } std::vector no_commands; - } @@ -703,7 +705,8 @@ cmLocalUnixMakefileGenerator3 { // Add a dependency on the rule file itself unless an option to skip // it is specifically enabled by the user or project. - const char* nodep = this->Makefile->GetDefinition("CMAKE_SKIP_RULE_DEPENDENCY"); + const char* nodep = + this->Makefile->GetDefinition("CMAKE_SKIP_RULE_DEPENDENCY"); if(!nodep || cmSystemTools::IsOff(nodep)) { depends.push_back(ruleFileName); @@ -733,8 +736,8 @@ cmLocalUnixMakefileGenerator3 d != cc.GetDepends().end(); ++d) { // Lookup the real name of the dependency in case it is a CMake target. - std::string dep = this->GetRealDependency(d->c_str(), - this->ConfigurationName.c_str()); + std::string dep = this->GetRealDependency + (d->c_str(), this->ConfigurationName.c_str()); depends.push_back(dep); } } @@ -941,9 +944,9 @@ cmLocalUnixMakefileGenerator3::AppendEcho(std::vector& commands, } //---------------------------------------------------------------------------- -// take a tgt path and convert it into a make target, it could be full, or relative -std::string -cmLocalUnixMakefileGenerator3 +//take a tgt path and convert it into a make target, it could be full, or +//relative +std::string cmLocalUnixMakefileGenerator3 ::ConvertToMakeTarget(const char* tgt) { // Make targets should not have a leading './' for a file in the @@ -1051,7 +1054,8 @@ cmLocalUnixMakefileGenerator3 // see if the variable has been defined before and return // the modified version of the variable - std::map::iterator i = this->MakeVariableMap.find(unmodified); + std::map::iterator i = + this->MakeVariableMap.find(unmodified); if(i != this->MakeVariableMap.end()) { return i->second; @@ -1125,9 +1129,9 @@ bool cmLocalUnixMakefileGenerator3 ::ScanDependencies(std::vector const& args) { - // Format of arguments is: - // $(CMAKE_COMMAND), cmake_depends, GeneratorName, home_output_dir, start_output_dir, info file - // The caller has ensured that all required arguments exist. + // Format of arguments is: $(CMAKE_COMMAND), cmake_depends, + // GeneratorName, home_output_dir, start_output_dir, info file The + // caller has ensured that all required arguments exist. // The info file for this target std::string const& infoFile = args[5]; @@ -1190,7 +1194,8 @@ cmLocalUnixMakefileGenerator3 } std::string internalRuleFileNameFull = dir; internalRuleFileNameFull += "/depend.internal"; - cmGeneratedFileStream internalRuleFileStream(internalRuleFileNameFull.c_str()); + cmGeneratedFileStream + internalRuleFileStream(internalRuleFileNameFull.c_str()); internalRuleFileStream.SetCopyIfDifferent(true); if(!internalRuleFileStream) { @@ -1256,7 +1261,8 @@ cmLocalUnixMakefileGenerator3 std::string complainRegexVar = "CMAKE_"; complainRegexVar += lang; complainRegexVar += "_INCLUDE_REGEX_COMPLAIN"; - if(const char* complainRegex = mf->GetDefinition(complainRegexVar.c_str())) + if(const char* complainRegex = + mf->GetDefinition(complainRegexVar.c_str())) { includeRegexComplain = complainRegex; } @@ -1290,7 +1296,8 @@ cmLocalUnixMakefileGenerator3 if (scanner) { - scanner->SetFileComparison(this->GlobalGenerator->GetCMakeInstance()->GetFileComparison()); + scanner->SetFileComparison + (this->GlobalGenerator->GetCMakeInstance()->GetFileComparison()); // for each file we need to scan std::string srcLang = "CMAKE_DEPENDS_CHECK_"; srcLang += lang; @@ -1305,7 +1312,8 @@ cmLocalUnixMakefileGenerator3 // make sure the object file is relative to home output std::string obj = *si; obj = lg->Convert(obj.c_str(),HOME_OUTPUT,MAKEFILE); - scanner->Write(src.c_str(),obj.c_str(),ruleFileStream, internalRuleFileStream); + scanner->Write(src.c_str(),obj.c_str(), + ruleFileStream, internalRuleFileStream); } // free the scanner for this language @@ -1491,7 +1499,8 @@ void cmLocalUnixMakefileGenerator3::CheckDependencies(cmMakefile* mf, // For each info file run the check cmDependsC checker; checker.SetVerbose(verbose); - checker.SetFileComparison(this->GlobalGenerator->GetCMakeInstance()->GetFileComparison()); + checker.SetFileComparison + (this->GlobalGenerator->GetCMakeInstance()->GetFileComparison()); for(std::vector::iterator l = files.begin(); l != files.end(); ++l) { @@ -1619,7 +1628,8 @@ cmLocalUnixMakefileGenerator3 // Prepend the target directory. std::string obj; - const char* fileTargetDirectory = source.GetProperty("MACOSX_PACKAGE_LOCATION"); + const char* fileTargetDirectory = + source.GetProperty("MACOSX_PACKAGE_LOCATION"); if ( fileTargetDirectory ) { std::string targetName; @@ -1643,7 +1653,8 @@ cmLocalUnixMakefileGenerator3 // Framework not handled yet abort(); } - obj = cmSystemTools::RelativePath(this->Makefile->GetHomeOutputDirectory(), obj.c_str()); + obj = cmSystemTools::RelativePath + (this->Makefile->GetHomeOutputDirectory(), obj.c_str()); } else { diff --git a/Source/cmQTWrapCPPCommand.h b/Source/cmQTWrapCPPCommand.h index 6f3e95d..ad5740d 100644 --- a/Source/cmQTWrapCPPCommand.h +++ b/Source/cmQTWrapCPPCommand.h @@ -24,7 +24,8 @@ /** \class cmQTWrapCPPCommand * \brief Create moc file rules for QT classes * - * cmQTWrapCPPCommand is used to create wrappers for QT classes into normal C++ + * cmQTWrapCPPCommand is used to create wrappers for QT classes into + * normal C++ */ class cmQTWrapCPPCommand : public cmCommand { -- cgit v0.12