#include <inttypes.h>
using std::string;
+using std::wstring;
template<>
string
return x;
}
+template<>
+string
+dcp::locale_convert (wchar_t const * x, int, bool)
+{
+ wstring s (x);
+ return string (s.begin(), s.end());
+}
+
template<>
string
dcp::locale_convert (char x, int, bool)
}
template<>
-int64_t
+long
+dcp::locale_convert (string x, int, bool)
+{
+ long int y = 0;
+ sscanf (x.c_str(), "%ld", &y);
+ return y;
+}
+
+template<>
+long long
dcp::locale_convert (string x, int, bool)
{
- int64_t y = 0;
- sscanf (x.c_str(), "%" PRId64, &y);
+ long long y = 0;
+ sscanf (x.c_str(), "%lld", &y);
return y;
}