fixes
This commit is contained in:
parent
aeb2fd0d39
commit
9e235d04a1
3 changed files with 7 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
#include "amount.h"
|
#include "amount.h"
|
||||||
|
|
||||||
|
#include <list>
|
||||||
|
|
||||||
#include "gmp.h"
|
#include "gmp.h"
|
||||||
|
|
||||||
#define MAX_PRECISION 10
|
#define MAX_PRECISION 10
|
||||||
|
|
@ -503,7 +505,7 @@ std::ostream& operator<<(std::ostream& out, const amount_t& amt)
|
||||||
out << quotient;
|
out << quotient;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
strings_list strs;
|
std::list<std::string> strs;
|
||||||
char buf[4];
|
char buf[4];
|
||||||
|
|
||||||
mpz_t temp;
|
mpz_t temp;
|
||||||
|
|
@ -525,7 +527,7 @@ std::ostream& operator<<(std::ostream& out, const amount_t& amt)
|
||||||
|
|
||||||
bool printed = false;
|
bool printed = false;
|
||||||
|
|
||||||
for (strings_list::reverse_iterator i = strs.rbegin();
|
for (std::list<std::string>::reverse_iterator i = strs.rbegin();
|
||||||
i != strs.rend();
|
i != strs.rend();
|
||||||
i++) {
|
i++) {
|
||||||
if (printed) {
|
if (printed) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "balance.h"
|
#include "ledger.h"
|
||||||
|
|
||||||
namespace ledger {
|
namespace ledger {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ config_t::config_t()
|
||||||
{
|
{
|
||||||
if (const char * p = std::getenv("HOME"))
|
if (const char * p = std::getenv("HOME"))
|
||||||
init_file = cache_file = price_db = p;
|
init_file = cache_file = price_db = p;
|
||||||
|
else
|
||||||
|
init_file = cache_file = price_db = "";
|
||||||
|
|
||||||
init_file += "/.ledgerrc";
|
init_file += "/.ledgerrc";
|
||||||
cache_file += "/.ledger";
|
cache_file += "/.ledger";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue