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


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

The following commit has been merged in the master branch:
commit f6c0f9371a1ce7b1ac48af7bf2695c45706f315c
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sat Feb 21 12:03:32 2004 +0000

    Minor clean-ups
---
 src/tags.cpp | 38 ++++++++++++++++++++++++--------------
 src/tags.hpp | 17 ++++++++++-------
 2 files changed, 34 insertions(+), 21 deletions(-)

diff --git a/src/tags.cpp b/src/tags.cpp
index 9ebdee0..7d7206b 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -20,13 +20,13 @@
  */
 /*
   File:      tags.cpp
-  Version:   $Name:  $ $Revision: 1.17 $
+  Version:   $Name:  $ $Revision: 1.18 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   15-Jan-04, ahu: created
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.17 $ $RCSfile: tags.cpp,v $")
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.18 $ $RCSfile: tags.cpp,v $")
 
 // *****************************************************************************
 // included header files
@@ -54,13 +54,9 @@ namespace Exif {
         IfdInfo(ifd0, "IFD0", "Image"),
         IfdInfo(exifIfd, "Exif", "Image"),
         IfdInfo(gpsIfd, "GPSInfo", "Image"),
-        IfdInfo(makerIfd, "MakerNote", "Image"),
+        IfdInfo(makerIfd, "Makernote", "Makernote"),
         IfdInfo(iopIfd, "Iop", "Image"),
         IfdInfo(ifd1, "IFD1", "Thumbnail"),
-        IfdInfo(ifd1ExifIfd, "Exif", "Thumbnail"),
-        IfdInfo(ifd1GpsIfd, "GPSInfo", "Thumbnail"),
-        IfdInfo(ifd1MakerIfd, "MakerNote", "Thumbnail"),
-        IfdInfo(ifd1IopIfd, "Iop", "Thumbnail"),
         IfdInfo(lastIfdId, "(Last IFD info)", "(Last IFD info)")
     };
 
@@ -253,13 +249,19 @@ namespace Exif {
         TagInfo(0xffff, "(UnknownIopTag)", "Unknown Exif Interoperability tag", ifdIdNotSet, sectionIdNotSet, printValue)
     };
 
+    // MakerNote Tags
+    static const TagInfo makerNoteTagInfo[] = {
+        // End of list marker
+        TagInfo(0xffff, "(UnknownMakerNoteTag)", "Unknown MakerNote tag", ifdIdNotSet, sectionIdNotSet, printValue)
+    };
+
     // Tag lookup lists with tag names, desc and where they (preferably) belong to;
     // this is an array with pointers to one list per IFD. The IfdId is used as the
     // index into the array.
     const TagInfo* ExifTags::tagInfos_[] = {
         0, 
-        ifdTagInfo, exifTagInfo, gpsTagInfo, 0, iopTagInfo,
-        ifdTagInfo, exifTagInfo, gpsTagInfo, 0, iopTagInfo
+        ifdTagInfo, exifTagInfo, gpsTagInfo, makerNoteTagInfo, iopTagInfo, ifdTagInfo, 
+        0
     };
 
     int ExifTags::tagInfoIdx(uint16 tag, IfdId ifdId)
@@ -345,9 +347,8 @@ namespace Exif {
             + "." + std::string(tagName(tag, ifdId));
     }
 
-    // The uniqueness that we promise in this 'database lookup' function
-    // holds only implicitely. The function returns the first match that
-    // we find, it doesn't verify the uniqueness.
+    // This 'database lookup' function returns the first match that
+    // we find, it doesn't verify whether this is the only match.
     std::pair<uint16, IfdId> ExifTags::decomposeKey(const std::string& key)
     {
         // Get the IFD, section name and tag name parts of the key
@@ -362,6 +363,11 @@ namespace Exif {
         std::string tagName = key.substr(pos0);
         if (tagName == "") throw Error("Invalid key");
 
+        // Check if this is a MakerNote key, stop processing if it is
+        if (ifdItem == ifdInfo_[makerIfd].item_) {
+            return std::make_pair(0xffff, makerIfd);
+        }
+
         // Use the parts of the key to find tag and IFD id
         IfdId ifdId = ifdIdNotSet;
         uint16 tag = 0xffff;
@@ -382,11 +388,15 @@ namespace Exif {
         return std::make_pair(tag, ifdId);
     } // ExifTags::decomposeKey
 
-    PrintFct ExifTags::printFct(uint16 tag, IfdId ifdId)
+    std::ostream& ExifTags::printTag(std::ostream& os,
+                                     uint16 tag, 
+                                     IfdId ifdId,
+                                     const Value& value)
     {
         int idx = tagInfoIdx(tag, ifdId);
         if (idx == -1) throw Error("No taginfo for IFD");
-        return tagInfos_[ifdId][idx].printFct_;
+        PrintFct fct = tagInfos_[ifdId][idx].printFct_;
+        return fct(os, value);
     }
 
     void ExifTags::taglist(std::ostream& os)
diff --git a/src/tags.hpp b/src/tags.hpp
index 55f47f5..e8d3194 100644
--- a/src/tags.hpp
+++ b/src/tags.hpp
@@ -21,7 +21,7 @@
 /*!
   @file    tags.hpp
   @brief   %Exif tag and type information
-  @version $Name:  $ $Revision: 1.16 $
+  @version $Name:  $ $Revision: 1.17 $
   @author  Andreas Huggel (ahu)
            <a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
   @date    15-Jan-04, ahu: created
@@ -166,22 +166,25 @@ namespace Exif {
         //! Return the section id for a section name
         static SectionId sectionId(const std::string& sectionName);
         /*!
-          @brief Return a unique key for the tag and IFD id.
-                 The key is of the form 'ifdItem.sectionName.tagName'.
+          @brief Return the key for the tag and IFD id.  The key is of the form
+                 'ifdItem.sectionName.tagName'.
          */
         static std::string makeKey(uint16 tag, IfdId ifdId);
         /*!
-          @brief Return the unique tag and IFD id pair for the key.
+          @brief Return tag and IFD id pair for the key.
           @return A pair consisting of the tag and IFD id.
           @throw Error ("Invalid key") if the key cannot be parsed into
                  item item, section name and tag name parts.
          */
         static std::pair<uint16, IfdId> decomposeKey(const std::string& key);
-        //! Return the print function for the tag, IFD id combination
-        static PrintFct printFct(uint16 tag, IfdId ifdId);
+        //! Interpret and print the value of an %Exif tag
+        static std::ostream& printTag(std::ostream& os,
+                                      uint16 tag, 
+                                      IfdId ifdId,
+                                      const Value& value);
         //! Print a list of all tags to standart output
         static void taglist(std::ostream& os);
-        
+
     private:
         static int tagInfoIdx(uint16 tag, IfdId ifdId);
         static int tagInfoIdx(const std::string& tagName, IfdId ifdId);

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list