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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:46:20 UTC 2017


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

The following commit has been merged in the master branch:
commit e7b804f3f5fd1aa45c5ee5675cb60e00ae5dcb28
Author: Robin Mills <robin at clanmills.com>
Date:   Fri Mar 18 07:48:15 2016 +0000

    #1108 Refactored static indent(depth) from png/tiff/jpeg to Internal::indent(depth)
---
 src/image.cpp     |  9 +++++++++
 src/image_int.hpp |  5 +++++
 src/iptc.cpp      | 11 +----------
 src/pngimage.cpp  |  9 +--------
 src/tiffimage.cpp | 17 +++++------------
 5 files changed, 21 insertions(+), 30 deletions(-)

diff --git a/src/image.cpp b/src/image.cpp
index 38ffc28..214c52e 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -630,4 +630,13 @@ namespace Exiv2 {
         return binaryToString(buf.pData_,size,start);
     }
 
+	std::string indent(int32_t d)
+    {
+    	std::string result ;
+    	if ( d > 0 )
+    		while ( d--)
+    			result += "  ";
+    	return result;
+    }
+
 }}                                      // namespace Internal, Exiv2
diff --git a/src/image_int.hpp b/src/image_int.hpp
index a96445d..7e515ee 100644
--- a/src/image_int.hpp
+++ b/src/image_int.hpp
@@ -65,6 +65,11 @@ namespace Exiv2 {
      */
     std::string binaryToString(const byte* buff, size_t size, size_t start /*=0*/);
 
+    /*!
+      @brief indent output for kpsRecursive in \em printStructure() \em .
+     */
+    std::string indent(int32_t depth);
+
 }}                                      // namespace Internal, Exiv2
 
 #endif                                  // #ifndef IMAGE_INT_HPP_
diff --git a/src/iptc.cpp b/src/iptc.cpp
index facee46..59f654e 100644
--- a/src/iptc.cpp
+++ b/src/iptc.cpp
@@ -353,21 +353,12 @@ namespace Exiv2 {
         return iptcMetadata_.erase(pos);
     }
 
-    static std::string indent(int d)
-    {
-    	std::string result ;
-    	if ( d > 0 )
-    		while ( d--)
-    			result += "  ";
-    	return result;
-    }
-
 	void IptcData::printStructure(std::ostream& out, const byte* bytes,const size_t size,uint32_t depth)
 	{
 		uint32_t i     = 0 ;
 		while  ( i < size-3 && bytes[i] != 0x1c ) i++;
 		depth++;
-		out << indent(depth) << "Record | DataSet | Name                     | Length | Data" << std::endl;
+		out << Internal::indent(depth) << "Record | DataSet | Name                     | Length | Data" << std::endl;
 		while ( bytes[i] == 0x1c && i < size-3 ) {
 			char buff[100];
 			uint16_t record  = bytes[i+1];
diff --git a/src/pngimage.cpp b/src/pngimage.cpp
index 55a8081..0a52b81 100644
--- a/src/pngimage.cpp
+++ b/src/pngimage.cpp
@@ -159,13 +159,6 @@ namespace Exiv2 {
         return true;
     }
 
-    static std::string indent(int depth)
-    {
-        std::string result;
-        while ( depth -- ) result += "  ";
-        return result;
-    }
-
     std::string upper(const std::string& str)
     {
         std::string result;
@@ -303,7 +296,7 @@ namespace Exiv2 {
                             uint32_t    l     = (uint32_t) std::strlen(bytes)+2;
                             // create a copy on write memio object with the data, then print the structure
                             BasicIo::AutoPtr p = BasicIo::AutoPtr(new MemIo(dataBuf.pData_+l,dataBuf.size_-l));
-                            out << indent(depth) << (const char*) buff.pData_ << ": " << (const char*) dataBuf.pData_ << std::endl;
+                            out << Internal::indent(depth) << (const char*) buff.pData_ << ": " << (const char*) dataBuf.pData_ << std::endl;
                         }
 
                         if ( bICC ) {
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index 831bce1..a515aef 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -451,13 +451,6 @@ namespace Exiv2 {
 
 #define MIN(a,b) ((a)<(b))?(b):(a)
 
-    static std::string indent(int depth)
-    {
-        std::string result;
-        while ( depth -- ) result += "  ";
-        return result;
-    }
-
     void TiffImage::printStructure(std::ostream& out, Exiv2::PrintStructureOption option,int depth)
     {
         if (io_->open() != 0) throw Error(9, io_->path(), strError());
@@ -491,15 +484,15 @@ namespace Exiv2 {
             bool tooBig = dirLength > 500;
 
             if ( bFirst && bPrint ) {
-                out << indent(depth) << Internal::stringFormat("STRUCTURE OF TIFF FILE (%c%c): ",c,c) << io.path() << std::endl;
-                if ( tooBig ) out << indent(depth) << "dirLength = " << dirLength << std::endl;
+                out << Internal::indent(depth) << Internal::stringFormat("STRUCTURE OF TIFF FILE (%c%c): ",c,c) << io.path() << std::endl;
+                if ( tooBig ) out << Internal::indent(depth) << "dirLength = " << dirLength << std::endl;
             }
             if  (tooBig) break;
 
             // Read the dictionary
             for ( int i = 0 ; i < dirLength ; i ++ ) {
                 if ( bFirst && bPrint ) {
-                    out << indent(depth)
+                    out << Internal::indent(depth)
                         << " address |    tag                           |     "
                         << " type |    count |    offset | value
";
                 }
@@ -542,7 +535,7 @@ namespace Exiv2 {
 
                 if ( bPrint ) {
                     uint32_t address = start + 2 + i*12 ;
-                    out << indent(depth)
+                    out << Internal::indent(depth)
                             << Internal::stringFormat("%8u | %#06x %-25s |%10s |%9u |%10u | "
                                 ,address,tag,tagName(tag,25),typeName(type),count,offset);
                     if ( isShortType(type) ){
@@ -603,7 +596,7 @@ namespace Exiv2 {
         } while (start) ;
 
         if ( bPrint ) {
-            out << indent(depth) << "END " << io.path() << std::endl;
+            out << Internal::indent(depth) << "END " << io.path() << std::endl;
         }
         depth--;
     }

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list