[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:42:39 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=dd3c112

The following commit has been merged in the master branch:
commit dd3c11274f6f32de1900e88bec75a4d6dae01d6f
Author: vog <vog at notjusthosting.com>
Date:   Mon Aug 22 21:56:41 2011 +0000

    Added new function Exiv2::versionNumberHexString()
---
 src/version.cpp | 11 +++++++++++
 src/version.hpp |  9 +++++++++
 2 files changed, 20 insertions(+)

diff --git a/src/version.cpp b/src/version.cpp
index 6dc5f21..7061fdb 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -39,12 +39,23 @@ EXIV2_RCSID("@(#) $Id$")
 
 #include "version.hpp"
 
+// + standard includes
+#include <iomanip>
+#include <sstream>
+
 namespace Exiv2 {
     int versionNumber()
     {
         return EXIV2_MAKE_VERSION(EXIV2_MAJOR_VERSION, EXIV2_MINOR_VERSION, EXIV2_PATCH_VERSION);
     }
 
+    std::string versionNumberHexString()
+    {
+        std::ostringstream os;
+        os << std::hex << std::setw(6) << std::setfill('0') << Exiv2::versionNumber();
+        return os.str();
+    }
+
     const char* version()
     {
         return EXV_PACKAGE_VERSION;
diff --git a/src/version.hpp b/src/version.hpp
index c71246c..8574765 100644
--- a/src/version.hpp
+++ b/src/version.hpp
@@ -32,6 +32,11 @@
 #ifndef VERSION_HPP_
 #define VERSION_HPP_
 
+// *****************************************************************************
+// included header files
+// + standard includes
+#include <string>
+
 /*!
   @brief %Exiv2 MAJOR version number of the library used at compile-time.
  */
@@ -117,6 +122,10 @@ namespace Exiv2 {
     */
     EXIV2API int versionNumber();
     /*!
+      @brief Return the version of %Exiv2 as hex string of fixed length 6.
+    */
+    EXIV2API std::string versionNumberHexString();
+    /*!
       @brief Return the version of %Exiv2 available at runtime as a string.
     */
     EXIV2API const char* version();

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list