summaryrefslogtreecommitdiff
path: root/ledger.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-15 17:08:56 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-15 17:08:56 -0400
commit7189b181ef3e0da74d992da87771fa26399391bc (patch)
tree3c6b677a54161fb63cb169c93d9eade0b316b4da /ledger.cc
parent78c44b5e795a98baacfbc56943b784370956cbca (diff)
downloadfork-ledger-7189b181ef3e0da74d992da87771fa26399391bc.tar.gz
fork-ledger-7189b181ef3e0da74d992da87771fa26399391bc.tar.bz2
fork-ledger-7189b181ef3e0da74d992da87771fa26399391bc.zip
further restructuring
Diffstat (limited to 'ledger.cc')
-rw-r--r--ledger.cc10
1 files changed, 7 insertions, 3 deletions
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