Merge commit '62bdb2f13a31449ca6f439ee121162647c39855e'
This commit is contained in:
commit
2906a2f759
5 changed files with 51 additions and 17 deletions
40
.travis.yml
40
.travis.yml
|
|
@ -1,18 +1,42 @@
|
||||||
|
# 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.
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
compiler:
|
compiler:
|
||||||
- clang
|
- clang
|
||||||
- gcc
|
- gcc
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
# Add software package repository, containing updated build toochain, i.e. GNU GCC 4.8
|
||||||
|
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test --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:
|
||||||
- "./acprep dependencies"
|
# Install GNU GCC 4.8 required by use of C++11
|
||||||
- wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download
|
- sudo apt-get install -qq g++-4.8 gcc-4.8
|
||||||
- tar jxf download
|
- export CXX="g++-4.8" CC="gcc-4.8"
|
||||||
- mv boost_1_55_0 $HOME/boost-trunk
|
# 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
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- BOOST="$HOME/boost-trunk"
|
- ./acprep opt make --python --boost=$BOOST_ROOT
|
||||||
- "./acprep opt make --python"
|
|
||||||
script:
|
script:
|
||||||
- "./acprep check -- --output-on-failure"
|
- ./acprep check -- --output-on-failure
|
||||||
- "PYTHONPATH=. python python/demo.py"
|
- PYTHONPATH=. python python/demo.py
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
on_success: change
|
on_success: change
|
||||||
|
|
|
||||||
1
acprep
1
acprep
|
|
@ -868,6 +868,7 @@ class PrepareBuild(CommandLineApp):
|
||||||
if self.options.boost_root:
|
if self.options.boost_root:
|
||||||
conf_args.append('-DBOOST_ROOT=%s' %
|
conf_args.append('-DBOOST_ROOT=%s' %
|
||||||
self.options.boost_root)
|
self.options.boost_root)
|
||||||
|
conf_args.append('-DBoost_NO_SYSTEM_PATHS=TRUE')
|
||||||
if self.options.boost_suffix:
|
if self.options.boost_suffix:
|
||||||
conf_args.append('-DBoost_COMPILER=%s' %
|
conf_args.append('-DBoost_COMPILER=%s' %
|
||||||
self.options.boost_suffix)
|
self.options.boost_suffix)
|
||||||
|
|
|
||||||
|
|
@ -178,8 +178,8 @@
|
||||||
(ledger-define-regexp iso-date
|
(ledger-define-regexp iso-date
|
||||||
( let ((sep '(or ?- ?/)))
|
( let ((sep '(or ?- ?/)))
|
||||||
(rx (group
|
(rx (group
|
||||||
(and (group (? (= 4 num)))
|
(and (? (and (group (= 4 num)))
|
||||||
(eval sep)
|
(eval sep))
|
||||||
(group (and num (? num)))
|
(group (and num (? num)))
|
||||||
(eval sep)
|
(eval sep)
|
||||||
(group (and num (? num)))))))
|
(group (and num (? num)))))))
|
||||||
|
|
@ -325,7 +325,7 @@
|
||||||
(note end-note))
|
(note end-note))
|
||||||
|
|
||||||
(defconst ledger-iterate-regex
|
(defconst ledger-iterate-regex
|
||||||
(concat "\\(Y\\s-+\\([0-9]+\\)\\|" ;; Catches a Y directive
|
(concat "\\(\\(?:Y\\|year\\)\\s-+\\([0-9]+\\)\\|" ;; Catches a Y/year directive
|
||||||
ledger-iso-date-regexp
|
ledger-iso-date-regexp
|
||||||
"\\([ *!]+\\)" ;; mark
|
"\\([ *!]+\\)" ;; mark
|
||||||
"\\((.*)\\)?" ;; code
|
"\\((.*)\\)?" ;; code
|
||||||
|
|
|
||||||
|
|
@ -89,12 +89,20 @@ within the transaction."
|
||||||
(defun ledger-xact-find-slot (moment)
|
(defun ledger-xact-find-slot (moment)
|
||||||
"Find the right place in the buffer for a transaction at MOMENT.
|
"Find the right place in the buffer for a transaction at MOMENT.
|
||||||
MOMENT is an encoded date"
|
MOMENT is an encoded date"
|
||||||
|
(let (last-xact-start)
|
||||||
(catch 'found
|
(catch 'found
|
||||||
(ledger-xact-iterate-transactions
|
(ledger-xact-iterate-transactions
|
||||||
(function
|
(function
|
||||||
(lambda (start date mark desc)
|
(lambda (start date mark desc)
|
||||||
|
(setq last-xact-start start)
|
||||||
(if (ledger-time-less-p moment date)
|
(if (ledger-time-less-p moment date)
|
||||||
(throw 'found t)))))))
|
(throw 'found t))))))
|
||||||
|
(when (and (eobp) last-xact-start)
|
||||||
|
(let ((end (cadr (ledger-find-xact-extents last-xact-start))))
|
||||||
|
(goto-char end)
|
||||||
|
(if (eobp)
|
||||||
|
(insert "\n")
|
||||||
|
(forward-line))))))
|
||||||
|
|
||||||
(defun ledger-xact-iterate-transactions (callback)
|
(defun ledger-xact-iterate-transactions (callback)
|
||||||
"Iterate through each transaction call CALLBACK for each."
|
"Iterate through each transaction call CALLBACK for each."
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,7 @@ void journal_t::initialize()
|
||||||
day_break = false;
|
day_break = false;
|
||||||
checking_style = CHECK_NORMAL;
|
checking_style = CHECK_NORMAL;
|
||||||
recursive_aliases = false;
|
recursive_aliases = false;
|
||||||
|
no_aliases = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void journal_t::add_account(account_t * acct)
|
void journal_t::add_account(account_t * acct)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue