blob: 85a7570cddff152f9265ad39d05a8c48568b4bca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "mask.h"
#include "debug.h"
#include "util.h"
#include <cstdlib>
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
|