From 738287ef7059e34c2f3c894aa3b1f7da3e059975 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 3 May 2007 06:11:33 +0000 Subject: Merged ../commodity_pool --- src/main.cc | 2 +- src/system.hh | 3 ++- src/textual.cc | 2 +- src/value.cc | 2 +- src/xpath.cc | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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(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 #include #include -#include +#include #include #include #include +#include #include #include #include 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(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((*(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(ident.c_str()); } else if ((id = document_t::lookup_builtin_id(ident)) != -1) { node.reset(new op_t(op_t::NODE_ID)); -- cgit v1.2.3