From f62a4906d1a8886fa086f5bd6a41b8597a31b1d4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 19 Aug 2004 02:30:56 -0400 Subject: fix to textual parsing, and a bit of reconstruction in main.cc --- textual.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'textual.cc') 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... -- cgit v1.2.3