summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2014-12-30 20:48:52 -0800
committerCraig Earls <enderw88@gmail.com>2014-12-30 20:48:52 -0800
commit7cd3a7fc9d6af64846a742bdd2ad07cb6dde0bf9 (patch)
tree7c569daa1137920ad3cc9ab32d574d24e24d0dc6
parentb6cef4bc507712427e9c5e83495ba5104679712d (diff)
parent8e79b3c7c74081b63f9d8b1e0ec97478f61d4ba8 (diff)
downloadfork-ledger-7cd3a7fc9d6af64846a742bdd2ad07cb6dde0bf9.tar.gz
fork-ledger-7cd3a7fc9d6af64846a742bdd2ad07cb6dde0bf9.tar.bz2
fork-ledger-7cd3a7fc9d6af64846a742bdd2ad07cb6dde0bf9.zip
Merge commit '8e79b3c7c74081b63f9d8b1e0ec97478f61d4ba8'
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml26
-rw-r--r--CMakeLists.txt4
-rw-r--r--README.md21
-rw-r--r--contrib/ParseCcStmt.cs2
-rw-r--r--doc/LICENSE2
-rw-r--r--doc/LICENSE.rtfbin1718 -> 1719 bytes
-rw-r--r--doc/ledger-mode.texi106
-rw-r--r--doc/ledger3.texi352
-rw-r--r--lisp/ledger-commodities.el2
-rw-r--r--lisp/ledger-complete.el2
-rw-r--r--lisp/ledger-context.el2
-rw-r--r--lisp/ledger-exec.el2
-rw-r--r--lisp/ledger-fonts.el2
-rw-r--r--lisp/ledger-init.el2
-rw-r--r--lisp/ledger-mode.el2
-rw-r--r--lisp/ledger-occur.el2
-rw-r--r--lisp/ledger-post.el2
-rw-r--r--lisp/ledger-reconcile.el2
-rw-r--r--lisp/ledger-regex.el2
-rw-r--r--lisp/ledger-report.el12
-rw-r--r--lisp/ledger-sort.el2
-rw-r--r--lisp/ledger-state.el2
-rw-r--r--lisp/ledger-test.el2
-rw-r--r--lisp/ledger-texi.el2
-rw-r--r--lisp/ledger-xact.el2
-rw-r--r--src/account.cc2
-rw-r--r--src/account.h2
-rw-r--r--src/amount.cc2
-rw-r--r--src/amount.h6
-rw-r--r--src/annotate.cc2
-rw-r--r--src/annotate.h2
-rw-r--r--src/archive.cc2
-rw-r--r--src/archive.h2
-rw-r--r--src/balance.cc2
-rw-r--r--src/balance.h2
-rw-r--r--src/chain.cc2
-rw-r--r--src/chain.h2
-rw-r--r--src/commodity.cc2
-rw-r--r--src/commodity.h2
-rw-r--r--src/compare.cc2
-rw-r--r--src/compare.h2
-rw-r--r--src/context.h2
-rw-r--r--src/convert.cc2
-rw-r--r--src/convert.h2
-rw-r--r--src/csv.cc2
-rw-r--r--src/csv.h2
-rw-r--r--src/draft.cc2
-rw-r--r--src/draft.h2
-rw-r--r--src/emacs.cc2
-rw-r--r--src/emacs.h2
-rw-r--r--src/error.cc2
-rw-r--r--src/error.h2
-rw-r--r--src/expr.cc2
-rw-r--r--src/expr.h2
-rw-r--r--src/exprbase.h2
-rw-r--r--src/filters.cc2
-rw-r--r--src/filters.h2
-rw-r--r--src/flags.h2
-rw-r--r--src/format.cc2
-rw-r--r--src/format.h2
-rw-r--r--src/generate.cc2
-rw-r--r--src/generate.h2
-rw-r--r--src/global.cc4
-rw-r--r--src/global.h8
-rw-r--r--src/history.cc2
-rw-r--r--src/history.h2
-rw-r--r--src/item.cc2
-rw-r--r--src/item.h2
-rw-r--r--src/iterators.cc2
-rw-r--r--src/iterators.h2
-rw-r--r--src/journal.cc2
-rw-r--r--src/journal.h2
-rw-r--r--src/lookup.cc2
-rw-r--r--src/lookup.h2
-rw-r--r--src/main.cc2
-rw-r--r--src/mask.cc2
-rw-r--r--src/mask.h2
-rw-r--r--src/op.cc2
-rw-r--r--src/op.h2
-rw-r--r--src/option.cc2
-rw-r--r--src/option.h2
-rw-r--r--src/org.cc2
-rw-r--r--src/org.h2
-rw-r--r--src/output.cc2
-rw-r--r--src/output.h2
-rw-r--r--src/parser.cc2
-rw-r--r--src/parser.h2
-rw-r--r--src/pool.cc2
-rw-r--r--src/pool.h2
-rw-r--r--src/post.cc2
-rw-r--r--src/post.h2
-rw-r--r--src/precmd.cc2
-rw-r--r--src/precmd.h2
-rw-r--r--src/predicate.h2
-rw-r--r--src/print.cc2
-rw-r--r--src/print.h2
-rw-r--r--src/pstream.h6
-rw-r--r--src/ptree.cc2
-rw-r--r--src/ptree.h2
-rw-r--r--src/py_account.cc2
-rw-r--r--src/py_amount.cc2
-rw-r--r--src/py_balance.cc2
-rw-r--r--src/py_commodity.cc2
-rw-r--r--src/py_expr.cc2
-rw-r--r--src/py_format.cc2
-rw-r--r--src/py_item.cc2
-rw-r--r--src/py_journal.cc2
-rw-r--r--src/py_post.cc2
-rw-r--r--src/py_session.cc2
-rw-r--r--src/py_times.cc2
-rw-r--r--src/py_utils.cc2
-rw-r--r--src/py_value.cc2
-rw-r--r--src/py_xact.cc2
-rw-r--r--src/pyfstream.h2
-rw-r--r--src/pyinterp.cc2
-rw-r--r--src/pyinterp.h2
-rw-r--r--src/pyledger.cc2
-rw-r--r--src/pyutils.h2
-rw-r--r--src/query.cc2
-rw-r--r--src/query.h2
-rw-r--r--src/quotes.cc2
-rw-r--r--src/quotes.h2
-rw-r--r--src/report.cc2
-rw-r--r--src/report.h2
-rw-r--r--src/scope.cc2
-rw-r--r--src/scope.h2
-rw-r--r--src/select.cc2
-rw-r--r--src/select.h2
-rw-r--r--src/session.cc2
-rw-r--r--src/session.h2
-rw-r--r--src/stats.cc2
-rw-r--r--src/stats.h2
-rw-r--r--src/stream.cc2
-rw-r--r--src/stream.h2
-rw-r--r--src/system.hh.in2
-rw-r--r--src/temps.cc2
-rw-r--r--src/temps.h2
-rw-r--r--src/textual.cc41
-rw-r--r--src/timelog.cc2
-rw-r--r--src/timelog.h2
-rw-r--r--src/times.cc2
-rw-r--r--src/times.h2
-rw-r--r--src/token.cc2
-rw-r--r--src/token.h2
-rw-r--r--src/unistring.h2
-rw-r--r--src/utils.cc4
-rw-r--r--src/utils.h4
-rw-r--r--src/value.cc2
-rw-r--r--src/value.h2
-rw-r--r--src/views.cc2
-rw-r--r--src/views.h2
-rw-r--r--src/xact.cc2
-rw-r--r--src/xact.h2
-rwxr-xr-xtest/DocTests.py19
-rw-r--r--test/baseline/opt-trace.test15
-rwxr-xr-xtest/convert.py2
-rw-r--r--test/regress/1038_1.test18
-rw-r--r--test/regress/1038_2.test18
-rw-r--r--test/regress/1038_3.test20
-rwxr-xr-xtools/prepare-commit-msg27
161 files changed, 579 insertions, 413 deletions
diff --git a/.gitignore b/.gitignore
index f740859e..16ee2784 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@
*.gcov
*.l[oa]
*.pyc
+*.sw[p-z]
*~
.timestamp
*.tar.bz2
diff --git a/.travis.yml b/.travis.yml
index b4999235..11d399e6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,5 @@
# Since the Travis CI environment http://docs.travis-ci.com/user/ci-environment/
-# provides GNU GCC 4.6, which does not support -std=c++11 GNU GCC 4.8 is
-# installed. Additionally boost 1.55.0 is compiled from source, since in the
-# Travis CI environment only boost 1.46 is available and no backported package
-# was found on the net.
+# provides GNU GCC 4.6, which does not support -std=c++11 GNU GCC 4.8 is installed
language: cpp
compiler:
@@ -10,31 +7,24 @@ compiler:
- gcc
before_install:
- # Add software package repository, containing updated build toochain, i.e. GNU GCC 4.8
+ # Add software package repositories with recent versions of gcc and boost
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes
+ - sudo add-apt-repository ppa:boost-latest/ppa --yes
- sudo apt-get update -qq
- # Download boost 1.55 and extract the source archive
- - wget --no-verbose --output-document=boost-trunk.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download
- - export BOOST_ROOT="$TRAVIS_BUILD_DIR/../boost-trunk"
- - export CMAKE_MODULE_PATH="$BOOST_ROOT"
- - mkdir -p $BOOST_ROOT
- - tar jxf boost-trunk.tar.bz2 --strip-components=1 -C $BOOST_ROOT
install:
# Install GNU GCC 4.8 required by use of C++11
- sudo apt-get install -qq g++-4.8 gcc-4.8
- export CXX="g++-4.8" CC="gcc-4.8"
- # Build boost libraries required by ledger
- - (cd $BOOST_ROOT; ./bootstrap.sh --with-libraries=date_time,filesystem,system,iostreams,regex,python,test)
- - (cd $BOOST_ROOT; ./b2 threading=multi --prefix=$BOOST_ROOT -d0 install)
- # Install further dependencies
- - ./acprep dependencies
+ # Install Ledger dependencies
+ - sudo apt-get install -qq libboost1.55 libgmp-dev libmpfr-dev libeditline-dev
before_script:
- - ./acprep opt make --python --boost=$BOOST_ROOT
+ - export JOBS=2
+ - ./acprep opt make --jobs $JOBS --python
script:
- - ./acprep check -- --output-on-failure
+ - ./acprep check --jobs $JOBS -- --output-on-failure
- PYTHONPATH=. python python/demo.py
notifications:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 09d14051..5cc49fa8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,8 @@
cmake_minimum_required(VERSION 2.8.5)
+if(POLICY CMP0042)
+ # CMP0042 is only known to CMake 3.0 and above
+ cmake_policy(SET CMP0042 OLD)
+endif(POLICY CMP0042)
PROJECT(ledger)
diff --git a/README.md b/README.md
index fd2f540d..e18792d6 100644
--- a/README.md
+++ b/README.md
@@ -96,7 +96,26 @@ And for building the current `maint` branch:
<tr><td>libxml2</td><td>2.7.2</td><td><em>optional</em></td></tr>
</table>
-### MacPorts
+### OS X
+
+You can use [MacPorts](https://www.macports.org/) or [homebrew](http://brew.sh/) to install this very quickly on OS X.
+
+#### 1. Homebrew
+
+You can see the parameters you can pass while installing with brew by the command `brew options ledger`. To install ledger, simply type the following command:
+
+ brew install ledger
+
+If everything worked well, you should have ledger working now. If you want to install this with python bindings, you can use the following command:
+
+ brew install ledger --with-python
+
+If you to want to startup python, use the following command:
+
+ ledger python
+
+
+#### 2. MacPorts
If you build stuff using MacPorts on OS X, as I do, here is what you would
run:
diff --git a/contrib/ParseCcStmt.cs b/contrib/ParseCcStmt.cs
index c9ad1d55..04e3dbb9 100644
--- a/contrib/ParseCcStmt.cs
+++ b/contrib/ParseCcStmt.cs
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2008, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/doc/LICENSE b/doc/LICENSE
index df1a0028..92be3a1d 100644
--- a/doc/LICENSE
+++ b/doc/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2009, John Wiegley. All rights reserved.
+Copyright (c) 2003-2015, John Wiegley. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
diff --git a/doc/LICENSE.rtf b/doc/LICENSE.rtf
index 8da96b65..471065fe 100644
--- a/doc/LICENSE.rtf
+++ b/doc/LICENSE.rtf
Binary files differ
diff --git a/doc/ledger-mode.texi b/doc/ledger-mode.texi
index ca91d178..b76cb309 100644
--- a/doc/ledger-mode.texi
+++ b/doc/ledger-mode.texi
@@ -225,10 +225,10 @@ Emacs will prompt for a report name. There are a few built-in reports,
and you can add any report you need @xref{Adding and Editing Reports}.
In the Minibuffer type @samp{account}. When prompted for an account
-type @samp{checking}. In another buffer you will see a Ledger register
-report. You can move around the buffer, with the point on a transaction,
-type @kbd{C-c C-c}. Ledger-mode will take you directly to that
-transaction in the @file{demo.ledger} buffer.
+type @samp{checking}. In a buffer named @file{*Ledger Report*}, you
+will see a Ledger register report. You can move around the buffer, with
+the point on a transaction, type @kbd{RET}. Ledger-mode will take you
+directly to that transaction in the @file{demo.ledger} buffer.
Another built-in report is the balance report. In the
@file{demo.ledger} buffer, type @kbd{C-c C-o C-r}. When prompted for
@@ -277,7 +277,7 @@ payees and accounts. Included files are not currently included in the
completion scan. Repeatedly hitting @kbd{TAB} will cycle through the
possible completions.
-Ledger-mode can also help you keep your amounts in aligned. Setting
+Ledger-mode can also help you keep your amounts aligned. Setting
@option{ledger-post-auto-adjust-amounts} to true tells Ledger-mode to
automatically place any amounts such that their last digit is aligned to
the column specified by @option{ledger-post-amount-alignment-column},
@@ -290,15 +290,18 @@ which defaults to @samp{52}. @xref{Ledger Post Customization Group}.
@node Setting a Transactions Effective Date, Quick Balance Display, Adding Transactions, Adding Transactions
@subsection Setting a Transactions Effective Date
+@kindex C-c C-t
+@cindex effective date
-Ledger provide for adding information to a transaction that add details
+Ledger provides for adding information to a transaction that add details
to the dates. For example, you can specify when the transaction was
-enter, when the transation clear, or when individual postings cleared.
-Ledger-mode referes to these additional dates as ``effective dates''.
-To set the effect date of a transaction place the point in the first
+entered, when the transaction was cleared, or when individual postings
+were cleared.
+Ledger-mode refers to these additional dates as @emph{effective} dates.
+To set the effective date of a transaction, place the point in the first
line of a transaction and type @kbd{C-c C-t}. The effective date will
-be added to the transacation. To set the effective date for an
-inividual posting, place point in the posting and type @kbd{C-c C-t} and
+be added to the transaction. To set the effective date for an
+individual posting, place point in the posting and type @kbd{C-c C-t} and
the effective date for that posting will be added at the end of the
posting.
@@ -390,12 +393,14 @@ while in a posting. This places an asterisk prior to the posting.
@node Formatting Transactions, Deleting Transactions, Marking Transactions, The Ledger Buffer
@section Formatting Transactions
-When editing a transaction, liberal use of the TAB key can keep the
-transaction well formatted. If you want to have ledger-mode cleanup the
-formatting of a trasnaction you can use Align Transaction or Align
-Region from the menu bar.
+@cindex transaction, formatting
-The menu item ``Clean-up Buffer'' sorts all transactions in the buffer
+When editing a transaction, liberal use of the @kbd{TAB} key can keep
+the transaction well formatted. If you want to have Ledger-mode cleanup
+the formatting of a transaction you can use @samp{Align Transaction} or
+@samp{Align Region} from the menu bar.
+
+The menu item @samp{Clean-up Buffer} sorts all transactions in the buffer
by date, removes extraneous empty lines and aligns every transaction.
@@ -639,13 +644,15 @@ type @kbd{t} and enter the new target value.
@node Running Basic Reports, Adding and Editing Reports, The Report Buffer, The Report Buffer
@section Running Reports
@kindex C-c C-o C-r
+@kindex C-c C-o C-g
+@kindex C-c C-o C-a
@cindex report, running
The real power behind Ledger is in its amazing reporting capability.
Ledger-mode provides easy facility to run reports directly from Emacs.
It has four reports built-in and facilities for adding custom reports.
-Typing @kbd{C-c C-o C-r} or using menu @samp{Ledger Run Report} prompts
+Typing @kbd{C-c C-o C-r} or using menu @samp{Run Report} prompts
for the name of a saved report. The built-in reports are:
@table @var
@@ -666,16 +673,16 @@ transactions involving that account.
@end table
-While viewing reports you can easily swtich back and forth between the
-ledger buffer and the report buffer. I ntransaction reports typing
-@kbd{RETURN} will take you to that transaction in the ledger buffer.
-While in theledger buffer @kbd{C-c C-o C-g} returns you to the report
-buffer.
+While viewing reports you can easily switch back and forth between the
+ledger buffer and the @file{*Ledger Report*} buffer. In @file{*Ledger
+Report*} buffer, typing @kbd{RET} will take you to that transaction in
+the ledger buffer. While in the ledger buffer @kbd{C-c C-o C-g} returns
+you to the @file{*Ledger Report*} buffer.
-By default ledger-mode will refresh the report buffer when the ledger
-buffer is saved. iF you want to rerun the report at another time time
+By default Ledger-mode will refresh the report buffer when the ledger
+buffer is saved. If you want to rerun the report at another time
@kbd{C-c C-o C-a}. This is useful if you have other programs altering
-your ledger file outside of emacs.
+your ledger file outside of Emacs.
@node Adding and Editing Reports, Reversing Report Order, Running Basic Reports, The Report Buffer
@@ -707,12 +714,13 @@ buffer you will have the option to give it a new name, or overwrite the
old report.
Deleting reports is accomplished by typing @kbd{C-c C-o C-e} or using
-@samp{Edit Reports} menu in the ledger buffer, or typing @kbd{e} in the
+@samp{Edit Report} menu in the ledger buffer, or typing @kbd{e} in the
@file{*Ledger Report*} buffer. This takes you to the Emacs
customization window for the Ledger Reports variables. Use the widgets
to delete the report you want removed.
-Typing @kbd{C-c C-o C-s} will prompt for a name and save the current report.
+Typing @kbd{C-c C-o C-s} will prompt for a name and save the current
+report.
@node Expansion Formats, Make Report Transactions Active, Adding and Editing Reports, Adding and Editing Reports
@subsection Expansion Formats
@@ -817,25 +825,25 @@ characters to specify when the transactions should appear.
@node Transactions that occur on specific dates, Transactions that occur on specific days, Specifying Upcoming Transactions, Specifying Upcoming Transactions
@subsection Transactions that occur on specific dates
-Many times you will repetitive transactions that occur on the same day
-of the month each month. These can be specified using a wild card in
-the year and month with a fixed date in the day. The following entry
+Many times you will enter repetitive transactions that occur on the same
+day of the month each month. These can be specified using a wild card
+in the year and month with a fixed date in the day. The following entry
specifies a transaction that occurs on the first and fifteenth of every
month in every year.
@example
[*/*/1,15] Paycheck
- Income:Job $1000.00
- Assets:Checking
+ Income:Job $1000.00
+ Assets:Checking
@end example
Some transactions do not occur every month. Comma separated lists of
-the months, or E for even, or O for odd number months can also be
-specified. The following entry specifies a bi-monthly exterminator bill that occurs
-in the even months:
+the months, or @samp{E} for even, or @samp{O} for odd number months can
+also be specified. The following entry specifies a bi-monthly
+exterminator bill that occurs in the even months:
@example
[*/E/01] Exterminator
- Expenses:Home $100.00
- Asset:Checking
+ Expenses:Home $100.00
+ Assets:Checking
@end example
@node Transactions that occur on specific days, , Transactions that occur on specific dates, Specifying Upcoming Transactions
@@ -844,13 +852,13 @@ in the even months:
Some transactions occur every relative to the day of the week rather
than the date of the month. For example, many people are paid every two
weeks without regard to the day of the month. Other events may occur on
-specific days regaless of the date. For example the following
+specific days regardless of the date. For example the following
transactions creates a transaction every other Thursday:
@example
[2014/11/27+2Th] Paycheck
- Income:Job $1000.00
- Assets; Checking
+ Income:Job $1000.00
+ Assets:Checking
@end example
It is necessary to specify a starting date in order for this type of
@@ -858,8 +866,8 @@ recurrence relation to be specified. The day names are two character
codes that default to Mo, Tu, We, Th, Fr, Sa, Su, for Monday, Tuesday,
Wednesday, Thursday, Friday, Saturday, Sunday respectively. You can
change the codes to something more convenient for your locale by
-customizing the ledger @code{ledger-schedule-week-days}. They must be 2
-character long.
+customizing the ledger @var{ledger-schedule-week-days}. They must be two
+characters long.
@@ -934,11 +942,11 @@ the reconcile regex.
@item ledger-buffer-tracks-reconcile-buffer
If non-nil, then when the cursor is moved to a new transaction in the
-reconcile window.
+@file{*Reconcile*} window.
@item ledger-reconcile-force-window-bottom
-If non-nil, make the reconcile window appear along the bottom of the
-register window and resize.
+If non-nil, make the @file{*Reconcile*} window appear along the bottom
+of the register window and resize.
@item ledger-reconcile-toggle-to-pending
If non-nil, then toggle between uncleared and pending @samp{!}. If
@@ -1006,13 +1014,15 @@ Default face for Ledger occur mode shown transactions.
Face for Ledger comments.
@item ledger-font-reconciler-uncleared-face
-Default face for uncleared transactions in the reconcile window.
+Default face for uncleared transactions in the @file{*Reconcile*} buffer.
@item ledger-font-reconciler-cleared-face
-Default face for cleared @samp{*} transactions in the reconcile window.
+Default face for cleared @samp{*} transactions in the @file{*Reconcile*}
+buffer.
@item ledger-font-reconciler-pending-face
-Default face for pending @samp{!} transactions in the reconcile window.
+Default face for pending @samp{!} transactions in the @file{*Reconcile*}
+buffer.
@item ledger-font-report-clickable-face
FIXME
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index 22bab2af..739b5539 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -14,7 +14,7 @@
@c | @var | | Ledger CLI option Variable (like -f FILE) |
@c | | | Ledger file Syntax |
@c | @samp | | Valued example or single char |
-@c | @file | | File |
+@c | @file | | File, Buffer |
@c | @file | | Program (like ledger, report, acprep) |
@c Restructuring manual ideas
@@ -26,49 +26,49 @@
@c tests when using ctest or acprep check.
@c The script parses the texinfo file and looks for three kinds of
@c specially marked @smallexamples, then it will run the ledger
-@c command from the exmaple, and compare the results with the output
+@c command from the example, and compare the results with the output
@c from the documentation.
@c
@c To specially mark a @smallexample append @c command:UUID, where
@c UUID is the first 7 digits from the commands sha1sum, e.g.:
-@c
+@c
@c @smallexample @c command:CDE330A
@c $ ledger -f sample.dat reg expenses
@c @end smallexample
-@c
+@c
@c Then DocTests.py will look for corresponding documented output,
@c which may appear anywhere in the file, and is marked with
@c @smallexample @c output:UUID where UUID is the UUID from the
@c corresponding ledger command example, e.g.:
-@c
+@c
@c @smallexample @c output:CDE330A
@c 04-May-27 Book Store Expenses:Books $20.00 $20.00
@c Expenses:Cards $40.00 $60.00
@c Expenses:Docs $30.00 $90.0
@c @end smallexample
-@c
+@c
@c Now where does this data in sample.dat come from?
@c DocTests.py is a bit smart about ledger's file argument, since
@c it will check if the given filename exists in the test/input/
@c directory.
-@c
+@c
@c Sometimes the journal data for an example is specified within
@c the documentation itself, in that case the journal example data
@c needs to be specially marked as well using @smallexample @c input:UUID,
@c again with the UUID being the UUID of the corresponding ledger example
@c command. If multiple inputs with the same UUID are found they will be
@c concatenated together and given as one set of data to the example command.
-@c
+@c
@c @smallexample @c input:35CB2A3
@c 2014/02/09 The Italian Place
@c Expenses:Food:Dining $ 36.84
@c Assets:Cash
@c @end smallexample
-@c
+@c
@c @smallexample @c command:35CB2A3
@c $ ledger -f inline.dat accounts
@c @end smallexample
-@c
+@c
@c @smallexample @c output:35CB2A3
@c Assets:Cash
@c Expenses:Food:Dining
@@ -89,10 +89,10 @@
@c Additionally DocTests.py will pass --init-file /dev/null to ledger to
@c ignore any default arguments to ledger the user running the tests
@c has configured.
-@c
+@c
@c To manually run the tests in this file run:
@c $ ./test/DocTests.py -vv --ledger ./ledger --file ./doc/ledger3.texi
-
+
@copying
@@ -1858,7 +1858,7 @@ A valuation function receives three arguments:
@table @code
-@item source
+@item source
A string identifying the commodity whose price is being asked for
(example: @samp{EUR}).
@@ -1995,8 +1995,8 @@ freeform text editor to enter transactions makes it easy to keep the
data, but also easy to enter accounts or payees inconsistently or with
spelling errors.
-In order to combat inconsistency you can define allowable accounts and
-payees. For simplicity, create a separate text file and define accounts
+In order to combat inconsistency you can define allowable accounts and
+payees. For simplicity, create a separate text file and define accounts
and payees like
@smallexample
@@ -2023,7 +2023,8 @@ $ ledger accounts >> Accounts.dat
@end smallexample
@noindent
-You will have to edit this file to add the @code{account} directive in front of every line.
+You will have to edit this file to add the @code{account} directive in
+front of every line.
@node Journal Format, Converting from other formats, Keeping it Consistent, Keeping a Journal
@section Journal Format
@@ -2148,8 +2149,8 @@ account Expenses:Food
@end smallexample
The @code{note} sub-directive associates a textual note with the
-account. This can be accessed later using the @code{note} value expression
-function in any account context.
+account. This can be accessed later using the @code{note} value
+expression function in any account context.
The @code{alias} sub-directive, which can occur multiple times, allows
the alias to be used in place of the full account name anywhere that
@@ -2226,9 +2227,9 @@ $ ledger bal --no-total ^Exp
$10.00 Expenses:Entertainment:Dining
@end smallexample
-With the option @option{--recursive-aliases}, aliases can refer to other aliases,
-the following example produces exactly the same transactions and account names
-as the preceding one:
+With the option @option{--recursive-aliases}, aliases can refer to other
+aliases, the following example produces exactly the same transactions
+and account names as the preceding one:
@smallexample @c input:validate
alias Entertainment=Expenses:Entertainment
@@ -2248,7 +2249,7 @@ $ ledger balance --no-total --recursive-aliases ^Exp
$10.00 Expenses:Entertainment:Dining
@end smallexample
-The option @option{--no-aliases} completely disables alias expansion.
+The option @option{--no-aliases} completely disables alias expansion.
All accounts are read verbatim as they are in the ledger file.
@item assert
@@ -2268,7 +2269,7 @@ balance to zero. Ledger allows you to leave one posting with no
amount and automatically balance the transaction in the
posting. The @code{bucket} allows you to fill in all postings and
automatically generate an additional posting to the bucket account
-balancing the transaction. If any transaction is unbalanced, it
+balancing the transaction. If any transaction is unbalanced, it
will automatically be balanced against the @code{bucket} account.
The following example sets @samp{Assets:Checking} as the bucket:
@@ -2316,8 +2317,8 @@ check <VALUE EXPRESSION BOOLEAN RESULT>
Start a block comment, closed by @code{end comment}.
@item commodity
-Pre-declare commodity names. This only has an effect if @option{--strict}
-or @option{--pedantic} is used (see below).
+Pre-declare commodity names. This only has an effect if
+@option{--strict} or @option{--pedantic} is used (see below).
@smallexample @c input:validate
commodity $
@@ -2325,7 +2326,7 @@ commodity CAD
@end smallexample
The @code{commodity} directive supports several optional
-sub-directives, if they immediately follow the commodity directive
+sub-directives, if they immediately follow the commodity directive
and---if they are on successive lines---begin with whitespace:
@smallexample @c input:validate
@@ -2344,8 +2345,8 @@ format this commodity. In the future, using this directive will disable
Ledger's observation of other ways that commodity is used, and will
provide the ``canonical'' representation.
-The @code{nomarket} sub-directive states that the commodity's price should
-never be auto-downloaded.
+The @code{nomarket} sub-directive states that the commodity's price
+should never be auto-downloaded.
The @code{default} sub-directive marks this as the ``default'' commodity.
@@ -2517,8 +2518,8 @@ tag CSV
@end smallexample
The @code{tag} directive supports two optional sub-directives, if they
-immediately follow the tag directive and---if on a successive line---begin
-with whitespace:
+immediately follow the tag directive and---if on a successive
+line---begin with whitespace:
@smallexample @c input:validate
tag Receipt
@@ -2529,8 +2530,8 @@ tag Receipt
The @code{check} and @code{assert} sub-directives warn or error
(respectively) if the given value expression evaluates to false within
the context of any use of the related tag. In such a context,
-``value'' is bound to the value of the tag (which may be something else
-but a string if typed metadata is used!). Such checks or assertions are
+``value'' is bound to the value of the tag (which may be something else
+but a string if typed metadata is used!). Such checks or assertions are
not called if no value is given.
@item test
@@ -2815,9 +2816,9 @@ you a place to put those codes:
@findex --uncleared
@findex --pending
-A transaction can have a ``state'': cleared, pending, or uncleared.
-The default is uncleared. To mark a transaction cleared, put an asterisk (*)
-before the payee, after the date or code:
+A transaction can have a ``state'': cleared, pending, or uncleared. The
+default is uncleared. To mark a transaction cleared, put an asterisk
+@samp{*} before the payee, after the date or code:
@smallexample @c input:validate
2012-03-10 * KFC
@@ -2975,9 +2976,10 @@ used as the payee name for that posting. This affects the
@command{register} report, the @command{payees} report, and the
@option{--by-payee} option.
-This is useful when for example you deposit 4 checks at a time to
-the bank. On the bank statement, there is just one amount @samp{$400},
-but you can specify from whom each check came from, as shown by example below:
+This is useful when for example you deposit 4 checks at a time to the
+bank. On the bank statement, there is just one amount @samp{$400}, but
+you can specify from whom each check came from, as shown by example
+below:
@smallexample @c input:validate
2010-06-17 Sample
@@ -3138,8 +3140,8 @@ A balance assignment has this form:
Assets:Cash = $500.00
@end smallexample
-This sets the amount of the second posting to whatever it would need
-to be for the total in @samp{Assets:Cash} to be $500.00 after the posting.
+This sets the amount of the second posting to whatever it would need to
+be for the total in @samp{Assets:Cash} to be $500.00 after the posting.
If the resulting amount is not $-20.00 in this case, it is an error.
@node Resetting a balance, Balancing transactions, Balance assignments, Balance verification
@@ -3174,9 +3176,9 @@ As a consequence of all the above, consider the following transaction:
@end smallexample
What this says is: set the amount of the posting to whatever value is
-needed so that @samp{Assets:Brokerage} contains 10 AAPL. Then, because this
-posting must balance, ensure that its value is zero. This can only be
-true if Assets:Brokerage does indeed contain 10 AAPL at that point in
+needed so that @samp{Assets:Brokerage} contains 10 AAPL. Then, because
+this posting must balance, ensure that its value is zero. This can only
+be true if Assets:Brokerage does indeed contain 10 AAPL at that point in
the input file.
A balanced virtual transaction is used simply to indicate to Ledger that
@@ -3246,9 +3248,10 @@ Said another way, whenever Ledger sees a posting cost of the form
"AMOUNT @@ AMOUNT", the commodity used in the second amount is marked
``primary''.
-The only meaning a primary commodity has is that the @option{--market (-V)}
-flag will never convert a primary commodity into any other commodity.
-@option{--exchange @var{COMMODITY} (-X)} still will, however.
+The only meaning a primary commodity has is that the @option{--market
+(-V)} flag will never convert a primary commodity into any other
+commodity. @option{--exchange @var{COMMODITY} (-X)} still will,
+however.
@node Posting cost expressions, Total posting costs, Explicit posting costs, Transactions
@section Posting cost expressions
@@ -3386,12 +3389,12 @@ but is not required to be used with them:
@end smallexample
It should be noted that this is a convenience only for cases where you
-buy and sell whole lots. The @{@{$500.00@}@} is @emph{not} an
-attribute of the commodity, whereas @{$5.00@} is. In fact, when you write
+buy and sell whole lots. The @{@{$500.00@}@} is @emph{not} an attribute
+of the commodity, whereas @{$5.00@} is. In fact, when you write
@{@{$500.00@}@}, Ledger just divides that value by 10 and sees
@{$50.00@}. So if you use the print command to look at this
-transaction, you'll see the single braces form in the output.
-The double braces price form is a shorthand only.
+transaction, you'll see the single braces form in the output. The
+double braces price form is a shorthand only.
Plus, it comes with dangers. This works fine:
@@ -3522,8 +3525,8 @@ indicate a virtual cost:
Income:Capital Gains $-125.00
@end smallexample
-You can specify any combination of lot prices, dates or notes, in any order.
-They are all optional.
+You can specify any combination of lot prices, dates or notes, in any
+order. They are all optional.
To show all lot information in a report, use @option{--lots}.
@@ -3714,9 +3717,9 @@ This becomes:
@node Referring to the matching posting's account, Applying metadata to every matched posting, Accessing the matching posting's amount, Automated Transactions
@subsection Referring to the matching posting's account
-Sometimes you want to refer to the account that was matched
-in some way within the automated transaction itself. This is
-done by using the string @samp{$account}, anywhere within the
+Sometimes you want to refer to the account that was matched
+in some way within the automated transaction itself. This is
+done by using the string @samp{$account}, anywhere within the
account part of the automated posting:
@smallexample @c input:validate
@@ -3881,8 +3884,8 @@ This entry accomplishes this. Every month you'll see an
automatic $37.50 deficit like you should, while your checking account
really knows that it debited $225 this month.
-And using the @option{--effective} option, the initial date will be overridden
-by the effective dates.
+And using the @option{--effective} option, the initial date will be
+overridden by the effective dates.
@smallexample @c command:6453542
$ ledger --effective register Groceries
@@ -4401,10 +4404,11 @@ report -J -l "Ua>=@{\$0.01@}" -d "d>=[last feb]" reg ^assets ^liab
The last report uses both a calculation predicate @option{--limit
@var{EXPR} (-l)} and a display predicate @option{--display @var{EXPR}
(-d)}. The calculation predicate limits the report to postings whose
-amount is greater than or equal to $1 (which can only happen if the posting amount
-is in dollars). The display predicate limits the transactions
-@emph{displayed} to just those since last February, even though those
-transactions from before will be computed as part of the balance.
+amount is greater than or equal to $1 (which can only happen if the
+posting amount is in dollars). The display predicate limits the
+transactions @emph{displayed} to just those since last February, even
+though those transactions from before will be computed as part of the
+balance.
@node Reporting Commands, Command-line Syntax, Building Reports, Top
@chapter Reporting Commands
@@ -4449,11 +4453,11 @@ balances for an account, such as when @ref{Archiving Previous Years}.
@findex --amount-data
@findex --total-data
-The @command{register} command displays all the postings occurring
-in a single account, line by line. The account regex must be
-specified as the only argument to this command. If any regexes occur
-after the required account name, the register will contain only those
-postings that match, which makes it very useful for hunting down a particular
+The @command{register} command displays all the postings occurring in
+a single account, line by line. The account regex must be specified as
+the only argument to this command. If any regexes occur after the
+required account name, the register will contain only those postings
+that match, which makes it very useful for hunting down a particular
posting.
The output from @command{register} is very close to what a typical
@@ -4465,8 +4469,8 @@ If you have ``Gnuplot'' installed, you may plot the amount or running
total of any register by using the script @file{report}, which is
included in the Ledger distribution. The only requirement is that you
add either @option{--amount-data (-j)} or @option{--total-data (-J)} to
-your @command{register} command, in order to plot either the amount or total
-column, respectively.
+your @command{register} command, in order to plot either the amount or
+total column, respectively.
@node The @command{print} command, , The @command{register} command, Primary Financial Reports
@subsection The @command{print} command
@@ -4547,9 +4551,10 @@ Transaction Number,Date,Description,Memo,Amount Debit,Amount Credit,Balance,Chec
Unfortunately, as it stands Ledger cannot read it, but you can. Ledger
expects the first line to contain a description of the fields on each
-line of the file. The fields ledger can recognize contain these case-insensitive strings
-@code{date}, @code{posted}, @code{code}, @code{payee} or @code{desc} or @code{description},
-@code{amount}, @code{cost}, @code{total}, and @code{note}.
+line of the file. The fields ledger can recognize contain these
+case-insensitive strings @code{date}, @code{posted}, @code{code},
+@code{payee} or @code{desc} or @code{description}, @code{amount},
+@code{cost}, @code{total}, and @code{note}.
Delete the account description lines at the top, and replace the first
line in the data above with:
@@ -5194,18 +5199,20 @@ pricedb database files.
@subsection @command{accounts}
@findex accounts
-The @command{accounts} command reports all of the accounts in the journal.
-Following the command with a regular expression will limit the output to
-accounts matching the regex. The output is sorted by name. Using the
-@option{--count} option will tell you how many entries use each account.
+The @command{accounts} command reports all of the accounts in the
+journal. Following the command with a regular expression will limit the
+output to accounts matching the regex. The output is sorted by name.
+Using the @option{--count} option will tell you how many entries use
+each account.
@node @command{payees}, @command{commodities}, @command{accounts}, Reports about your Journals
@subsection @command{payees}
@findex payees
-The @command{payees} command reports all of the unique payees in the journal.
-Using the @option{--count} option will tell you how many entries use
-each payee. To filter the payees displayed you must use the prefix @@:
+The @command{payees} command reports all of the unique payees in the
+journal. Using the @option{--count} option will tell you how many
+entries use each payee. To filter the payees displayed you must use the
+prefix @@:
@smallexample
$ ledger payees @@Nic
@@ -5228,10 +5235,10 @@ you how many entries use each commodity.
@findex tags
@findex --values
-The @command{tags} command reports all of the tags in the journal. The output
-is sorted by name. Using the @option{--count} option will tell you how
-many entries use each tag. Using the @option{--values} option will
-report the values used by each tag.
+The @command{tags} command reports all of the tags in the journal. The
+output is sorted by name. Using the @option{--count} option will tell
+you how many entries use each tag. Using the @option{--values} option
+will report the values used by each tag.
@node @command{xact}, @command{stats}, @command{tags}, Reports about your Journals
@subsection @command{xact}
@@ -5358,7 +5365,7 @@ There are many, many command options available with the @file{ledger}
program, and it takes a while to master them. However, none of them are
required to use the basic reporting commands.
-@node Command Line Quick Reference, Detailed Option Description, Basic Usage, Command-line Syntax
+@node Command Line Quick Reference, Detailed Option Description, Basic Usage, Command-line Syntax
@section Command Line Quick Reference
@menu
@@ -5371,7 +5378,7 @@ required to use the basic reporting commands.
* Commodity Reporting::
@end menu
-@node Basic Reporting Commands, Basic Options, Command Line Quick Reference, Command Line Quick Reference
+@node Basic Reporting Commands, Basic Options, Command Line Quick Reference, Command Line Quick Reference
@subsection Basic Reporting Commands
@ftable @code
@@ -5405,7 +5412,8 @@ Print account balances as transactions.
Print price history for matching commodities.
@item pricedb
-Print price history for matching commodities in a format readable by ledger.
+Print price history for matching commodities in a format readable by
+ledger.
@item xact
Generate transactions based on previous postings.
@@ -5531,7 +5539,7 @@ Accounts, tags or commodities not previously declared will cause errors.
@item --check-payees
Enable strict and pedantic checking for payees as well as accounts,
-commodities and tags. This only works in conjunction with
+commodities and tags. This only works in conjunction with
@option{--strict} or @option{--pedantic}.
@item --immediate
@@ -5717,7 +5725,7 @@ Report net gain or loss for commodities that have a price history.
@end ftable
-@node Detailed Option Description, Period Expressions, Command Line Quick Reference, Command-line Syntax
+@node Detailed Option Description, Period Expressions, Command Line Quick Reference, Command-line Syntax
@section Detailed Option Description
@menu
@@ -5847,7 +5855,7 @@ a decimal separator, not the usual period.
@item --download
@itemx -Q
-Direct Ledger to download prices using the script defined via the option
+Direct Ledger to download prices using the script defined via the option
@option{--getquote @var{FILE}}.
@item --explicit
@@ -5933,9 +5941,9 @@ a misspelled commodity or account) it will issue a warning giving you
the file and line number of the problem.
@item --recursive-aliases
-Normally, ledger only expands aliases once. With this option, ledger tries
-to expand the result of alias expansion recursively, until no more expansions
-apply.
+Normally, ledger only expands aliases once. With this option, ledger
+tries to expand the result of alias expansion recursively, until no more
+expansions apply.
@item --time-colon
The @option{--time-colon} option will display the value for a seconds
@@ -6049,7 +6057,7 @@ $ ledger reg Expenses --begin Dec --bold-if "amount>100"
@end smallexample
@noindent
-list all transactions since the beginning of December and print in
+list all transactions since the beginning of December and print in
bold any posting greater than $100.
@item --budget
@@ -6141,7 +6149,7 @@ Transform the date of the transaction using @var{EXPR}.
@item --date-format @var{DATE_FORMAT}
@itemx -y @var{DATE_FORMAT}
-Specify the format ledger should use to read and print dates
+Specify the format ledger should use to read and print dates
(@pxref{Date and Time Format Codes}).
@item --date-width @var{INT}
@@ -6154,7 +6162,7 @@ FIX THIS ENTRY @c ASK JOHN
@item --dc
Display register or balance in debit/credit format If you use
@option{--dc} with either the @command{register} (reg) or
-@command{balance} (bal) commands, you will now get extra columns.
+@command{balance} (bal) commands, you will now get extra columns.
The register goes from this:
@smallexample
@@ -6225,8 +6233,8 @@ in the register and prices reports.
Display only lines that satisfy the expression @var{EXPR}.
@item --display-amount @var{EXPR}
-Apply a transformation to the @emph{displayed} amount. This happens after
-calculations occur.
+Apply a transformation to the @emph{displayed} amount. This happens
+after calculations occur.
@item --display-total @var{EXPR}
Apply a transformation to the @emph{displayed} total. This happens after
@@ -6312,8 +6320,8 @@ or @code{commodity}. The @code{tags()} function is also useful here.
@item --group-title-format @var{FORMAT_STRING}
Set the format for the headers that separates the report sections of
-a grouped report. Only has an effect with a @option{--group-by @var{EXPR}}
-register report.
+a grouped report. Only has an effect with a @option{--group-by
+@var{EXPR}} register report.
@smallexample
$ ledger reg Expenses --group-by "payee" --group-title-format "------------------------ %-20(value) ---------------------\n"
@@ -6449,7 +6457,7 @@ Only works for accounts that have a single commodity.
Define a period expression that sets the time period during which
transactions are to be accounted. For a @command{register} report only
the transactions that satisfy the period expression with be displayed.
-For a @command{balance} report only those transactions will be accounted
+For a @command{balance} report only those transactions will be accounted
in the final balances.
@item --pivot @var{TAG}
@@ -6460,7 +6468,7 @@ identifying which car the purchase was for @samp{; Car: Prius}, then the
command:
@smallexample
-$ ledger bal Fuel --pivot "Car" --period "this year"
+$ ledger bal Fuel --pivot "Car" --period "this year"
$ 3491.26 Car
$ 1084.22 M3:Expenses:Auto:Fuel
$ 149.65 MG V11:Expenses:Auto:Fuel
@@ -6509,10 +6517,10 @@ Report commodity totals (this is the default).
Synonym for @samp{--period "quarterly"}.
@item --raw
-In the @command{print} report, show transactions using the exact same syntax as
-specified by the user in their data file. Don't do any massaging or
-interpreting. This can be useful for minor cleanups, like just aligning
-amounts.
+In the @command{print} report, show transactions using the exact same
+syntax as specified by the user in their data file. Don't do any
+massaging or interpreting. This can be useful for minor cleanups, like
+just aligning amounts.
@item --real
@itemx -R
@@ -6523,8 +6531,8 @@ transactions.
Define the output format for the @command{register} report.
@item --related
-In a @command{register} report show the related account. This is the other
-@emph{side} of the transaction.
+In a @command{register} report show the related account. This is the
+other @emph{side} of the transaction.
@item --related-all
Show all postings in a transaction, similar to @option{--related} but
@@ -6544,12 +6552,13 @@ FIX THIS ENTRY
FIX THIS ENTRY @c FIXME thdox
@item --seed @var{FIXME}
-Set the random seed to @var{FIXME} for the @code{generate} command. Used as part of
-development testing.
+Set the random seed to @var{FIXME} for the @code{generate} command.
+Used as part of development testing.
@item --sort @var{VEXPR}
@itemx -S @var{VEXPR}
-Sort the @command{register} report based on the value expression given to sort.
+Sort the @command{register} report based on the value expression given
+to sort.
@item --sort-all @var{FIXME}
FIX THIS ENTRY
@@ -6569,8 +6578,8 @@ FIX THIS ENTRY
@item --tail @var{INT}
@itemx --last @var{INT}
-Report only the last @var{INT} entries. Only useful in a @command{register}
-report.
+Report only the last @var{INT} entries. Only useful in
+a @command{register} report.
@item --time-report
FIX THIS ENTRY @c FIXME thdox
@@ -6722,8 +6731,8 @@ Set the reporting period to @var{STR}. This will subtotal all matching
transactions within each period separately, making it easy to see
weekly, monthly, quarterly, etc., posting totals. A period string can
even specify the beginning and end of the report range, using simple
-terms like @samp{last June} or @samp{next month}. For more details on period
-expressions, see @ref{Period Expressions}.
+terms like @samp{last June} or @samp{next month}. For more details on
+period expressions, see @ref{Period Expressions}.
@item --period-sort @var{VEXPR}
Sort the postings within each reporting period using the value
@@ -6856,7 +6865,7 @@ Set the value expression used for the ``totals'' column in the
@c ledger reg food not dining expr 'payee =~ /chang/'
@c @end smallexample
-@node Output customization, Commodity reporting, Report filtering, Detailed Option Description
+@node Output customization, Commodity reporting, Report filtering, Detailed Option Description
@subsection Output customization
These options affect only the output, but not which postings are
@@ -6894,7 +6903,8 @@ Report posting totals by month.
@item --yearly
@itemx -Y
-Report posting totals by year. For more complex periods, use @option{--period}.
+Report posting totals by year. For more complex periods, use
+@option{--period}.
@c TODO end this sentence
@item --period @var{PERIOD_EXPRESSION}
@@ -6907,10 +6917,10 @@ to see if weekend spending is more than on weekdays.
@item --sort @var{VEXPR}
@itemx -S @var{VEXPR}
Sort a report by comparing the values determined using the value
-expression @var{VEXPR}. For example, using @samp{-S "-abs(total)"} in the
-@command{balance} report will sort account balances from greatest to least,
-using the absolute value of the total. For more on how to use value expressions,
-see @ref{Value Expressions}.
+expression @var{VEXPR}. For example, using @samp{-S "-abs(total)"} in
+the @command{balance} report will sort account balances from greatest to
+least, using the absolute value of the total. For more on how to use
+value expressions, see @ref{Value Expressions}.
@item --pivot @var{TAG}
Produce a pivot table around the @var{TAG} provided. This requires
@@ -7296,7 +7306,7 @@ which allows you to report most everything in EUR if you use @samp{-X
EUR}, except for certain accounts or postings which should always be
valuated in another currency. For example:
-@c TODO is this example missing the actual line to get the effect?
+@c TODO is this example missing the actual line to get the effect?
@c it looks like it only contains a match, but no effect
@smallexample @c input:validate
= /^Assets:Brokerage:CAD$/
@@ -7334,13 +7344,14 @@ these values:
@itemize
@item Register Report
-For the @command{register} report, use the value of that commodity on the date of
-the posting being reported, with a @samp{<Revalued>} posting added at
-the end if today's value is different from the value of the last
-posting.
+For the @command{register} report, use the value of that commodity on
+the date of the posting being reported, with a @samp{<Revalued>} posting
+added at the end if today's value is different from the value of the
+last posting.
@item Balance Report
-For the @command{balance} report, use the value of that commodity as of today.
+For the @command{balance} report, use the value of that commodity as of
+today.
@end itemize
@@ -7353,16 +7364,16 @@ You can also now use @option{--exchange @var{COMMODITY} (-X)} (and
and @option{--price (-I)}, to see valuation reports of just your basis
costs or lot prices.
-Finally, sometimes, you may seek to only report one (or some subset)
-of the commodities in terms of another commodity. In this
-situation, you can use the syntax
-@option{--exchange @var{COMMODITY1}:@var{COMMODITY2}} to request that
-ledger always display @var{COMMODITY1} in terms of @var{COMMODITY2},
-but you want no other commodities to be automatically displayed in terms of
-@var{COMMODITY2} without additional @option{--exchange} options. For
-example, if you wanted to report EUR and BTC in terms of USD, but report
-all other commodities without conversion to USD, you could use:
-@option{--exchange EUR:USD --exchange BTC:USD}.
+Finally, sometimes, you may seek to only report one (or some subset) of
+the commodities in terms of another commodity. In this situation, you
+can use the syntax @option{--exchange @var{COMMODITY1}:@var{COMMODITY2}}
+to request that ledger always display @var{COMMODITY1} in terms of
+@var{COMMODITY2}, but you want no other commodities to be automatically
+displayed in terms of @var{COMMODITY2} without additional
+@option{--exchange} options. For example, if you wanted to report EUR
+and BTC in terms of USD, but report all other commodities without
+conversion to USD, you could use: @option{--exchange EUR:USD --exchange
+BTC:USD}.
@node Environment variables, , Commodity reporting, Detailed Option Description
@subsection Environment variables
@@ -7563,7 +7574,7 @@ This report continues outputting postings until the running total
is greater than $-500.00. A final posting is always shown, to
inform you what the total afterwards would be.
-Forecasting can also be used with the @command{balance} report,
+Forecasting can also be used with the @command{balance} report,
but by date only, and not against the running total:
@smallexample @c command:validate
@@ -7584,20 +7595,20 @@ o 2013/03/29 03:39:00
This records a check-in to the given ACCOUNT, and a check-out. You can
be checked-in to multiple accounts at a time, if you wish, and they can
span multiple days (use @option{--day-break} to break them up in the
-report). The number of seconds between check-in and check-out is accumulated
-as time to that ACCOUNT. If the checkout uses a capital @samp{O}, the
-transaction is marked ``cleared''. You can use an optional PAYEE for
-whatever meaning you like.
+report). The number of seconds between check-in and check-out is
+accumulated as time to that ACCOUNT. If the checkout uses a capital
+@samp{O}, the transaction is marked ``cleared''. You can use an
+optional PAYEE for whatever meaning you like.
Now, there are a few ways to generate this information. You can use
the @file{timeclock.el} package, which is part of Emacs. Or you can
write a simple script in whichever language you prefer to emit similar
information. Or you can use Org mode's time-clocking abilities and
-the @samp{org2tc} script developed by John Wiegley.
+the @file{org2tc} script developed by John Wiegley.
These timelog entries can appear in a separate file, or directly in
-your main ledger file. The initial @samp{i} and @samp{o} characters
-count as Ledger ``directives'', and are accepted anywhere that
+your main ledger file. The initial @samp{i} and @samp{o} characters
+count as Ledger ``directives'', and are accepted anywhere that
ordinary transactions are valid.
@node Value Expressions, Format Strings, Time Keeping, Top
@@ -7673,7 +7684,7 @@ $ ledger -b "this month" register checking
@findex --total @var{VEXPR}
Below are the one letter variables available in any value expression.
-For the @command{register} and @command{print} commands, these variables
+For the @command{register} and @command{print} commands, these variables
relate to individual postings, and sometimes the account affected by a
posting. For the @command{balance} command, these variables relate to
accounts, often with a subtle difference in meaning. The use of each
@@ -7683,10 +7694,11 @@ variable for both is specified.
@item t
This maps to whatever the user specified with @option{--amount
-@var{EXPR} (-t)}. In a @command{register} report, @option{--amount @var{EXPR}
-(-t)} changes the value column; in a @command{balance} report, it has no meaning
-by default. If @option{--amount @var{EXPR} (-t)} was not specified, the
-current report style's value expression is used.
+@var{EXPR} (-t)}. In a @command{register} report, @option{--amount
+@var{EXPR} (-t)} changes the value column; in a @command{balance}
+report, it has no meaning by default. If @option{--amount @var{EXPR}
+(-t)} was not specified, the current report style's value expression is
+used.
@item T
This maps to whatever the user specified with @option{--total
@@ -7880,9 +7892,10 @@ Useful for specifying a date in plain terms. For example, you could say
@samp{expr date =~ /2014/}.
@item expr comment =~ /REGEX/
-A regular expression that matches against a posting's comment field. This
-searches only a posting's field, not the transaction's note or comment field.
-For example, @samp{ledger reg "expr" "comment =~ /landline/"} will match:
+A regular expression that matches against a posting's comment
+field. This searches only a posting's field, not the transaction's note
+or comment field. For example, @code{ledger reg "expr" "comment =~
+/landline/"} will match:
@smallexample
2014/1/29 Phone bill
@@ -7905,8 +7918,8 @@ instead.
@item expr note =~ /REGEX/
A regular expression that matches against a transaction's note field.
This searches all comments in the transaction, including comments on
-individual postings. Thus, @samp{ledger reg "expr" "note =~ /landline/"} will
-match both all the three examples below:
+individual postings. Thus, @samp{ledger reg "expr" "note =~ /landline/"}
+will match both all the three examples below:
@smallexample
2014/1/29 Phone bill
@@ -7945,9 +7958,9 @@ text that occurs between parentheses before the payee).
@end table
-The @samp{query} command can be used to see how Ledger interprets your query.
-This can be useful if you are not getting the results you expect. See
-@pxref{Pre-Commands} for more.
+The @command{query} command can be used to see how Ledger interprets
+your query. This can be useful if you are not getting the results you
+expect (@pxref{Pre-Commands}).
@menu
* Miscellaneous::
@@ -8509,7 +8522,8 @@ generated the posting.
@table @code
@item filename
-the name of ledger the data file from whence the posting came, abbreviated @samp{S}.
+the name of ledger the data file from whence the posting came,
+abbreviated @samp{S}.
@item beg_pos
character position in @code{filename} where entry for posting begins,
@@ -8815,10 +8829,10 @@ querying ad reporting on your data.
@item Textual journal parser
-There is a textual parser, wholly contained in @file{textual.cc}, which knows
-how to parse text into journal objects, which then get ``finalized'' and
-added to the journal. Finalization is the step that enforces the
-double-entry guarantee.
+There is a textual parser, wholly contained in @file{textual.cc}, which
+knows how to parse text into journal objects, which then get
+``finalized'' and added to the journal. Finalization is the step that
+enforces the double-entry guarantee.
@item Iterators
@@ -8836,8 +8850,8 @@ the user passed to @option{--sort @var{VEXPR}}.
Many reports bring pseudo-journal objects into existence, like postings
which report totals in a @samp{Total} account. These objects are
-created and managed by a @code{temporaries_t} object, which gets used in many
-places by the reporting filters.
+created and managed by a @code{temporaries_t} object, which gets used in
+many places by the reporting filters.
@item Option handling
@@ -9296,8 +9310,8 @@ Print detailed information on the execution of Ledger.
@item --verify
Enable additional assertions during run-time. This causes a significant
-slowdown. When combined with @option{--debug @var{CODE}} ledger will produce
-memory trace information.
+slowdown. When combined with @option{--debug @var{CODE}} ledger will
+produce memory trace information.
@item --verify-memory
FIX THIS ENTRY @c FIXME thdox
@@ -9401,8 +9415,8 @@ true
FIX THIS ENTRY @c FIXME thdox
@item template
-Shows the insertion template that the @command{xact} sub-command generates.
-This is a debugging command.
+Shows the insertion template that the @command{xact} sub-command
+generates. This is a debugging command.
@end ftable
@@ -9505,7 +9519,7 @@ is now @env{LEDGER_PRICE_EXP}.
@end itemize
-@node Example Journal File, Miscellaneous Notes, Major Changes from version 2.6, Top
+@node Example Journal File, Miscellaneous Notes, Major Changes from version 2.6, Top
@appendix Example Journal File
The following journal file is included with the source distribution of
@@ -9604,7 +9618,7 @@ $ ledger --group-by "tag('trip')" bal
$ legder reg --sort "tag('foo')" %foo
$ ledger cleared VWCU NFCU Tithe Misentry
$ ledger register Joint --uncleared
-$ ledger register Checking --sort d -d 'd>[2011/04/01]' until 2011/05/25
+$ ledger register Checking --sort d -d 'd>[2011/04/01]' until 2011/05/25
@end smallexample
@node Ledger Files, , Invoking Ledger, Cookbook
diff --git a/lisp/ledger-commodities.el b/lisp/ledger-commodities.el
index c2d7639b..5ffebf3b 100644
--- a/lisp/ledger-commodities.el
+++ b/lisp/ledger-commodities.el
@@ -1,6 +1,6 @@
;;; ledger-commodities.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-complete.el b/lisp/ledger-complete.el
index fd79656a..2fae9911 100644
--- a/lisp/ledger-complete.el
+++ b/lisp/ledger-complete.el
@@ -1,6 +1,6 @@
;;; ledger-complete.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-context.el b/lisp/ledger-context.el
index dd393789..0dfa4645 100644
--- a/lisp/ledger-context.el
+++ b/lisp/ledger-context.el
@@ -1,6 +1,6 @@
;;; ledger-context.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-exec.el b/lisp/ledger-exec.el
index 1a0c967d..8902d839 100644
--- a/lisp/ledger-exec.el
+++ b/lisp/ledger-exec.el
@@ -1,6 +1,6 @@
;;; ledger-exec.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-fonts.el b/lisp/ledger-fonts.el
index 117eb1d1..8bdecdb3 100644
--- a/lisp/ledger-fonts.el
+++ b/lisp/ledger-fonts.el
@@ -1,6 +1,6 @@
;;; ledger-fonts.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-init.el b/lisp/ledger-init.el
index 9a20ac98..49d74098 100644
--- a/lisp/ledger-init.el
+++ b/lisp/ledger-init.el
@@ -1,6 +1,6 @@
;;; ledger-init.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-mode.el b/lisp/ledger-mode.el
index 1a44554e..4e2beff6 100644
--- a/lisp/ledger-mode.el
+++ b/lisp/ledger-mode.el
@@ -1,6 +1,6 @@
;;; ledger-mode.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-occur.el b/lisp/ledger-occur.el
index 1df4e7a0..a4fde2e1 100644
--- a/lisp/ledger-occur.el
+++ b/lisp/ledger-occur.el
@@ -1,6 +1,6 @@
;;; ledger-occur.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-post.el b/lisp/ledger-post.el
index a316129d..e0c7aaee 100644
--- a/lisp/ledger-post.el
+++ b/lisp/ledger-post.el
@@ -1,6 +1,6 @@
;;; ledger-post.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-reconcile.el b/lisp/ledger-reconcile.el
index 5a10e89d..80e27ae3 100644
--- a/lisp/ledger-reconcile.el
+++ b/lisp/ledger-reconcile.el
@@ -1,6 +1,6 @@
;;; ledger-reconcile.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-regex.el b/lisp/ledger-regex.el
index 99655716..41231845 100644
--- a/lisp/ledger-regex.el
+++ b/lisp/ledger-regex.el
@@ -1,6 +1,6 @@
;;; ledger-regex.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-report.el b/lisp/ledger-report.el
index 52a64667..eb3d8435 100644
--- a/lisp/ledger-report.el
+++ b/lisp/ledger-report.el
@@ -1,6 +1,6 @@
;;; ledger-report.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
@@ -196,7 +196,7 @@ used to generate the buffer, navigating the buffer, etc."
(setq buffer-read-only t)
(message "q to quit; r to redo; e to edit; k to kill; s to save; SPC and DEL to scroll"))))
-(defun string-empty-p (s)
+(defun ledger-report-string-empty-p (s)
"Check S for the empty string."
(string-equal "" s))
@@ -205,7 +205,7 @@ used to generate the buffer, navigating the buffer, etc."
If name exists, returns the object naming the report,
otherwise returns nil."
- (unless (string-empty-p name)
+ (unless (ledger-report-string-empty-p name)
(car (assoc name ledger-reports))))
(defun ledger-reports-add (name cmd)
@@ -296,7 +296,7 @@ Optional EDIT the command."
(setq ledger-report-saved nil)) ;; this is a new report, or edited report
(setq report-cmd (ledger-report-expand-format-specifiers report-cmd))
(set (make-local-variable 'ledger-report-cmd) report-cmd)
- (or (string-empty-p report-name)
+ (or (ledger-report-string-empty-p report-name)
(ledger-report-name-exists report-name)
(progn
(ledger-reports-add report-name report-cmd)
@@ -409,7 +409,7 @@ Optional EDIT the command."
(defun ledger-report-read-new-name ()
"Read the name for a new report from the minibuffer."
(let ((name ""))
- (while (string-empty-p name)
+ (while (ledger-report-string-empty-p name)
(setq name (read-from-minibuffer "Report name: " nil nil nil
'ledger-report-name-prompt-history)))
name))
@@ -419,7 +419,7 @@ Optional EDIT the command."
(interactive)
(ledger-report-goto)
(let (existing-name)
- (when (string-empty-p ledger-report-name)
+ (when (ledger-report-string-empty-p ledger-report-name)
(setq ledger-report-name (ledger-report-read-new-name)))
(if (setq existing-name (ledger-report-name-exists ledger-report-name))
diff --git a/lisp/ledger-sort.el b/lisp/ledger-sort.el
index 23cfbae9..870e298c 100644
--- a/lisp/ledger-sort.el
+++ b/lisp/ledger-sort.el
@@ -1,6 +1,6 @@
;;; ledger-xact.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-state.el b/lisp/ledger-state.el
index 8fe84053..47805f15 100644
--- a/lisp/ledger-state.el
+++ b/lisp/ledger-state.el
@@ -1,6 +1,6 @@
;;; ledger-state.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-test.el b/lisp/ledger-test.el
index 2db44c2b..da120f63 100644
--- a/lisp/ledger-test.el
+++ b/lisp/ledger-test.el
@@ -1,6 +1,6 @@
;;; ledger-test.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-texi.el b/lisp/ledger-texi.el
index 746051bf..afaf0df7 100644
--- a/lisp/ledger-texi.el
+++ b/lisp/ledger-texi.el
@@ -1,6 +1,6 @@
;;; ledger-texi.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/lisp/ledger-xact.el b/lisp/ledger-xact.el
index 29f6f4f0..0eb9386a 100644
--- a/lisp/ledger-xact.el
+++ b/lisp/ledger-xact.el
@@ -1,6 +1,6 @@
;;; ledger-xact.el --- Helper code for use with the "ledger" command-line tool
-;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org)
+;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org)
;; This file is not part of GNU Emacs.
diff --git a/src/account.cc b/src/account.cc
index 216b15bd..358aa09a 100644
--- a/src/account.cc
+++ b/src/account.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/account.h b/src/account.h
index 7411dfc2..76e839eb 100644
--- a/src/account.h
+++ b/src/account.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/amount.cc b/src/amount.cc
index 5d74c22e..6ddcdb4f 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/amount.h b/src/amount.h
index 8fadaf9d..ea5cadd6 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -1,9 +1,9 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * modification, are permitted provided that the following conditions are
+ * met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
diff --git a/src/annotate.cc b/src/annotate.cc
index 89363dd5..7c54edef 100644
--- a/src/annotate.cc
+++ b/src/annotate.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/annotate.h b/src/annotate.h
index 0f8f8e68..c0fbcd3d 100644
--- a/src/annotate.h
+++ b/src/annotate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/archive.cc b/src/archive.cc
index 87faab3c..9ae04e85 100644
--- a/src/archive.cc
+++ b/src/archive.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/archive.h b/src/archive.h
index d5a5a90b..485f9606 100644
--- a/src/archive.h
+++ b/src/archive.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/balance.cc b/src/balance.cc
index 752bf133..36eab7d4 100644
--- a/src/balance.cc
+++ b/src/balance.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/balance.h b/src/balance.h
index ca1ee31b..752bb4d6 100644
--- a/src/balance.h
+++ b/src/balance.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/chain.cc b/src/chain.cc
index bb3955b8..42f474c4 100644
--- a/src/chain.cc
+++ b/src/chain.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/chain.h b/src/chain.h
index f9f5c6c6..224bed21 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/commodity.cc b/src/commodity.cc
index ae852462..398245fb 100644
--- a/src/commodity.cc
+++ b/src/commodity.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/commodity.h b/src/commodity.h
index 80945fe7..3d1ddf04 100644
--- a/src/commodity.h
+++ b/src/commodity.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/compare.cc b/src/compare.cc
index 34e41332..db169cfc 100644
--- a/src/compare.cc
+++ b/src/compare.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/compare.h b/src/compare.h
index defc38f3..554e84aa 100644
--- a/src/compare.h
+++ b/src/compare.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/context.h b/src/context.h
index 27b733a1..e787f335 100644
--- a/src/context.h
+++ b/src/context.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/convert.cc b/src/convert.cc
index 816271f2..a4454c14 100644
--- a/src/convert.cc
+++ b/src/convert.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/convert.h b/src/convert.h
index c82dd34c..020dfea2 100644
--- a/src/convert.h
+++ b/src/convert.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/csv.cc b/src/csv.cc
index 9f7e78e4..b0a54f4e 100644
--- a/src/csv.cc
+++ b/src/csv.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/csv.h b/src/csv.h
index 9c4ccca1..cda15ea3 100644
--- a/src/csv.h
+++ b/src/csv.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/draft.cc b/src/draft.cc
index 63173234..78e53ccd 100644
--- a/src/draft.cc
+++ b/src/draft.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/draft.h b/src/draft.h
index 39786ec8..7ba40640 100644
--- a/src/draft.h
+++ b/src/draft.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/emacs.cc b/src/emacs.cc
index b7f20bd2..dc16c002 100644
--- a/src/emacs.cc
+++ b/src/emacs.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/emacs.h b/src/emacs.h
index aecf884e..fef7a882 100644
--- a/src/emacs.h
+++ b/src/emacs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/error.cc b/src/error.cc
index 830dacb0..90697c5f 100644
--- a/src/error.cc
+++ b/src/error.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/error.h b/src/error.h
index c4aa2a71..31fa76a3 100644
--- a/src/error.h
+++ b/src/error.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/expr.cc b/src/expr.cc
index 84da6292..e38d794f 100644
--- a/src/expr.cc
+++ b/src/expr.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/expr.h b/src/expr.h
index 4909c21e..384cc661 100644
--- a/src/expr.h
+++ b/src/expr.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/exprbase.h b/src/exprbase.h
index 17a8ad95..b88fcd7d 100644
--- a/src/exprbase.h
+++ b/src/exprbase.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/filters.cc b/src/filters.cc
index d24188f5..2f97a0e5 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/filters.h b/src/filters.h
index 48d1a0fb..1404b38e 100644
--- a/src/filters.h
+++ b/src/filters.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/flags.h b/src/flags.h
index 910b70a7..f3593517 100644
--- a/src/flags.h
+++ b/src/flags.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/format.cc b/src/format.cc
index 402cfdfd..2887a387 100644
--- a/src/format.cc
+++ b/src/format.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/format.h b/src/format.h
index 3e16bbb5..6ac4075e 100644
--- a/src/format.h
+++ b/src/format.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/generate.cc b/src/generate.cc
index b69d7cd1..6503f414 100644
--- a/src/generate.cc
+++ b/src/generate.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/generate.h b/src/generate.h
index 622861e2..b17116fa 100644
--- a/src/generate.h
+++ b/src/generate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/global.cc b/src/global.cc
index a58bba54..602e216c 100644
--- a/src/global.cc
+++ b/src/global.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -514,7 +514,7 @@ void handle_debug_options(int argc, char * argv[])
#if TRACING_ON
_log_level = LOG_TRACE;
try {
- _trace_level = boost::lexical_cast<uint8_t>(argv[i + 1]);
+ _trace_level = boost::lexical_cast<uint16_t>(argv[i + 1]);
}
catch (const boost::bad_lexical_cast&) {
throw std::logic_error(_("Argument to --trace must be an integer"));
diff --git a/src/global.h b/src/global.h
index eda75112..f36dbe3d 100644
--- a/src/global.h
+++ b/src/global.h
@@ -1,9 +1,9 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * modification, are permitted provided that the following conditions are
+ * met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@@ -127,7 +127,7 @@ public:
out << '-' << Ledger_VERSION_DATE;
out << _(", the command-line accounting tool");
out <<
- _("\n\nCopyright (c) 2003-2014, John Wiegley. All rights reserved.\n\n\
+ _("\n\nCopyright (c) 2003-2015, John Wiegley. All rights reserved.\n\n\
This program is made available under the terms of the BSD Public License.\n\
See LICENSE file included with the distribution for details and disclaimer.");
out << std::endl;
diff --git a/src/history.cc b/src/history.cc
index 3601c093..e3c459f3 100644
--- a/src/history.cc
+++ b/src/history.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/history.h b/src/history.h
index 68c46189..dd776383 100644
--- a/src/history.h
+++ b/src/history.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/item.cc b/src/item.cc
index 551c8fef..9effcd23 100644
--- a/src/item.cc
+++ b/src/item.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/item.h b/src/item.h
index 767a0715..458cb378 100644
--- a/src/item.h
+++ b/src/item.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/iterators.cc b/src/iterators.cc
index fd6cde69..21bec5d9 100644
--- a/src/iterators.cc
+++ b/src/iterators.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/iterators.h b/src/iterators.h
index 93d0d7ce..86eb86ca 100644
--- a/src/iterators.h
+++ b/src/iterators.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/journal.cc b/src/journal.cc
index b11b5c45..ae545477 100644
--- a/src/journal.cc
+++ b/src/journal.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/journal.h b/src/journal.h
index 803b9511..613b2b96 100644
--- a/src/journal.h
+++ b/src/journal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/lookup.cc b/src/lookup.cc
index aa1eeb65..6dbeb502 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/lookup.h b/src/lookup.h
index 60ef334b..fc7063ec 100644
--- a/src/lookup.h
+++ b/src/lookup.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/main.cc b/src/main.cc
index 81118e43..c26a280a 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/mask.cc b/src/mask.cc
index 5c5d02f9..29b53781 100644
--- a/src/mask.cc
+++ b/src/mask.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/mask.h b/src/mask.h
index 296892c8..2b579768 100644
--- a/src/mask.h
+++ b/src/mask.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/op.cc b/src/op.cc
index 5794794e..ff707a14 100644
--- a/src/op.cc
+++ b/src/op.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/op.h b/src/op.h
index 99838f86..c45ffb08 100644
--- a/src/op.h
+++ b/src/op.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/option.cc b/src/option.cc
index 0629399e..8c003e08 100644
--- a/src/option.cc
+++ b/src/option.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/option.h b/src/option.h
index 1ea9457d..4646121d 100644
--- a/src/option.h
+++ b/src/option.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/org.cc b/src/org.cc
index 34ca6de3..7d11c36a 100644
--- a/src/org.cc
+++ b/src/org.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/org.h b/src/org.h
index 6e78350d..40b7685d 100644
--- a/src/org.h
+++ b/src/org.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/output.cc b/src/output.cc
index ba469ea9..ffd144e1 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/output.h b/src/output.h
index 38f1e59e..ec7ec6c2 100644
--- a/src/output.h
+++ b/src/output.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/parser.cc b/src/parser.cc
index 7fbbff8a..8044338f 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/parser.h b/src/parser.h
index a056493a..e46fc719 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/pool.cc b/src/pool.cc
index 71bfab72..95c0f49d 100644
--- a/src/pool.cc
+++ b/src/pool.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/pool.h b/src/pool.h
index f93f3496..d24df78c 100644
--- a/src/pool.h
+++ b/src/pool.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/post.cc b/src/post.cc
index 4244a349..269e2e6c 100644
--- a/src/post.cc
+++ b/src/post.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/post.h b/src/post.h
index d04be266..1e5fc569 100644
--- a/src/post.h
+++ b/src/post.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/precmd.cc b/src/precmd.cc
index edd824f1..2da6ba8e 100644
--- a/src/precmd.cc
+++ b/src/precmd.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/precmd.h b/src/precmd.h
index f25fcb43..bf2732d7 100644
--- a/src/precmd.h
+++ b/src/precmd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/predicate.h b/src/predicate.h
index 964d4418..30d07223 100644
--- a/src/predicate.h
+++ b/src/predicate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/print.cc b/src/print.cc
index 54cfa578..02e518f7 100644
--- a/src/print.cc
+++ b/src/print.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/print.h b/src/print.h
index e882922e..c587b499 100644
--- a/src/print.h
+++ b/src/print.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/pstream.h b/src/pstream.h
index ed314068..3b669aca 100644
--- a/src/pstream.h
+++ b/src/pstream.h
@@ -1,9 +1,9 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * modification, are permitted provided that the following conditions are
+ * met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
diff --git a/src/ptree.cc b/src/ptree.cc
index 3fc9ace6..3efe4451 100644
--- a/src/ptree.cc
+++ b/src/ptree.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/ptree.h b/src/ptree.h
index dc1161f3..36708dcf 100644
--- a/src/ptree.h
+++ b/src/ptree.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_account.cc b/src/py_account.cc
index 7b8eda8c..1cc28b92 100644
--- a/src/py_account.cc
+++ b/src/py_account.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_amount.cc b/src/py_amount.cc
index 01fb370c..84558a29 100644
--- a/src/py_amount.cc
+++ b/src/py_amount.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_balance.cc b/src/py_balance.cc
index ff6e75f8..98ed8c60 100644
--- a/src/py_balance.cc
+++ b/src/py_balance.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_commodity.cc b/src/py_commodity.cc
index 18903a86..27a0e105 100644
--- a/src/py_commodity.cc
+++ b/src/py_commodity.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_expr.cc b/src/py_expr.cc
index c62cb3e1..803388f2 100644
--- a/src/py_expr.cc
+++ b/src/py_expr.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_format.cc b/src/py_format.cc
index ba590e62..6086d6cb 100644
--- a/src/py_format.cc
+++ b/src/py_format.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_item.cc b/src/py_item.cc
index 5d9a4ae2..473bbef8 100644
--- a/src/py_item.cc
+++ b/src/py_item.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_journal.cc b/src/py_journal.cc
index cc2b996d..abbcd866 100644
--- a/src/py_journal.cc
+++ b/src/py_journal.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_post.cc b/src/py_post.cc
index d6ff5402..851828c7 100644
--- a/src/py_post.cc
+++ b/src/py_post.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_session.cc b/src/py_session.cc
index 5253dba3..f6053180 100644
--- a/src/py_session.cc
+++ b/src/py_session.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_times.cc b/src/py_times.cc
index c210889d..906dcfaa 100644
--- a/src/py_times.cc
+++ b/src/py_times.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_utils.cc b/src/py_utils.cc
index 0dc3d2bf..df87bded 100644
--- a/src/py_utils.cc
+++ b/src/py_utils.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_value.cc b/src/py_value.cc
index 669e0d73..2828e3b8 100644
--- a/src/py_value.cc
+++ b/src/py_value.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/py_xact.cc b/src/py_xact.cc
index 5e355ad9..5b4c14d4 100644
--- a/src/py_xact.cc
+++ b/src/py_xact.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/pyfstream.h b/src/pyfstream.h
index d1aca260..11f514a2 100644
--- a/src/pyfstream.h
+++ b/src/pyfstream.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/pyinterp.cc b/src/pyinterp.cc
index 9d6638fc..54e62946 100644
--- a/src/pyinterp.cc
+++ b/src/pyinterp.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/pyinterp.h b/src/pyinterp.h
index 5ea40567..32becbf6 100644
--- a/src/pyinterp.h
+++ b/src/pyinterp.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/pyledger.cc b/src/pyledger.cc
index 27a07deb..1f478dec 100644
--- a/src/pyledger.cc
+++ b/src/pyledger.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/pyutils.h b/src/pyutils.h
index 0a50d0eb..039b2605 100644
--- a/src/pyutils.h
+++ b/src/pyutils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/query.cc b/src/query.cc
index 7e96b040..04b18581 100644
--- a/src/query.cc
+++ b/src/query.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/query.h b/src/query.h
index f2161eb8..b7608bc7 100644
--- a/src/query.h
+++ b/src/query.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/quotes.cc b/src/quotes.cc
index c29f18d0..6d179287 100644
--- a/src/quotes.cc
+++ b/src/quotes.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/quotes.h b/src/quotes.h
index 34c506dd..c14bc495 100644
--- a/src/quotes.h
+++ b/src/quotes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/report.cc b/src/report.cc
index a05a57d9..4b240611 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/report.h b/src/report.h
index acfd40db..67e95884 100644
--- a/src/report.h
+++ b/src/report.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/scope.cc b/src/scope.cc
index 7eaf50c3..3ca9e0c0 100644
--- a/src/scope.cc
+++ b/src/scope.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/scope.h b/src/scope.h
index 30b825a3..8ad3afac 100644
--- a/src/scope.h
+++ b/src/scope.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/select.cc b/src/select.cc
index a9e943ab..81800f16 100644
--- a/src/select.cc
+++ b/src/select.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/select.h b/src/select.h
index 09555db8..c95e15f7 100644
--- a/src/select.h
+++ b/src/select.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/session.cc b/src/session.cc
index f20b4f6c..b0d31be9 100644
--- a/src/session.cc
+++ b/src/session.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/session.h b/src/session.h
index 88146c1e..b287b19e 100644
--- a/src/session.h
+++ b/src/session.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/stats.cc b/src/stats.cc
index 31bceea3..406ecd3b 100644
--- a/src/stats.cc
+++ b/src/stats.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/stats.h b/src/stats.h
index 7502fc20..f0408591 100644
--- a/src/stats.h
+++ b/src/stats.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/stream.cc b/src/stream.cc
index e4eb7800..c5a40e87 100644
--- a/src/stream.cc
+++ b/src/stream.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/stream.h b/src/stream.h
index 577a3291..05572cb4 100644
--- a/src/stream.h
+++ b/src/stream.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/system.hh.in b/src/system.hh.in
index 67a218da..21417e09 100644
--- a/src/system.hh.in
+++ b/src/system.hh.in
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/temps.cc b/src/temps.cc
index 75669a2a..15ccbc3a 100644
--- a/src/temps.cc
+++ b/src/temps.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/temps.h b/src/temps.h
index eedea4c1..77a7824e 100644
--- a/src/temps.h
+++ b/src/temps.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/textual.cc b/src/textual.cc
index b113c746..8007ca0d 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -285,6 +285,11 @@ void instance_t::parse()
}
}
+ if (apply_stack.front().value.type() == typeid(optional<datetime_t>))
+ epoch = boost::get<optional<datetime_t> >(apply_stack.front().value);
+
+ apply_stack.pop_front();
+
#if defined(TIMELOG_SUPPORT)
timelog.close();
#endif // TIMELOG_SUPPORT
@@ -419,7 +424,9 @@ void instance_t::read_next_directive(bool& error_flag)
price_xact_directive(line);
break;
case 'Y': // set the current year
- apply_year_directive(line + 1);
+ if (std::strlen(line+1) == 0)
+ throw_(parse_error, _f("Directive '%1%' requires an argument") % line[0]);
+ apply_year_directive(line+1);
break;
}
}
@@ -863,14 +870,17 @@ void instance_t::apply_rate_directive(char * line)
void instance_t::apply_year_directive(char * line)
{
- apply_stack.push_front(application_t("year", epoch));
-
- // This must be set to the last day of the year, otherwise partial
- // dates like "11/01" will refer to last year's november, not the
- // current year.
- unsigned short year(lexical_cast<unsigned short>(skip_ws(line)));
- DEBUG("times.epoch", "Setting current year to " << year);
- epoch = datetime_t(date_t(year, 12, 31));
+ try {
+ unsigned short year(lexical_cast<unsigned short>(skip_ws(line)));
+ apply_stack.push_front(application_t("year", epoch));
+ DEBUG("times.epoch", "Setting current year to " << year);
+ // This must be set to the last day of the year, otherwise partial
+ // dates like "11/01" will refer to last year's november, not the
+ // current year.
+ epoch = datetime_t(date_t(year, 12, 31));
+ } catch(bad_lexical_cast &) {
+ throw_(parse_error, _f("Argument '%1%' not a valid year") % skip_ws(line));
+ }
}
void instance_t::end_apply_directive(char * kind)
@@ -1245,13 +1255,13 @@ void instance_t::python_directive(char * line)
void instance_t::import_directive(char *)
{
throw_(parse_error,
- _("'python' directive seen, but Python support is missing"));
+ _("'import' directive seen, but Python support is missing"));
}
void instance_t::python_directive(char *)
{
throw_(parse_error,
- _("'import' directive seen, but Python support is missing"));
+ _("'python' directive seen, but Python support is missing"));
}
#endif // HAVE_BOOST_PYTHON
@@ -1375,6 +1385,13 @@ bool instance_t::general_directive(char * line)
return true;
}
break;
+
+ case 'y':
+ if (std::strcmp(p, "year") == 0) {
+ apply_year_directive(arg);
+ return true;
+ }
+ break;
}
if (expr_t::ptr_op_t op = lookup(symbol_t::DIRECTIVE, p)) {
diff --git a/src/timelog.cc b/src/timelog.cc
index 8f157d62..91ee2697 100644
--- a/src/timelog.cc
+++ b/src/timelog.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/timelog.h b/src/timelog.h
index 50c93aab..af621ee6 100644
--- a/src/timelog.h
+++ b/src/timelog.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/times.cc b/src/times.cc
index 15009dc5..b6c15dc3 100644
--- a/src/times.cc
+++ b/src/times.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/times.h b/src/times.h
index 00007580..c1bfb1cc 100644
--- a/src/times.h
+++ b/src/times.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/token.cc b/src/token.cc
index aa78cd5a..9fe7873f 100644
--- a/src/token.cc
+++ b/src/token.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/token.h b/src/token.h
index febd8620..3fe249aa 100644
--- a/src/token.h
+++ b/src/token.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/unistring.h b/src/unistring.h
index 340115eb..3f459d83 100644
--- a/src/unistring.h
+++ b/src/unistring.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/utils.cc b/src/utils.cc
index 741ce79d..9b528f54 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -574,7 +574,7 @@ std::ostream * _log_stream = &std::cerr;
std::ostringstream _log_buffer;
#if TRACING_ON
-uint8_t _trace_level;
+uint16_t _trace_level;
#endif
static bool logger_has_run = false;
diff --git a/src/utils.h b/src/utils.h
index c3dcf562..b92a6f49 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -251,7 +251,7 @@ void logger_func(log_level_t level);
#if TRACING_ON
-extern uint8_t _trace_level;
+extern uint16_t _trace_level;
#define SHOW_TRACE(lvl) \
(ledger::_log_level >= ledger::LOG_TRACE && lvl <= ledger::_trace_level)
diff --git a/src/value.cc b/src/value.cc
index 70a8ab43..2737add9 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/value.h b/src/value.h
index 3308e160..c224ce04 100644
--- a/src/value.h
+++ b/src/value.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/views.cc b/src/views.cc
index f0931e87..61b824cd 100644
--- a/src/views.cc
+++ b/src/views.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/views.h b/src/views.h
index bc4e5011..2be3d978 100644
--- a/src/views.h
+++ b/src/views.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/xact.cc b/src/xact.cc
index 049a2dac..5369c138 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/xact.h b/src/xact.h
index 074791b3..3ca57953 100644
--- a/src/xact.h
+++ b/src/xact.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2014, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/test/DocTests.py b/test/DocTests.py
index be28fae1..ea32608e 100755
--- a/test/DocTests.py
+++ b/test/DocTests.py
@@ -16,6 +16,7 @@ class DocTests:
self.ledger = os.path.abspath(args.ledger)
self.sourcepath = os.path.abspath(args.file)
self.verbose = args.verbose
+ self.tests = args.examples
self.examples = dict()
self.test_files = list()
@@ -114,7 +115,7 @@ class DocTests:
if command[0] == '$': command.remove('$')
index = command.index('ledger')
command[index] = self.ledger
- for i,argument in enumerate('--init-file /dev/null --columns 80'.split()):
+ for i,argument in enumerate('--args-only --columns 80'.split()):
command.insert(index+i+1, argument)
try:
@@ -133,7 +134,14 @@ class DocTests:
def test_examples(self):
failed = set()
- for test_id in self.examples:
+ tests = self.examples.keys()
+ if self.tests:
+ tests = list(set(self.tests).intersection(tests))
+ temp = list(set(self.tests).difference(tests))
+ if len(temp) > 0:
+ print >> sys.stderr, 'Skipping non-existent examples: %s' % ', '.join(temp)
+
+ for test_id in tests:
validation = False
if "validate-data" in self.examples[test_id] or "validate-command" in self.examples[test_id]:
validation = True
@@ -213,7 +221,7 @@ class DocTests:
if __name__ == "__main__":
def getargs():
- parser = argparse.ArgumentParser(description='DocTests', prefix_chars='-')
+ parser = argparse.ArgumentParser(prog='DocTests', description='Test ledger examples from the documentation', prefix_chars='-')
parser.add_argument('-v', '--verbose',
dest='verbose',
action='count',
@@ -230,6 +238,11 @@ if __name__ == "__main__":
action='store',
required=True,
help='the texinfo documentation file to run the examples from')
+ parser.add_argument('examples',
+ metavar='EXAMPLE',
+ type=str,
+ nargs='*',
+ help='the examples to test')
return parser.parse_args()
args = getargs()
diff --git a/test/baseline/opt-trace.test b/test/baseline/opt-trace.test
new file mode 100644
index 00000000..9034018e
--- /dev/null
+++ b/test/baseline/opt-trace.test
@@ -0,0 +1,15 @@
+2007/02/02 RD VMMXX
+ Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
+ Income:Dividends:Vanguard:VMMXX $-0.35
+
+; Using values with two or more digits as the argument to the --trace option
+; resulted in a segmentation fault.
+; Since ledger prints debugging information to stderr when the --trace option
+; was given and that debugging information contains timing information, e.g. [1ms]
+; which is likely to differ on each test run, this test only checks that ledger
+; does not crash when the --trace options was specified.
+test reg --trace 10 2>/dev/null
+07-Feb-02 RD VMMXX As:Inves:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
+ In:Divid:Vanguar:VMMXX $-0.35 $-0.35
+ 0.350 VMMXX
+end test
diff --git a/test/convert.py b/test/convert.py
index ae44b39f..5328c4ae 100755
--- a/test/convert.py
+++ b/test/convert.py
@@ -3,7 +3,7 @@
# convert.py: This script converts a Boost.Test unit test into an
# equivalent Python unit test.
#
-# Copyright (c) 2003-2010, John Wiegley. All rights reserved.
+# Copyright (c) 2003-2015, John Wiegley. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
diff --git a/test/regress/1038_1.test b/test/regress/1038_1.test
new file mode 100644
index 00000000..c833816e
--- /dev/null
+++ b/test/regress/1038_1.test
@@ -0,0 +1,18 @@
+Y2014
+
+04/13 Bank
+ Expenses:Loan $400
+ Assets:Cash
+
+05/13 Bug 1038 Test
+ Expenses:Some:Account $500
+ Assets:Cash
+
+06/13 Landlord
+ Expenses:Rent $600
+ Assets:Cash
+
+test reg --now 2014-05-14 -p 'this month'
+14-May-13 Bug 1038 Test Expenses:Some:Account $500 $500
+ Assets:Cash $-500 0
+end test
diff --git a/test/regress/1038_2.test b/test/regress/1038_2.test
new file mode 100644
index 00000000..ce0c046d
--- /dev/null
+++ b/test/regress/1038_2.test
@@ -0,0 +1,18 @@
+year 2014
+
+04/13 Bank
+ Expenses:Loan $400
+ Assets:Cash
+
+05/13 Bug 1038 Test
+ Expenses:Some:Account $500
+ Assets:Cash
+
+06/13 Landlord
+ Expenses:Rent $600
+ Assets:Cash
+
+test reg --now 2014-05-14 -p 'this month'
+14-May-13 Bug 1038 Test Expenses:Some:Account $500 $500
+ Assets:Cash $-500 0
+end test
diff --git a/test/regress/1038_3.test b/test/regress/1038_3.test
new file mode 100644
index 00000000..0e277d71
--- /dev/null
+++ b/test/regress/1038_3.test
@@ -0,0 +1,20 @@
+apply year 2014
+
+04/13 Bank
+ Expenses:Loan $400
+ Assets:Cash
+
+05/13 Bug 1038 Test
+ Expenses:Some:Account $500
+ Assets:Cash
+
+06/13 Landlord
+ Expenses:Rent $600
+ Assets:Cash
+
+end apply
+
+test reg --now 2014-05-14 -p 'this month'
+14-May-13 Bug 1038 Test Expenses:Some:Account $500 $500
+ Assets:Cash $-500 0
+end test
diff --git a/tools/prepare-commit-msg b/tools/prepare-commit-msg
new file mode 100755
index 00000000..e103888a
--- /dev/null
+++ b/tools/prepare-commit-msg
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Prepare git commit message:
+# - Add [ci skip] if the changes seem irrelevant for continuous integration
+
+# Add [ci skip] to the commit message unless there are changes to files
+# that are relevant for testing such as src/*, test/*, ledger3.texi, ...
+function add_ci_skip()
+{
+ pattern="$1"; shift
+ if [ $(git diff --cached --name-only | grep --count "$pattern") -eq 0 ]; then
+ tempfile=$(mktemp $0.XXXXXX)
+ cat - "$1" <<EOF > "$tempfile"
+
+# It seems the changes to be committed are irrelevant for the continuous
+# integration, therefore it will be skipped for this commit.
+#
+# If you still want continuous integration to run for this commit
+# comment or remove the next line.
+[ci skip]
+EOF
+ mv "$tempfile" "$1"
+ fi
+}
+
+## MAIN
+add_ci_skip '\(^src\|^test\|^doc/ledger3.texi\|^\.travis.yml\|CMakeLists.txt\)' "$@"