Fredrik Fornwall
6 years ago
4 changed files with 3 additions and 99 deletions
@ -1,36 +0,0 @@ |
|||
From 850a2cec794ef0d98dbaaf83e5ddce4ecb819e27 Mon Sep 17 00:00:00 2001 |
|||
From: Tommi Komulainen <tommi.komulainen@iki.fi> |
|||
Date: Sat, 26 May 2018 09:36:45 +0200 |
|||
Subject: [PATCH] Fix garbled dates when using --date-format |
|||
|
|||
Capture the `std::string` value from options in a local variable that |
|||
lives as long as the `c_str()` taken from it to ensure it does not get |
|||
freed prematurely. |
|||
|
|||
Fixes: #546 |
|||
---
|
|||
src/print.cc | 4 +++- |
|||
1 file changed, 3 insertions(+), 1 deletion(-) |
|||
|
|||
diff --git a/src/print.cc b/src/print.cc
|
|||
index 9fa75eab..92323777 100644
|
|||
--- a/src/print.cc
|
|||
+++ b/src/print.cc
|
|||
@@ -103,11 +103,13 @@ namespace {
|
|||
void print_xact(report_t& report, std::ostream& out, xact_t& xact) |
|||
{ |
|||
format_type_t format_type = FMT_WRITTEN; |
|||
+ string format_str;
|
|||
optional<const char *> format; |
|||
|
|||
if (report.HANDLED(date_format_)) { |
|||
format_type = FMT_CUSTOM; |
|||
- format = report.HANDLER(date_format_).str().c_str();
|
|||
+ format_str = report.HANDLER(date_format_).str();
|
|||
+ format = format_str.c_str();
|
|||
} |
|||
|
|||
std::ostringstream buf; |
|||
--
|
|||
2.20.1 |
|||
|
@ -1,8 +1,7 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://www.ledger-cli.org |
|||
TERMUX_PKG_DESCRIPTION="Powerful, double-entry accounting system" |
|||
TERMUX_PKG_LICENSE="BSD 3-Clause" |
|||
TERMUX_PKG_VERSION=3.1.1 |
|||
TERMUX_PKG_REVISION=8 |
|||
TERMUX_PKG_SRCURL=https://github.com/ledger/ledger/archive/v${TERMUX_PKG_VERSION}.tar.gz |
|||
TERMUX_PKG_SHA256=90f06561ab692b192d46d67bc106158da9c6c6813cc3848b503243a9dfd8548a |
|||
TERMUX_PKG_VERSION=3.1.2 |
|||
TERMUX_PKG_SHA256=3ecebe00e8135246e5437e4364bb7a38869fad7c3250b849cf8c18ca2628182e |
|||
TERMUX_PKG_SRCURL=https://github.com/ledger/ledger/archive/${TERMUX_PKG_VERSION}.tar.gz |
|||
TERMUX_PKG_DEPENDS="boost, libedit, libmpfr, utf8cpp, libgmp" |
|||
|
@ -1,24 +0,0 @@ |
|||
From dab0039680cde39bd50404d1466f3ad50e012b68 Mon Sep 17 00:00:00 2001 |
|||
From: Ivy Foster <iff@escondida.tk> |
|||
Date: Thu, 26 Oct 2017 17:10:48 -0500 |
|||
Subject: [PATCH] src/global.cc: do not parse user-specified init-file twice |
|||
|
|||
---
|
|||
src/global.cc | 4 +--- |
|||
1 file changed, 1 insertion(+), 3 deletions(-) |
|||
|
|||
diff --git a/src/global.cc b/src/global.cc
|
|||
index b1c45d45f..37765a9b3 100644
|
|||
--- a/src/global.cc
|
|||
+++ b/src/global.cc
|
|||
@@ -136,9 +136,7 @@ void global_scope_t::read_init()
|
|||
path init_file; |
|||
if (HANDLED(init_file_)) { |
|||
init_file=HANDLER(init_file_).str(); |
|||
- if (exists(init_file)) {
|
|||
- parse_init(init_file);
|
|||
- } else {
|
|||
+ if (!exists(init_file)) {
|
|||
throw_(parse_error, _f("Could not find specified init file %1%") % init_file); |
|||
} |
|||
} else { |
@ -1,35 +0,0 @@ |
|||
From c18a55f9ef9969b38e5cf7f0f319b8ec5df34809 Mon Sep 17 00:00:00 2001 |
|||
From: Jan Beich <jbeich@FreeBSD.org> |
|||
Date: Mon, 9 Jul 2018 12:07:30 +0000 |
|||
Subject: [PATCH] Unbreak with boost 1.68 |
|||
|
|||
In file included from src/main.cc:34: |
|||
In file included from src/global.h:41: |
|||
In file included from src/option.h:45: |
|||
In file included from src/scope.h:45: |
|||
In file included from src/op.h:45: |
|||
In file included from src/expr.h:45: |
|||
In file included from src/exprbase.h:57: |
|||
src/utils.h:47:10: fatal error: 'boost/uuid/sha1.hpp' file not found |
|||
#include <boost/uuid/sha1.hpp> |
|||
^ |
|||
---
|
|||
src/utils.h | 4 ++++ |
|||
1 file changed, 4 insertions(+) |
|||
|
|||
diff --git a/src/utils.h b/src/utils.h
|
|||
index b21dff7af..857b8289c 100644
|
|||
--- a/src/utils.h
|
|||
+++ b/src/utils.h
|
|||
@@ -44,7 +44,11 @@
|
|||
#ifndef _UTILS_H |
|||
#define _UTILS_H |
|||
|
|||
+#if (BOOST_VERSION >= 106600)
|
|||
+#include <boost/uuid/detail/sha1.hpp>
|
|||
+#else
|
|||
#include <boost/uuid/sha1.hpp> |
|||
+#endif
|
|||
|
|||
/** |
|||
* @name Default values |
Loading…
Reference in new issue