Commit graph

104 commits

Author SHA1 Message Date
John Wiegley
858978de89 Journal data structures now use date_t instead of datetime_t.
This means transactions can only have day-level granularity -- which has
always been the case from an data file point of view.  The advantage to this
restriction is that reports will now be immune from daylight savings related
bugs, where a transaction falls to the wrong side of a --monthly report, for
example.
2008-08-01 17:37:22 -04:00
John Wiegley
ea3b386062 Added a new 'format' debugging command, which dissects the formatting
expression in its argument.
2008-08-01 03:44:22 -04:00
John Wiegley
8ed99e621d Turned some #if 0'd code into a comment. 2008-08-01 03:11:45 -04:00
John Wiegley
567902b173 Simplified the format_t code so that it no longer references any particulars
about journal objects.  This is all done through value expressions now.
2008-08-01 01:37:58 -04:00
John Wiegley
e5048ec71b Change many uses of for+iterator to use Boost.Foreach. 2008-07-31 17:48:29 -04:00
John Wiegley
99313ebc6c Revised the way that exceptions are thrown around. Instead of context being a
complicated string of pointers, it's now just a global block of text that gets
appended to as the error is being thrown up, and can be displayed at the catch
point if desired.  There are almost no cases where a thrown exception will not
result in an error message being displayed to the user.
2008-07-31 06:24:45 -04:00
John Wiegley
2aff35215f Enabled a huge number of warning flags for g++ in acprep, and fixed them all
except for several unused parameter warnings (because there is so much code
still #if 0'd out), and one implicit conversion from long long to long which
still has to be dealt with.
2008-07-30 05:12:46 -04:00
John Wiegley
1bb29cdbb7 The register report has begun printing real data, although not all the pieces
are in place yet and the formatting is still off.
2008-07-29 21:44:21 -04:00
John Wiegley
42e1d725aa The next value expression scheme is working, but the individual accessor
functions for each of the journal objects has yet to be ported.
2008-07-29 21:05:08 -04:00
John Wiegley
ea27d1b45a Moved around and renamed a very large amount of code in order to rationalize
the way that value expressions extract information from journal objects.
2008-07-29 20:10:03 -04:00
John Wiegley
4518ea9540 Value expression architecture is now rewritten, but the functionality of the
old system (for example, the meaning of 'a') has yet to be restored.  In the
new scheme, this will be done by definition a function outside of the value
expression logic, rather than the tight coupling between journal innards and
value expressions that occurred in 2.x.
2008-07-29 05:59:38 -04:00
John Wiegley
713f896790 A large body of work to get the register report printing again, but still
fails due to the fact that 2.x value expression syntax is not restored.
2008-07-27 00:10:35 -04:00
John Wiegley
162d982b0c The --verify option is now working properly again. Use "--verify --verbose"
if you wish to see memory usage statistics along with a top-level trace.
2008-07-26 05:06:06 -04:00
John Wiegley
961b30926b --verify works again, but the memory totals at the end still need work. 2008-07-26 04:08:55 -04:00
John Wiegley
643f2d33cf More work toward getting the textual parser working again. Since this means
that value expressions must work, there are a lot of details involved.
2008-07-24 09:02:47 -04:00
John Wiegley
d86a91d45b 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.
2008-07-20 23:12:04 -04:00
John Wiegley
52fc9f2e44 Brought in the final round of 3.0 code, although it does not compile yet:
report, session, parts of xpath, main, journal, option.
2008-07-20 05:03:54 -04:00
John Wiegley
d159501993 The code is compiling again, but it's far from being able to run yet. 2008-05-08 02:50:19 -04:00
John Wiegley
04dfda2282 Made separate modules for the csv command, since the prior method was
not fully correct.
2008-04-13 02:41:33 -04:00
John Wiegley
f9b874e1cb Added elision styles. 2008-04-13 02:41:32 -04:00
John Wiegley
5a93d4819e Reworked the way date/times are handled. 2008-04-13 02:41:32 -04:00
John Wiegley
32bdfe20d9 Tons of corrections and fixes to value expressions and lot figures. 2008-04-13 02:41:31 -04:00
John Wiegley
2964dd15b2 *** empty log message *** 2008-04-13 02:41:30 -04:00
John Wiegley
82d0ee869b Added --ansi and --ansi-invert options. 2008-04-13 02:41:30 -04:00
John Wiegley
e32d9e64a7 Added much better error location. 2008-04-13 02:41:29 -04:00
John Wiegley
b737cd8e6d Added a DATETIME value type. 2008-04-13 02:41:29 -04:00
John Wiegley
7acc1306d9 *** empty log message *** 2008-04-13 02:41:29 -04:00
John Wiegley
96d6d62ad9 Began support for improved commodity handling. 2008-04-13 02:41:28 -04:00
John Wiegley
7901598f1d Checked in all major updates. 2008-04-13 02:41:27 -04:00
John Wiegley
f2a167e0ed *** empty log message *** 2008-04-13 02:41:26 -04:00
John Wiegley
e22fa78e84 Added a check for null. 2008-04-13 02:41:24 -04:00
John Wiegley
2df14a5b86 Transactions now track their beginning and ending position, as do
entries.  The new format strings %xB %xE %xb %xe can be used to
display those values relative to a transaction.  The Emacs module now
relies on this support to exactly determine where a transaction is,
rather than the Elisp logic it relied on previously.
2008-04-13 02:41:24 -04:00
John Wiegley
a8012940f4 Removed Python integration support. 2008-04-13 02:41:21 -04:00
John Wiegley
f691735c6c Restructed the code that it can build and be used as a shared library.
The command-line version is still statically bound in the build
process by default (for the sake of speed).
2008-04-13 02:41:21 -04:00
John Wiegley
c7d72a09af *** empty log message *** 2008-04-13 02:41:20 -04:00
John Wiegley
c1b998980f *** empty log message *** 2008-04-13 02:41:19 -04:00
John Wiegley
eb0525e315 See ChangeLog 2008-04-13 02:41:19 -04:00
John Wiegley
a53f44ecda Support has been added for clearing of individual transactions. Set
`ledger-clear-whole-entries' in Emacs to revert to the old behavior.
2008-04-13 02:41:19 -04:00
John Wiegley
f851642347 (parse_elements): The format codes %b and %e can be used to display
the beginning and ending line numbers of an entry.  (format): Output
beginning and ending line for BEG_LINE and END_LINE types.
2008-04-13 02:41:12 -04:00
John Wiegley
d79b1b6a48 (format): [1178223] Don't truncate to max_width in the case of
outputting balances.
2008-04-13 02:41:07 -04:00
John Wiegley
c0285de46b Moved `format_xml_entries' to xml.cc. 2008-04-13 02:41:03 -04:00
John Wiegley
bb444b740f (truncated): Added "style" argument, so that at least Python users can
choose which output style they want (truncation at beginning, middle
or end of the string).  (export_format): Expose following handlers to
Python: FormatTransactions, FormatEntries, FormatXmlEntries,
FormatAccount, FormatEquity.
2008-04-13 02:41:01 -04:00
John Wiegley
38b126edbd (truncated): Simplified this method, and added schemes for truncating
at the beginning and middle of a string (neither of which seems better
than truncating at the front).  (output_xml_string): Change xml_string
to output_xml_string, for simplicity's sake.  Also, < and > are now
output as &lt; and &gt;.  (format_last_entry): Use output_xml_string
for the account name as well as the code, payee and note.
2008-04-13 02:40:59 -04:00
John Wiegley
32df4dd563 (format_equity::flush): If the equity balance uses multiple
commodities, then multiple "Equity" lines need to be printed, one for
each.  (format_equity::operator()): Same, but for individual accounts.
2008-04-13 02:40:59 -04:00
John Wiegley
1c7669671c Changes to support building with gcc 2.95. 2008-04-13 02:40:57 -04:00
John Wiegley
9d8b36a258 (format_transactions::operator): Corrected a bad memory access. 2008-04-13 02:40:56 -04:00
John Wiegley
f3c736006c *** empty log message *** 2008-04-13 02:40:55 -04:00
John Wiegley
4fda551752 (parse_elements): Added %S, %B and %E elements, for printing the
source path, beginning and ending positions of an entry.
2008-04-13 02:40:54 -04:00
John Wiegley
8f63d2d172 (format_last_entry): Output tr:cost as an amount, not as an amount
string.
2008-04-13 02:40:53 -04:00
John Wiegley
9cd4cf6df8 (format): Pay attention to the max_width setting for each formatting
element.  This means that "%.20N" can no longer exceed 20 characters
of width.
2008-04-13 02:40:50 -04:00