From 63367e3aac062a7b55a3ba5c36a6c7fffbb6e2cc Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 29 Aug 2004 23:32:29 -0400 Subject: the amount/balance/value logic is now a library, completely separate from ledger --- binary.cc | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'binary.cc') diff --git a/binary.cc b/binary.cc index 0a712972..a64f21ff 100644 --- a/binary.cc +++ b/binary.cc @@ -8,21 +8,21 @@ namespace ledger { -const unsigned long binary_magic_number = 0xFFEED765; -static const unsigned long format_version = 0x0002001a; +static unsigned long binary_magic_number = 0xFFEED765; +static unsigned long format_version = 0x0002001a; -static account_t ** accounts; -static account_t ** accounts_next; -static unsigned int account_index; +static account_t ** accounts; +static account_t ** accounts_next; +static unsigned int account_index; -static commodity_t ** commodities; -static commodity_t ** commodities_next; -static unsigned int commodity_index; +static commodity_t ** commodities; +static commodity_t ** commodities_next; +static unsigned int commodity_index; -amount_t::bigint_t * bigints; -amount_t::bigint_t * bigints_next; -unsigned int bigints_index; -unsigned int bigints_count; +extern char * bigints; +extern char * bigints_next; +extern unsigned int bigints_index; +extern unsigned int bigints_count; #if DEBUG_LEVEL >= ALPHA #define read_binary_guard(in, id) { \ @@ -342,9 +342,8 @@ unsigned int read_binary_journal(std::istream& in, transaction_t * xact_pool = (transaction_t *) (item_pool + sizeof(entry_t) * count); bigints_index = 0; - bigints = bigints_next - = (amount_t::bigint_t *) (item_pool + sizeof(entry_t) * count + - sizeof(transaction_t) * xact_count); + bigints = bigints_next = (item_pool + sizeof(entry_t) * count + + sizeof(transaction_t) * xact_count); // Read in the commodities -- cgit v1.2.3