From cf6babcf9048f7e9205b1bead4794d8e2e9e8d62 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 6 Feb 2009 03:31:41 -0400 Subject: Restored all the option handlers from 2.6.2, but not the options themselves. --- src/option.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/option.cc') 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, -- cgit v1.2.3