summaryrefslogtreecommitdiff
path: root/ledger.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ledger.cc')
-rw-r--r--ledger.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/ledger.cc b/ledger.cc
index b77b8856..d0006d0b 100644
--- a/ledger.cc
+++ b/ledger.cc
@@ -4,7 +4,6 @@
namespace ledger {
-bool use_warnings = false;
book * main_ledger;
commodity::~commodity()
@@ -251,6 +250,15 @@ mask::mask(const std::string& pat) : exclude(false)
<< std::endl;
}
+mask::mask(const mask& m) : exclude(m.exclude), pattern(m.pattern)
+{
+ const char *error;
+ int erroffset;
+ regexp = pcre_compile(pattern.c_str(), PCRE_CASELESS,
+ &error, &erroffset, NULL);
+ assert(regexp);
+}
+
void read_regexps(const std::string& path, regexps_map& regexps)
{
if (access(path.c_str(), R_OK) != -1) {