diff options
author | Brad King <brad.king@kitware.com> | 2013-02-01 14:28:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-02-01 14:28:50 (GMT) |
commit | 588d705cb1ec1d37f10711eb9c0a9e2398805f47 (patch) | |
tree | 71691c5a413f331682a6812f7f5a28a3430e1551 /Source/kwsys/testCommandLineArguments.cxx | |
parent | 163812468054601c95ac894703a6299d3b324e22 (diff) | |
parent | 23ae48412093e4acbd5270536aace226d5869679 (diff) | |
download | CMake-588d705cb1ec1d37f10711eb9c0a9e2398805f47.zip CMake-588d705cb1ec1d37f10711eb9c0a9e2398805f47.tar.gz CMake-588d705cb1ec1d37f10711eb9c0a9e2398805f47.tar.bz2 |
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/testCommandLineArguments.cxx')
-rw-r--r-- | Source/kwsys/testCommandLineArguments.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/kwsys/testCommandLineArguments.cxx b/Source/kwsys/testCommandLineArguments.cxx index e75a87e..72e6544 100644 --- a/Source/kwsys/testCommandLineArguments.cxx +++ b/Source/kwsys/testCommandLineArguments.cxx @@ -24,9 +24,9 @@ #include <stddef.h> /* size_t */ #include <string.h> /* strcmp */ -void* random_ptr = reinterpret_cast<void*>(0x123); +static void* random_ptr = reinterpret_cast<void*>(0x123); -int argument(const char* arg, const char* value, void* call_data) +static int argument(const char* arg, const char* value, void* call_data) { kwsys_ios::cout << "Got argument: \"" << arg << "\" value: \"" << (value?value:"(null)") << "\"" << kwsys_ios::endl; if ( call_data != random_ptr ) @@ -37,7 +37,7 @@ int argument(const char* arg, const char* value, void* call_data) return 1; } -int unknown_argument(const char* argument, void* call_data) +static int unknown_argument(const char* argument, void* call_data) { kwsys_ios::cout << "Got unknown argument: \"" << argument << "\"" << kwsys_ios::endl; if ( call_data != random_ptr ) @@ -48,12 +48,12 @@ int unknown_argument(const char* argument, void* call_data) return 1; } -bool CompareTwoItemsOnList(bool i1, bool i2) { return i1 == i2; } -bool CompareTwoItemsOnList(int i1, int i2) { return i1 == i2; } -bool CompareTwoItemsOnList(double i1, double i2) { return i1 == i2; } -bool CompareTwoItemsOnList(const char* i1, +static bool CompareTwoItemsOnList(bool i1, bool i2) { return i1 == i2; } +static bool CompareTwoItemsOnList(int i1, int i2) { return i1 == i2; } +static bool CompareTwoItemsOnList(double i1, double i2) { return i1 == i2; } +static bool CompareTwoItemsOnList(const char* i1, const char* i2) { return strcmp(i1, i2) == 0; } -bool CompareTwoItemsOnList(const kwsys_stl::string& i1, +static bool CompareTwoItemsOnList(const kwsys_stl::string& i1, const kwsys_stl::string& i2) { return i1 == i2; } int testCommandLineArguments(int argc, char* argv[]) |