diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-09-16 17:56:09 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-09-16 17:56:09 (GMT) |
commit | 767057f37fa6ce196b15ee2243a1d409b33ba893 (patch) | |
tree | 1a4756eb33488182cbbf42a81dfdd3013f42e4d9 /Source/kwsys/Registry.cxx | |
parent | 9b486bacfc98d6878b0e48f0136653c98cc5b385 (diff) | |
download | CMake-767057f37fa6ce196b15ee2243a1d409b33ba893.zip CMake-767057f37fa6ce196b15ee2243a1d409b33ba893.tar.gz CMake-767057f37fa6ce196b15ee2243a1d409b33ba893.tar.bz2 |
BUG: Fix encoding and add deleting to the test
Diffstat (limited to 'Source/kwsys/Registry.cxx')
-rw-r--r-- | Source/kwsys/Registry.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/kwsys/Registry.cxx b/Source/kwsys/Registry.cxx index 245e3ef..a15a12a 100644 --- a/Source/kwsys/Registry.cxx +++ b/Source/kwsys/Registry.cxx @@ -525,7 +525,7 @@ bool RegistryHelper::Close() it != this->EntriesMap.end(); ++ it ) { - *ofs << it->first.c_str() << " = " << it->second.c_str()<< kwsys_ios::endl; + *ofs << it->first.c_str() << " = " << this->EncodeValue(it->second.c_str()).c_str() << kwsys_ios::endl; } } this->EntriesMap.erase( @@ -660,7 +660,7 @@ bool RegistryHelper::SetValue(const char *skey, const char *value) { return 0; } - this->EntriesMap[key] = this->EncodeValue(value); + this->EntriesMap[key] = value; return 1; } return false; @@ -744,7 +744,7 @@ kwsys_stl::string RegistryHelper::EncodeKey(const char* str) { switch ( *str ) { - case '%': case '=': case '\n': case '\r': case '\t': case ' ': + case '%': case '=': case '\n': case '\r': case '\t': char buffer[4]; sprintf(buffer, "%%%02X", *str); ostr << buffer; |