Add another conversion.
authorCarl Hetherington <cth@carlh.net>
Sat, 23 Mar 2019 22:10:04 +0000 (22:10 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 23 Mar 2019 22:10:04 +0000 (22:10 +0000)
src/locale_convert.cc
src/locale_convert.h

index 8f3073c4608e940ed38008e1c5bac95dbc443503..4264217af1488191859575ea3dd25e4f77e73a55 100644 (file)
@@ -52,6 +52,19 @@ sub::locale_convert (unsigned long int x, int, bool)
        return buffer;
 }
 
+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)
index be0903b480ea9906ff24e7d1408343e2ad2eac47..c5112689c086206fd76cc3adda4ca14f50ece715 100644 (file)
@@ -44,6 +44,10 @@ template <>
 std::string
 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);