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 /Tests/X11 | |
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 'Tests/X11')
-rw-r--r-- | Tests/X11/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/X11/HelloWorldX11.cxx | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/Tests/X11/CMakeLists.txt b/Tests/X11/CMakeLists.txt index 03aa095..3859ba2 100644 --- a/Tests/X11/CMakeLists.txt +++ b/Tests/X11/CMakeLists.txt @@ -8,8 +8,8 @@ MESSAGE("X11_FOUND: ${X11_FOUND}") ADD_EXECUTABLE (UseX11 X11.c) install(TARGETS UseX11 DESTINATION bin) -# so for universal binaries this test will fail if -# +# so for universal binaries this test will fail if +# IF(APPLE) LIST(LENGTH CMAKE_OSX_ARCHITECTURES NUMARCH) IF(NUMARCH GREATER 1) diff --git a/Tests/X11/HelloWorldX11.cxx b/Tests/X11/HelloWorldX11.cxx index e3c9dd9..f2b8bdd 100644 --- a/Tests/X11/HelloWorldX11.cxx +++ b/Tests/X11/HelloWorldX11.cxx @@ -9,7 +9,7 @@ * Copyright (c) 2004 __MyCompanyName__. All rights reserved. * */ - + #ifndef MAIN_H #define MAIN_H 1 @@ -28,10 +28,10 @@ public: // constructor Main(int argc, char * const argv[]); //virtual ~Main(); - + private: - + /* here are our X variables */ Display *dis; @@ -53,7 +53,7 @@ private: /*** START MAIN.CPP ***/ -// modified from Brian Hammond's Howdy program at +// modified from Brian Hammond's Howdy program at // http://www.insanityengine.com/doc/x11/xintro.html // jeff louie 02.05.2004 @@ -73,11 +73,11 @@ Main::Main (int argc, char * const argv[]) { init_x(); // event loop - while(1) { + while(1) { // get the next event and stuff it into our event variable. // Note: only events we set the mask for are detected! XNextEvent(dis, &event); - + switch (event.type) { int x; @@ -115,19 +115,19 @@ Main::Main (int argc, char * const argv[]) { } } -void Main::init_x() { +void Main::init_x() { unsigned long black,white; dis=XOpenDisplay(NULL); screen=DefaultScreen(dis); black=BlackPixel(dis,screen), white=WhitePixel(dis, screen); - win=XCreateSimpleWindow(dis,DefaultRootWindow(dis),0,0, + win=XCreateSimpleWindow(dis,DefaultRootWindow(dis),0,0, 300, 300, 5,black, white); XSetStandardProperties(dis,win,"Hello World","Hi",None,NULL,0,NULL); XSelectInput(dis, win, ExposureMask|ButtonPressMask|KeyPressMask); // get Graphics Context - gc=XCreateGC(dis, win, 0,0); + gc=XCreateGC(dis, win, 0,0); XSetBackground(dis,gc,white); XSetForeground(dis,gc,black); XClearWindow(dis, win); @@ -137,8 +137,8 @@ void Main::init_x() { void Main::close_x() { XFreeGC(dis, gc); XDestroyWindow(dis,win); - XCloseDisplay(dis); - exit(1); + XCloseDisplay(dis); + exit(1); }; void Main::redraw() { |