[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:56 UTC 2017


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

The following commit has been merged in the master branch:
commit 1bea0c6aeb153cb9730ea496a63f65134511fb8e
Author: Robin Mills <robin at clanmills.com>
Date:   Thu Sep 15 14:09:43 2016 +0000

    #1108 Better string formatting (and associated test/data changes).  Tweaks to code layout for r4497.
---
 src/image.cpp               |   2 +-
 src/pngimage.cpp            |  17 ++++++++---------
 test/data/bugfixes-test.out | Bin 1912453 -> 1912573 bytes
 test/data/icc-test.out      |   6 +++---
 4 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/src/image.cpp b/src/image.cpp
index d396c7a..eaaf106 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -634,7 +634,7 @@ namespace Exiv2 {
             int   c             = (int) buff[start++] ;
             bool  bTrailingNull = c == 0 && start == size;
             if ( !bTrailingNull ) {
-                if (c < ' ' || c > 127) c = '.' ;
+                if (c < ' ' || c >= 127) c = '.' ;
                 result +=  (char) c ;
             }
         }
diff --git a/src/pngimage.cpp b/src/pngimage.cpp
index 2415538..81e48e6 100644
--- a/src/pngimage.cpp
+++ b/src/pngimage.cpp
@@ -221,16 +221,11 @@ namespace Exiv2 {
             const std::string softKey = "Software";
 
             bool bPrint = option == kpsBasic || option == kpsRecursive ;
-            if ( bPrint ) {
-                out << "STRUCTURE OF PNG FILE: " << io_->path() << std::endl;
-                out << " address | index | chunk_type |  length | data                           | checksum" << std::endl;
-            }
+            bool bFirst = true ;
 
-            long       index   = 0;
             const long imgSize = io_->size();
             DataBuf    cheaderBuf(8);
 
-
             while( !io_->eof() && ::strcmp(chType,"IEND") ) {
                 size_t address = io_->tell();
 
@@ -264,7 +259,6 @@ namespace Exiv2 {
                 while ( dataString.size() < 32 ) dataString += ' ';
                 dataString  = dataString.substr(0,30);
 
-
                 // chunk type
                 bool tEXt  = std::strcmp(chType,"tEXt")== 0;
                 bool zTXt  = std::strcmp(chType,"zTXt")== 0;
@@ -339,8 +333,13 @@ namespace Exiv2 {
                 byte checksum[4];
                 io_->read(checksum,4);
                 if ( bPrint ) {
-                    out << Internal::stringFormat("%8d | %5d | %10s |%8d | "
-                              ,(uint32_t)address, index++,chType,dataOffset)
+                    if ( bFirst ) {
+                        out << "STRUCTURE OF PNG FILE: " << io_->path() << std::endl;
+                        out << " address | chunk |  length | data                           | checksum" << std::endl;
+                        bFirst = false;
+                    }
+                    out << Internal::stringFormat("%8d | %-5s |%8d | "
+                              ,(uint32_t)address, chType,dataOffset)
                         << dataString
                         << Internal::stringFormat(" | 0x%02x%02x%02x%02x"
                               ,checksum[0],checksum[1],checksum[2],checksum[3])
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index 201d012..4327556 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
diff --git a/test/data/icc-test.out b/test/data/icc-test.out
index 9e301c5..56c43d0 100644
--- a/test/data/icc-test.out
+++ b/test/data/icc-test.out
@@ -46,7 +46,7 @@ STRUCTURE OF JPEG FILE: Reagan.jpg
     5708 | 0xffe1 APP1  |    5287 | http://ns.adobe.com/xap/1.0/.<?x
    10997 | 0xffe2 APP2  |   65512 | ICC_PROFILE..... APPL....prtrRGB chunk 1/0
    76512 | 0xffe2 APP2  |   65512 | ICC_PROFILE..X..Ih.V...j.U..4mVT chunk 2/88
-  142027 | 0xffe2 APP2  |   65512 | ICC_PROFILE..}.f...~mcx...`.... chunk 3/125
+  142027 | 0xffe2 APP2  |   65512 | ICC_PROFILE..}.f...~mcx....`.... chunk 3/125
   207542 | 0xffe2 APP2  |   65512 | ICC_PROFILE...|...S...^...v..... chunk 4/-119
   273057 | 0xffe2 APP2  |   65512 | ICC_PROFILE....bXf2..`Og...^0g.. chunk 5/-117
   338572 | 0xffe2 APP2  |   65512 | ICC_PROFILE....~.|...{.}P..y.}.. chunk 6/-119
@@ -83,7 +83,7 @@ STRUCTURE OF JPEG FILE: Reagan.jpg
     5708 | 0xffe1 APP1  |    5287 | http://ns.adobe.com/xap/1.0/.<?x
    10997 | 0xffe2 APP2  |   65512 | ICC_PROFILE.... APPL....prtrRGB  chunk 1/24
    76512 | 0xffe2 APP2  |   65512 | ICC_PROFILE....Ih.V...j.U..4mVT< chunk 2/-79
-  142027 | 0xffe2 APP2  |   65512 | ICC_PROFILE...f...~mcx...`..... chunk 3/27
+  142027 | 0xffe2 APP2  |   65512 | ICC_PROFILE...f...~mcx....`..... chunk 3/27
   207542 | 0xffe2 APP2  |   65512 | ICC_PROFILE..|...S...^...v...... chunk 4/124
   273057 | 0xffe2 APP2  |   65512 | ICC_PROFILE...bXf2..`Og...^0g..I chunk 5/-98
   338572 | 0xffe2 APP2  |   65512 | ICC_PROFILE...~.|...{.}P..y.}..V chunk 6/-116
@@ -122,7 +122,7 @@ STRUCTURE OF JPEG FILE: Reagan.jpg
     5708 | 0xffe1 APP1  |    5287 | http://ns.adobe.com/xap/1.0/.<?x
    10997 | 0xffe2 APP2  |   65512 | ICC_PROFILE... APPL....prtrRGB L chunk 1/-97
    76512 | 0xffe2 APP2  |   65512 | ICC_PROFILE...Ih.V...j.U..4mVT<. chunk 2/-99
-  142027 | 0xffe2 APP2  |   65512 | ICC_PROFILE..f...~mcx...`.....] chunk 3/102
+  142027 | 0xffe2 APP2  |   65512 | ICC_PROFILE..f...~mcx....`.....] chunk 3/102
   207542 | 0xffe2 APP2  |   65512 | ICC_PROFILE.....S...^...v....... chunk 4/-99
   273057 | 0xffe2 APP2  |   65512 | ICC_PROFILE..bXf2..`Og...^0g..I\ chunk 5/98
   338572 | 0xffe2 APP2  |   65512 | ICC_PROFILE..~.|...{.}P..y.}..Vv chunk 6/126

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list