diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-17 15:21:45 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-17 15:21:45 (GMT) |
commit | 9891260a6dab66c9ea44b5c2e244f3128625baf5 (patch) | |
tree | 930651e4383fe1d904cc9c493bd859cb97b530af /Source/kwsys/Registry.cxx | |
parent | 2694ad76c538333d3ff45613bd1201f97af003cd (diff) | |
download | CMake-9891260a6dab66c9ea44b5c2e244f3128625baf5.zip CMake-9891260a6dab66c9ea44b5c2e244f3128625baf5.tar.gz CMake-9891260a6dab66c9ea44b5c2e244f3128625baf5.tar.bz2 |
ENH: add support for watcom wmake and wcl386
Diffstat (limited to 'Source/kwsys/Registry.cxx')
-rw-r--r-- | Source/kwsys/Registry.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/kwsys/Registry.cxx b/Source/kwsys/Registry.cxx index 97d854d..3c0be26 100644 --- a/Source/kwsys/Registry.cxx +++ b/Source/kwsys/Registry.cxx @@ -367,9 +367,7 @@ RegistryHelper::~RegistryHelper() bool RegistryHelper::Open(const char *toplevel, const char *subkey, int readonly) { - this->EntriesMap.erase( - this->EntriesMap.begin(), - this->EntriesMap.end()); + this->EntriesMap.clear(); m_Empty = 1; #ifdef _WIN32 @@ -416,7 +414,7 @@ bool RegistryHelper::Open(const char *toplevel, const char *subkey, } } m_HomeDirectory = homeDirectory; - str << m_HomeDirectory << "/." << toplevel << "rc"; + str << m_HomeDirectory.c_str() << "/." << toplevel << "rc"; if ( readonly == Registry::READWRITE ) { kwsys_ios::ofstream ofs( str.str().c_str(), kwsys_ios::ios::out|kwsys_ios::ios::app ); @@ -503,7 +501,7 @@ bool RegistryHelper::Close() } kwsys_ios::ostringstream str; - str << m_HomeDirectory << "/." << this->GetTopLevel() << "rc"; + str << m_HomeDirectory.c_str() << "/." << this->GetTopLevel() << "rc"; kwsys_ios::ofstream *ofs = new kwsys_ios::ofstream(str.str().c_str(), kwsys_ios::ios::out); if ( !ofs ) { @@ -531,9 +529,7 @@ bool RegistryHelper::Close() *ofs << it->first.c_str() << " = " << this->EncodeValue(it->second.c_str()).c_str() << kwsys_ios::endl; } } - this->EntriesMap.erase( - this->EntriesMap.begin(), - this->EntriesMap.end()); + this->EntriesMap.clear(); ofs->close(); delete ofs; this->SetSubKey(0); @@ -673,7 +669,8 @@ kwsys_stl::string RegistryHelper::CreateKey( const char *key ) return ""; } kwsys_ios::ostringstream ostr; - ostr << this->EncodeKey(this->m_SubKey.c_str()) << "\\" << this->EncodeKey(key); + ostr << this->EncodeKey(this->m_SubKey.c_str()).c_str() + << "\\" << this->EncodeKey(key).c_str(); return ostr.str(); } |