summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-19 02:30:56 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-19 02:30:56 -0400
commitf62a4906d1a8886fa086f5bd6a41b8597a31b1d4 (patch)
treeaaa5438556cce06457a1493fb6bfdc1e29ebfe68 /textual.cc
parent41604e0ea65cb342aa05074bf39bbbc832c4c86a (diff)
downloadfork-ledger-f62a4906d1a8886fa086f5bd6a41b8597a31b1d4.tar.gz
fork-ledger-f62a4906d1a8886fa086f5bd6a41b8597a31b1d4.tar.bz2
fork-ledger-f62a4906d1a8886fa086f5bd6a41b8597a31b1d4.zip
fix to textual parsing, and a bit of reconstruction in main.cc
Diffstat (limited to 'textual.cc')
-rw-r--r--textual.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/textual.cc b/textual.cc
index df7d0242..564b2cd2 100644
--- a/textual.cc
+++ b/textual.cc
@@ -110,6 +110,10 @@ transaction_t * parse_transaction(std::istream& in, account_t * account,
in.getline(line, MAX_LINE);
linenum++;
+ // Skip a possible blank line
+ if (*skip_ws(line) == '\0')
+ return NULL;
+
return parse_transaction_text(line, account, entry);
}
@@ -321,8 +325,7 @@ unsigned int parse_textual_journal(std::istream& in, journal_t * journal,
if (peek_next_nonws(in) != '\n') {
in.getline(line, MAX_LINE);
linenum++;
- throw parse_error(path, linenum,
- "Ignoring entry beginning with whitespace");
+ throw parse_error(path, linenum, "Line begins with whitespace");
}
// fall through...