Commit graph

105 commits

Author SHA1 Message Date
John Wiegley
a8012940f4 Removed Python integration support. 2008-04-13 02:41:21 -04:00
John Wiegley
ed63481f3b *** empty log message *** 2008-04-13 02:41:17 -04:00
John Wiegley
d65a758c84 Moved the setting of time quantities to the commodity initialization
section.
2008-04-13 02:41:16 -04:00
John Wiegley
1e6bfc7796 (amount_t::value): Corrected a problem with commodity rounding after
market values are determined (was using the wrong commodity's
precision value).
(commodity_t::value): Fixed the market value calculation algorithm,
which was very broken (but only seemed to show up if the price history
was very small).
2008-04-13 02:41:14 -04:00
John Wiegley
e8df173270 (find_commodity): Don't copy over the NOMARKET flag from the default
commodity.
2008-04-13 02:41:14 -04:00
John Wiegley
a10f3f02e7 (parse): Allow "-$100.00" as the equivalent of "$-100.00". 2008-04-13 02:41:12 -04:00
John Wiegley
3797cb1ad9 (amount_t::parse): Only set the SUFFIXED flag if there is actually a
commodity symbol.
2008-04-13 02:41:10 -04:00
John Wiegley
1823a2b886 (parse_conversion): When defining a commodity conversion, always mark
the larger unit as having no market value (the market price is
determined by looking up the base commodity and then multiplying).
2008-04-13 02:41:06 -04:00
John Wiegley
675319a0b0 (value): Use `std::map<>::lower_bound' to search for the nearest price
item in a commodity's history list.  This is much more efficient than
doing a reverse linear search.
2008-04-13 02:41:06 -04:00
John Wiegley
0f98c9235f *** empty log message *** 2008-04-13 02:41:05 -04:00
John Wiegley
d83008166a (parse): A fix to the way commodity flags are applied to newly parsed
commodities.  This was needing for an edge-case involving commodities
that first appears as part of the cost (@ SPEC) of a transaction.
2008-04-13 02:41:05 -04:00
John Wiegley
1c7669671c Changes to support building with gcc 2.95. 2008-04-13 02:40:57 -04:00
John Wiegley
8f373c049c (AMOUNT_CMP_AMOUNT): Fixed a very serious error in basic amount math,
when lhs is zero.
2008-04-13 02:40:55 -04:00
John Wiegley
193a801c03 Added preliminary support for OFX, using libofx. Needs much
real-world testing.
2008-04-13 02:40:55 -04:00
John Wiegley
08e81c1858 (operator/): Added a more complete divide-by-zero check. 2008-04-13 02:40:52 -04:00
John Wiegley
3e61a94f76 Added commodity_t::default_commodity. Initialize the same. 2008-04-13 02:40:49 -04:00
John Wiegley
b4cdc528b4 *** empty log message *** 2008-04-13 02:40:48 -04:00
John Wiegley
1db60b12e2 updated to 2.02 2008-04-13 02:40:48 -04:00
John Wiegley
c9fb11bd60 updated to version 2.0 2008-04-13 02:40:47 -04:00
John Wiegley
a32173ace6 changes 2008-04-13 02:40:47 -04:00
John Wiegley
ba2c04072c fixed several segfaults (using new option-scrambler test harness) 2004-09-27 18:08:48 -04:00
John Wiegley
f8a62c444f made several of the buffers used non-static 2004-09-26 23:48:31 -04:00
John Wiegley
fbd8fd2caf fixed printing of amounts that have a null commodity (was always precision 0) 2004-09-24 23:22:48 -04:00
John Wiegley
eda733a56e improved error checking in parser, in case parts of an amount are missing 2004-09-24 23:11:50 -04:00
John Wiegley
c5d519447e fixed a rather obscure memory bug, which also simplified some code 2004-09-24 05:25:52 -04:00
John Wiegley
9f8a32ab48 fixed several issues in value_t's core 2004-09-21 03:41:40 -04:00
John Wiegley
6c66d1e0ef improvements to python exposure of commodity_t 2004-09-11 02:18:04 -04:00
John Wiegley
e414123ecb change commodity->symbol to const, and added set_symbol 2004-09-10 05:07:50 -04:00
John Wiegley
63367e3aac the amount/balance/value logic is now a library, completely separate from ledger 2004-08-29 23:32:29 -04:00
John Wiegley
2d62f7b633 redid the way amount_t::commodity is handled; no more direct access 2004-08-29 04:31:59 -04:00
John Wiegley
032afa5657 a bit of a reorg; still much more to go 2004-08-29 03:23:55 -04:00
John Wiegley
b4304515ff ledger.so (the python module) now builds based on autoconf discovery 2004-08-28 04:26:48 -04:00
John Wiegley
16841fbae3 added (disabled) code for Boost.Python 2004-08-27 23:38:39 -04:00
John Wiegley
3c50b2fb7a read all binary data in at one go; gains 33% 2004-08-26 15:35:14 -04:00
John Wiegley
942943323e don't placement new() amount_t in binary.cc when it isn't necessary 2004-08-26 14:31:50 -04:00
John Wiegley
69bd31b4d0 added usual operator 2004-08-25 21:51:11 -04:00
John Wiegley
ac000a67c4 fixed two memory corruption bugs 2004-08-25 21:02:07 -04:00
John Wiegley
ab86cd8c37 added asserts to, and proof-read, amount.cc 2004-08-25 17:34:23 -04:00
John Wiegley
6febfc3b4c Bulk alloc bigints in the binary reader; this gains another 20% 2004-08-25 01:47:55 -04:00
John Wiegley
1fd37a432d cleanup; fully switched to autoconf -- use scripts/acprep 2004-08-24 02:11:32 -04:00
John Wiegley
73e2abd1b2 a little cleanup; reversed the meaning of -z and -p (to be more mnemonic) 2004-08-23 18:23:31 -04:00
John Wiegley
ea3bf5d720 Removed dependency on libgmpxx.a 2004-08-23 08:25:40 -04:00
John Wiegley
6365b8b7a8 simplified some code 2004-08-22 18:34:18 -04:00
John Wiegley
5619a1d5be a little more reorganizing, but only fractionally faster. diminishing returns! 2004-08-22 02:13:41 -04:00
John Wiegley
6d5333b896 use value_t instead of balance_pair_t; gains for 10% binary, 2% textual 2004-08-21 23:18:45 -04:00
John Wiegley
c1e5119e97 fixes so that ledger will build optimized 2004-08-21 16:15:55 -04:00
John Wiegley
000bfe1cec only compute the cost when it differs from the amount 2004-08-21 15:55:03 -04:00
John Wiegley
86ac953379 tracked down a tricky memory leak in value.h 2004-08-21 05:40:06 -04:00
John Wiegley
7dbd7bce59 more cleanup 2004-08-21 04:58:49 -04:00
John Wiegley
6392b01799 moved some debug code around 2004-08-21 04:09:07 -04:00