From 7189b181ef3e0da74d992da87771fa26399391bc Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 15 Aug 2004 17:08:56 -0400 Subject: further restructuring --- ledger.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ledger.cc') diff --git a/ledger.cc b/ledger.cc index abfaca3c..11972d55 100644 --- a/ledger.cc +++ b/ledger.cc @@ -177,7 +177,9 @@ entry_t * journal_t::derive_entry(strings_list::iterator i, return added; } -int parse_journal_file(const std::string& path, journal_t * journal) +int parse_journal_file(const std::string& path, + journal_t * journal, + account_t * master) { journal->sources.push_back(path); @@ -191,9 +193,11 @@ int parse_journal_file(const std::string& path, journal_t * journal) stream.seekg(0); if (magic == binary_magic_number) - return read_binary_journal(stream, journal, journal->master); + return read_binary_journal(stream, journal, + master ? master : journal->master); else - return parse_textual_journal(stream, journal, journal->master); + return parse_textual_journal(stream, journal, + master ? master : journal->master); } } // namespace ledger -- cgit v1.2.3