diff options
author | John Wiegley <johnw@newartisans.com> | 2007-04-30 06:26:38 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:33 -0400 |
commit | c8899addfd2deed3d84be2de234681db64987722 (patch) | |
tree | 07f9a5eb603ff4ec83fe18c83083575d2b7a439a /src/mask.cc | |
parent | aa9cc125796711afcaa459898e95527fdae8e912 (diff) | |
download | ledger-c8899addfd2deed3d84be2de234681db64987722.tar.gz ledger-c8899addfd2deed3d84be2de234681db64987722.tar.bz2 ledger-c8899addfd2deed3d84be2de234681db64987722.zip |
Rearranged the sources a bit.
Diffstat (limited to 'src/mask.cc')
-rw-r--r-- | src/mask.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mask.cc b/src/mask.cc new file mode 100644 index 00000000..02cac880 --- /dev/null +++ b/src/mask.cc @@ -0,0 +1,24 @@ +#include "mask.h" + +namespace ledger { + +mask_t::mask_t(const string& pat) : exclude(false) +{ + const char * p = pat.c_str(); + + if (*p == '-') { + exclude = true; + p++; + while (std::isspace(*p)) + p++; + } + else if (*p == '+') { + p++; + while (std::isspace(*p)) + p++; + } + + expr.assign(p); +} + +} // namespace ledger |