diff options
author | Ken Martin <ken.martin@kitware.com> | 2006-05-10 18:15:15 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2006-05-10 18:15:15 (GMT) |
commit | d77fbb9640900294e5a32305188c89a3e70e6cc5 (patch) | |
tree | 50d36cc5b6773d2172a749135a8b3ee1e803c64e | |
parent | 20c27063ddbf22b5a90d27a2d45bd1b3d140e532 (diff) | |
download | CMake-d77fbb9640900294e5a32305188c89a3e70e6cc5.zip CMake-d77fbb9640900294e5a32305188c89a3e70e6cc5.tar.gz CMake-d77fbb9640900294e5a32305188c89a3e70e6cc5.tar.bz2 |
STYLE: fix line length
-rw-r--r-- | Source/cmCommandArgumentParser.cxx | 21 | ||||
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 35 | ||||
-rw-r--r-- | Source/cmCommandArgumentParserTokens.h | 5 | ||||
-rw-r--r-- | Source/cmConfigureFileCommand.cxx | 3 | ||||
-rw-r--r-- | Source/cmCreateTestSourceList.h | 14 | ||||
-rw-r--r-- | Source/cmDepends.cxx | 3 |
6 files changed, 38 insertions, 43 deletions
diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx index 8fa88d1..1f219dd 100644 --- a/Source/cmCommandArgumentParser.cxx +++ b/Source/cmCommandArgumentParser.cxx @@ -1,7 +1,8 @@ /* A Bison parser, made by GNU Bison 2.1. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, + 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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 @@ -118,7 +119,9 @@ This file must be translated to C and modified to build everywhere. Run bison like this: - bison --yacc --name-prefix=cmCommandArgument_yy --defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx cmCommandArgumentParser.y + bison --yacc --name-prefix=cmCommandArgument_yy + --defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx + cmCommandArgumentParser.y Modify cmCommandArgumentParser.cxx: - remove TABs @@ -162,7 +165,8 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message); #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 @@ -1287,8 +1291,10 @@ yyreduce: case 15: #line 166 "cmCommandArgumentParser.y" { - (yyval.str) = yyGetParser->ExpandSpecialVariable((yyvsp[-2].str),(yyvsp[-1].str)); - //std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "] [" << $<str>3 << "]" << std::endl; + (yyval.str) = + yyGetParser->ExpandSpecialVariable((yyvsp[-2].str),(yyvsp[-1].str)); + //std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "] + //[" << $<str>3 << "]" << std::endl; } break; @@ -1296,7 +1302,8 @@ yyreduce: #line 172 "cmCommandArgumentParser.y" { (yyval.str) = yyGetParser->ExpandVariable((yyvsp[-1].str)); - //std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "] [" << $<str>3 << "]" << std::endl; + //std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "] + //[" << $<str>3 << "]" << std::endl; } break; diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 570cc2d..51a4d3a 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -63,7 +63,8 @@ char* cmCommandArgumentParserHelper::AddString(const char* str) return stVal; } -char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, const char* var) +char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, + const char* var) { if ( !key ) { @@ -85,7 +86,8 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, cons } return this->EmptyVariable; } - cmSystemTools::Error("Key ", key, " is not used yet. For now only $ENV{..} is allowed"); + cmSystemTools::Error("Key ", key, + " is not used yet. For now only $ENV{..} is allowed"); return 0; } @@ -131,8 +133,8 @@ char* cmCommandArgumentParserHelper::CombineUnions(char* in1, char* in2) return out; } -void cmCommandArgumentParserHelper::AllocateParserType(cmCommandArgumentParserHelper::ParserType* pt, - const char* str, int len) +void cmCommandArgumentParserHelper::AllocateParserType +(cmCommandArgumentParserHelper::ParserType* pt,const char* str, int len) { pt->str = 0; if ( len == 0 ) @@ -147,10 +149,10 @@ void cmCommandArgumentParserHelper::AllocateParserType(cmCommandArgumentParserHe strncpy(pt->str, str, len); pt->str[len] = 0; this->Variables.push_back(pt->str); - // std::cout << (void*) pt->str << " " << pt->str << " JPAllocateParserType" << std::endl; } -bool cmCommandArgumentParserHelper::HandleEscapeSymbol(cmCommandArgumentParserHelper::ParserType* pt, char symbol) +bool cmCommandArgumentParserHelper::HandleEscapeSymbol +(cmCommandArgumentParserHelper::ParserType* pt, char symbol) { if ( this->NoEscapeMode ) { @@ -204,8 +206,6 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb) { return 0; } - //printf("Do some parsing: %s\n", str); - this->Verbose = verb; this->InputBuffer = str; this->InputBufferPos = 0; @@ -220,8 +220,6 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb) cmCommandArgument_yylex_destroy(yyscanner); if ( res != 0 ) { - //str << "CAL_Parser returned: " << res << std::endl; - //std::cerr << "When parsing: [" << str << "]" << std::endl; return 0; } @@ -229,7 +227,8 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb) if ( Verbose ) { - std::cerr << "Expanding [" << str << "] produced: [" << this->Result.c_str() << "]" << std::endl; + std::cerr << "Expanding [" << str << "] produced: [" + << this->Result.c_str() << "]" << std::endl; } return 1; } @@ -248,9 +247,6 @@ void cmCommandArgumentParserHelper::CleanupParser() int cmCommandArgumentParserHelper::LexInput(char* buf, int maxlen) { - //std::cout << "JPLexInput "; - //std::cout.write(buf, maxlen); - //std::cout << std::endl; if ( maxlen < 1 ) { return 0; @@ -274,19 +270,8 @@ int cmCommandArgumentParserHelper::LexInput(char* buf, int maxlen) void cmCommandArgumentParserHelper::Error(const char* str) { unsigned long pos = static_cast<unsigned long>(this->InputBufferPos); - //fprintf(stderr, "Argument Parser Error: %s (%lu / Line: %d)\n", str, pos, this->CurrentLine); cmOStringStream ostr; ostr << str << " (" << pos << ")"; - /* - int cc; - std::cerr << "String: ["; - for ( cc = 0; cc < 30 && *(this->InputBuffer.c_str() + this->InputBufferPos + cc); - cc ++ ) - { - std::cerr << *(this->InputBuffer.c_str() + this->InputBufferPos + cc); - } - std::cerr << "]" << std::endl; - */ this->ErrorString = ostr.str(); } diff --git a/Source/cmCommandArgumentParserTokens.h b/Source/cmCommandArgumentParserTokens.h index 377b6a2..c14b766 100644 --- a/Source/cmCommandArgumentParserTokens.h +++ b/Source/cmCommandArgumentParserTokens.h @@ -1,7 +1,8 @@ /* A Bison parser, made by GNU Bison 2.1. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, + 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index b382f86..ccfe3d4 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -30,7 +30,8 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args) this->OuputFile = args[1]; if ( !this->Makefile->CanIWriteThisFile(this->OuputFile.c_str()) ) { - std::string e = "attempted to configure a file: " + this->OuputFile + " into a source directory."; + std::string e = "attempted to configure a file: " + this->OuputFile + + " into a source directory."; this->SetError(e.c_str()); cmSystemTools::SetFatalErrorOccured(); return false; diff --git a/Source/cmCreateTestSourceList.h b/Source/cmCreateTestSourceList.h index efee5f3..b484c08 100644 --- a/Source/cmCreateTestSourceList.h +++ b/Source/cmCreateTestSourceList.h @@ -72,13 +72,13 @@ public: "DriverName is the name of the test driver program. The rest of " "the arguments consist of a list of test source files, can be " "semicolon separated. Each test source file should have a function in " - "it that is the same name as the file with no extension (foo.cxx should " - "have int foo();) DriverName will be able to call each of the tests by " - "name on the command line. If EXTRA_INCLUDE is specified, then the " - "next argument is included into the generated file. If FUNCTION is " - "specified, then the next argument is taken as a function name that " - "is passed a pointer to ac and av. This can be used to add extra " - "command line processing to each test. The cmake variable " + "it that is the same name as the file with no extension (foo.cxx " + "should have int foo();) DriverName will be able to call each of the " + "tests by name on the command line. If EXTRA_INCLUDE is specified, " + "then the next argument is included into the generated file. If " + "FUNCTION is specified, then the next argument is taken as a function " + "name that is passed a pointer to ac and av. This can be used to add " + "extra command line processing to each test. The cmake variable " "CMAKE_TESTDRIVER_BEFORE_TESTMAIN can be set to have code that will be " "placed directly before calling the test main function. " "CMAKE_TESTDRIVER_AFTER_TESTMAIN can be set to have code that will be " diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index 7ea0e7e..f6d577c 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -105,7 +105,8 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends) bool okay = true; while(internalDepends.getline(this->Dependee, this->MaxPath)) { - if ( this->Dependee[0] == 0 || this->Dependee[0] == '#' || this->Dependee[0] == '\r' ) + if ( this->Dependee[0] == 0 || this->Dependee[0] == '#' || + this->Dependee[0] == '\r' ) { continue; } |