Commit graph

57 commits

Author SHA1 Message Date
John Wiegley
71d0033b6f Corrected several compile and link problems 2012-03-06 23:04:27 -06:00
John Wiegley
b6adc8f460 Use unique_ptr instead of std::auto_ptr 2012-03-05 17:46:42 -06:00
John Wiegley
036200e959 Make copying of format_t objects memory-safe 2012-03-05 05:53:36 -06:00
John Wiegley
96ec764c4a Don't copy the next pointer in element_t's copy ctor 2012-03-05 05:06:57 -06:00
John Wiegley
5abbf44583 Corrected copy of format_t objects
Copying of sub-elements was causing pointer overlap.
2012-03-05 05:03:53 -06:00
John Wiegley
35ace8816a Improvements to format parsing
Fixes #337
2012-03-02 10:58:16 -06:00
John Wiegley
e2afc783db Increased file copyrights to 2012 2012-02-29 22:32:23 -06:00
John Wiegley
bc9ff7095f Introduced a new SCOPE expression terminal 2012-02-20 17:20:22 -06:00
John Wiegley
c3a9a7d2c5 Fixed many Clang type conversion warnings with static_cast 2012-02-17 15:17:52 -06:00
John Wiegley
a19b541dd9 Removed unneeded default cases 2012-02-17 15:15:32 -06:00
John Wiegley
2f1b1c8ced Change weighting of account-name abbreviation
Parent accounts are abbreviated even more, so that child accounts can
show more text.
2010-06-21 18:05:26 -04:00
John Wiegley
c367dcab82 Improved algorithm for abbreviating account names 2010-06-14 07:20:23 -04:00
John Wiegley
0bb9c11062 Changed display order of format exceptions 2010-06-13 03:52:20 -04:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
ab416f759f Updated copyrights to 2003-2010 2010-03-05 22:14:10 -05:00
John Wiegley
7a44791221 Optimization in the formatting of string values 2009-11-14 02:49:38 -05:00
John Wiegley
7cd37b1d50 Moving the #include of unistring.h into format.h 2009-11-10 18:43:38 -05:00
John Wiegley
bf24b93818 Fixes to the value expression parser and evaluator 2009-11-10 02:26:20 -05:00
John Wiegley
fb8be53edb Redesigned the format_t class 2009-11-09 02:06:08 -05:00
John Wiegley
c3535d06c8 Redesigned the expr_t, predicate_t, query_t classes 2009-11-09 02:06:06 -05:00
John Wiegley
aae134f692 Fixed a display issue with the balance report 2009-10-27 19:01:55 -04:00
John Wiegley
ca1560d53d Fixed overflow bug introduced by the warning fixes 2009-10-25 05:39:47 -04:00
John Wiegley
588f2ef2f5 Fixed many compiler warnings from g++ 4.4 2009-10-25 05:01:39 -04:00
John Wiegley
e8f315f00d Correctly align amounts formatted as "%12(amount)" 2009-06-28 15:53:46 +01:00
John Wiegley
8cb80185d5 Restored the --truncate option, added baseline test 2009-06-21 19:06:07 +01:00
John Wiegley
110f0b8023 Enabled use of pre-compiled headers by default 2009-03-10 17:02:03 -04:00
John Wiegley
c11d325712 Reduced the #include dependency tree to a minimum 2009-03-04 23:53:43 -04:00
John Wiegley
9d4e888ef5 Cured several harmless compiler warnings 2009-03-04 04:31:34 -04:00
John Wiegley
4af1bfdde3 Allow special %{} formatting sequence
Although %(amount) inserts an item's amount, it only does exactly that.
There is no special consideration like stripping of lot details, or
reduction to the base commodity, etc.  For those things, and to make
sure it was display in red if negative, the canonical form would be:

  %(ansify_if(justify(scrub(amount), 12, -1, true), red if amount < 0))

You can now use the special %{} form as an alternate to this:

  %12{amount, red if amount < 0}

The two expand to the same underlying expression.
2009-03-03 15:06:15 -04:00
John Wiegley
38122c2224 Corrected warnings g++-4.3.3 was complaining about 2009-02-28 04:54:54 -04:00
John Wiegley
316b854676 Fixed a buffer overrun 2009-02-27 01:46:16 -04:00
John Wiegley
238bd7f8a5 Marked all strings needing internationalization
These strings are now collected automagically in the file po/ledger.pot.
If you'd like to produce a translation, just run this command after
building Ledger:

    msginit -l LOCALE -o LANG.po -i po/ledger.pot

Where LOCALE is a string like de or en_GB, and LANG is a short
descriptive word for your language.

Then send me this .po file so I can commit it to the Ledger sources
(alternatively, you could maintain the file in a fork on GitHub), and
setup the build script to format and install your new message catalog
during a "make install".
2009-02-25 03:51:42 -04:00
John Wiegley
944c63e6f2 The Great Renaming, Part II
The last commit did not contain the majority of changes because of a
slight mishap.  This contains the real changeset.
2009-02-23 19:07:30 -04:00
John Wiegley
13812346b6 Handle reporting widths that are too small 2009-02-21 02:17:03 -04:00
John Wiegley
a181ac52d3 Corrected a column-wise formatting issue 2009-02-20 15:41:48 -04:00
John Wiegley
cae49a2998 Efficiency fix for the formatting code 2009-02-19 12:49:25 -04:00
John Wiegley
07f4aefdfd Removed the %*| special char, for %*(" ") 2009-02-17 17:58:50 -04:00
John Wiegley
caeb336176 The format code %C is now equal to %(fmt_C) 2009-02-15 19:53:38 -04:00
John Wiegley
5516a7ddb5 Removed an unused function 2009-02-15 19:49:05 -04:00
John Wiegley
20475478a4 Removed the %! formatting code, as it does nothing 2009-02-15 16:42:14 -04:00
John Wiegley
326cbea4c7 The formatting code no longer justifies values
This is done in the value code, which knows -- based on the value's type
-- how best to apply the justification.
2009-02-13 19:27:37 -04:00
John Wiegley
a9061811ce Greatly improved output from the "format" command
It now shows the formatted result against a sample entry, similar to
what "parse" now does.
2009-02-13 19:25:15 -04:00
John Wiegley
f50def86c4 Moved get_partial_name from format.cc into account_t, where it belongs. 2009-02-08 23:28:30 -04:00
John Wiegley
2d941730b1 Largely removed all of Ledger's use of global variables, for the REPL's sake. 2009-02-04 19:55:27 -04:00
John Wiegley
9540406af1 Simplified error context handling. 2009-02-02 00:24:26 -04:00
John Wiegley
7128fdb637 Added a missing throw() in the formatter. 2009-02-01 22:09:27 -04:00
John Wiegley
05c77351e4 Stopped using the generic "unsigned int" in favor of more specific types. 2009-01-29 18:23:57 -04:00
John Wiegley
8b75b5cbfb Revised the way that parsing flags get passed around. 2009-01-29 02:24:25 -04:00
John Wiegley
900a92e115 Added support for Unicode text in Ledger files, thanks to 'utfcpp', which can
be located at http://utfcpp.sourceforge.net.
2009-01-23 19:50:00 -04:00
John Wiegley
887828a40c Increased copyright range to include 2009. 2009-01-20 01:53:31 -04:00