summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-09 19:36:53 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-09 19:36:53 (GMT)
commit1defe94e31dcfdfb9a10c684ddf1b01761322bf2 (patch)
tree38c3dc67c7ac28fa5a402cf0ec6284db6e2fe730 /Source
parent428bc2482305b757d930e337eab353615b49ed65 (diff)
downloadCMake-1defe94e31dcfdfb9a10c684ddf1b01761322bf2.zip
CMake-1defe94e31dcfdfb9a10c684ddf1b01761322bf2.tar.gz
CMake-1defe94e31dcfdfb9a10c684ddf1b01761322bf2.tar.bz2
STYLE: Minor style
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/Directory.cxx16
-rw-r--r--Source/kwsys/DynamicLoader.cxx26
-rw-r--r--Source/kwsys/testSystemTools.cxx36
3 files changed, 39 insertions, 39 deletions
diff --git a/Source/kwsys/Directory.cxx b/Source/kwsys/Directory.cxx
index 09e7615..79e8111 100644
--- a/Source/kwsys/Directory.cxx
+++ b/Source/kwsys/Directory.cxx
@@ -38,7 +38,7 @@ class DirectoryInternals
public:
// Array of Files
kwsys_stl::vector<kwsys_stl::string> Files;
-
+
// Path to Open'ed directory
kwsys_stl::string Path;
};
@@ -113,32 +113,32 @@ bool Directory::Load(const char* name)
#endif
char* buf;
size_t n = strlen(name);
- if ( name[n - 1] == '/' )
+ if ( name[n - 1] == '/' )
{
buf = new char[n + 1 + 1];
sprintf(buf, "%s*", name);
- }
+ }
else
{
buf = new char[n + 2 + 1];
sprintf(buf, "%s/*", name);
}
struct _finddata_t data; // data of current file
-
+
// Now put them into the file array
srchHandle = _findfirst(buf, &data);
delete [] buf;
-
+
if ( srchHandle == -1 )
{
return 0;
}
-
+
// Loop through names
- do
+ do
{
this->Internal->Files.push_back(data.name);
- }
+ }
while ( _findnext(srchHandle, &data) != -1 );
this->Internal->Path = name;
return _findclose(srchHandle) != -1;
diff --git a/Source/kwsys/DynamicLoader.cxx b/Source/kwsys/DynamicLoader.cxx
index 9bbf07e..8584a84 100644
--- a/Source/kwsys/DynamicLoader.cxx
+++ b/Source/kwsys/DynamicLoader.cxx
@@ -29,7 +29,7 @@
// 3. Windows which uses LoadLibrary
// 4. Most unix systems (including Mac OS X 10.3 and later) which use dlopen (default)
// Each part of the ifdef contains a complete implementation for
-// the static methods of DynamicLoader.
+// the static methods of DynamicLoader.
namespace KWSYS_NAMESPACE
{
@@ -166,7 +166,7 @@ DynamicLoaderFunction DynamicLoader::GetSymbolAddress(LibHandle /* lib */, const
//----------------------------------------------------------------------------
const char* DynamicLoader::LibPrefix()
-{
+{
return "";
}
@@ -195,7 +195,7 @@ const char* DynamicLoader::LastError()
namespace KWSYS_NAMESPACE
{
-
+
//----------------------------------------------------------------------------
LibHandle DynamicLoader::OpenLibrary(const char* libname)
{
@@ -218,7 +218,7 @@ int DynamicLoader::CloseLibrary(LibHandle lib)
//----------------------------------------------------------------------------
DynamicLoaderFunction DynamicLoader::GetSymbolAddress(LibHandle lib, const char* sym)
-{
+{
void *result;
#ifdef UNICODE
wchar_t wsym[MB_CUR_MAX];
@@ -233,7 +233,7 @@ DynamicLoaderFunction DynamicLoader::GetSymbolAddress(LibHandle lib, const char*
//----------------------------------------------------------------------------
const char* DynamicLoader::LibPrefix()
-{
+{
return "";
}
@@ -248,16 +248,16 @@ const char* DynamicLoader::LastError()
{
LPVOID lpMsgBuf;
- FormatMessage(
+ FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
- NULL
+ NULL
);
-
+
static char* str = 0;
delete [] str;
str = strcpy(new char[strlen((char*)lpMsgBuf)+1], (char*)lpMsgBuf);
@@ -280,7 +280,7 @@ const char* DynamicLoader::LastError()
namespace KWSYS_NAMESPACE
{
-
+
//----------------------------------------------------------------------------
LibHandle DynamicLoader::OpenLibrary(const char* libname )
{
@@ -301,16 +301,16 @@ int DynamicLoader::CloseLibrary(LibHandle lib)
//----------------------------------------------------------------------------
DynamicLoaderFunction DynamicLoader::GetSymbolAddress(LibHandle lib, const char* sym)
-{
+{
void* result = dlsym(lib, sym);
-
+
// Hack to cast pointer-to-data to pointer-to-function.
return *reinterpret_cast<DynamicLoaderFunction*>(&result);
}
//----------------------------------------------------------------------------
const char* DynamicLoader::LibPrefix()
-{
+{
return "lib";
}
@@ -323,7 +323,7 @@ const char* DynamicLoader::LibExtension()
//----------------------------------------------------------------------------
const char* DynamicLoader::LastError()
{
- return dlerror();
+ return dlerror();
}
} // namespace KWSYS_NAMESPACE
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index 55682f4..2106f7a 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -30,7 +30,7 @@
#include "testSystemTools.h"
//----------------------------------------------------------------------------
-const char* toUnixPaths[][2] =
+const char* toUnixPaths[][2] =
{
{ "/usr/local/bin/passwd", "/usr/local/bin/passwd" },
{ "/usr/lo cal/bin/pa sswd", "/usr/lo cal/bin/pa sswd" },
@@ -50,16 +50,16 @@ const char* toUnixPaths[][2] =
{0, 0}
};
-bool CheckConvertToUnixSlashes(kwsys_stl::string input,
+bool CheckConvertToUnixSlashes(kwsys_stl::string input,
kwsys_stl::string output)
{
kwsys_stl::string result = input;
kwsys::SystemTools::ConvertToUnixSlashes(result);
if ( result != output )
{
- kwsys_ios::cerr
- << "Problem with ConvertToUnixSlashes - input: " << input.c_str()
- << " output: " << result.c_str() << " expected: " << output.c_str()
+ kwsys_ios::cerr
+ << "Problem with ConvertToUnixSlashes - input: " << input.c_str()
+ << " output: " << result.c_str() << " expected: " << output.c_str()
<< kwsys_ios::endl;
return false;
}
@@ -67,25 +67,25 @@ bool CheckConvertToUnixSlashes(kwsys_stl::string input,
}
//----------------------------------------------------------------------------
-const char* checkEscapeChars[][4] =
+const char* checkEscapeChars[][4] =
{
{ "1 foo 2 bar 2", "12", "\\", "\\1 foo \\2 bar \\2"},
{ " {} ", "{}", "#", " #{#} "},
{0, 0, 0, 0}
};
-bool CheckEscapeChars(kwsys_stl::string input,
- const char *chars_to_escape,
- char escape_char,
+bool CheckEscapeChars(kwsys_stl::string input,
+ const char *chars_to_escape,
+ char escape_char,
kwsys_stl::string output)
{
kwsys_stl::string result = kwsys::SystemTools::EscapeChars(
input.c_str(), chars_to_escape, escape_char);
if (result != output)
{
- kwsys_ios::cerr
- << "Problem with CheckEscapeChars - input: " << input.c_str()
- << " output: " << result.c_str() << " expected: " << output.c_str()
+ kwsys_ios::cerr
+ << "Problem with CheckEscapeChars - input: " << input.c_str()
+ << " output: " << result.c_str() << " expected: " << output.c_str()
<< kwsys_ios::endl;
return false;
}
@@ -97,20 +97,20 @@ bool CheckDetectFileType()
{
bool res = true;
- if (kwsys::SystemTools::DetectFileType(TEST_SYSTEMTOOLS_BIN_FILE) !=
+ if (kwsys::SystemTools::DetectFileType(TEST_SYSTEMTOOLS_BIN_FILE) !=
kwsys::SystemTools::FileTypeBinary)
{
- kwsys_ios::cerr
- << "Problem with DetectFileType - failed to detect type of: "
+ kwsys_ios::cerr
+ << "Problem with DetectFileType - failed to detect type of: "
<< TEST_SYSTEMTOOLS_BIN_FILE << kwsys_ios::endl;
res = false;
}
- if (kwsys::SystemTools::DetectFileType(TEST_SYSTEMTOOLS_SRC_FILE) !=
+ if (kwsys::SystemTools::DetectFileType(TEST_SYSTEMTOOLS_SRC_FILE) !=
kwsys::SystemTools::FileTypeText)
{
- kwsys_ios::cerr
- << "Problem with DetectFileType - failed to detect type of: "
+ kwsys_ios::cerr
+ << "Problem with DetectFileType - failed to detect type of: "
<< TEST_SYSTEMTOOLS_SRC_FILE << kwsys_ios::endl;
res = false;
}