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


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

The following commit has been merged in the master branch:
commit b614abf06fe25a3d582fa2d9168cea9b34c5527a
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sat May 8 07:00:59 2004 +0000

    Fixed exposure bias print function (uses gcd now)
---
 src/tags.cpp | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/tags.cpp b/src/tags.cpp
index c3e71ba..803bc32 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -20,13 +20,13 @@
  */
 /*
   File:      tags.cpp
-  Version:   $Name:  $ $Revision: 1.24 $
+  Version:   $Name:  $ $Revision: 1.25 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   15-Jan-04, ahu: created
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.24 $ $RCSfile: tags.cpp,v $")
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.25 $ $RCSfile: tags.cpp,v $")
 
 // *****************************************************************************
 // included header files
@@ -636,12 +636,20 @@ namespace Exif {
     std::ostream& print0x9204(std::ostream& os, const Value& value)
     {
         Rational bias = value.toRational();
-        if (bias.first == 0) {
-            os << "+/- 0";
+        if (bias.second <= 0) {
+            os << "(" << bias.first << "/" << bias.second << ")";
+        }
+        else if (bias.first == 0) {
+            os << "0";
         }
         else {
-            os << (bias.first < 0 ? "- " : "+ ");
-            os << labs(bias.first) << "/" << bias.second;
+            long d = lgcd(labs(bias.first), bias.second);
+            long num = labs(bias.first) / d;
+            long den = bias.second / d;
+            os << (bias.first < 0 ? "-" : "+") << num;
+            if (den != 1) {
+                os << "/" << den;
+            }
         }
         return os;
     }

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list