summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentationFormatterText.cxx
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:42:58 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:18:39 (GMT)
commit7bbaa4283de26864b2e55e819db0884771585467 (patch)
treeecb748dbe41a13d8bdea77acd0049cde999d933e /Source/cmDocumentationFormatterText.cxx
parentbe9db98946b7918f279812fd0616abb650eebed0 (diff)
downloadCMake-7bbaa4283de26864b2e55e819db0884771585467.zip
CMake-7bbaa4283de26864b2e55e819db0884771585467.tar.gz
CMake-7bbaa4283de26864b2e55e819db0884771585467.tar.bz2
Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
Diffstat (limited to 'Source/cmDocumentationFormatterText.cxx')
-rw-r--r--Source/cmDocumentationFormatterText.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmDocumentationFormatterText.cxx b/Source/cmDocumentationFormatterText.cxx
index 0b04b73..5def194 100644
--- a/Source/cmDocumentationFormatterText.cxx
+++ b/Source/cmDocumentationFormatterText.cxx
@@ -33,9 +33,9 @@ void cmDocumentationFormatterText
os << name << "\n\n";
}
- const std::vector<cmDocumentationEntry> &entries =
+ const std::vector<cmDocumentationEntry> &entries =
section.GetEntries();
- for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
+ for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
op != entries.end(); ++op)
{
if(op->Name.size())
@@ -58,7 +58,7 @@ void cmDocumentationFormatterText
}
}
-void cmDocumentationFormatterText::PrintPreformatted(std::ostream& os,
+void cmDocumentationFormatterText::PrintPreformatted(std::ostream& os,
const char* text)
{
bool newline = true;
@@ -78,7 +78,7 @@ void cmDocumentationFormatterText::PrintPreformatted(std::ostream& os,
os << "\n";
}
-void cmDocumentationFormatterText::PrintParagraph(std::ostream& os,
+void cmDocumentationFormatterText::PrintParagraph(std::ostream& os,
const char* text)
{
os << this->TextIndent;
@@ -91,7 +91,7 @@ void cmDocumentationFormatterText::SetIndent(const char* indent)
this->TextIndent = indent;
}
-void cmDocumentationFormatterText::PrintColumn(std::ostream& os,
+void cmDocumentationFormatterText::PrintColumn(std::ostream& os,
const char* text)
{
// Print text arranged in an indented column of fixed witdh.
@@ -100,14 +100,14 @@ void cmDocumentationFormatterText::PrintColumn(std::ostream& os,
bool newSentence = false;
bool firstLine = true;
int width = this->TextWidth - static_cast<int>(strlen(this->TextIndent));
-
+
// Loop until the end of the text.
while(*l)
{
// Parse the next word.
const char* r = l;
while(*r && (*r != '\n') && (*r != ' ')) { ++r; }
-
+
// Does it fit on this line?
if(r-l < (width-column-(newSentence?1:0)))
{
@@ -135,12 +135,12 @@ void cmDocumentationFormatterText::PrintColumn(std::ostream& os,
// first line.
os << (firstLine?"":this->TextIndent);
}
-
+
// Print the word.
os.write(l, static_cast<long>(r-l));
newSentence = (*(r-1) == '.');
}
-
+
if(*r == '\n')
{
// Text provided a newline. Start a new line.
@@ -175,6 +175,6 @@ void cmDocumentationFormatterText::PrintColumn(std::ostream& os,
// Move to beginning of next word. Skip over whitespace.
l = r;
- while(*l && (*l == ' ')) { ++l; }
+ while(*l && (*l == ' ')) { ++l; }
}
}