Merged ../commodity_pool

This commit is contained in:
John Wiegley 2007-05-03 06:11:33 +00:00
parent c59018c29d
commit 738287ef70
8 changed files with 42 additions and 8 deletions

33
configure vendored
View file

@ -728,8 +728,13 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package. # Identity of this package.
PACKAGE_NAME='ledger' PACKAGE_NAME='ledger'
PACKAGE_TARNAME='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_VERSION='3.0-git-commodity_pool'
PACKAGE_STRING='ledger 3.0-git-commodity_pool' PACKAGE_STRING='ledger 3.0-git-commodity_pool'
>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
PACKAGE_BUGREPORT='johnw@newartisans.com' PACKAGE_BUGREPORT='johnw@newartisans.com'
ac_unique_file="ledger" 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. # 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. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF 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. \`configure' configures ledger 3.0-git-commodity_pool to adapt to many kinds of systems.
>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1494,7 +1503,11 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in 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:";; short | recursive ) echo "Configuration of ledger 3.0-git-commodity_pool:";;
>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1605,7 +1618,11 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
<<<<<<< HEAD:configure
ledger configure 3.0-git-lexical_cast
=======
ledger configure 3.0-git-commodity_pool ledger configure 3.0-git-commodity_pool
>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
generated by GNU Autoconf 2.61 generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 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 This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. 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 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 generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@ $ $0 $@
@ -2310,7 +2331,11 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='ledger' PACKAGE='ledger'
<<<<<<< HEAD:configure
VERSION='3.0-git-lexical_cast'
=======
VERSION='3.0-git-commodity_pool' VERSION='3.0-git-commodity_pool'
>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -22045,7 +22070,11 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" 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 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 generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -22098,7 +22127,11 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\ ac_cs_version="\\
<<<<<<< HEAD:configure
ledger config.status 3.0-git-lexical_cast
=======
ledger config.status 3.0-git-commodity_pool ledger config.status 3.0-git-commodity_pool
>>>>>>> 084f9d776dfed8da92b05f6daf52e8c2c8370f21:configure
configured by $0, generated by GNU Autoconf 2.61, configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View file

@ -3,7 +3,7 @@
AC_PREREQ(2.59) 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) AC_CONFIG_SRCDIR(ledger)
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE

View file

@ -408,7 +408,7 @@ int main(int argc, char * argv[], char * envp[])
#if defined(TRACING_ON) #if defined(TRACING_ON)
if (i + 1 < argc && std::strcmp(argv[i], "--trace") == 0) { if (i + 1 < argc && std::strcmp(argv[i], "--trace") == 0) {
ledger::_log_level = LOG_TRACE; ledger::_log_level = LOG_TRACE;
ledger::_trace_level = std::atoi(argv[i + 1]); ledger::_trace_level = lexical_cast<int>(argv[i + 1]);
i++; i++;
} }
#endif #endif

View file

@ -107,10 +107,11 @@ extern "C" {
#include <boost/filesystem/operations.hpp> #include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/function.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/hashed_index.hpp>
#include <boost/multi_index/key_extractors.hpp> #include <boost/multi_index/key_extractors.hpp>
#include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/operators.hpp> #include <boost/operators.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/ptr_container/ptr_list.hpp> #include <boost/ptr_container/ptr_list.hpp>

View file

@ -776,7 +776,7 @@ unsigned int textual_parser_t::parse(std::istream& in,
case 'Y': // set current year case 'Y': // set current year
#if 0 #if 0
// jww (2007-04-18): Need to set this up again // 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 #endif
break; break;

View file

@ -1647,7 +1647,7 @@ void value_t::in_place_cast(type_t cast_type)
break; break;
} }
if (alldigits) { if (alldigits) {
long temp = std::atol((*(string **) data)->c_str()); long temp = lexical_cast<long>((*(string **) data)->c_str());
destroy(); destroy();
*(long *) data = temp; *(long *) data = temp;
} else { } else {

View file

@ -654,7 +654,7 @@ xpath_t::parse_value_term(std::istream& in, unsigned short tflags) const
int id = -1; int id = -1;
if (std::isdigit(ident[0])) { if (std::isdigit(ident[0])) {
node.reset(new op_t(op_t::ARG_INDEX)); 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) { else if ((id = document_t::lookup_builtin_id(ident)) != -1) {
node.reset(new op_t(op_t::NODE_ID)); node.reset(new op_t(op_t::NODE_ID));

View file

@ -17,8 +17,8 @@ void BasicAmountTestCase::testConstructors()
amount_t x3(123.456); amount_t x3(123.456);
amount_t x5("123456"); amount_t x5("123456");
amount_t x6("123.456"); amount_t x6("123.456");
amount_t x7(std::string("123456")); amount_t x7(string("123456"));
amount_t x8(std::string("123.456")); amount_t x8(string("123.456"));
amount_t x9(x3); amount_t x9(x3);
amount_t x10(x6); amount_t x10(x6);
amount_t x11(x8); amount_t x11(x8);