diff options
author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2006-03-09 19:36:53 (GMT) |
---|---|---|
committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2006-03-09 19:36:53 (GMT) |
commit | 1defe94e31dcfdfb9a10c684ddf1b01761322bf2 (patch) | |
tree | 38c3dc67c7ac28fa5a402cf0ec6284db6e2fe730 /Source/kwsys/Directory.cxx | |
parent | 428bc2482305b757d930e337eab353615b49ed65 (diff) | |
download | CMake-1defe94e31dcfdfb9a10c684ddf1b01761322bf2.zip CMake-1defe94e31dcfdfb9a10c684ddf1b01761322bf2.tar.gz CMake-1defe94e31dcfdfb9a10c684ddf1b01761322bf2.tar.bz2 |
STYLE: Minor style
Diffstat (limited to 'Source/kwsys/Directory.cxx')
-rw-r--r-- | Source/kwsys/Directory.cxx | 16 |
1 files changed, 8 insertions, 8 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; |