summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/locale_convert.cc13
-rw-r--r--src/locale_convert.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/src/locale_convert.cc b/src/locale_convert.cc
index 8f3073c..4264217 100644
--- a/src/locale_convert.cc
+++ b/src/locale_convert.cc
@@ -54,6 +54,19 @@ sub::locale_convert (unsigned long int x, int, bool)
template<>
string
+sub::locale_convert (unsigned long long x, int, bool)
+{
+ char buffer[64];
+#ifdef LIBSUB_WINDOWS
+ __mingw_snprintf (buffer, sizeof(buffer), "%lld", x);
+#else
+ snprintf (buffer, sizeof(buffer), "%lld", x);
+#endif
+ return buffer;
+}
+
+template<>
+string
sub::locale_convert (string x, int, bool)
{
return x;
diff --git a/src/locale_convert.h b/src/locale_convert.h
index be0903b..c511268 100644
--- a/src/locale_convert.h
+++ b/src/locale_convert.h
@@ -46,6 +46,10 @@ locale_convert (unsigned long int x, int, bool);
template <>
std::string
+locale_convert (unsigned long long x, int, bool);
+
+template <>
+std::string
locale_convert (std::string x, int, bool);
template <>