head 1.6; access; symbols pkgsrc-2019Q2:1.5.0.32 pkgsrc-2019Q2-base:1.5 pkgsrc-2019Q1:1.5.0.30 pkgsrc-2019Q1-base:1.5 pkgsrc-2018Q4:1.5.0.28 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.26 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.5.0.24 pkgsrc-2018Q2-base:1.5 pkgsrc-2018Q1:1.5.0.22 pkgsrc-2018Q1-base:1.5 pkgsrc-2017Q4:1.5.0.20 pkgsrc-2017Q4-base:1.5 pkgsrc-2017Q3:1.5.0.18 pkgsrc-2017Q3-base:1.5 pkgsrc-2017Q2:1.5.0.14 pkgsrc-2017Q2-base:1.5 pkgsrc-2017Q1:1.5.0.12 pkgsrc-2017Q1-base:1.5 pkgsrc-2016Q4:1.5.0.10 pkgsrc-2016Q4-base:1.5 pkgsrc-2016Q3:1.5.0.8 pkgsrc-2016Q3-base:1.5 pkgsrc-2016Q2:1.5.0.6 pkgsrc-2016Q2-base:1.5 pkgsrc-2016Q1:1.5.0.4 pkgsrc-2016Q1-base:1.5 pkgsrc-2015Q4:1.5.0.2 pkgsrc-2015Q4-base:1.5 pkgsrc-2015Q3:1.4.0.12 pkgsrc-2015Q3-base:1.4 pkgsrc-2015Q2:1.4.0.10 pkgsrc-2015Q2-base:1.4 pkgsrc-2015Q1:1.4.0.8 pkgsrc-2015Q1-base:1.4 pkgsrc-2014Q4:1.4.0.6 pkgsrc-2014Q4-base:1.4 pkgsrc-2014Q3:1.4.0.4 pkgsrc-2014Q3-base:1.4 pkgsrc-2014Q2:1.4.0.2 pkgsrc-2014Q2-base:1.4 pkgsrc-2014Q1:1.3.0.32 pkgsrc-2014Q1-base:1.3 pkgsrc-2013Q4:1.3.0.30 pkgsrc-2013Q4-base:1.3 pkgsrc-2013Q3:1.3.0.28 pkgsrc-2013Q3-base:1.3 pkgsrc-2013Q2:1.3.0.26 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.3.0.24 pkgsrc-2013Q1-base:1.3 pkgsrc-2012Q4:1.3.0.22 pkgsrc-2012Q4-base:1.3 pkgsrc-2012Q3:1.3.0.20 pkgsrc-2012Q3-base:1.3 pkgsrc-2012Q2:1.3.0.18 pkgsrc-2012Q2-base:1.3 pkgsrc-2012Q1:1.3.0.16 pkgsrc-2012Q1-base:1.3 pkgsrc-2011Q4:1.3.0.14 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q3:1.3.0.12 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.3.0.10 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.8 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.6 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.4 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.2 pkgsrc-2010Q2-base:1.3 pkgsrc-2009Q4:1.2.0.12 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.10 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.8 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.6 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.4 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.2; locks; strict; comment @# @; 1.6 date 2019.07.15.22.07.08; author nia; state dead; branches; next 1.5; commitid TcFDZkBLgQysNbvB; 1.5 date 2015.10.03.12.08.37; author bsiegert; state Exp; branches; next 1.4; commitid lXLj0it8UBqmSEDy; 1.4 date 2014.06.05.06.43.54; author adam; state Exp; branches 1.4.12.1; next 1.3; commitid YE3JSNbtfiLGFiDx; 1.3 date 2010.05.31.23.20.46; author dholland; state Exp; branches; next 1.2; 1.2 date 2008.06.07.23.28.36; author gdt; state dead; branches 1.2.2.1; next 1.1; 1.1 date 2008.06.07.23.01.28; author gdt; state Exp; branches; next ; 1.4.12.1 date 2015.10.06.17.44.21; author spz; state Exp; branches; next ; commitid CyQdFalsHn6OD4Ey; 1.2.2.1 date 2008.06.07.23.28.36; author tron; state dead; branches; next 1.2.2.2; 1.2.2.2 date 2008.06.08.12.38.12; author tron; state Exp; branches; next ; desc @@ 1.6 log @exiv2: Update to 0.72.1 pkgsrc notes: upstream has changed their build system to cmake (and meson in the case of gexiv2) unfortunately the build system for exiv2-organize has rotted so it has to be removed for now. tested on various netbsd versions with gimp, I am expecting breakage, sorry in advance. Changes from version 0.27 to 0.27.1 ----------------------------------- Closed (40) https://github.com/Exiv2/exiv2/milestone/3?closed=1 Changes from version 0.26 to 0.27 --------------------------------- https://github.com/Exiv2/exiv2/milestone/1?closed=1 88 issues have been closed on Redmine * Build: (11) - 0001362: Fix Clang build (David Carlos Manuelda) - 0001358: Unsuccessful build (Win7, MSVC2015, amd64_x86) (Andreas Martin) - 0001356: Small patch to configure.py (Sridhar Boovaraghavan) - 0001329: Error during cmake with gcc version parsing (Maxime Daisy) - 0001310: Provide support for msys/2.0 - 0001299: exiv2-0.26-trunk.tar.gz changed on download server (Jonathan Riddell) - 0001270: Using libexiv2.a/.lib in multhreaded app segfaults. (Ben Touchette) - 0001237: Report CMake/MinGW issues to Kitware - 0001188: Provide build support for C++11 - 0001174: Visual Studio Support Enhancements - 0001121: Visual Studio support for v0.27 * Basicio: (1) - 0001374: excessively often calls stat() (Johannes Berg) * Coverity: (11) - 0001265: [ Coverity : /src/basicio.cpp ] Unchecked return value from library , Time of check time of use , Incorrect deallocator used , Dereference before null check , String not null terminated (Mahesh Hegde) - 0001264: [ Coverity : /src/actions.cpp ] Unchecked return value from library , Logically dead code , Not restoring ostream format (Mahesh Hegde) - 0001263: [ Coverity : 1396730 Uninitialized scalar field ] /include/exiv2/xmp.hpp (Mahesh Hegde) - 0001262: [ Coverity : XMPSDK Errors ] Unused value , Explicit null dereferenced (Mahesh Hegde) - 0001261: [ Coverity : 1296083 Resource leak ] /src/exiv2.cpp (Mahesh Hegde) - 0001260: [ Coverity : 1296084 Resource leak ] /src/http.cpp (Mahesh Hegde) - 0001259: [ Coverity : 1396717 Out-of-bounds read ] /src/easyaccess.cpp (Mahesh Hegde) - 0001258: [ Coverity 1396718 Out-of-bounds access ] /src/webpimage.cpp (Mahesh Hegde) - 0001257: [ Coverity 1396719 Resource leak ] /src/tiffcomposite.cpp (Mahesh Hegde) - 0001256: [ Coverity 1396721 : /src/basicio.cpp ] String not null terminated (Mahesh Hegde) - 0000883: Use Coverity SCAN on exiv2 code-base (Mahesh Hegde) * Camera: (1) - 0001352: Support camera Canon M100 (Daniel Zucchetto) * Duplicate: (1) - 0001307: exiv2: tiffvisitor.cpp:1299: virtual void Exiv2::Internal::TiffReader::visitDirectory(Exiv2::Internal::TiffDirectory*): Assertion `tc.get()' failed. (Henri Salo) * Exif: (6) - 0001320: It is a heap-buffer-overflow in Exiv2::Jp2Image::readMetadata (jp2image.cpp:277) (Zhu Liu) - 0001319: It is a heap-buffer-overflow in Exiv2::us2Data (types.cpp:346) (Zhu Liu) - 0001318: Invalid memory address dereference in Exiv2::StringValueBase::read ( in value.cpp:302) (Zhu Liu) - 0001317: It is a heap-buffer-overflow in Exiv2::s2Data (types.cpp:383) (Zhu Liu) - 0001316: It is a heap-buffer-overflow in Exiv2::l2Data (types.cpp:398) (Zhu Liu) - 0001315: Invalid memory address dereference in Exiv2::DataValue::read (value.cpp:193) (Zhu Liu) * Insufficient information: (1) - 0001347: Segfault in Digikam when saving/loading certain TIFF images (V Engmark) * Image format: (5) - 0001353: Segmentation fault in the software exiv2 when the function Exiv2::tEXtToDataBuf() is finished (chung-yi lin) - 0001346: Assertion failure in Exiv2::Internal::CiffComponent::doRead() in libexiv2 (Sanjay Rawat) - 0001345: Assertion Failure (SIGABRT) in Exiv2:RafImage::readMetadata() in Libexiv2 (Sanjay Rawat) - 0001338: Exiv2 aborted (crashed) with "Error in `exiv2': free(): invalid next size (fast)" (Sanjay Rawat) - 0001334: Version 0.26 is returns unwanted data when the key value is received from RW2 files (Panasonic DMC-GF6 camera) (Alex Stepanov) * Lens: (20) - 0001373: Tamron SP 24-70mm F/2.8 Di VC USD not recognized properly (Achim Kilchert) - 0001372: The lens "Tamron AF 18-200mm F3.5-6.3 XR Di II" is wrongly identified. (Julian Hofer) - 0001370: Add entry for new(ish) lens - Tamron 10-24mm F/3.5-4.5 Di II VC HLD (B023) (Robert Sleator) - 0001366: Feature Request Sigma 85mm f/1.4 DG Art Series (Christian Fandel) - 0001365: Feature Request fr Sigma 135mm f/1.8 DG Art Series (Christian Fandel) - 0001361: Wrongly identified Canon 2x extender as 1.4x extender with Tamron lens (Simon Harhues) - 0001355: New lens Tamron 100-400mm F/4.5-6.3 Di VC USD (Christian Touzé) - 0001351: Add lens: Sigma 120-300mm f/2.8 G VR (Nikolai Försterling) - 0001348: patch: add Tamron SP AF 150-600mm F/5-6.3 VC USD G2 (A022) for Nikon (Mike Romanov) - 0001339: Panasonic DMC-TZ70 lens not detected (Tim Stahel) - 0001336: Support for AF-P DX NIKKOR 10-20mm f/4.5-5.6G VR (Šarūnas Burdulis) - 0001335: Missing Nikon lense (Niels Hansen) - 0001333: New Lens: Tamron SP 24-70mm F/2.8 Di VC USD G2 (A032) (LP Tech) - 0001332: Recognise Tamron 18-200mm F/3.5-6.3 DiII VC B018 on Canon bodies (Šarūnas Burdulis) - 0001328: Sigma 18-300mm is wrongly reported as a Canon 75-300mm (Jean-Luc Jean-Luc Coulon) - 0001327: Two Sigma 24-70mm f/2.8 IF EX DG HSM lens definitions ?? (Philippe Dussart-Desart) - 0001326: Tamron 100-300mm f/5-6.3 MACRO 1:4 (Albert Jasinski) - 0001323: Add lens "Sigma 18-300mm f/3.5-6.3 DC Macro OS HS" for Canon ID 197 (Ronny Heidenreich) - 0001306: the lens TAMRON SP 15-30mm F/2.8 Di VC USD A012 is not properly recognised (rene ernenwein) - 0001304: Lens missing Tamron SP 90mm f/2.8 Di Macro 1:1 VC USD F017 (Matze G) * Miscellaneous: (2) - 0001314: it is a stack-overflow vulnerability in Exiv2::Internal::stringFormat[abi:cxx11] ( in image.cpp:975 ) (Zhu Liu) - 0001305: Segmentation fault on certain image (Oleg Antonyan) * Makernote: (2) - 0001343: Irix 15mm f/2.4 on Nikon (Ben Perston) - 0001324: Pentax Makernote written twice (Dominique Nerriec) * Metadata: (7) - 0001341: Date/Time Original not modified for NEFs (Jean-Luc CECCOLI) - 0001340: Infinite loop bugs in Libexiv2 Exiv2::Image::printIFDStructure() (Sanjay Rawat) - 0001325: Crash in exiv2 - Nikon1MakerNote::printBarValue (nikonnm.cpp) (Thibaud Mouton) - 0001322: Exception in PentaxMakerNote::printShutterCount, source: pentaxmn.cpp (Norbert Wagner) - 0001321: Invalid memory address dereference in Exiv2::getULong(types.cpp:246) (Zhu Liu) - 0001301: New lens: Sigma 18-35mm f/1.8 DC HSM Art for Canon (Alexander Steffen) - 0001300: New lens: Canon EF-S 35mm f/2.8 Macro IS STM (Alexander Steffen) * Not-a-bug: (8) - 0001369: New lens Yongnuo 50mm f/1.8 II for Canon (Michal Fapso) - 0001368: Canon EF-M 15-45 broken LensType (Peter Wemmert) - 0001367: New Lens Sigma 100-400 mm, F5-6.3 DG for Nikon (Thomas G) - 0001364: New lens Tamron SP 24-70mm F/2.8 Di VC USD G2 (Mikko Pantsar) - 0001350: Add lens: AF-S DX Nikkor 18-140mm (Nikolai Försterling) - 0001349: Add lens: Sigma 50-100mm F1.8 DC HSM | A (Nikolai Försterling) - 0001344: Unknown metadata (luv zeng) - 0001331: exiv2 fails to delete bulk of metadata in jpeg (Denis-Carl Robidoux) * Tools: (1) - 0001303: #1 Use 'releases' feature on GitHub * Tiff parser: (3) - 0001360: exiv2 can't read metadata from tiff file (tiff directory length is too large) (T Modes) - 0001359: This does not look like a TIFF image (jaeho jung) - 0001330: Crash in Exiv2::TiffImage::readMetadata (Tobias E.) * Video: (2) - 0001068: Video Code Umbrella - 0001028: Add GSoC13 video-write code * Website: (3) - 0001308: Move directory /website to svn://dev.exiv2.org/svn/team/website - 0001302: Use sha256 Checksums on Downloads and Archive pages of the web site. - 0001288: site defaults to http://, and https:// certificate is bogus (Matthias Andree) * Xmp: (3) - 0001354: Inconsistency with long XMP namespaces (e.g. 'Iptc4xmpExt') (Jens Georg) - 0001278: XMP SDK Split (Ben Touchette) - 0000941: Upgrade xmpsdk source to Adobe's current version @ text @$NetBSD: patch-aa,v 1.5 2015/10/03 12:08:37 bsiegert Exp $ Fix build on Solaris, from PR 37720. --- config/config.mk.in.orig 2015-06-21 16:19:25.000000000 +0200 +++ config/config.mk.in 2015-10-02 05:22:11.000000000 +0200 @@@@ -148,7 +148,7 @@@@ # Dependency files post-process commands POSTDEPEND = if test ! -d $(DEPDIR); then mkdir $(DEPDIR); fi; \ - if test -e $*.d; then cp $*.d $(DEPDIR)/$*.d; \ + if test -f $*.d; then cp $*.d $(DEPDIR)/$*.d; \ sed -e 's/^\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $(DEPDIR)/$*.d; \ $(RM) $*.d; fi @ 1.5 log @Update exiv2 to 0.25, fixing a security issue. Patch from Timo Buhrmester via mail. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.4 2014/06/05 06:43:54 adam Exp $ @ 1.4 log @Changes 0.24: Exiv2 introduces its first support for Video metadata. Many more cameras and accessories are now recognised. Numerous bugs fixes, build and test improvments. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.3 2010/05/31 23:20:46 dholland Exp $ d5 3 a7 3 --- config/config.mk.in.orig 2013-12-01 12:13:42.000000000 +0000 +++ config/config.mk.in @@@@ -133,7 +133,7 @@@@ ifdef DEP_TRACKING d9 5 a13 5 # Dependency files post-process commands POSTDEPEND = if test ! -d $(DEPDIR); then mkdir $(DEPDIR); fi; \ - if test -e $*.d; then cp $*.d $(DEPDIR)/$*.d; \ + if test -f $*.d; then cp $*.d $(DEPDIR)/$*.d; \ sed -e 's/^\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ d15 1 a15 1 $(RM) $*.d; fi @ 1.4.12.1 log @Pullup ticket #4830 - requested by bsiegert graphics/exiv2: security update graphics/exiv2-organize: dependant update Revisions pulled up: - graphics/exiv2-organize/Makefile 1.28 - graphics/exiv2/Makefile.common 1.5 - graphics/exiv2/PLIST 1.17 - graphics/exiv2/distinfo 1.25 - graphics/exiv2/patches/patch-aa 1.5 - graphics/exiv2/patches/patch-configure 1.2 - graphics/exiv2/patches/patch-src_Makefile 1.1 - graphics/exiv2/patches/patch-src_http.cpp 1.1 - graphics/exiv2/patches/patch-src_svn_version.sh 1.1 ------------------------------------------------------------------- Module Name: pkgsrc Committed By: bsiegert Date: Sat Oct 3 12:08:37 UTC 2015 Modified Files: pkgsrc/graphics/exiv2: Makefile.common PLIST distinfo pkgsrc/graphics/exiv2-organize: Makefile pkgsrc/graphics/exiv2/patches: patch-aa patch-configure Added Files: pkgsrc/graphics/exiv2/patches: patch-src_Makefile patch-src_http.cpp patch-src_svn_version.sh Log Message: Update exiv2 to 0.25, fixing a security issue. Patch from Timo Buhrmester via mail. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 pkgsrc/graphics/exiv2/Makefile.common cvs rdiff -u -r1.16 -r1.17 pkgsrc/graphics/exiv2/PLIST cvs rdiff -u -r1.24 -r1.25 pkgsrc/graphics/exiv2/distinfo cvs rdiff -u -r1.27 -r1.28 pkgsrc/graphics/exiv2-organize/Makefile cvs rdiff -u -r1.4 -r1.5 pkgsrc/graphics/exiv2/patches/patch-aa cvs rdiff -u -r1.1 -r1.2 pkgsrc/graphics/exiv2/patches/patch-configure cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/exiv2/patches/patch-src_Makefile \ pkgsrc/graphics/exiv2/patches/patch-src_http.cpp \ pkgsrc/graphics/exiv2/patches/patch-src_svn_version.sh @ text @d1 1 a1 1 $NetBSD$ d5 3 a7 3 --- config/config.mk.in.orig 2015-06-21 16:19:25.000000000 +0200 +++ config/config.mk.in 2015-10-02 05:22:11.000000000 +0200 @@@@ -148,7 +148,7 @@@@ d9 5 a13 5 # Dependency files post-process commands POSTDEPEND = if test ! -d $(DEPDIR); then mkdir $(DEPDIR); fi; \ - if test -e $*.d; then cp $*.d $(DEPDIR)/$*.d; \ + if test -f $*.d; then cp $*.d $(DEPDIR)/$*.d; \ sed -e 's/^\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ d15 1 a15 1 $(RM) $*.d; fi @ 1.3 log @Fix build on Solaris; patch from the KDE-Solaris project via Joern Clausen in PR 37720. @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 --- config/config.mk.in~ 2009-11-27 11:39:59.000000000 +0000 d9 5 a13 5 # Dependency files post-process commands POSTDEPEND = if test ! -d $(DEPDIR); then mkdir $(DEPDIR); fi; \ - if test -e $*.d; then cp $*.d $(DEPDIR)/$*.d; \ + if test -f $*.d; then cp $*.d $(DEPDIR)/$*.d; \ sed -e 's/^\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ d15 1 a15 1 $(RM) $*.d; fi @ 1.2 log @Update to 0.17. Significant Changes from version 0.16 * Exiv2 utility - [tools] exiv2 now writes a proper XMP sidecar file (it used to just dump the XMP packet to a file). - [tools] exiv2 can now also save Exif and IPTC data in the XMP sidecar file (conversion of Exif/IPTC to/from XMP). * Exiv2 library - 0000546: [exif] Exiv2 crashes while converting Nikon lens information for pretty printing. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.1 2008/06/07 23:01:28 gdt Exp $ d3 1 a3 2 From upstream SVN, svn diff -r 1388:1399. Fixes http://dev.robotbattle.com/bugs/view.php?id=0000546. d5 3 a7 56 Index: src/nikonmn.cpp =================================================================== --- src/nikonmn.cpp (revision 1398) +++ src/nikonmn.cpp (revision 1399) @@@@ -931,29 +931,31 @@@@ std::ostream& Nikon3MakerNote::print0x0084(std::ostream& os, const Value& value) { - if (value.count() == 4) { - long len1 = value.toLong(0); - long len2 = value.toLong(1); - Rational fno1 = value.toRational(2); - Rational fno2 = value.toRational(3); - os << len1; - if (len2 != len1) { - os << "-" << len2; - } - os << "mm "; - std::ostringstream oss; - oss.copyfmt(os); - os << "F" << std::setprecision(2) - << static_cast(fno1.first) / fno1.second; - if (fno2 != fno1) { - os << "-" << std::setprecision(2) - << static_cast(fno2.first) / fno2.second; - } - os.copyfmt(oss); - } - else { + if ( value.count() != 4 + || value.toRational(0).second == 0 + || value.toRational(1).second == 0) { os << "(" << value << ")"; + return os; } + long len1 = value.toLong(0); + long len2 = value.toLong(1); + + Rational fno1 = value.toRational(2); + Rational fno2 = value.toRational(3); + os << len1; + if (len2 != len1) { + os << "-" << len2; + } + os << "mm "; + std::ostringstream oss; + oss.copyfmt(os); + os << "F" << std::setprecision(2) + << static_cast(fno1.first) / fno1.second; + if (fno2 != fno1) { + os << "-" << std::setprecision(2) + << static_cast(fno2.first) / fno2.second; + } + os.copyfmt(oss); return os; } d9 7 @ 1.2.2.1 log @file patch-aa was added on branch pkgsrc-2008Q1 on 2008-06-08 12:38:12 +0000 @ text @d1 62 @ 1.2.2.2 log @Pullup ticket #2418 - requested by gdt Security patch for exiv2 Revisions pulled up: - graphics/exiv2/Makefile 1.18 - graphics/exiv2/distinfo 1.11 - graphics/exiv2/patches/patch-aa 1.1 --- Module Name: pkgsrc Committed By: gdt Date: Sat Jun 7 23:01:28 UTC 2008 Modified Files: pkgsrc/graphics/exiv2: Makefile distinfo Added Files: pkgsrc/graphics/exiv2/patches: patch-aa Log Message: Add patch: From upstream SVN, svn diff -r 1388:1399. Fixes http://dev.robotbattle.com/bugs/view.php?id=0000546. PKGREVISION++. @ text @a0 62 $NetBSD: patch-aa,v 1.1 2008/06/07 23:01:28 gdt Exp $ From upstream SVN, svn diff -r 1388:1399. Fixes http://dev.robotbattle.com/bugs/view.php?id=0000546. Index: src/nikonmn.cpp =================================================================== --- src/nikonmn.cpp (revision 1398) +++ src/nikonmn.cpp (revision 1399) @@@@ -931,29 +931,31 @@@@ std::ostream& Nikon3MakerNote::print0x0084(std::ostream& os, const Value& value) { - if (value.count() == 4) { - long len1 = value.toLong(0); - long len2 = value.toLong(1); - Rational fno1 = value.toRational(2); - Rational fno2 = value.toRational(3); - os << len1; - if (len2 != len1) { - os << "-" << len2; - } - os << "mm "; - std::ostringstream oss; - oss.copyfmt(os); - os << "F" << std::setprecision(2) - << static_cast(fno1.first) / fno1.second; - if (fno2 != fno1) { - os << "-" << std::setprecision(2) - << static_cast(fno2.first) / fno2.second; - } - os.copyfmt(oss); - } - else { + if ( value.count() != 4 + || value.toRational(0).second == 0 + || value.toRational(1).second == 0) { os << "(" << value << ")"; + return os; } + long len1 = value.toLong(0); + long len2 = value.toLong(1); + + Rational fno1 = value.toRational(2); + Rational fno2 = value.toRational(3); + os << len1; + if (len2 != len1) { + os << "-" << len2; + } + os << "mm "; + std::ostringstream oss; + oss.copyfmt(os); + os << "F" << std::setprecision(2) + << static_cast(fno1.first) / fno1.second; + if (fno2 != fno1) { + os << "-" << std::setprecision(2) + << static_cast(fno2.first) / fno2.second; + } + os.copyfmt(oss); return os; } @ 1.1 log @Add patch: From upstream SVN, svn diff -r 1388:1399. Fixes http://dev.robotbattle.com/bugs/view.php?id=0000546. PKGREVISION++. @ text @d1 1 a1 1 $NetBSD$ @