summaryrefslogtreecommitdiff
path: root/debug.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-19 20:31:46 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:28 -0400
commit0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c (patch)
tree0a2c2aca7100d045f491b03f0a5bda92378d3ef9 /debug.cc
parent176b3044e355398a0c31e0c42a3cd7b8a2e3f3e5 (diff)
downloadledger-0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c.tar.gz
ledger-0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c.tar.bz2
ledger-0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c.zip
Made the amount/balance/value interface a bit more rational; added
back a useless version of the register command (just to prove the command sequence); and added smart XML semantics to the XPath implementation so that nodes can be coerced to values.
Diffstat (limited to 'debug.cc')
-rw-r--r--debug.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/debug.cc b/debug.cc
index b3b140bc..3b996045 100644
--- a/debug.cc
+++ b/debug.cc
@@ -81,13 +81,8 @@ bool _free_debug_stream = false;
bool _debug_active(const char * const cls) {
if (char * debug = std::getenv("DEBUG_CLASS")) {
- static const char * error;
- static int erroffset;
- static int ovec[30];
- static pcre * class_regexp = pcre_compile(debug, PCRE_CASELESS,
- &error, &erroffset, NULL);
- return pcre_exec(class_regexp, NULL, cls, std::strlen(cls),
- 0, 0, ovec, 30) >= 0;
+ static boost::regex class_regexp(debug);
+ return boost::regex_match(cls, class_regexp);
}
return false;
}