summaryrefslogtreecommitdiff
path: root/ledger.h
diff options
context:
space:
mode:
Diffstat (limited to 'ledger.h')
-rw-r--r--ledger.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/ledger.h b/ledger.h
index d9524b4a..d189d526 100644
--- a/ledger.h
+++ b/ledger.h
@@ -1,5 +1,5 @@
#ifndef _LEDGER_H
-#define _LEDGER_H "$Revision: 1.5 $"
+#define _LEDGER_H "$Revision: 1.6 $"
//////////////////////////////////////////////////////////////////////
//
@@ -17,6 +17,8 @@
#include <ctime>
#include <cassert>
+#include <pcre.h> // Perl regular expression library
+
namespace ledger {
// Format of a ledger entry (GNUcash account files are also supported):
@@ -279,6 +281,24 @@ typedef std::pair<const std::string, account *> accounts_entry;
extern accounts_t accounts;
+struct mask
+{
+ bool exclude;
+ pcre * regexp;
+
+ mask(bool exc, pcre * re) : exclude(exc), regexp(re) {}
+};
+
+extern void record_regexp(char * pattern, std::list<mask>& regexps);
+extern void read_regexps(const char * path, std::list<mask>& regexps);
+extern bool matches(const std::list<mask>& regexps,
+ const std::string& str);
+
+#ifdef HUQUQULLAH
+extern bool compute_huquq;
+extern std::list<mask> huquq_categories;
+#endif
+
extern bool use_warnings;
} // namespace ledger