Skip to content
Snippets Groups Projects
Commit 52788bb8 authored by James Johnston's avatar James Johnston
Browse files

SystemTools: Remove trailing whitespace.

Change-Id: I53978f9da16eef6652566a59d8569fed07fe33a4
parent 91cb7820
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ public: ...@@ -68,7 +68,7 @@ public:
}; };
// This instance will show up in any translation unit that uses // This instance will show up in any translation unit that uses
// SystemTools. It will make sure SystemTools is initialized // SystemTools. It will make sure SystemTools is initialized
// before it is used and is the last static object destroyed. // before it is used and is the last static object destroyed.
static SystemToolsManager SystemToolsManagerInstance; static SystemToolsManager SystemToolsManagerInstance;
...@@ -113,34 +113,34 @@ public: ...@@ -113,34 +113,34 @@ public:
* all other are lowercased). * all other are lowercased).
*/ */
static kwsys_stl::string Capitalized(const kwsys_stl::string&); static kwsys_stl::string Capitalized(const kwsys_stl::string&);
/** /**
* Return a 'capitalized words' string (i.e the first letter of each word * Return a 'capitalized words' string (i.e the first letter of each word
* is uppercased all other are left untouched though). * is uppercased all other are left untouched though).
*/ */
static kwsys_stl::string CapitalizedWords(const kwsys_stl::string&); static kwsys_stl::string CapitalizedWords(const kwsys_stl::string&);
/** /**
* Return a 'uncapitalized words' string (i.e the first letter of each word * Return a 'uncapitalized words' string (i.e the first letter of each word
* is lowercased all other are left untouched though). * is lowercased all other are left untouched though).
*/ */
static kwsys_stl::string UnCapitalizedWords(const kwsys_stl::string&); static kwsys_stl::string UnCapitalizedWords(const kwsys_stl::string&);
/** /**
* Return a lower case string * Return a lower case string
*/ */
static kwsys_stl::string LowerCase(const kwsys_stl::string&); static kwsys_stl::string LowerCase(const kwsys_stl::string&);
/** /**
* Return a lower case string * Return a lower case string
*/ */
static kwsys_stl::string UpperCase(const kwsys_stl::string&); static kwsys_stl::string UpperCase(const kwsys_stl::string&);
/** /**
* Count char in string * Count char in string
*/ */
static size_t CountChar(const char* str, char c); static size_t CountChar(const char* str, char c);
/** /**
* Remove some characters from a string. * Remove some characters from a string.
* Return a pointer to the new resulting string (allocated with 'new') * Return a pointer to the new resulting string (allocated with 'new')
...@@ -152,13 +152,13 @@ public: ...@@ -152,13 +152,13 @@ public:
* Return a pointer to the new resulting string (allocated with 'new') * Return a pointer to the new resulting string (allocated with 'new')
*/ */
static char* RemoveCharsButUpperHex(const char* str); static char* RemoveCharsButUpperHex(const char* str);
/** /**
* Replace some characters by another character in a string (in-place) * Replace some characters by another character in a string (in-place)
* Return a pointer to string * Return a pointer to string
*/ */
static char* ReplaceChars(char* str, const char *toreplace,char replacement); static char* ReplaceChars(char* str, const char *toreplace,char replacement);
/** /**
* Returns true if str1 starts (respectively ends) with str2 * Returns true if str1 starts (respectively ends) with str2
*/ */
...@@ -171,25 +171,25 @@ public: ...@@ -171,25 +171,25 @@ public:
* Returns a pointer to the last occurence of str2 in str1 * Returns a pointer to the last occurence of str2 in str1
*/ */
static const char* FindLastString(const char* str1, const char* str2); static const char* FindLastString(const char* str1, const char* str2);
/** /**
* Make a duplicate of the string similar to the strdup C function * Make a duplicate of the string similar to the strdup C function
* but use new to create the 'new' string, so one can use * but use new to create the 'new' string, so one can use
* 'delete' to remove it. Returns 0 if the input is empty. * 'delete' to remove it. Returns 0 if the input is empty.
*/ */
static char* DuplicateString(const char* str); static char* DuplicateString(const char* str);
/** /**
* Return the string cropped to a given length by removing chars in the * Return the string cropped to a given length by removing chars in the
* center of the string and replacing them with an ellipsis (...) * center of the string and replacing them with an ellipsis (...)
*/ */
static kwsys_stl::string CropString(const kwsys_stl::string&,size_t max_len); static kwsys_stl::string CropString(const kwsys_stl::string&,size_t max_len);
/** split a path by separator into an array of strings, default is /. /** split a path by separator into an array of strings, default is /.
If isPath is true then the string is treated like a path and if If isPath is true then the string is treated like a path and if
s starts with a / then the first element of the returned array will s starts with a / then the first element of the returned array will
be /, so /foo/bar will be [/, foo, bar] be /, so /foo/bar will be [/, foo, bar]
*/ */
static kwsys_stl::vector<String> SplitString(const kwsys_stl::string& s, char separator = '/', static kwsys_stl::vector<String> SplitString(const kwsys_stl::string& s, char separator = '/',
bool isPath = false); bool isPath = false);
/** /**
...@@ -197,7 +197,7 @@ public: ...@@ -197,7 +197,7 @@ public:
*/ */
static int Strucmp(const char *s1, const char *s2); static int Strucmp(const char *s1, const char *s2);
/** /**
* Convert a string in __DATE__ or __TIMESTAMP__ format into a time_t. * Convert a string in __DATE__ or __TIMESTAMP__ format into a time_t.
* Return false on error, true on success * Return false on error, true on success
*/ */
...@@ -210,11 +210,11 @@ public: ...@@ -210,11 +210,11 @@ public:
*/ */
static bool Split(const kwsys_stl::string& s, kwsys_stl::vector<kwsys_stl::string>& l); static bool Split(const kwsys_stl::string& s, kwsys_stl::vector<kwsys_stl::string>& l);
static bool Split(const kwsys_stl::string& s, kwsys_stl::vector<kwsys_stl::string>& l, char separator); static bool Split(const kwsys_stl::string& s, kwsys_stl::vector<kwsys_stl::string>& l, char separator);
/** /**
* Return string with space added between capitalized words * Return string with space added between capitalized words
* (i.e. EatMyShorts becomes Eat My Shorts ) * (i.e. EatMyShorts becomes Eat My Shorts )
* (note that IEatShorts becomes IEat Shorts) * (note that IEatShorts becomes IEat Shorts)
*/ */
static kwsys_stl::string AddSpaceBetweenCapitalizedWords( static kwsys_stl::string AddSpaceBetweenCapitalizedWords(
const kwsys_stl::string&); const kwsys_stl::string&);
...@@ -290,7 +290,7 @@ public: ...@@ -290,7 +290,7 @@ public:
/** /**
* Return true if a file exists in the current directory. * Return true if a file exists in the current directory.
* If isFile = true, then make sure the file is a file and * If isFile = true, then make sure the file is a file and
* not a directory. If isFile = false, then return true * not a directory. If isFile = false, then return true
* if it is a file or a directory. * if it is a file or a directory.
*/ */
...@@ -317,7 +317,7 @@ public: ...@@ -317,7 +317,7 @@ public:
Change the modification time or create a file Change the modification time or create a file
*/ */
static bool Touch(const kwsys_stl::string& filename, bool create); static bool Touch(const kwsys_stl::string& filename, bool create);
/** /**
* Compare file modification times. * Compare file modification times.
* Return true for successful comparison and false for error. * Return true for successful comparison and false for error.
...@@ -360,7 +360,7 @@ public: ...@@ -360,7 +360,7 @@ public:
* to the running executable. If argv0 is not a full path, * to the running executable. If argv0 is not a full path,
* then this will try to find the full path. If the path is not * then this will try to find the full path. If the path is not
* found false is returned, if found true is returned. An error * found false is returned, if found true is returned. An error
* message of the attempted paths is stored in errorMsg. * message of the attempted paths is stored in errorMsg.
* exeName is the name of the executable. * exeName is the name of the executable.
* buildDir is a possibly null path to the build directory. * buildDir is a possibly null path to the build directory.
* installPrefix is a possibly null pointer to the install directory. * installPrefix is a possibly null pointer to the install directory.
...@@ -384,7 +384,7 @@ public: ...@@ -384,7 +384,7 @@ public:
static kwsys_stl::string CollapseFullPath(const kwsys_stl::string& in_relative, static kwsys_stl::string CollapseFullPath(const kwsys_stl::string& in_relative,
const kwsys_stl::string& in_base); const kwsys_stl::string& in_base);
/** /**
* Get the real path for a given path, removing all symlinks. In * Get the real path for a given path, removing all symlinks. In
* the event of an error (non-existent path, permissions issue, * the event of an error (non-existent path, permissions issue,
* etc.) the original path is returned if errorMessage pointer is * etc.) the original path is returned if errorMessage pointer is
...@@ -469,31 +469,31 @@ public: ...@@ -469,31 +469,31 @@ public:
*/ */
static kwsys_stl::string GetFilenameLastExtension( static kwsys_stl::string GetFilenameLastExtension(
const kwsys_stl::string& filename); const kwsys_stl::string& filename);
/** /**
* Return file name without extension of a full filename * Return file name without extension of a full filename
*/ */
static kwsys_stl::string GetFilenameWithoutExtension( static kwsys_stl::string GetFilenameWithoutExtension(
const kwsys_stl::string&); const kwsys_stl::string&);
/** /**
* Return file name without its last (shortest) extension * Return file name without its last (shortest) extension
*/ */
static kwsys_stl::string GetFilenameWithoutLastExtension( static kwsys_stl::string GetFilenameWithoutLastExtension(
const kwsys_stl::string&); const kwsys_stl::string&);
/** /**
* Return whether the path represents a full path (not relative) * Return whether the path represents a full path (not relative)
*/ */
static bool FileIsFullPath(const kwsys_stl::string&); static bool FileIsFullPath(const kwsys_stl::string&);
static bool FileIsFullPath(const char*); static bool FileIsFullPath(const char*);
/** /**
* For windows return the short path for the given path, * For windows return the short path for the given path,
* Unix just a pass through * Unix just a pass through
*/ */
static bool GetShortPath(const kwsys_stl::string& path, kwsys_stl::string& result); static bool GetShortPath(const kwsys_stl::string& path, kwsys_stl::string& result);
/** /**
* Read line from file. Make sure to get everything. Due to a buggy stream * Read line from file. Make sure to get everything. Due to a buggy stream
* library on the HP and another on Mac OS X, we need this very carefully * library on the HP and another on Mac OS X, we need this very carefully
...@@ -501,7 +501,7 @@ public: ...@@ -501,7 +501,7 @@ public:
* end-of-file was reached. If the has_newline argument is specified, it will * end-of-file was reached. If the has_newline argument is specified, it will
* be true when the line read had a newline character. * be true when the line read had a newline character.
*/ */
static bool GetLineFromStream(kwsys_ios::istream& istr, static bool GetLineFromStream(kwsys_ios::istream& istr,
kwsys_stl::string& line, kwsys_stl::string& line,
bool* has_newline=0, bool* has_newline=0,
long sizeLimit=-1); long sizeLimit=-1);
...@@ -529,7 +529,7 @@ public: ...@@ -529,7 +529,7 @@ public:
/** /**
* Make a new directory if it is not there. This function * Make a new directory if it is not there. This function
* can make a full path even if none of the directories existed * can make a full path even if none of the directories existed
* prior to calling this function. * prior to calling this function.
*/ */
static bool MakeDirectory(const char* path); static bool MakeDirectory(const char* path);
static bool MakeDirectory(const kwsys_stl::string& path); static bool MakeDirectory(const kwsys_stl::string& path);
...@@ -572,12 +572,12 @@ public: ...@@ -572,12 +572,12 @@ public:
*/ */
static bool CopyADirectory(const kwsys_stl::string& source, const kwsys_stl::string& destination, static bool CopyADirectory(const kwsys_stl::string& source, const kwsys_stl::string& destination,
bool always = true); bool always = true);
/** /**
* Remove a file * Remove a file
*/ */
static bool RemoveFile(const kwsys_stl::string& source); static bool RemoveFile(const kwsys_stl::string& source);
/** /**
* Remove a directory * Remove a directory
*/ */
...@@ -593,7 +593,7 @@ public: ...@@ -593,7 +593,7 @@ public:
*/ */
static kwsys_stl::string FindFile( static kwsys_stl::string FindFile(
const kwsys_stl::string& name, const kwsys_stl::string& name,
const kwsys_stl::vector<kwsys_stl::string>& path = const kwsys_stl::vector<kwsys_stl::string>& path =
kwsys_stl::vector<kwsys_stl::string>(), kwsys_stl::vector<kwsys_stl::string>(),
bool no_system_path = false); bool no_system_path = false);
...@@ -602,7 +602,7 @@ public: ...@@ -602,7 +602,7 @@ public:
*/ */
static kwsys_stl::string FindDirectory( static kwsys_stl::string FindDirectory(
const kwsys_stl::string& name, const kwsys_stl::string& name,
const kwsys_stl::vector<kwsys_stl::string>& path = const kwsys_stl::vector<kwsys_stl::string>& path =
kwsys_stl::vector<kwsys_stl::string>(), kwsys_stl::vector<kwsys_stl::string>(),
bool no_system_path = false); bool no_system_path = false);
...@@ -631,17 +631,17 @@ public: ...@@ -631,17 +631,17 @@ public:
static kwsys_stl::string FindLibrary( static kwsys_stl::string FindLibrary(
const kwsys_stl::string& name, const kwsys_stl::string& name,
const kwsys_stl::vector<kwsys_stl::string>& path); const kwsys_stl::vector<kwsys_stl::string>& path);
/** /**
* Return true if the file is a directory * Return true if the file is a directory
*/ */
static bool FileIsDirectory(const kwsys_stl::string& name); static bool FileIsDirectory(const kwsys_stl::string& name);
/** /**
* Return true if the file is a symlink * Return true if the file is a symlink
*/ */
static bool FileIsSymlink(const kwsys_stl::string& name); static bool FileIsSymlink(const kwsys_stl::string& name);
/** /**
* Return true if the file has a given signature (first set of bytes) * Return true if the file has a given signature (first set of bytes)
*/ */
...@@ -657,15 +657,15 @@ public: ...@@ -657,15 +657,15 @@ public:
* The algorithm is simplistic, and should probably check for usual file * The algorithm is simplistic, and should probably check for usual file
* extensions, 'magic' signature, unicode, etc. * extensions, 'magic' signature, unicode, etc.
*/ */
enum FileTypeEnum enum FileTypeEnum
{ {
FileTypeUnknown, FileTypeUnknown,
FileTypeBinary, FileTypeBinary,
FileTypeText FileTypeText
}; };
static SystemTools::FileTypeEnum DetectFileType( static SystemTools::FileTypeEnum DetectFileType(
const char* filename, const char* filename,
unsigned long length = 256, unsigned long length = 256,
double percent_bin = 0.05); double percent_bin = 0.05);
/** /**
...@@ -690,18 +690,18 @@ public: ...@@ -690,18 +690,18 @@ public:
* 'filename_found' is assigned the fully qualified name/path of the file * 'filename_found' is assigned the fully qualified name/path of the file
* if it is found (not touched otherwise). * if it is found (not touched otherwise).
* If 'try_filename_dirs' is true, try to find the file using the * If 'try_filename_dirs' is true, try to find the file using the
* components of its path, i.e. if we are looking for c:/foo/bar/bill.txt, * components of its path, i.e. if we are looking for c:/foo/bar/bill.txt,
* first look for bill.txt in 'dir', then in 'dir'/bar, then in 'dir'/foo/bar * first look for bill.txt in 'dir', then in 'dir'/bar, then in 'dir'/foo/bar
* etc. * etc.
* Return true if the file was found, false otherwise. * Return true if the file was found, false otherwise.
*/ */
static bool LocateFileInDir(const char *filename, static bool LocateFileInDir(const char *filename,
const char *dir, const char *dir,
kwsys_stl::string& filename_found, kwsys_stl::string& filename_found,
int try_filename_dirs = 0); int try_filename_dirs = 0);
/** compute the relative path from local to remote. local must /** compute the relative path from local to remote. local must
be a directory. remote can be a file or a directory. be a directory. remote can be a file or a directory.
Both remote and local must be full paths. Basically, if Both remote and local must be full paths. Basically, if
you are in directory local and you want to access the file in remote you are in directory local and you want to access the file in remote
what is the relative path to do that. For example: what is the relative path to do that. For example:
...@@ -891,11 +891,11 @@ public: ...@@ -891,11 +891,11 @@ public:
* Return true if the string matches the format; false otherwise. * Return true if the string matches the format; false otherwise.
*/ */
static bool ParseURL( const kwsys_stl::string& URL, static bool ParseURL( const kwsys_stl::string& URL,
kwsys_stl::string& protocol, kwsys_stl::string& protocol,
kwsys_stl::string& username, kwsys_stl::string& username,
kwsys_stl::string& password, kwsys_stl::string& password,
kwsys_stl::string& hostname, kwsys_stl::string& hostname,
kwsys_stl::string& dataport, kwsys_stl::string& dataport,
kwsys_stl::string& datapath ); kwsys_stl::string& datapath );
private: private:
...@@ -936,7 +936,7 @@ private: ...@@ -936,7 +936,7 @@ private:
*/ */
static kwsys_stl::string FindName( static kwsys_stl::string FindName(
const kwsys_stl::string& name, const kwsys_stl::string& name,
const kwsys_stl::vector<kwsys_stl::string>& path = const kwsys_stl::vector<kwsys_stl::string>& path =
kwsys_stl::vector<kwsys_stl::string>(), kwsys_stl::vector<kwsys_stl::string>(),
bool no_system_path = false); bool no_system_path = false);
......
...@@ -271,48 +271,48 @@ static bool CheckStringOperations() ...@@ -271,48 +271,48 @@ static bool CheckStringOperations()
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with CapitalizedWords " << "Problem with CapitalizedWords "
<< '"' << test << '"' << kwsys_ios::endl; << '"' << test << '"' << kwsys_ios::endl;
res = false; res = false;
} }
test = "Mary Had A Little Lamb."; test = "Mary Had A Little Lamb.";
if (kwsys::SystemTools::UnCapitalizedWords(test) != if (kwsys::SystemTools::UnCapitalizedWords(test) !=
"mary had a little lamb.") "mary had a little lamb.")
{ {
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with UnCapitalizedWords " << "Problem with UnCapitalizedWords "
<< '"' << test << '"' << kwsys_ios::endl; << '"' << test << '"' << kwsys_ios::endl;
res = false; res = false;
} }
test = "MaryHadTheLittleLamb."; test = "MaryHadTheLittleLamb.";
if (kwsys::SystemTools::AddSpaceBetweenCapitalizedWords(test) != if (kwsys::SystemTools::AddSpaceBetweenCapitalizedWords(test) !=
"Mary Had The Little Lamb.") "Mary Had The Little Lamb.")
{ {
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with AddSpaceBetweenCapitalizedWords " << "Problem with AddSpaceBetweenCapitalizedWords "
<< '"' << test << '"' << kwsys_ios::endl; << '"' << test << '"' << kwsys_ios::endl;
res = false; res = false;
} }
char * cres = char * cres =
kwsys::SystemTools::AppendStrings("Mary Had A"," Little Lamb."); kwsys::SystemTools::AppendStrings("Mary Had A"," Little Lamb.");
if (strcmp(cres,"Mary Had A Little Lamb.")) if (strcmp(cres,"Mary Had A Little Lamb."))
{ {
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with AppendStrings " << "Problem with AppendStrings "
<< "\"Mary Had A\" \" Little Lamb.\"" << kwsys_ios::endl; << "\"Mary Had A\" \" Little Lamb.\"" << kwsys_ios::endl;
res = false; res = false;
} }
delete [] cres; delete [] cres;
cres = cres =
kwsys::SystemTools::AppendStrings("Mary Had"," A ","Little Lamb."); kwsys::SystemTools::AppendStrings("Mary Had"," A ","Little Lamb.");
if (strcmp(cres,"Mary Had A Little Lamb.")) if (strcmp(cres,"Mary Had A Little Lamb."))
{ {
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with AppendStrings " << "Problem with AppendStrings "
<< "\"Mary Had\" \" A \" \"Little Lamb.\"" << kwsys_ios::endl; << "\"Mary Had\" \" A \" \"Little Lamb.\"" << kwsys_ios::endl;
res = false; res = false;
} }
delete [] cres; delete [] cres;
...@@ -321,28 +321,28 @@ static bool CheckStringOperations() ...@@ -321,28 +321,28 @@ static bool CheckStringOperations()
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with CountChar " << "Problem with CountChar "
<< "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl; << "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl;
res = false; res = false;
} }
cres = cres =
kwsys::SystemTools::RemoveChars("Mary Had A Little Lamb.","aeiou"); kwsys::SystemTools::RemoveChars("Mary Had A Little Lamb.","aeiou");
if (strcmp(cres,"Mry Hd A Lttl Lmb.")) if (strcmp(cres,"Mry Hd A Lttl Lmb."))
{ {
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with RemoveChars " << "Problem with RemoveChars "
<< "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl; << "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl;
res = false; res = false;
} }
delete [] cres; delete [] cres;
cres = cres =
kwsys::SystemTools::RemoveCharsButUpperHex("Mary Had A Little Lamb."); kwsys::SystemTools::RemoveCharsButUpperHex("Mary Had A Little Lamb.");
if (strcmp(cres,"A")) if (strcmp(cres,"A"))
{ {
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with RemoveCharsButUpperHex " << "Problem with RemoveCharsButUpperHex "
<< "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl; << "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl;
res = false; res = false;
} }
delete [] cres; delete [] cres;
...@@ -354,7 +354,7 @@ static bool CheckStringOperations() ...@@ -354,7 +354,7 @@ static bool CheckStringOperations()
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with ReplaceChars " << "Problem with ReplaceChars "
<< "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl; << "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl;
res = false; res = false;
} }
delete [] cres2; delete [] cres2;
...@@ -364,7 +364,7 @@ static bool CheckStringOperations() ...@@ -364,7 +364,7 @@ static bool CheckStringOperations()
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with StringStartsWith " << "Problem with StringStartsWith "
<< "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl; << "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl;
res = false; res = false;
} }
if (!kwsys::SystemTools::StringEndsWith("Mary Had A Little Lamb.", if (!kwsys::SystemTools::StringEndsWith("Mary Had A Little Lamb.",
...@@ -373,7 +373,7 @@ static bool CheckStringOperations() ...@@ -373,7 +373,7 @@ static bool CheckStringOperations()
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with StringEndsWith " << "Problem with StringEndsWith "
<< "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl; << "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl;
res = false; res = false;
} }
cres = kwsys::SystemTools::DuplicateString("Mary Had A Little Lamb."); cres = kwsys::SystemTools::DuplicateString("Mary Had A Little Lamb.");
...@@ -382,18 +382,18 @@ static bool CheckStringOperations() ...@@ -382,18 +382,18 @@ static bool CheckStringOperations()
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with DuplicateString " << "Problem with DuplicateString "
<< "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl; << "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl;
res = false; res = false;
} }
delete [] cres; delete [] cres;
test = "Mary Had A Little Lamb."; test = "Mary Had A Little Lamb.";
if (kwsys::SystemTools::CropString(test,13) != if (kwsys::SystemTools::CropString(test,13) !=
"Mary ...Lamb.") "Mary ...Lamb.")
{ {
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with CropString " << "Problem with CropString "
<< "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl; << "\"Mary Had A Little Lamb.\"" << kwsys_ios::endl;
res = false; res = false;
} }
kwsys_stl::vector<kwsys_stl::string> lines; kwsys_stl::vector<kwsys_stl::string> lines;
...@@ -515,36 +515,36 @@ static bool CheckStringOperations() ...@@ -515,36 +515,36 @@ static bool CheckStringOperations()
#endif #endif
if (kwsys::SystemTools::ConvertToWindowsOutputPath if (kwsys::SystemTools::ConvertToWindowsOutputPath
("L://Local Mojo/Hex Power Pack/Iffy Voodoo") != ("L://Local Mojo/Hex Power Pack/Iffy Voodoo") !=
"\"L:\\Local Mojo\\Hex Power Pack\\Iffy Voodoo\"") "\"L:\\Local Mojo\\Hex Power Pack\\Iffy Voodoo\"")
{ {
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with ConvertToWindowsOutputPath " << "Problem with ConvertToWindowsOutputPath "
<< "\"L://Local Mojo/Hex Power Pack/Iffy Voodoo\"" << "\"L://Local Mojo/Hex Power Pack/Iffy Voodoo\""
<< kwsys_ios::endl; << kwsys_ios::endl;
res = false; res = false;
} }
if (kwsys::SystemTools::ConvertToWindowsOutputPath if (kwsys::SystemTools::ConvertToWindowsOutputPath
("//grayson/Local Mojo/Hex Power Pack/Iffy Voodoo") != ("//grayson/Local Mojo/Hex Power Pack/Iffy Voodoo") !=
"\"\\\\grayson\\Local Mojo\\Hex Power Pack\\Iffy Voodoo\"") "\"\\\\grayson\\Local Mojo\\Hex Power Pack\\Iffy Voodoo\"")
{ {
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with ConvertToWindowsOutputPath " << "Problem with ConvertToWindowsOutputPath "
<< "\"//grayson/Local Mojo/Hex Power Pack/Iffy Voodoo\"" << "\"//grayson/Local Mojo/Hex Power Pack/Iffy Voodoo\""
<< kwsys_ios::endl; << kwsys_ios::endl;
res = false; res = false;
} }
if (kwsys::SystemTools::ConvertToUnixOutputPath if (kwsys::SystemTools::ConvertToUnixOutputPath
("//Local Mojo/Hex Power Pack/Iffy Voodoo") != ("//Local Mojo/Hex Power Pack/Iffy Voodoo") !=
"//Local\\ Mojo/Hex\\ Power\\ Pack/Iffy\\ Voodoo") "//Local\\ Mojo/Hex\\ Power\\ Pack/Iffy\\ Voodoo")
{ {
kwsys_ios::cerr kwsys_ios::cerr
<< "Problem with ConvertToUnixOutputPath " << "Problem with ConvertToUnixOutputPath "
<< "\"//Local Mojo/Hex Power Pack/Iffy Voodoo\"" << "\"//Local Mojo/Hex Power Pack/Iffy Voodoo\""
<< kwsys_ios::endl; << kwsys_ios::endl;
res = false; res = false;
} }
return res; return res;
...@@ -672,7 +672,7 @@ int testSystemTools(int, char*[]) ...@@ -672,7 +672,7 @@ int testSystemTools(int, char*[])
for (cc = 0; checkEscapeChars[cc][0]; cc ++ ) for (cc = 0; checkEscapeChars[cc][0]; cc ++ )
{ {
res &= CheckEscapeChars(checkEscapeChars[cc][0], checkEscapeChars[cc][1], res &= CheckEscapeChars(checkEscapeChars[cc][0], checkEscapeChars[cc][1],
*checkEscapeChars[cc][2], checkEscapeChars[cc][3]); *checkEscapeChars[cc][2], checkEscapeChars[cc][3]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment