From 9e235d04a1aa9d38fa6f1503902873d2f7ad8419 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 17 Aug 2004 03:43:29 -0400 Subject: fixes --- amount.cc | 6 ++++-- balance.cc | 2 +- config.cc | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/amount.cc b/amount.cc index b1cde175..9f8c78f2 100644 --- a/amount.cc +++ b/amount.cc @@ -1,5 +1,7 @@ #include "amount.h" +#include + #include "gmp.h" #define MAX_PRECISION 10 @@ -503,7 +505,7 @@ std::ostream& operator<<(std::ostream& out, const amount_t& amt) out << quotient; } else { - strings_list strs; + std::list strs; char buf[4]; mpz_t temp; @@ -525,7 +527,7 @@ std::ostream& operator<<(std::ostream& out, const amount_t& amt) bool printed = false; - for (strings_list::reverse_iterator i = strs.rbegin(); + for (std::list::reverse_iterator i = strs.rbegin(); i != strs.rend(); i++) { if (printed) { diff --git a/balance.cc b/balance.cc index f5340195..7ecdab4e 100644 --- a/balance.cc +++ b/balance.cc @@ -1,4 +1,4 @@ -#include "balance.h" +#include "ledger.h" namespace ledger { diff --git a/config.cc b/config.cc index 99c4d4b4..06e6f4a7 100644 --- a/config.cc +++ b/config.cc @@ -20,6 +20,8 @@ config_t::config_t() { if (const char * p = std::getenv("HOME")) init_file = cache_file = price_db = p; + else + init_file = cache_file = price_db = ""; init_file += "/.ledgerrc"; cache_file += "/.ledger"; -- cgit v1.2.3