summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-15 16:42:14 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-15 16:42:14 -0400
commit20475478a4f49b8f6e4c86b8c1fc7d79451581e0 (patch)
tree31084656dd239b481dca87d984887f855a142fff
parent6f7f87699c509131ab5ffff330ba77abbd58e829 (diff)
downloadfork-ledger-20475478a4f49b8f6e4c86b8c1fc7d79451581e0.tar.gz
fork-ledger-20475478a4f49b8f6e4c86b8c1fc7d79451581e0.tar.bz2
fork-ledger-20475478a4f49b8f6e4c86b8c1fc7d79451581e0.zip
Removed the %! formatting code, as it does nothing
-rw-r--r--src/format.cc8
-rw-r--r--src/format.h1
-rw-r--r--src/report.cc12
3 files changed, 8 insertions, 13 deletions
diff --git a/src/format.cc b/src/format.cc
index cfbe5172..43563a2a 100644
--- a/src/format.cc
+++ b/src/format.cc
@@ -136,14 +136,11 @@ format_t::element_t * format_t::parse_elements(const string& fmt)
}
++p;
- while (*p == '!' || *p == '-') {
+ while (*p == '-') {
switch (*p) {
case '-':
current->add_flags(ELEMENT_ALIGN_LEFT);
break;
- case '!':
- current->add_flags(ELEMENT_FORMATTED);
- break;
}
++p;
}
@@ -283,8 +280,7 @@ void format_t::format(std::ostream& out_str, scope_t& scope)
unistring temp(out.str());
string result;
- if (! elem->has_flags(ELEMENT_FORMATTED) &&
- elem->max_width > 0 && elem->max_width < temp.length()) {
+ if (elem->max_width > 0 && elem->max_width < temp.length()) {
result = truncate(temp, elem->max_width);
} else {
result = temp.extract();
diff --git a/src/format.h b/src/format.h
index d1716dbf..f5d665c6 100644
--- a/src/format.h
+++ b/src/format.h
@@ -65,7 +65,6 @@ class format_t : public noncopyable
struct element_t : public supports_flags<>, public noncopyable
{
#define ELEMENT_ALIGN_LEFT 0x01
-#define ELEMENT_FORMATTED 0x02
enum kind_t {
STRING,
diff --git a/src/report.cc b/src/report.cc
index e195a8c2..933ff306 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -48,16 +48,16 @@ report_t::report_t(session_t& _session)
HANDLER(register_format_).on(
"%-.9(date) %-.20(payee)"
" %-.23(truncate(account, 23, 2))"
- " %!12(print_balance(strip(display_amount), 12, 67))"
- " %!12(print_balance(strip(display_total), 12, 80, true))\n%/"
+ " %12(print_balance(strip(display_amount), 12, 67))"
+ " %12(print_balance(strip(display_total), 12, 80, true))\n%/"
"%31|%-.23(truncate(account, 23, 2))"
- " %!12(print_balance(strip(display_amount), 12, 67))"
- " %!12(print_balance(strip(display_total), 12, 80, true))\n");
+ " %12(print_balance(strip(display_amount), 12, 67))"
+ " %12(print_balance(strip(display_total), 12, 80, true))\n");
// jww (2009-02-06): Most of these still need to be defined
HANDLER(wide_register_format_).on(
- "%-.9D %-.35P %-.39A %22.108t %!22.132T\n%/"
- "%48|%-.38A %22.108t %!22.132T\n");
+ "%-.9D %-.35P %-.39A %22.108t %22.132T\n%/"
+ "%48|%-.38A %22.108t %22.132T\n");
HANDLER(print_format_).on(
"%(format_date(entry.date, \"%Y/%m/%d\"))"