summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-02-20 01:06:31 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:05 -0400
commit9ff282bd1173ddc34cad14a6e983b26b69278296 (patch)
tree65fb6008516e0c03bab1c3f8825e99c7692fd271 /textual.cc
parent0f98c9235f5106d18b33d026b99edbcfdcd66478 (diff)
downloadfork-ledger-9ff282bd1173ddc34cad14a6e983b26b69278296.tar.gz
fork-ledger-9ff282bd1173ddc34cad14a6e983b26b69278296.tar.bz2
fork-ledger-9ff282bd1173ddc34cad14a6e983b26b69278296.zip
(parse_entry): Parse the pending flag if a ! is used in place of *.
Diffstat (limited to 'textual.cc')
-rw-r--r--textual.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/textual.cc b/textual.cc
index 4a6a839e..bffd56bd 100644
--- a/textual.cc
+++ b/textual.cc
@@ -220,9 +220,17 @@ entry_t * parse_entry(std::istream& in, char * line, account_t * master,
TIMER_START(entry_details);
- if (next && *next == '*') {
- curr->state = entry_t::CLEARED;
- next = skip_ws(++next);
+ if (next) {
+ switch (*next) {
+ case '*':
+ curr->state = entry_t::CLEARED;
+ next = skip_ws(++next);
+ break;
+ case '!':
+ curr->state = entry_t::PENDING;
+ next = skip_ws(++next);
+ break;
+ }
}
// Parse the optional code: (TEXT)