From 529604b204a75f4aec22a9a57805f741dff7fe06 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 23 Jun 2005 00:07:59 +0000 Subject: Updated binary version number. (read_binary_entry_base): Read in beginning and ending line information for each entry. (write_binary_entry_base): Write out beginning and ending line information for each entry. --- binary.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'binary.cc') diff --git a/binary.cc b/binary.cc index 913f29d1..abe8fccd 100644 --- a/binary.cc +++ b/binary.cc @@ -11,7 +11,7 @@ namespace ledger { static unsigned long binary_magic_number = 0xFFEED765; -static unsigned long format_version = 0x00020035; +static unsigned long format_version = 0x00020036; static account_t ** accounts; static account_t ** accounts_next; @@ -200,7 +200,9 @@ inline void read_binary_entry_base(char *& data, entry_base_t * entry, { read_binary_number(data, entry->src_idx); read_binary_number(data, entry->beg_pos); + read_binary_number(data, entry->beg_line); read_binary_number(data, entry->end_pos); + read_binary_number(data, entry->end_line); for (unsigned long i = 0, count = read_binary_number(data); i < count; @@ -550,7 +552,9 @@ void write_binary_entry_base(std::ostream& out, entry_base_t * entry) { write_binary_number(out, entry->src_idx); write_binary_number(out, entry->beg_pos); + write_binary_number(out, entry->beg_line); write_binary_number(out, entry->end_pos); + write_binary_number(out, entry->end_line); write_binary_number(out, entry->transactions.size()); for (transactions_list::const_iterator i = entry->transactions.begin(); -- cgit v1.2.3