summaryrefslogtreecommitdiff
path: root/binary.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-10-14 19:05:55 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:19 -0400
commita53f44ecdaf9051c9e7f64993787c88d98b5348a (patch)
tree5d3876db32ae57002ec870583c5acb623e4c34c4 /binary.cc
parent50c689e1ae75a304ef7431fa489360076e837120 (diff)
downloadfork-ledger-a53f44ecdaf9051c9e7f64993787c88d98b5348a.tar.gz
fork-ledger-a53f44ecdaf9051c9e7f64993787c88d98b5348a.tar.bz2
fork-ledger-a53f44ecdaf9051c9e7f64993787c88d98b5348a.zip
Support has been added for clearing of individual transactions. Set
`ledger-clear-whole-entries' in Emacs to revert to the old behavior.
Diffstat (limited to 'binary.cc')
-rw-r--r--binary.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/binary.cc b/binary.cc
index e9ac3deb..2a573f8f 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 = 0x00020040;
+static unsigned long format_version = 0x00020042;
static account_t ** accounts;
static account_t ** accounts_next;
@@ -188,6 +188,7 @@ inline void read_binary_transaction(char *& data, transaction_t * xact)
} else {
xact->cost = NULL;
}
+ read_binary_number(data, xact->state);
read_binary_number(data, xact->flags);
xact->flags |= TRANSACTION_BULK_ALLOC;
read_binary_string(data, &xact->note);
@@ -218,7 +219,6 @@ inline void read_binary_entry(char *& data, entry_t * entry,
{
read_binary_entry_base(data, entry, xact_pool);
read_binary_number(data, entry->date);
- read_binary_number(data, entry->state);
read_binary_string(data, &entry->code);
read_binary_string(data, &entry->payee);
}
@@ -548,6 +548,7 @@ void write_binary_transaction(std::ostream& out, transaction_t * xact)
} else {
write_binary_number<char>(out, 0);
}
+ write_binary_number(out, xact->state);
write_binary_number(out, xact->flags);
write_binary_string(out, xact->note);
}
@@ -571,7 +572,6 @@ void write_binary_entry(std::ostream& out, entry_t * entry)
{
write_binary_entry_base(out, entry);
write_binary_number(out, entry->date);
- write_binary_number(out, entry->state);
write_binary_string(out, entry->code);
write_binary_string(out, entry->payee);
}