diff options
author | Kitware Robot <kwrobot@kitware.com> | 2012-08-13 17:42:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-13 18:18:39 (GMT) |
commit | 7bbaa4283de26864b2e55e819db0884771585467 (patch) | |
tree | ecb748dbe41a13d8bdea77acd0049cde999d933e /Source/CursesDialog | |
parent | be9db98946b7918f279812fd0616abb650eebed0 (diff) | |
download | CMake-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/CursesDialog')
-rw-r--r-- | Source/CursesDialog/cmCursesBoolWidget.cxx | 12 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesBoolWidget.h | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesCacheEntryComposite.cxx | 10 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesCacheEntryComposite.h | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesDummyWidget.cxx | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesDummyWidget.h | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesFilePathWidget.cxx | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesForm.h | 4 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesLabelWidget.cxx | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesLabelWidget.h | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesLongMessageForm.cxx | 18 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesLongMessageForm.h | 4 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.h | 10 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesPathWidget.cxx | 6 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesStringWidget.cxx | 30 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesStringWidget.h | 2 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesWidget.h | 2 |
17 files changed, 56 insertions, 56 deletions
diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx index 9c4c5a5..fd15b99 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.cxx +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -12,7 +12,7 @@ #include "cmCursesBoolWidget.h" #include "cmCursesMainForm.h" -cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, +cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { @@ -38,15 +38,15 @@ bool cmCursesBoolWidget::HandleInput(int& key, cmCursesMainForm*, WINDOW* w) this->SetValueAsBool(true); } - touchwin(w); - wrefresh(w); + touchwin(w); + wrefresh(w); return true; } else { return false; } - + } void cmCursesBoolWidget::SetValueAsBool(bool value) @@ -56,7 +56,7 @@ void cmCursesBoolWidget::SetValueAsBool(bool value) this->SetValue("ON"); } else - { + { this->SetValue("OFF"); } } @@ -68,7 +68,7 @@ bool cmCursesBoolWidget::GetValueAsBool() return true; } else - { + { return false; } } diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h index 0d1d6a6..d2a25ca 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.h +++ b/Source/CursesDialog/cmCursesBoolWidget.h @@ -19,7 +19,7 @@ class cmCursesBoolWidget : public cmCursesWidget { public: cmCursesBoolWidget(int width, int height, int left, int top); - + // Description: // Handle user input. Called by the container of this widget // when this widget has focus. Returns true if the input was diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx index 828384d..c58d037 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -19,19 +19,19 @@ #include "../cmSystemTools.h" cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(const char* key, - int labelwidth, + int labelwidth, int entrywidth) : Key(key), LabelWidth(labelwidth), EntryWidth(entrywidth) { this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key); this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " "); - this->Entry = 0; + this->Entry = 0; this->Entry = new cmCursesStringWidget(this->EntryWidth, 1, 1, 1); } cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( - const char* key, const cmCacheManager::CacheIterator& it, bool isNew, - int labelwidth, int entrywidth) + const char* key, const cmCacheManager::CacheIterator& it, bool isNew, + int labelwidth, int entrywidth) : Key(key), LabelWidth(labelwidth), EntryWidth(entrywidth) { this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key); @@ -74,7 +74,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( it.GetValue()); break; case cmCacheManager::UNINITIALIZED: - cmSystemTools::Error("Found an undefined variable: ", it.GetName()); + cmSystemTools::Error("Found an undefined variable: ", it.GetName()); break; default: // TODO : put warning message here diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h index a40ea28..1357a02 100644 --- a/Source/CursesDialog/cmCursesCacheEntryComposite.h +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h @@ -20,7 +20,7 @@ class cmCursesCacheEntryComposite public: cmCursesCacheEntryComposite(const char* key, int labelwidth, int entrywidth); cmCursesCacheEntryComposite(const char* key, - const cmCacheManager::CacheIterator& it, + const cmCacheManager::CacheIterator& it, bool isNew, int labelwidth, int entrywidth); ~cmCursesCacheEntryComposite(); const char* GetValue(); diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx index 1d8a45d..60086a5 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.cxx +++ b/Source/CursesDialog/cmCursesDummyWidget.cxx @@ -11,7 +11,7 @@ ============================================================================*/ #include "cmCursesDummyWidget.h" -cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, +cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h index cc4cc74..9ac1365 100644 --- a/Source/CursesDialog/cmCursesDummyWidget.h +++ b/Source/CursesDialog/cmCursesDummyWidget.h @@ -20,7 +20,7 @@ class cmCursesDummyWidget : public cmCursesWidget { public: cmCursesDummyWidget(int width, int height, int left, int top); - + // Description: // Handle user input. Called by the container of this widget // when this widget has focus. Returns true if the input was diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx index 13bbcc9..01db014 100644 --- a/Source/CursesDialog/cmCursesFilePathWidget.cxx +++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx @@ -11,7 +11,7 @@ ============================================================================*/ #include "cmCursesFilePathWidget.h" -cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, +cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, int left, int top) : cmCursesPathWidget(width, height, left, top) { diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h index 7556d74..3cba856 100644 --- a/Source/CursesDialog/cmCursesForm.h +++ b/Source/CursesDialog/cmCursesForm.h @@ -20,7 +20,7 @@ class cmCursesForm public: cmCursesForm(); virtual ~cmCursesForm(); - + // Description: // Handle user input. virtual void HandleInput() = 0; @@ -59,7 +59,7 @@ public: } static cmCursesForm* CurrentForm; - + protected: diff --git a/Source/CursesDialog/cmCursesLabelWidget.cxx b/Source/CursesDialog/cmCursesLabelWidget.cxx index 2ad4813..b5ed312 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.cxx +++ b/Source/CursesDialog/cmCursesLabelWidget.cxx @@ -11,7 +11,7 @@ ============================================================================*/ #include "cmCursesLabelWidget.h" -cmCursesLabelWidget::cmCursesLabelWidget(int width, int height, +cmCursesLabelWidget::cmCursesLabelWidget(int width, int height, int left, int top, const std::string& name) : cmCursesWidget(width, height, left, top) diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h index bbcc586..cc32d11 100644 --- a/Source/CursesDialog/cmCursesLabelWidget.h +++ b/Source/CursesDialog/cmCursesLabelWidget.h @@ -23,7 +23,7 @@ public: cmCursesLabelWidget(int width, int height, int left, int top, const std::string& name); virtual ~cmCursesLabelWidget(); - + // Description: // Handle user input. Called by the container of this widget // when this widget has focus. Returns true if the input was diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx index 0e2cd22..057f8f3 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.cxx +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -19,10 +19,10 @@ inline int ctrl(int z) { return (z&037); -} +} -cmCursesLongMessageForm::cmCursesLongMessageForm(std::vector<std::string> - const& messages, const char* +cmCursesLongMessageForm::cmCursesLongMessageForm(std::vector<std::string> + const& messages, const char* title) { // Append all messages into on big string @@ -84,7 +84,7 @@ void cmCursesLongMessageForm::UpdateStatusBar() curses_move(y-4,0); attron(A_STANDOUT); printw(bar); - attroff(A_STANDOUT); + attroff(A_STANDOUT); curses_move(y-3,0); printw(version); pos_form_cursor(this->Form); @@ -94,7 +94,7 @@ void cmCursesLongMessageForm::PrintKeys() { int x,y; getmaxyx(stdscr, y, x); - if ( x < cmCursesMainForm::MIN_WIDTH || + if ( x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT ) { return; @@ -105,7 +105,7 @@ void cmCursesLongMessageForm::PrintKeys() curses_move(y-2,0); printw(firstLine); pos_form_cursor(this->Form); - + } void cmCursesLongMessageForm::Render(int, int, int, int) @@ -155,7 +155,7 @@ void cmCursesLongMessageForm::Render(int, int, int, int) this->UpdateStatusBar(); this->PrintKeys(); - touchwin(stdscr); + touchwin(stdscr); refresh(); } @@ -200,8 +200,8 @@ void cmCursesLongMessageForm::HandleInput() this->UpdateStatusBar(); this->PrintKeys(); - touchwin(stdscr); - wrefresh(stdscr); + touchwin(stdscr); + wrefresh(stdscr); } } diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h index 341f9c6..1e86974 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.h +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -21,10 +21,10 @@ class cmCursesCacheEntryComposite; class cmCursesLongMessageForm : public cmCursesForm { public: - cmCursesLongMessageForm(std::vector<std::string> const& messages, + cmCursesLongMessageForm(std::vector<std::string> const& messages, const char* title); virtual ~cmCursesLongMessageForm(); - + // Description: // Handle user input. virtual void HandleInput(); diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index 3e191b4..883a2b3 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -30,12 +30,12 @@ class cmCursesMainForm : public cmCursesForm public: cmCursesMainForm(std::vector<std::string> const& args, int initwidth); virtual ~cmCursesMainForm(); - + /** * Set the widgets which represent the cache entries. */ void InitializeUI(); - + /** * Handle user input. */ @@ -65,7 +65,7 @@ public: * exception is during a resize. The optional argument specifies the * string to be displayed in the status bar. */ - virtual void UpdateStatusBar() { this->UpdateStatusBar(0); } + virtual void UpdateStatusBar() { this->UpdateStatusBar(0); } virtual void UpdateStatusBar(const char* message); /** @@ -90,7 +90,7 @@ public: int Configure(int noconfigure=0); /** - * Used to generate + * Used to generate */ int Generate(); @@ -98,7 +98,7 @@ public: * Used by main program */ int LoadCache(const char *dir); - + /** * Progress callback */ diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx index b113c2e..14c325b 100644 --- a/Source/CursesDialog/cmCursesPathWidget.cxx +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -14,7 +14,7 @@ #include "cmCursesMainForm.h" #include "cmSystemTools.h" -cmCursesPathWidget::cmCursesPathWidget(int width, int height, +cmCursesPathWidget::cmCursesPathWidget(int width, int height, int left, int top) : cmCursesStringWidget(width, height, left, top) { @@ -75,8 +75,8 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w) } this->SetString(cstr.c_str()); - touchwin(w); - wrefresh(w); + touchwin(w); + wrefresh(w); form_driver(form, REQ_END_FIELD); this->LastGlob = glob; this->LastString = cstr; diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index d363f00..5c7414f 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -15,9 +15,9 @@ inline int ctrl(int z) { return (z&037); -} +} -cmCursesStringWidget::cmCursesStringWidget(int width, int height, +cmCursesStringWidget::cmCursesStringWidget(int width, int height, int left, int top) : cmCursesWidget(width, height, left, top) { @@ -63,7 +63,7 @@ void cmCursesStringWidget::OnType(int& key, cmCursesMainForm* fm, WINDOW*) form_driver(fm->GetForm(), key); } -bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, +bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) { int x,y; @@ -90,7 +90,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, 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 @@ -100,7 +100,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, } else { - key=getch(); + key=getch(); continue; } } @@ -111,7 +111,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, return false; } // 10 == enter - if (key == 10 || key == KEY_ENTER) + if (key == 10 || key == KEY_ENTER) { this->OnReturn(fm, w); } @@ -121,7 +121,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, key == KEY_PPAGE || key == ctrl('u')) { this->InEdit = false; - delete[] this->OriginalString; + delete[] this->OriginalString; // trick to force forms to update the field buffer form_driver(form, REQ_NEXT_FIELD); form_driver(form, REQ_PREV_FIELD); @@ -136,8 +136,8 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, fm->PrintKeys(); this->SetString(this->OriginalString); delete[] this->OriginalString; - touchwin(w); - wrefresh(w); + touchwin(w); + wrefresh(w); return true; } } @@ -165,7 +165,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, { form_driver(form, REQ_END_FIELD); } - else if ( key == 127 || + else if ( key == 127 || key == KEY_BACKSPACE ) { if ( form->curcol > 0 ) @@ -186,10 +186,10 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, } if ( !this->Done ) { - touchwin(w); - wrefresh(w); - - key=getch(); + touchwin(w); + wrefresh(w); + + key=getch(); } } return true; @@ -214,7 +214,7 @@ bool cmCursesStringWidget::PrintKeys() { int x,y; getmaxyx(stdscr, y, x); - if ( x < cmCursesMainForm::MIN_WIDTH || + if ( x < cmCursesMainForm::MIN_WIDTH || y < cmCursesMainForm::MIN_HEIGHT ) { return false; diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h index cd54f24..e939049 100644 --- a/Source/CursesDialog/cmCursesStringWidget.h +++ b/Source/CursesDialog/cmCursesStringWidget.h @@ -26,7 +26,7 @@ class cmCursesStringWidget : public cmCursesWidget { public: cmCursesStringWidget(int width, int height, int left, int top); - + /** * Handle user input. Called by the container of this widget * when this widget has focus. Returns true if the input was diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index ee36af6..952c67a 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -22,7 +22,7 @@ class cmCursesWidget public: cmCursesWidget(int width, int height, int left, int top); virtual ~cmCursesWidget(); - + /** * Handle user input. Called by the container of this widget * when this widget has focus. Returns true if the input was |