aboutsummaryrefslogtreecommitdiffstats
path: root/src/mgr/swconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mgr/swconfig.cpp')
-rw-r--r--src/mgr/swconfig.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mgr/swconfig.cpp b/src/mgr/swconfig.cpp
index d73d475..e29113d 100644
--- a/src/mgr/swconfig.cpp
+++ b/src/mgr/swconfig.cpp
@@ -2,7 +2,7 @@
* swconfig.cpp - implementation of Class SWConfig used for saving and
* retrieval of configuration information
*
- * $Id: swconfig.cpp,v 1.9 2002/07/28 01:48:38 scribe Exp $
+ * $Id: swconfig.cpp,v 1.11 2002/10/01 22:04:59 dglassey Exp $
*
* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
@@ -23,6 +23,7 @@
#include <swconfig.h>
#include <utilfuns.h>
+SWORD_NAMESPACE_START
SWConfig::SWConfig(const char * ifilename) {
filename = ifilename;
@@ -34,7 +35,7 @@ SWConfig::~SWConfig() {
}
-char SWConfig::getline(FILE *fp, string &line)
+char SWConfig::getline(FILE *fp, std::string &line)
{
char retval = 0;
char buf[255];
@@ -64,9 +65,9 @@ char SWConfig::getline(FILE *fp, string &line)
void SWConfig::Load() {
FILE *cfile;
char *buf, *data;
- string line;
+ std::string line;
ConfigEntMap cursect;
- string sectname;
+ std::string sectname;
bool first = true;
Sections.erase(Sections.begin(), Sections.end());
@@ -105,10 +106,10 @@ void SWConfig::Load() {
void SWConfig::Save() {
FILE *cfile;
- string buf;
+ std::string buf;
SectionMap::iterator sit;
ConfigEntMap::iterator entry;
- string sectname;
+ std::string sectname;
if ((cfile = fopen(filename.c_str(), "w"))) {
@@ -161,3 +162,5 @@ void SWConfig::augment(SWConfig &addFrom) {
ConfigEntMap & SWConfig::operator [] (const char *section) {
return Sections[section];
}
+
+SWORD_NAMESPACE_END