ledger/mask.cc
John Wiegley 0a6b5726ec Made the amount/balance/value interface a bit more rational; added
back a useless version of the register command (just to prove the
 command sequence); and added smart XML semantics to the XPath
 implementation so that nodes can be coerced to values.
2008-04-13 03:38:28 -04:00

24 lines
357 B
C++

#include "mask.h"
#include "debug.h"
#include "util.h"
#include <cstdlib>
mask_t::mask_t(const std::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);
}