summaryrefslogtreecommitdiff
path: root/format.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-20 23:12:04 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-20 23:12:04 -0400
commitd86a91d45b837d1d32e943107c856497897cc85c (patch)
tree3e9ca05a7126facb6b2ad7cd9447d4bc7c149d6c /format.cc
parent689df610779d43bf740925a90ab3579b22d45da8 (diff)
downloadfork-ledger-d86a91d45b837d1d32e943107c856497897cc85c.tar.gz
fork-ledger-d86a91d45b837d1d32e943107c856497897cc85c.tar.bz2
fork-ledger-d86a91d45b837d1d32e943107c856497897cc85c.zip
The new XPath parser has been integrated, although I have removed the
XML-related bits -- I just wanted the better infrastructure that had been created during the rewrite. It doesn't work, but it compiles and links now. This means that all of the previous 3.0 code has been moved over, although there are still snippets of code in pending/old that need to be restored.
Diffstat (limited to 'format.cc')
-rw-r--r--format.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/format.cc b/format.cc
index c64e149d..a2af245b 100644
--- a/format.cc
+++ b/format.cc
@@ -463,13 +463,13 @@ void format_t::format(std::ostream& out_str, const details_t& details) const
if (details.xact->cost && details.xact->amount) {
std::ostringstream stream;
- if (! details.xact->amount_expr.expr.empty())
- stream << details.xact->amount_expr.expr;
+ if (! details.xact->amount_expr.expr_str.empty())
+ stream << details.xact->amount_expr.expr_str;
else
stream << details.xact->amount.strip_annotations();
if (details.xact->cost_expr)
- stream << details.xact->cost_expr->expr;
+ stream << details.xact->cost_expr->expr_str;
else
stream << " @ " << amount_t(*details.xact->cost /
details.xact->amount).unround();
@@ -498,8 +498,8 @@ void format_t::format(std::ostream& out_str, const details_t& details) const
}
if (! use_disp) {
- if (! details.xact->amount_expr.expr.empty())
- out << details.xact->amount_expr.expr;
+ if (! details.xact->amount_expr.expr_str.empty())
+ out << details.xact->amount_expr.expr_str;
else
out << details.xact->amount.strip_annotations();
} else {
@@ -828,7 +828,7 @@ void print_entry(std::ostream& out, const entry_base_t& entry_base,
}
else if (const auto_entry_t * entry =
dynamic_cast<const auto_entry_t *>(&entry_base)) {
- out << "= " << entry->predicate.predicate.expr << '\n';
+ out << "= " << entry->predicate.predicate.expr_str << '\n';
print_format = prefix + " %-34A %12o\n";
}
else if (const period_entry_t * entry =