diff options
author | Brad King <brad.king@kitware.com> | 2016-05-06 18:30:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-09 13:41:43 (GMT) |
commit | 0ac18d40c8c29a17f1acfcaca506f41a26185901 (patch) | |
tree | 88b5d3c4b8c587d7979231d0e6ce9b03b0685a74 /Source/cmXMLParser.cxx | |
parent | d95fbdb70944a8f9a7e6ac11bc51f410a99aafcd (diff) | |
download | CMake-0ac18d40c8c29a17f1acfcaca506f41a26185901.zip CMake-0ac18d40c8c29a17f1acfcaca506f41a26185901.tar.gz CMake-0ac18d40c8c29a17f1acfcaca506f41a26185901.tar.bz2 |
Remove `//------...` horizontal separator comments
Modern editors provide plenty of ways to visually separate functions.
Drop the explicit comments that previously served this purpose.
Use the following command to automate the change:
$ git ls-files -z -- \
"*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" |
egrep -z -v "^Source/cmCommandArgumentLexer\." |
egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" |
egrep -z -v "^Source/cmDependsJavaLexer\." |
egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" |
egrep -z -v "^Source/cmExprLexer\." |
egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" |
egrep -z -v "^Source/cmFortranLexer\." |
egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" |
egrep -z -v "^Source/cmListFileLexer\." |
egrep -z -v "^Source/cm_sha2" |
egrep -z -v "^Source/(kwsys|CursesDialog/form)/" |
egrep -z -v "^Utilities/(KW|cm).*/" |
xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}'
This avoids modifying third-party sources and generated sources.
Diffstat (limited to 'Source/cmXMLParser.cxx')
-rw-r--r-- | Source/cmXMLParser.cxx | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx index 6a24faa..e2f7afa 100644 --- a/Source/cmXMLParser.cxx +++ b/Source/cmXMLParser.cxx @@ -16,7 +16,6 @@ #include <cm_expat.h> #include <ctype.h> -//---------------------------------------------------------------------------- cmXMLParser::cmXMLParser() { this->Parser = 0; @@ -25,7 +24,6 @@ cmXMLParser::cmXMLParser() this->ReportCallbackData = 0; } -//---------------------------------------------------------------------------- cmXMLParser::~cmXMLParser() { if ( this->Parser ) @@ -34,7 +32,6 @@ cmXMLParser::~cmXMLParser() } } -//---------------------------------------------------------------------------- int cmXMLParser::Parse(const char* string) { return (int)this->InitializeParser() && @@ -60,7 +57,6 @@ int cmXMLParser::ParseFile(const char* file) return this->Parse(str.str().c_str()); } -//---------------------------------------------------------------------------- int cmXMLParser::InitializeParser() { if ( this->Parser ) @@ -82,7 +78,6 @@ int cmXMLParser::InitializeParser() return 1; } -//---------------------------------------------------------------------------- int cmXMLParser::ParseChunk(const char* inputString, std::string::size_type length) { @@ -101,7 +96,6 @@ int cmXMLParser::ParseChunk(const char* inputString, return res; } -//---------------------------------------------------------------------------- int cmXMLParser::CleanupParser() { if ( !this->Parser ) @@ -128,7 +122,6 @@ int cmXMLParser::CleanupParser() return result; } -//---------------------------------------------------------------------------- int cmXMLParser::ParseBuffer(const char* buffer, std::string::size_type count) { // Pass the buffer to the expat XML parser. @@ -141,45 +134,38 @@ int cmXMLParser::ParseBuffer(const char* buffer, std::string::size_type count) return 1; } -//---------------------------------------------------------------------------- int cmXMLParser::ParseBuffer(const char* buffer) { return this->ParseBuffer(buffer, static_cast<int>(strlen(buffer))); } -//---------------------------------------------------------------------------- int cmXMLParser::ParsingComplete() { // Default behavior is to parse to end of stream. return 0; } -//---------------------------------------------------------------------------- void cmXMLParser::StartElement(const std::string& name, const char ** /*atts*/) { std::cout << "Start element: " << name << std::endl; } -//---------------------------------------------------------------------------- void cmXMLParser::EndElement(const std::string& name) { std::cout << "End element: " << name << std::endl; } -//---------------------------------------------------------------------------- void cmXMLParser::CharacterDataHandler(const char* /*inData*/, int /*inLength*/) { } -//---------------------------------------------------------------------------- int cmXMLParser::IsSpace(char c) { return isspace(c); } -//---------------------------------------------------------------------------- const char* cmXMLParser::FindAttribute(const char** atts, const char* attribute) { @@ -196,7 +182,6 @@ const char* cmXMLParser::FindAttribute(const char** atts, return 0; } -//---------------------------------------------------------------------------- void cmXMLParserStartElement(void* parser, const char *name, const char **atts) { @@ -206,7 +191,6 @@ void cmXMLParserStartElement(void* parser, const char *name, static_cast<cmXMLParser*>(parser)->StartElement(name, atts); } -//---------------------------------------------------------------------------- void cmXMLParserEndElement(void* parser, const char *name) { // End element handler that is registered with the XML_Parser. This @@ -214,7 +198,6 @@ void cmXMLParserEndElement(void* parser, const char *name) static_cast<cmXMLParser*>(parser)->EndElement(name); } -//---------------------------------------------------------------------------- void cmXMLParserCharacterDataHandler(void* parser, const char* data, int length) { @@ -224,7 +207,6 @@ void cmXMLParserCharacterDataHandler(void* parser, const char* data, static_cast<cmXMLParser*>(parser)->CharacterDataHandler(data, length); } -//---------------------------------------------------------------------------- void cmXMLParser::ReportXmlParseError() { XML_Parser parser = static_cast<XML_Parser>(this->Parser); @@ -233,7 +215,6 @@ void cmXMLParser::ReportXmlParseError() XML_ErrorString(XML_GetErrorCode(parser))); } -//---------------------------------------------------------------------------- void cmXMLParser::ReportError(int line, int, const char* msg) { if(this->ReportCallback) |