summaryrefslogtreecommitdiff
path: root/ledger.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2003-09-30 11:31:45 +0000
committerJohn Wiegley <johnw@newartisans.com>2003-09-30 11:31:45 +0000
commitf6c2e3d51eb8cd0892e5beeae59b74f12d14c027 (patch)
treed8c9f649d32f95386ca0a34657d99aa707a42f0a /ledger.h
parent30aef588bf32419718a4d0ea0488ed8a074ff784 (diff)
downloadfork-ledger-f6c2e3d51eb8cd0892e5beeae59b74f12d14c027.tar.gz
fork-ledger-f6c2e3d51eb8cd0892e5beeae59b74f12d14c027.tar.bz2
fork-ledger-f6c2e3d51eb8cd0892e5beeae59b74f12d14c027.zip
*** empty log message ***
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