diff --git a/src/Config.cpp b/src/Config.cpp index b060e949e..bf0c23ae9 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -633,7 +634,7 @@ const std::string Config::get (const std::string& key) const int Config::getInteger (const std::string& key) { if ((*this).find (key) != (*this).end ()) - return atoi ((*this)[key].c_str ()); + return strtoimax ((*this)[key].c_str (), NULL, 10); return 0; } @@ -642,7 +643,7 @@ const int Config::getInteger (const std::string& key) const double Config::getReal (const std::string& key) { if ((*this).find (key) != (*this).end ()) - return atof ((*this)[key].c_str ()); + return strtod ((*this)[key].c_str (), NULL); return 0.0; } diff --git a/src/Config.h b/src/Config.h index 35f8e42e1..73909eb4a 100644 --- a/src/Config.h +++ b/src/Config.h @@ -1,7 +1,8 @@ //////////////////////////////////////////////////////////////////////////////// // taskwarrior - a command line task list manager. // -// Copyright 2006-2011, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez. +// All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/test/config.t.cpp b/test/config.t.cpp index 757f100b7..9d2ebe108 100644 --- a/test/config.t.cpp +++ b/test/config.t.cpp @@ -1,7 +1,8 @@ //////////////////////////////////////////////////////////////////////////////// // taskwarrior - a command line task list manager. // -// Copyright 2006-2011, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez. +// All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal