summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMarius Nita <marius@cs.pdx.edu>2002-08-26 21:03:24 +0000
committerMarius Nita <marius@cs.pdx.edu>2002-08-26 21:03:24 +0000
commit572acce581f4b8799db661ed7ab0007de0393a09 (patch)
tree3d9af34b2370879ebc52efc9cca3e22c411b4d6d /util
parentba1a71566b7e793409f0f32ad7b9589e8b8e8c70 (diff)
Fixed a couple of glitches, added on/off values for boolean
Diffstat (limited to 'util')
-rw-r--r--util/epist/config.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/epist/config.cc b/util/epist/config.cc
index 3e99e135..f4f0bac6 100644
--- a/util/epist/config.cc
+++ b/util/epist/config.cc
@@ -77,7 +77,7 @@ bool Config::getValue(Config::BoolType type, bool &ret) const
BoolItemList::const_iterator it = bool_items.begin(), end = bool_items.end();
for (; it != end; ++it) {
if ((*it)->type == type) {
- ret = (*it)->type;
+ ret = (*it)->value;
return true;
}
}
@@ -123,7 +123,8 @@ void Config::addOption(const std::string &name, const std::string &value)
item->type = bool_options[i].type;
- if (strcasecmp(tmp, "true") == 0 || strcasecmp(tmp, "1"))
+ if (strcasecmp(tmp, "true") == 0 || strcasecmp(tmp, "1") == 0 ||
+ strcasecmp(tmp, "on") == 0)
item->value = true;
else
item->value = false;