diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-06 03:31:41 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-06 03:31:41 -0400 |
commit | cf6babcf9048f7e9205b1bead4794d8e2e9e8d62 (patch) | |
tree | 38688d2cd2433517045a67d2ef3f2777ee335050 /src/option.cc | |
parent | ecc5a1aab50d57e65b654ea9f8a84f17208ca612 (diff) | |
download | fork-ledger-cf6babcf9048f7e9205b1bead4794d8e2e9e8d62.tar.gz fork-ledger-cf6babcf9048f7e9205b1bead4794d8e2e9e8d62.tar.bz2 fork-ledger-cf6babcf9048f7e9205b1bead4794d8e2e9e8d62.zip |
Restored all the option handlers from 2.6.2, but not the options themselves.
Diffstat (limited to 'src/option.cc')
-rw-r--r-- | src/option.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/option.cc b/src/option.cc index 7f8bdeb4..366c9c54 100644 --- a/src/option.cc +++ b/src/option.cc @@ -47,15 +47,15 @@ namespace { else *p++ = ch; } + *p++ = '_'; *p = '\0'; if (expr_t::ptr_op_t op = scope.lookup(buf)) - return op_bool_tuple(op, false); + return op_bool_tuple(op, true); - *p++ = '_'; - *p = '\0'; + *--p = '\0'; - return op_bool_tuple(scope.lookup(buf), true); + return op_bool_tuple(scope.lookup(buf), false); } op_bool_tuple find_option(scope_t& scope, const char letter) @@ -63,15 +63,15 @@ namespace { char buf[10]; std::strcpy(buf, "opt_"); buf[4] = letter; - buf[5] = '\0'; + buf[5] = '_'; + buf[6] = '\0'; if (expr_t::ptr_op_t op = scope.lookup(buf)) - return op_bool_tuple(op, false); + return op_bool_tuple(op, true); - buf[5] = '_'; - buf[6] = '\0'; + buf[5] = '\0'; - return op_bool_tuple(scope.lookup(buf), true); + return op_bool_tuple(scope.lookup(buf), false); } void process_option(const function_t& opt, scope_t& scope, |