summaryrefslogtreecommitdiff
path: root/src/item.cc
Commit message (Collapse)AuthorAgeFilesLines
* Avoid ctype abuse.Taylor R Campbell2024-08-061-1/+2
| | | | | fix https://github.com/ledger/ledger/issues/2338 fix https://github.com/ledger/ledger/issues/2340
* Make xact hashes independent of posting orderJohn Wiegley2024-08-051-1/+5
| | | | | Also, support matching provided hashes against a prefixed of the generated hash.
* Fix compiler warning about std::binary_functionAlexis Hildebrandt2023-12-121-0/+2
| | | | being deprecated as of C++11
* Update copyright yearAlexis Hildebrandt2023-02-021-1/+1
| | | | [skip ci]
* Update copyright statement for 2022Alexis Hildebrandt2022-07-021-1/+1
|
* Fix build for x86_64-w64-mingw32Daniel Coonce2021-02-021-1/+1
| | | | Fixes #1905
* Fix tag value parsingMichael Budde2019-03-301-1/+1
| | | | | | | | | | | | If a tag is more than 2 characters from the beginning of the comment the tag value offset will be wrong. #1702 gives an example where the tag line starts with `;;` and the tag value thus becomes `: Bar` because of this bug. The use `index` in the offset calulation seems to be a lucky coincidence that works in the common case: "; tag: value" Fixes #1702
* Fix parsing issue involving effective datesMartin Michlmayr2019-01-151-1/+1
| | | | | | | | | | | | | | | | | Cory Duplantis reported that "A specially crafted journal file can cause [an] integer underflow resulting in code execution". Cory provided this test case: Expenses:Food:Groceries $ 37.50 ; ] [=2004/01/01] Note the ] that comes before [ after the ;. This issue was reported and described in great detail by Cory Duplantis of Cisco Talos. This issue is known as TALOS-2017-0303 and has been assigned CVE-2017-2807. Cory's description can be found at https://www.talosintelligence.com/vulnerability_reports/TALOS-2017-0303 Fixes #1722
* [misc] Update year in copyright notice to 2017Alexis Hildebrandt2018-01-271-1/+1
| | | | [ci skip]
* [misc] Update year in copyright notice to 2017Alexis Hildebrandt2017-01-051-1/+1
| | | | [ci skip]
* [misc] Update year in copyright notice to 2016Alexis Hildebrandt2016-01-021-1/+1
| | | | [ci skip]
* Bump copyright notice to 2015Alexis Hildebrandt2014-12-271-1/+1
| | | | | | The following script makes it a no-brainer: % NEXT_YEAR=2015; ag -l 'Copyright.*Wiegley' \ | xargs sed -i '' -e "s/\(Copyright.*\)-20[0-9]\{2\}/\1-${NEXT_YEAR}/"
* Bump copyright information to 2014Alexis Hildebrandt2014-02-021-1/+1
|
* fix ledger xml output, remove ledger json commandJohann Klähn2013-03-081-5/+4
| | | | | | | | | | | | As the format used by property trees to represent valid JSON and that for valid XML is too different and given that there are more requests for valid XML output I decided to pursue a quick fix and remove the json command in favor of a working xml command. See bug #782, #909, recent discussion on mailing list. JSON support is postponed until I or someone else finds time to work on this or the python bindings are more stable.
* Bump copyright information to 2013John Wiegley2013-02-181-1/+1
|
* change handling of standard inputJohann Klähn2013-01-171-2/+2
| | | | | | | | | | | | | | | For `-f /dev/stdin`, the `pathname` of the parsing context will be empty as for any other streamed input. `instance_t::include_directive` did not work as expected for `-f /dev/stdin` and relative file names. One would expect them to be relative to the current directory rather than `/dev`. This will lead to `While parsing file ""` messages. This could be adjusted to read `While parsing standard input`, but maybe it's not worth the special cases. This commit also fixes bug 788: behaviour of source_context for '-f -'
* remove superfluous 'break'Johann Klähn2013-01-151-1/+0
|
* Added filebase and filepath valuesCraig Earls2012-10-231-1/+21
| | | | | | 'filename' returns the complete path/filename of the file containg the current xact. This is inconvenient for some displays. filebase returns only the base name. For completeness added filepath as well.
* Converted the Ledger build system to use CMakeJohn Wiegley2012-05-201-1/+1
|
* Switched to Boost.PropertyTree for XML generationJohn Wiegley2012-05-181-0/+14
|
* Switch to using Boost.FormatJohn Wiegley2012-05-141-8/+8
|
* post.x = y defines metadata tag xJohn Wiegley2012-04-041-0/+7
|
* Make metadata tags case insensitiveJohn Wiegley2012-04-041-1/+11
|
* Make status and state valexpr synonymsJohn Wiegley2012-04-041-1/+1
|
* Whitespace fixJohn Wiegley2012-04-041-3/+2
|
* Made an assert more relaxed in item_context()John Wiegley2012-03-191-1/+1
|
* Another fix to metadata value parsingJohn Wiegley2012-03-071-15/+9
|
* Fix parsing of metadata values containing spacesJohn Wiegley2012-03-071-13/+19
|
* Increased file copyrights to 2012John Wiegley2012-02-291-1/+1
|
* Fixed problem with the Python buildJohn Wiegley2012-02-291-5/+2
|
* Change occurrences of auxiliary_date to just aux_dateJohn Wiegley2012-02-281-1/+1
|
* Renamed actual/effective dates to primary/auxiliaryJohn Wiegley2012-02-281-9/+13
|
* The "id" of an item now maps to its UUIDJohn Wiegley2012-02-271-0/+10
|
* Added --rich-data for 'convert', and SHA1 checksum checkingJohn Wiegley2012-02-261-1/+1
|
* Fixed many Clang type conversion warnings with static_castJohn Wiegley2012-02-171-1/+1
|
* Changed an int to std::size_tJohn Wiegley2012-02-171-1/+1
|
* Fixes for variable shadowing (15/28)John Wiegley2012-02-171-3/+3
|
* Cleanup whitespaceJohn Wiegley2011-08-181-1/+1
|
* Improved an assertJohn Wiegley2011-02-121-3/+2
|
* A metadata key must occur at the beginningJohn Wiegley2010-06-181-1/+3
| | | | | | | | | Before, this was valid: ; Today Yesterday: Tomorrow Which would set the key Yesterday to the value Tomorrow. Now, it is just an ordinary comment.
* has_tag and get_tag now take an 'inherit' parameterJohn Wiegley2010-06-181-4/+5
|
* Only look for [date] outside of metadata entriesJohn Wiegley2010-06-181-16/+16
|
* Revised how Ledger handles the "current year"John Wiegley2010-06-141-11/+9
| | | | | Now when the Y directive sets the current year for a region, it affects everything, as if the clock really were set back to that year.
* Completely reworked argument passing in expressionsJohn Wiegley2010-06-131-7/+6
|
* Add support for typed metadataJohn Wiegley2010-06-121-7/+23
| | | | | | | | | | The metadata construct 'Key: Value' is now just a special case for 'Key:: "Value"'. Another after a :: in metadata setting is parsed as a full value expression and typed as such. For example: ; Key:: $400 + $500 ledger -l 'tag("Key") < $1000'
* Store metadata values as value_t instead of stringJohn Wiegley2010-06-121-21/+23
|
* Untabified all source filesJohn Wiegley2010-06-111-57/+57
|
* Fixed interaction with -V/X and grouped postingsJohn Wiegley2010-06-091-0/+5
| | | | | | | | | | With -s, -M/Y/D, -n, and a few other flags, postings get "grouped" into meta-transactions that contain more postings than before. In all these cases, -V use the date of the *earliest* posting in that group, which makes little sense and caused breakages with -J. It now uses the latest date. Fixes #197 / 68EAF363-D0FE-4127-866E-A5AEBACB65D6
* Added new "addr" value expression functionJohn Wiegley2010-06-031-0/+6
| | | | | It returns the address of the given object as an integer. This can be used to uniquely compare entities.
* Empty notes and tags now return null valuesJohn Wiegley2010-05-301-4/+5
|