summaryrefslogtreecommitdiff
path: root/src/quotes.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-11 16:03:50 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-11 17:02:25 -0400
commitdea2aed0b509734ec4e1cd163ac2a4f013000da2 (patch)
tree7908da76c67ae5172882306a319bf26df81b73b4 /src/quotes.cc
parentd580079df892c30d023b3211d6c4611c17b11f8f (diff)
downloadfork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.gz
fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.bz2
fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.zip
Untabified all source files
Diffstat (limited to 'src/quotes.cc')
-rw-r--r--src/quotes.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/quotes.cc b/src/quotes.cc
index 4e3ec33e..90c1f3eb 100644
--- a/src/quotes.cc
+++ b/src/quotes.cc
@@ -40,13 +40,13 @@ namespace ledger {
optional<price_point_t>
commodity_quote_from_script(commodity_t& commodity,
- const optional<commodity_t&>& exchange_commodity)
+ const optional<commodity_t&>& exchange_commodity)
{
DEBUG("commodity.download", "downloading quote for symbol " << commodity.symbol());
#if defined(DEBUG_ON)
if (exchange_commodity)
DEBUG("commodity.download",
- " in terms of commodity " << exchange_commodity->symbol());
+ " in terms of commodity " << exchange_commodity->symbol());
#endif
char buf[256];
@@ -76,29 +76,29 @@ commodity_quote_from_script(commodity_t& commodity,
DEBUG("commodity.download", "downloaded quote: " << buf);
if (optional<std::pair<commodity_t *, price_point_t> > point =
- commodity_pool_t::current_pool->parse_price_directive(buf)) {
+ commodity_pool_t::current_pool->parse_price_directive(buf)) {
if (commodity_pool_t::current_pool->price_db) {
#if defined(__GNUG__) && __GNUG__ < 3
- ofstream database(*commodity_pool_t::current_pool->price_db,
- ios::out | ios::app);
+ ofstream database(*commodity_pool_t::current_pool->price_db,
+ ios::out | ios::app);
#else
- ofstream database(*commodity_pool_t::current_pool->price_db,
- std::ios_base::out | std::ios_base::app);
+ ofstream database(*commodity_pool_t::current_pool->price_db,
+ std::ios_base::out | std::ios_base::app);
#endif
- database << "P "
- << format_datetime(point->second.when, FMT_WRITTEN)
- << " " << commodity.symbol()
- << " " << point->second.price
- << std::endl;
+ database << "P "
+ << format_datetime(point->second.when, FMT_WRITTEN)
+ << " " << commodity.symbol()
+ << " " << point->second.price
+ << std::endl;
}
return point->second;
}
} else {
DEBUG("commodity.download",
- "Failed to download price for '" << commodity.symbol() <<
- "' (command: \"getquote " << commodity.symbol() <<
- " " << (exchange_commodity ?
- exchange_commodity->symbol() : "''") << "\")");
+ "Failed to download price for '" << commodity.symbol() <<
+ "' (command: \"getquote " << commodity.symbol() <<
+ " " << (exchange_commodity ?
+ exchange_commodity->symbol() : "''") << "\")");
// Don't try to download this commodity again.
commodity.add_flags(COMMODITY_NOMARKET);