summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-06-23 00:07:59 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:12 -0400
commit529604b204a75f4aec22a9a57805f741dff7fe06 (patch)
tree65cf14c4d743dfb0b25b1b8240dd18663ce1b01d
parenta10f3f02e711b67e754e5a9430a09144e3339133 (diff)
downloadfork-ledger-529604b204a75f4aec22a9a57805f741dff7fe06.tar.gz
fork-ledger-529604b204a75f4aec22a9a57805f741dff7fe06.tar.bz2
fork-ledger-529604b204a75f4aec22a9a57805f741dff7fe06.zip
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.
-rw-r--r--binary.cc6
1 files changed, 5 insertions, 1 deletions
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<unsigned long>(data);
i < count;
@@ -550,7 +552,9 @@ void write_binary_entry_base(std::ostream& out, entry_base_t * entry)
{
write_binary_number<unsigned long>(out, entry->src_idx);
write_binary_number<istream_pos_type>(out, entry->beg_pos);
+ write_binary_number<unsigned long>(out, entry->beg_line);
write_binary_number<istream_pos_type>(out, entry->end_pos);
+ write_binary_number<unsigned long>(out, entry->end_line);
write_binary_number<unsigned long>(out, entry->transactions.size());
for (transactions_list::const_iterator i = entry->transactions.begin();