diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | cmake/FindUtfcpp.cmake | 3 | ||||
-rw-r--r-- | doc/NEWS | 57 | ||||
-rw-r--r-- | src/error.h | 2 | ||||
-rw-r--r-- | src/mask.cc | 3 | ||||
-rw-r--r-- | src/output.cc | 7 | ||||
-rw-r--r-- | src/py_value.cc | 8 | ||||
-rw-r--r-- | src/query.cc | 1 | ||||
-rw-r--r-- | src/system.hh.in | 4 | ||||
-rw-r--r-- | src/utils.h | 6 |
11 files changed, 56 insertions, 47 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e2ed3cac..c85a5157 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,8 +96,6 @@ include(CheckCXXSourceCompiles) include(CheckCXXSourceRuns) include(CMakePushCheckState) -check_function_exists(access HAVE_ACCESS) -check_function_exists(realpath HAVE_REALPATH) check_function_exists(getpwuid HAVE_GETPWUID) check_function_exists(getpwnam HAVE_GETPWNAM) check_function_exists(ioctl HAVE_IOCTL) @@ -84,16 +84,6 @@ Dependency | Version (or greater) [lcov] | 1.6 _optional_, for `make report`, used with `/./acprep gcov` [sloccount] | 2.26 _optional_, for `make sloc` -And for building the outdated `release/2.6.3` branch: - -Dependency | Version ------------|-------- -[GMP] | 4.2.2 -[pcre] | 7.7 -[libofx] | 0.8.3 _optional_ -[expat] | 2.0.1 _optional_ -[libxml2] | 2.7.2 _optional_ - ### macOS You can use [Homebrew] or [MacPorts] to install Ledger easily on macOS. diff --git a/cmake/FindUtfcpp.cmake b/cmake/FindUtfcpp.cmake index 185a8d88..93828ef4 100644 --- a/cmake/FindUtfcpp.cmake +++ b/cmake/FindUtfcpp.cmake @@ -10,7 +10,8 @@ set(UTFCPP_FOUND FALSE) find_path(UTFCPP_INCLUDE_DIR NAMES utf8.h - HINTS "${UTFCPP_PATH}" "${PROJECT_SOURCE_DIR}/lib/utfcpp/v2_0/source" + HINTS "${UTFCPP_PATH}" + PATHS "${PROJECT_SOURCE_DIR}/lib/utfcpp/v2_0/source" ) if (UTFCPP_INCLUDE_DIR) @@ -1,33 +1,66 @@ Ledger NEWS -* 3.1.2 +* 3.1.2 (unreleased) -- Increased maximum length for regex from 255 to 4095 (bug #981). +- Increase maximum length for regex from 255 to 4095 (bug #981) - Initialize periods from from/since clause rather than earliest - transaction date (bug #1159). + transaction date (bug #1159) -- Check balance assertions against the amount after the posting (bug #1147). +- Check balance assertions against the amount after the posting (bug #1147) -- Allow balance assertions with multiple posts to same account (bug #1187). +- Allow balance assertions with multiple posts to same account (bug #1187) -- Fixed period duration of "every X days" and similar statements (bug #370). +- Fix period duration of "every X days" and similar statements (bug #370) -- Option --force-color does not require --color anymore (bug #1109). +- Make option --force-color not require --color anymore (bug #1109) -- Added quoted_rfc4180 to allow CVS output with RFC 4180 compliant quoting. +- Add quoted_rfc4180 to allow CVS output with RFC 4180 compliant quoting. + +- Add support for --prepend-format in accounts command + +- Fix handling of edge cases in trim function (bug #520) + +- Fix auto xact posts not getting applied to account total during + journal parse (bug #552) + +- Transfer null_post flags to generated postings + +- Fix segfault when using --market with --group-by + +- Use amount_width variable for budget report + +- Keep pending items in budgets until the last day they apply + +- Fixed bug where .total used in value expressions breaks totals + +- Make automated transactions work with assertions (bug #1127) + +- Improve parsing of date tokens (bug #1626) + +- Don't attempt to invert a value if it's already zero (bug #1703) + +- Do not parse user-specified init-file twice - Python: Removed double quotes from Unicode values. +- Python: Ensure that parse errors produce useful RuntimeErrors + +- Python: Expose journal expand_aliases + +- Python: Expose journal_t::register_account + +- Improve bash completion + - Emacs Lisp files have been moved to https://github.com/ledger/ledger-mode -- Fixed build under MSYS (32-bit). +- Fix build under MSYS (32-bit). -- Fixed build under Cygwin. +- Fix build under Cygwin. - Various documentation improvements -* 3.1.1 +* 3.1.1 (2016-01-11) - Added a --no-revalued option @@ -57,7 +90,7 @@ - Add continuous integration (https://travis-ci.org/ledger/ledger) -* 3.1 +* 3.1 (2014-10-05) - Changed the definition of cost basis to preserve the original cost basis when a gain or loss is made (if you bought 1 AAA for $10 and then sold diff --git a/src/error.h b/src/error.h index ba278519..bc9953cd 100644 --- a/src/error.h +++ b/src/error.h @@ -47,7 +47,7 @@ namespace ledger { extern std::ostringstream _desc_buffer; template <typename T> -inline void throw_func(const string& message) { +[[ noreturn ]] inline void throw_func(const string& message) { _desc_buffer.clear(); _desc_buffer.str(""); throw T(message); diff --git a/src/mask.cc b/src/mask.cc index 434acad6..35e690de 100644 --- a/src/mask.cc +++ b/src/mask.cc @@ -75,9 +75,8 @@ mask_t& mask_t::assign_glob(const string& pat) if (i + 1 < len) { re_pat += pat[++i]; break; - } else { - // fallthrough... } + // fallthrough... default: re_pat += pat[i]; break; diff --git a/src/output.cc b/src/output.cc index c2fa83ac..09d3ad9e 100644 --- a/src/output.cc +++ b/src/output.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2018, John Wiegley. All rights reserved. + * Copyright (c) 2003-2019, 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 @@ -284,8 +284,9 @@ void report_accounts::flush() std::ostream& out(report.output_stream); format_t prepend_format; std::size_t prepend_width; + bool do_prepend_format; - if (report.HANDLED(prepend_format_)) { + if ((do_prepend_format = report.HANDLED(prepend_format_))) { prepend_format.parse_format(report.HANDLER(prepend_format_).str()); prepend_width = report.HANDLED(prepend_width_) ? lexical_cast<std::size_t>(report.HANDLER(prepend_width_).str()) @@ -293,7 +294,7 @@ void report_accounts::flush() } foreach (accounts_pair& entry, accounts) { - if (prepend_format) { + if (do_prepend_format) { bind_scope_t bound_scope(report, *entry.first); out.width(static_cast<std::streamsize>(prepend_width)); out << prepend_format(bound_scope); diff --git a/src/py_value.cc b/src/py_value.cc index f4f63946..486228c0 100644 --- a/src/py_value.cc +++ b/src/py_value.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2018, John Wiegley. All rights reserved. + * Copyright (c) 2003-2019, 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 @@ -88,12 +88,6 @@ namespace { return buf.str(); } - string py_dump_relaxed(const value_t& value) { - std::ostringstream buf; - value.dump(buf, true); - return buf.str(); - } - void py_set_string(value_t& value, const string& str) { return value.set_string(str); } diff --git a/src/query.cc b/src/query.cc index fc1d4ff0..883bea40 100644 --- a/src/query.cc +++ b/src/query.cc @@ -155,6 +155,7 @@ query_t::lexer_t::next_token(query_t::lexer_t::token_t::kind_t tok_context) case ')': if (! consume_next && tok_context == token_t::TOK_EXPR) goto test_ident; + // fall through... case '(': case '&': case '|': diff --git a/src/system.hh.in b/src/system.hh.in index 3c1187d9..c093e334 100644 --- a/src/system.hh.in +++ b/src/system.hh.in @@ -59,9 +59,7 @@ #define HAVE_GETTEXT @HAVE_GETTEXT@ -#cmakedefine HAVE_ACCESS #cmakedefine HAVE_EDIT -#cmakedefine HAVE_REALPATH #cmakedefine HAVE_GETPWUID #cmakedefine HAVE_GETPWNAM #cmakedefine HAVE_IOCTL @@ -143,7 +141,6 @@ typedef std::ostream::pos_type ostream_pos_type; #undef isspace(c) #endif -#include <sys/stat.h> #if defined(_WIN32) || defined(__CYGWIN__) #include <io.h> #else @@ -243,7 +240,6 @@ typedef std::ostream::pos_type ostream_pos_type; #include <boost/python/detail/wrap_python.hpp> #include <datetime.h> -#include <unicodeobject.h> #include <boost/python/module_init.hpp> #include <boost/python/suite/indexing/vector_indexing_suite.hpp> diff --git a/src/utils.h b/src/utils.h index 857b8289..c9146dd7 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2018, John Wiegley. All rights reserved. + * Copyright (c) 2003-2019, 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 @@ -500,10 +500,6 @@ inline T& downcast(U& object) { path resolve_path(const path& pathname); -#ifdef HAVE_REALPATH -extern "C" char * realpath(const char *, char resolved_path[]); -#endif - inline const string& either_or(const string& first, const string& second) { return first.empty() ? second : first; |