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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:41:05 UTC 2017


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

The following commit has been merged in the master branch:
commit 50c213af9bdecfe62cf5140296f2854c51d9338c
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Thu Jan 7 16:55:23 2010 +0000

    Published convertStringCharset() in the API (for #662).
---
 src/convert.cpp | 76 ++++++++++++++++++++++++++-------------------------------
 src/convert.hpp |  4 +++
 2 files changed, 39 insertions(+), 41 deletions(-)

diff --git a/src/convert.cpp b/src/convert.cpp
index ac8d32a..f4b8d8e 100644
--- a/src/convert.cpp
+++ b/src/convert.cpp
@@ -73,12 +73,6 @@ namespace {
       The return code indicates if the operation was successful.
      */
     bool getTextValue(std::string& value, const Exiv2::XmpData::iterator& pos);
-
-    /*!
-      @brief Convert string charset with iconv.
-     */
-    bool convertStringCharset(std::string &str, const char* from, const char* to);
-
 }
 
 // *****************************************************************************
@@ -1315,39 +1309,6 @@ namespace Exiv2 {
         converter.cnvFromXmp();
     }
 
-}                                       // namespace Exiv2
-
-// *****************************************************************************
-// local definitions
-namespace {
-
-    bool getTextValue(std::string& value, const Exiv2::XmpData::iterator& pos)
-    {
-        if (pos->typeId() == Exiv2::langAlt) {
-            // get the default language entry without x-default qualifier
-            value = pos->toString(0);
-            if (!pos->value().ok() && pos->count() == 1) {
-                // If there is no default but exactly one entry, take that
-                // without the qualifier
-                value = pos->toString();
-                if (   pos->value().ok()
-                    && value.length() > 5 && value.substr(0, 5) == "lang=") {
-                    std::string::size_type pos = value.find_first_of(' ');
-                    if (pos != std::string::npos) {
-                        value = value.substr(pos + 1);
-                    }
-                    else {
-                        value.clear();
-                    }
-                }
-            }
-        }
-        else {
-            value = pos->toString();
-        }
-        return pos->value().ok();
-    }
-
     bool convertStringCharset(std::string &str, const char* from, const char* to)
     {
         if (0 == strcmp(from, to)) return true; // nothing to do
@@ -1357,7 +1318,7 @@ namespace {
         cd = iconv_open(to, from);
         if (cd == (iconv_t)(-1)) {
 #ifndef SUPPRESS_WARNINGS
-            std::cerr << "Warning: iconv_open: " << Exiv2::strError() << "
";
+            std::cerr << "Warning: iconv_open: " << strError() << "
";
 #endif
             return false;
         }
@@ -1377,7 +1338,7 @@ namespace {
             if (rc == size_t(-1) && errno != E2BIG) {
 #ifndef SUPPRESS_WARNINGS
                 std::cerr << "Warning: iconv: "
-                          << Exiv2::strError()
+                          << strError()
                           << " inbytesleft = " << inbytesleft << "
";
 #endif
                 ret = false;
@@ -1397,4 +1358,37 @@ namespace {
 #endif // EXV_HAVE_ICONV
     }
 
+}                                       // namespace Exiv2
+
+// *****************************************************************************
+// local definitions
+namespace {
+
+    bool getTextValue(std::string& value, const Exiv2::XmpData::iterator& pos)
+    {
+        if (pos->typeId() == Exiv2::langAlt) {
+            // get the default language entry without x-default qualifier
+            value = pos->toString(0);
+            if (!pos->value().ok() && pos->count() == 1) {
+                // If there is no default but exactly one entry, take that
+                // without the qualifier
+                value = pos->toString();
+                if (   pos->value().ok()
+                    && value.length() > 5 && value.substr(0, 5) == "lang=") {
+                    std::string::size_type pos = value.find_first_of(' ');
+                    if (pos != std::string::npos) {
+                        value = value.substr(pos + 1);
+                    }
+                    else {
+                        value.clear();
+                    }
+                }
+            }
+        }
+        else {
+            value = pos->toString();
+        }
+        return pos->value().ok();
+    }
+
 }
diff --git a/src/convert.hpp b/src/convert.hpp
index 49f5a26..f72bee7 100644
--- a/src/convert.hpp
+++ b/src/convert.hpp
@@ -41,6 +41,7 @@
 #endif
 
 // + standard includes
+#include <string>
 
 // *****************************************************************************
 // namespace extensions
@@ -78,6 +79,9 @@ namespace Exiv2 {
     //! Convert (move) XMP properties to IPTC tags, remove converted XMP properties.
     EXIV2API void moveXmpToIptc(XmpData& xmpData, IptcData& iptcData);
 
+    //! Convert string charset with iconv.
+    EXIV2API bool convertStringCharset(std::string& str, const char* from, const char* to);
+
 }                                       // namespace Exiv2
 
 #endif                                  // #ifndef CONVERT_HPP_

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list