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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:36:57 UTC 2017


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

The following commit has been merged in the master branch:
commit 7539421a27d61ef4adcf86c21070463a913d8015
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sat Feb 19 07:43:36 2005 +0000

    Fixed handling of Ifd offsets (bug #411), fixed guessing of Ifd base offset, added Ifd::pBase_ (not used yet), updated tests
---
 src/ifd-test.cpp                        | 148 +++++++++++++++++++++++++++++---
 src/ifd.cpp                             |  53 ++++++------
 src/ifd.hpp                             |  24 +++---
 test/Makefile                           |  88 +++++++++----------
 test/data/ifd-test.out                  | 100 +++++++++++++++++++++
 test/{makernote-test.sh => ifd-test.sh} |  10 +--
 6 files changed, 329 insertions(+), 94 deletions(-)

diff --git a/src/ifd-test.cpp b/src/ifd-test.cpp
index 2026637..968fd4d 100644
--- a/src/ifd-test.cpp
+++ b/src/ifd-test.cpp
@@ -1,20 +1,25 @@
+// ***************************************************************** -*- C++ -*-
+/*
+  Abstract : Simple test program to test class Ifd.
+
+  File     : ifd-test.cpp
+  Version  : $Rev$
+  Author(s): Andreas Huggel (ahu)
+  History  : 15-Feb-05, ahu
+ */
+// *****************************************************************************
+// included header files
 #include "ifd.hpp"
 #include "error.hpp"
 
 #include <iostream>
 #include <string>
 
-/*
-  Test cases:
-  - IFD entry offset is 0
-  - Wrong endianness
-
-
-
-*/
-
 int main()
 try {
+    // -------------------------------------------------------------------------
+    std::cout << "Read standard Ifd from data buffer
";
+
     long len = 76;
     Exiv2::byte buf[] 
         = { // No
@@ -35,7 +40,7 @@ try {
     Exiv2::Ifd ifd(Exiv2::ifd0Id, 0, false);
     int rc = ifd.read(buf, len, Exiv2::bigEndian, 1);
     if (rc) {
-        std::cout << "Ifd::read failed, rc = " << rc << "
";
+        std::cout << "Ifd::read (1) failed, rc = " << rc << "
";
         return rc;
     }
     ifd.print(std::cout);
@@ -50,9 +55,130 @@ try {
     std::cout << "Setting value of entry 3...
";
     pos->setValue(2, 6, data, 6);
 
-
+    Exiv2::DataBuf db(1024);
+    rc = ifd.copy(db.pData_, Exiv2::bigEndian);
+    std::cout << "Wrote " << rc << " characters to data buffer
"; 
+    rc = ifd.read(db.pData_, len, Exiv2::bigEndian, 1);
+    if (rc) {
+        std::cout << "Ifd::read (1a) failed, rc = " << rc << "
";
+        return rc;
+    }    
     ifd.print(std::cout);
 
+    // -------------------------------------------------------------------------
+    std::cout << "
Read non-standard Ifd from data buffer
";
+
+    long len2 = 76;
+    Exiv2::byte buf2[] 
+        = { // Data
+            'K', 'u', 'a', 'l', 'a', '

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list