summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure33
-rw-r--r--configure.in2
-rw-r--r--src/main.cc2
-rw-r--r--src/system.hh3
-rw-r--r--src/textual.cc2
-rw-r--r--src/value.cc2
-rw-r--r--src/xpath.cc2
-rw-r--r--tests/numerics/BasicAmount.cc4
8 files changed, 42 insertions, 8 deletions
diff --git a/configure b/configure
index 06fc8974..1113c0f7 100755
--- a/configure
+++ b/configure
@@ -728,8 +728,13 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='ledger'
PACKAGE_TARNAME='ledger'
+<<<<<<< HEAD:configure
+PACKAGE_VERSION='3.0-git-lexical_cast'
+PACKAGE_STRING='ledger 3.0-git-lexical_cast'
+=======
PACKAGE_VERSION='3.0-git-commodity_pool'
PACKAGE_STRING='ledger 3.0-git-commodity_pool'
+>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
PACKAGE_BUGREPORT='johnw@newartisans.com'
ac_unique_file="ledger"
@@ -1424,7 +1429,11 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
+<<<<<<< HEAD:configure
+\`configure' configures ledger 3.0-git-lexical_cast to adapt to many kinds of systems.
+=======
\`configure' configures ledger 3.0-git-commodity_pool to adapt to many kinds of systems.
+>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1494,7 +1503,11 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
+<<<<<<< HEAD:configure
+ short | recursive ) echo "Configuration of ledger 3.0-git-lexical_cast:";;
+=======
short | recursive ) echo "Configuration of ledger 3.0-git-commodity_pool:";;
+>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
esac
cat <<\_ACEOF
@@ -1605,7 +1618,11 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
+<<<<<<< HEAD:configure
+ledger configure 3.0-git-lexical_cast
+=======
ledger configure 3.0-git-commodity_pool
+>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1619,7 +1636,11 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
+<<<<<<< HEAD:configure
+It was created by ledger $as_me 3.0-git-lexical_cast, which was
+=======
It was created by ledger $as_me 3.0-git-commodity_pool, which was
+>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2310,7 +2331,11 @@ fi
# Define the identity of the package.
PACKAGE='ledger'
+<<<<<<< HEAD:configure
+ VERSION='3.0-git-lexical_cast'
+=======
VERSION='3.0-git-commodity_pool'
+>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
cat >>confdefs.h <<_ACEOF
@@ -22045,7 +22070,11 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
+<<<<<<< HEAD:configure
+This file was extended by ledger $as_me 3.0-git-lexical_cast, which was
+=======
This file was extended by ledger $as_me 3.0-git-commodity_pool, which was
+>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22098,7 +22127,11 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
+<<<<<<< HEAD:configure
+ledger config.status 3.0-git-lexical_cast
+=======
ledger config.status 3.0-git-commodity_pool
+>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.in b/configure.in
index 8af5e870..f8e0b956 100644
--- a/configure.in
+++ b/configure.in
@@ -3,7 +3,7 @@
AC_PREREQ(2.59)
-AC_INIT(ledger, 3.0-git-commodity_pool, johnw@newartisans.com)
+AC_INIT(ledger, 3.0-git, johnw@newartisans.com)
AC_CONFIG_SRCDIR(ledger)
AM_INIT_AUTOMAKE
diff --git a/src/main.cc b/src/main.cc
index 25a5fc18..6908be3d 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -408,7 +408,7 @@ int main(int argc, char * argv[], char * envp[])
#if defined(TRACING_ON)
if (i + 1 < argc && std::strcmp(argv[i], "--trace") == 0) {
ledger::_log_level = LOG_TRACE;
- ledger::_trace_level = std::atoi(argv[i + 1]);
+ ledger::_trace_level = lexical_cast<int>(argv[i + 1]);
i++;
}
#endif
diff --git a/src/system.hh b/src/system.hh
index 2cc03413..efad4546 100644
--- a/src/system.hh
+++ b/src/system.hh
@@ -107,10 +107,11 @@ extern "C" {
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/function.hpp>
-#include <boost/multi_index_container.hpp>
+#include <boost/lexical_cast.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/key_extractors.hpp>
#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index_container.hpp>
#include <boost/operators.hpp>
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_list.hpp>
diff --git a/src/textual.cc b/src/textual.cc
index 6b36a4ac..6e7e3ee2 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -776,7 +776,7 @@ unsigned int textual_parser_t::parse(std::istream& in,
case 'Y': // set current year
#if 0
// jww (2007-04-18): Need to set this up again
- date_t::current_year = std::atoi(skip_ws(line + 1));
+ date_t::current_year = lexical_cast<int>(skip_ws(line + 1));
#endif
break;
diff --git a/src/value.cc b/src/value.cc
index e1cfa736..4451a543 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1647,7 +1647,7 @@ void value_t::in_place_cast(type_t cast_type)
break;
}
if (alldigits) {
- long temp = std::atol((*(string **) data)->c_str());
+ long temp = lexical_cast<long>((*(string **) data)->c_str());
destroy();
*(long *) data = temp;
} else {
diff --git a/src/xpath.cc b/src/xpath.cc
index fd574cee..86b0c1c4 100644
--- a/src/xpath.cc
+++ b/src/xpath.cc
@@ -654,7 +654,7 @@ xpath_t::parse_value_term(std::istream& in, unsigned short tflags) const
int id = -1;
if (std::isdigit(ident[0])) {
node.reset(new op_t(op_t::ARG_INDEX));
- node->arg_index = std::atol(ident.c_str());
+ node->arg_index = lexical_cast<unsigned int>(ident.c_str());
}
else if ((id = document_t::lookup_builtin_id(ident)) != -1) {
node.reset(new op_t(op_t::NODE_ID));
diff --git a/tests/numerics/BasicAmount.cc b/tests/numerics/BasicAmount.cc
index aed682a6..755bc372 100644
--- a/tests/numerics/BasicAmount.cc
+++ b/tests/numerics/BasicAmount.cc
@@ -17,8 +17,8 @@ void BasicAmountTestCase::testConstructors()
amount_t x3(123.456);
amount_t x5("123456");
amount_t x6("123.456");
- amount_t x7(std::string("123456"));
- amount_t x8(std::string("123.456"));
+ amount_t x7(string("123456"));
+ amount_t x8(string("123.456"));
amount_t x9(x3);
amount_t x10(x6);
amount_t x11(x8);