summaryrefslogtreecommitdiff
path: root/ledger.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2003-10-10 18:53:27 +0000
committerJohn Wiegley <johnw@newartisans.com>2003-10-10 18:53:27 +0000
commit60fa58e847fd8368059e13e6d9b941fc0e75291b (patch)
tree42631fa16ccb3ed77a49497d8a6e43115c58831c /ledger.cc
parent2835be562889c4e4dd11205533cca54ae02042e1 (diff)
downloadfork-ledger-60fa58e847fd8368059e13e6d9b941fc0e75291b.tar.gz
fork-ledger-60fa58e847fd8368059e13e6d9b941fc0e75291b.tar.bz2
fork-ledger-60fa58e847fd8368059e13e6d9b941fc0e75291b.zip
*** empty log message ***
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) {