summaryrefslogtreecommitdiff
path: root/format.cc
Commit message (Collapse)AuthorAgeFilesLines
* Regular expressions are working again, such that very basic register reportsJohn Wiegley2008-08-031-405/+8
| | | | are now possible.
* Rearranged the code a bit, breaking walk.cc into several different files:John Wiegley2008-08-031-8/+5
| | | | | | | | | | compare compare_items<T> handler item_handler<T> iterators used to iterators sets of journal objects filters derived from item_handler, they morph the result set output derived from item_handler, these do the printing Also, created a new 'help' files which contains just Ledger's help text.
* Added several missing copyright notices.John Wiegley2008-08-031-0/+31
|
* Got date, payee and accounts back into the register report.John Wiegley2008-08-031-11/+2
|
* More infrastructure work toward getting journal objects to provide their ownJohn Wiegley2008-08-021-5/+18
| | | | information in an abstract manner.
* Formatting now relies exclusively on value expressions.John Wiegley2008-08-021-10/+24
| | | | | | | | | | | | | | | | | | | | What this means is that the utility code, basic math, value expressions, string formatting and option handling are now entirely decoupled from the rest of the code. This decoupling not only greatly simplifies the more basic parts of Ledger, but makes it much easier to test and verify its completeness. For example, when the formatting code %X is seen by the format parser, it turns into a call to the expression function fmt_X, which must be defined when the format string is first compiled against an object. If that object is a transaction, the transaction's scope will be the first to have a chance at providing a definition. If an account is being reported, it will. If neither does, the next scope in sequence -- soon to be the current report -- will, and then the session object that "owns" the current Ledger session. In 2.6, the formatting code new everything about transaction and accounts, and relied on flags to communicate special details between them. Now the transaction will offer the details for its own reporting, while the formatter worries only about strings and how to output them.
* Journal data structures now use date_t instead of datetime_t.John Wiegley2008-08-011-3/+3
| | | | | | | | 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.
* Added a new 'format' debugging command, which dissects the formattingJohn Wiegley2008-08-011-1/+26
| | | | expression in its argument.
* Turned some #if 0'd code into a comment.John Wiegley2008-08-011-43/+32
|
* Simplified the format_t code so that it no longer references any particularsJohn Wiegley2008-08-011-411/+115
| | | | about journal objects. This is all done through value expressions now.
* Change many uses of for+iterator to use Boost.Foreach.John Wiegley2008-07-311-34/+22
|
* Revised the way that exceptions are thrown around. Instead of context being aJohn Wiegley2008-07-311-2/+2
| | | | | | | 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.
* Enabled a huge number of warning flags for g++ in acprep, and fixed them allJohn Wiegley2008-07-301-1/+2
| | | | | | 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.
* The register report has begun printing real data, although not all the piecesJohn Wiegley2008-07-291-2/+4
| | | | are in place yet and the formatting is still off.
* The next value expression scheme is working, but the individual accessorJohn Wiegley2008-07-291-25/+26
| | | | functions for each of the journal objects has yet to be ported.
* Moved around and renamed a very large amount of code in order to rationalizeJohn Wiegley2008-07-291-38/+36
| | | | the way that value expressions extract information from journal objects.
* Value expression architecture is now rewritten, but the functionality of theJohn Wiegley2008-07-291-5/+23
| | | | | | | 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.
* A large body of work to get the register report printing again, but stillJohn Wiegley2008-07-271-1/+3
| | | | fails due to the fact that 2.x value expression syntax is not restored.
* The --verify option is now working properly again. Use "--verify --verbose"John Wiegley2008-07-261-4/+12
| | | | if you wish to see memory usage statistics along with a top-level trace.
* --verify works again, but the memory totals at the end still need work.John Wiegley2008-07-261-0/+2
|
* More work toward getting the textual parser working again. Since this meansJohn Wiegley2008-07-241-18/+18
| | | | that value expressions must work, there are a lot of details involved.
* The new XPath parser has been integrated, although I have removed theJohn Wiegley2008-07-201-6/+6
| | | | | | | 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.
* Brought in the final round of 3.0 code, although it does not compile yet:John Wiegley2008-07-201-16/+16
| | | | report, session, parts of xpath, main, journal, option.
* The code is compiling again, but it's far from being able to run yet.John Wiegley2008-05-081-73/+92
|
* Made separate modules for the csv command, since the prior method wasJohn Wiegley2008-04-131-23/+2
| | | | not fully correct.
* Added elision styles.John Wiegley2008-04-131-17/+65
|
* Reworked the way date/times are handled.John Wiegley2008-04-131-12/+10
|
* Tons of corrections and fixes to value expressions and lot figures.John Wiegley2008-04-131-20/+45
|
* *** empty log message ***John Wiegley2008-04-131-8/+15
|
* Added --ansi and --ansi-invert options.John Wiegley2008-04-131-1/+60
|
* Added much better error location.John Wiegley2008-04-131-8/+27
|
* Added a DATETIME value type.John Wiegley2008-04-131-12/+20
|
* *** empty log message ***John Wiegley2008-04-131-11/+10
|
* Began support for improved commodity handling.John Wiegley2008-04-131-3/+3
|
* Checked in all major updates.John Wiegley2008-04-131-20/+14
|
* *** empty log message ***John Wiegley2008-04-131-0/+2
|
* Added a check for null.John Wiegley2008-04-131-1/+1
|
* Transactions now track their beginning and ending position, as doJohn Wiegley2008-04-131-8/+40
| | | | | | | 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.
* Removed Python integration support.John Wiegley2008-04-131-117/+0
|
* Restructed the code that it can build and be used as a shared library.John Wiegley2008-04-131-4/+6
| | | | | The command-line version is still statically bound in the build process by default (for the sake of speed).
* *** empty log message ***John Wiegley2008-04-131-1/+1
|
* *** empty log message ***John Wiegley2008-04-131-1/+1
|
* See ChangeLogJohn Wiegley2008-04-131-9/+54
|
* Support has been added for clearing of individual transactions. SetJohn Wiegley2008-04-131-4/+64
| | | | `ledger-clear-whole-entries' in Emacs to revert to the old behavior.
* (parse_elements): The format codes %b and %e can be used to displayJohn Wiegley2008-04-131-0/+12
| | | | | the beginning and ending line numbers of an entry. (format): Output beginning and ending line for BEG_LINE and END_LINE types.
* (format): [1178223] Don't truncate to max_width in the case ofJohn Wiegley2008-04-131-1/+4
| | | | outputting balances.
* Moved `format_xml_entries' to xml.cc.John Wiegley2008-04-131-208/+0
|
* (truncated): Added "style" argument, so that at least Python users canJohn Wiegley2008-04-131-22/+86
| | | | | | | 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.
* (truncated): Simplified this method, and added schemes for truncatingJohn Wiegley2008-04-131-28/+63
| | | | | | | | 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.
* (format_equity::flush): If the equity balance uses multipleJohn Wiegley2008-04-131-4/+44
| | | | | commodities, then multiple "Equity" lines need to be printed, one for each. (format_equity::operator()): Same, but for individual accounts.