Commit graph

1719 commits

Author SHA1 Message Date
Johann Klähn
d922f46595 fix bug 748: option aliases not recognized 2013-01-15 23:30:17 +01:00
Johann Klähn
0a1ff03542 fix bug 788: behaviour of source_context for '-f -'
`session_t::read_data` did not set context.pathname to `/dev/stdin`
for the special case `-f -`. I chose to adjust `source_context` too
as there is no sensible context if no file name is provided.
2013-01-15 23:03:39 +01:00
Johann Klähn
2b1cfd6706 remove superfluous 'break' 2013-01-15 21:17:03 +01:00
Johann Klähn
428490e917 fix for 'store absolute paths internally'
`parent_path` was called on unprocessed path
so neither `resolve_path` nor `filesystem::absolute` had any effect.
2013-01-15 21:16:15 +01:00
John Wiegley
aba0a5ed2d Improvement to account alias expansion
Aliases are now expanded not only if they occur by themselves, but also
if they occur as the beginning of a multi-part account.  Given <alias
Food=Expenses:Food> the account <Food:Tomatos> should now be expanded to
<Expenses:Food:Tomatos>.
2013-01-11 07:08:51 -06:00
John Wiegley
82ac7ef313 Guard against a possible NULL 2013-01-11 00:10:30 -06:00
John Wiegley
3445ddec09 Merge branch 'next' of github.com:ledger/ledger into next 2012-11-26 12:52:12 -06:00
John Wiegley
2ac996d916 Shorten debug comment 2012-11-23 16:54:03 -06:00
Alexis Hildebrandt
6a5d6a88cd Fix crash when accessing the transaction code via post.xact.code using python
ledger would abort with the following error message:
  TypeError: No Python class registered for C++ class boost::optional<std::string>

The changes pass a CallPolicy to make_getter when adding the transaction
code property for python, so that the correct to_python conversion is
made. For details see:
http://www.boost.org/doc/libs/1_52_0/libs/python/doc/v2/faq.html#topythonconversionfailed
2012-11-19 23:00:58 +01:00
John Wiegley
63712728e1 Properly handle metadata tags on auto-postings 2012-11-12 02:30:04 -06:00
John Wiegley
29359f3a87 Account names in auto-xacts can be format strings 2012-11-12 02:30:04 -06:00
Christophe Rhodes
a6d40ada1f right-justify amount_expr text in print report where possible 2012-11-06 12:31:01 +00:00
Christophe Rhodes
8214a69e20 fix comment in display_filter_posts::output_rounding(post_t)
slightly more detail in the case of zero display_amount and --empty
not specified.
2012-11-06 12:31:01 +00:00
John Wiegley
ae5325f0a9 Guard against global_scope being NULL 2012-10-31 14:57:19 -05:00
John Wiegley
ab5dd39be4 Merge pull request #97 from enderw88/Bug726-727-draft-and-lisp-command
Added "draft" and "lisp" command synonyms
2012-10-31 12:03:22 -07:00
John Wiegley
3b9b2cf908 Corrected a typo 2012-10-31 00:14:47 -05:00
Craig Earls
5c5c6463c7 Added missing break; statement in report.cc 2012-10-26 15:46:10 -07:00
Craig Earls
10180f0fff Added "draft" and "lisp" command synonyms 2012-10-26 13:33:27 -07:00
John Wiegley
7cee6c559b Merge pull request #96 from enderw88/Bug634-floor-ceil-round
Bug 634 and 488, Corrected behavior of floor, and added ceiling
2012-10-26 08:31:57 -07:00
Craig Earls
b044a74bd3 Bug 634 and 488, Corrected behavior of floor, and added ceiling
This is only a partial fix for 634, since rounding is not fixed.
2012-10-25 22:28:26 -07:00
John Wiegley
34ca6b3991 Merge pull request #95 from enderw88/Bug695-init-file
Bug695 init file
2012-10-25 12:52:03 -07:00
Craig Earls
4b261f99bc Fixes Bug 695, ledger ignores --init-file
Handle --init-file as a special command option like the debug options.
That wway we can have the argument captured before teh global scope is
created.
2012-10-25 10:39:48 -07:00
Craig Earls
41cc9a7f3c Added filebase and filepath values
'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.
2012-10-23 14:10:19 -07:00
Craig Earls
14dcb27777 Implemented Bug551 Automatic Transactions are cleared base on parent 2012-10-23 13:07:39 -07:00
Johann Klähn
e824070b4a fix bucket directive (bug 765)
This was caused by both 'A' and 'bucket' using
default_account_directive. This function was still stripping the 'A'
directive, so the first character of the account name used with 'bucket'
was cut off. Maybe the code for the other directives should be changed
accordingly for consistency (put line + 1 in call instead of function).
2012-10-23 12:13:22 +02:00
Johann Klähn
49b02614a3 fix account mapping in csv conversion
By using payees_for_unknown_accounts instead of account_mappings in
csv.cc ledger will have the same behaviour as in `ledger -f - print`
in that it uses payee fields in account directives to rewrite the
account.
2012-10-18 13:45:40 -07:00
Hyrum Wright
73aa585efa Fix compilation warning: ensure a destructor is properly defined to avoid
compiler confusion.
2012-08-14 01:23:32 -04:00
Hyrum Wright
6ccb5e9687 Fix compilation warning: be sure we call the base class copy constructor. 2012-08-14 01:23:04 -04:00
John Wiegley
97693b43b5 Resolve account.date to latest post in the account 2012-08-09 16:56:53 -05:00
John Wiegley
afc023406a Always store absolute paths internally 2012-08-02 16:13:58 -05:00
John Wiegley
2de6af2761 Don't use __has_feature in utils.cc 2012-08-02 13:11:24 -05:00
John Wiegley
8538878d8d Guard some function definitions for ASan 2012-07-30 23:24:15 -05:00
John Wiegley
8869566331 Fixed a subtle memory overwrite
Fixes #608
2012-06-27 16:55:46 -05:00
John Wiegley
ff589a1656 Also using Clang's PCH with my "cxx" compiler 2012-05-27 03:02:42 -05:00
John Wiegley
d1444f4c97 Fixed a reference to HAVE_EDIT 2012-05-20 18:17:12 -05:00
John Wiegley
05d1704eb8 Removed an unnecessary #define 2012-05-20 16:06:43 -05:00
John Wiegley
54649d1b7a Make profiling builds work with Clang 2012-05-20 16:06:32 -05:00
John Wiegley
a916ed87bc Guard against an incorrect use of assert() 2012-05-20 15:31:49 -05:00
John Wiegley
2345f48094 Changed all ASSERTS_ON -> !NO_ASSERTS 2012-05-20 15:25:10 -05:00
John Wiegley
1b1c7cd4ac A few more CMake-related fixes 2012-05-20 15:23:52 -05:00
John Wiegley
f579e6ddac Work around inclusion ordering bug with Xpressive 2012-05-20 15:15:54 -05:00
John Wiegley
a9bdcc3301 Work around collision between Format's put & Graph 2012-05-20 15:03:22 -05:00
John Wiegley
4681e58d7f Converted the Ledger build system to use CMake 2012-05-20 04:48:05 -05:00
John Wiegley
303976e563 Fixed a variable name shadowing 2012-05-18 01:47:04 -06:00
John Wiegley
7e8ba51cd0 Added a "json" report command 2012-05-18 01:38:39 -06:00
John Wiegley
a38ed141c1 Switched to Boost.PropertyTree for XML generation 2012-05-18 01:31:01 -06:00
John Wiegley
f4f3058b8c Switch to using Boost.Format 2012-05-14 21:44:00 -06:00
John Wiegley
9617266905 Improved detection of iostream's eof() condition 2012-05-14 21:41:38 -06:00
John Wiegley
32eaa03469 Fixed a hidden memory corruption bug 2012-05-14 21:41:38 -06:00
John Wiegley
1cc618a956 Added a * for cleared entries in the time report 2012-05-10 04:03:32 -05:00