[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:38 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=a25763d
The following commit has been merged in the master branch:
commit a25763d070453d18c43ce37c772f355683a22d79
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Wed Sep 15 13:14:52 2004 +0000
Replaced custom integer types with C99 types
---
config.h.in | 38 +++++++++++
configure.ac | 2 +-
src/canonmn.cpp | 8 +--
src/canonmn.hpp | 4 +-
src/datasets.cpp | 46 ++++++-------
src/datasets.hpp | 196 +++++++++++++++++++++++++++---------------------------
src/exif.cpp | 26 ++++----
src/exif.hpp | 10 +--
src/fujimn.cpp | 6 +-
src/fujimn.hpp | 4 +-
src/ifd.cpp | 28 ++++----
src/ifd.hpp | 58 ++++++++--------
src/image.cpp | 34 +++++-----
src/image.hpp | 16 ++---
src/iptc.cpp | 28 ++++----
src/iptc.hpp | 34 +++++-----
src/iptctest.cpp | 8 +--
src/makernote.cpp | 20 +++---
src/makernote.hpp | 22 +++---
src/metadatum.hpp | 6 +-
src/nikonmn.cpp | 10 +--
src/nikonmn.hpp | 8 +--
src/sigmamn.cpp | 6 +-
src/sigmamn.hpp | 4 +-
src/tags.cpp | 38 +++++------
src/tags.hpp | 24 +++----
src/types.cpp | 28 ++++----
src/types.hpp | 45 ++++++-------
src/value.cpp | 12 ++--
src/value.hpp | 42 ++++++------
30 files changed, 424 insertions(+), 387 deletions(-)
diff --git a/config.h.in b/config.h.in
index 62c35f4..bf70b36 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,8 +1,29 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
@@ -50,6 +71,9 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
@@ -59,6 +83,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
@@ -81,9 +108,20 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
diff --git a/configure.ac b/configure.ac
index 2f6f5af..8ca0902 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ AC_PROG_RANLIB
# Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([malloc.h stdlib.h string.h unistd.h wchar.h libintl.h])
+AC_CHECK_HEADERS([libintl.h malloc.h stdint.h stdlib.h string.h unistd.h wchar.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
diff --git a/src/canonmn.cpp b/src/canonmn.cpp
index 1e95ae2..2a76ba8 100644
--- a/src/canonmn.cpp
+++ b/src/canonmn.cpp
@@ -20,7 +20,7 @@
*/
/*
File: canonmn.cpp
- Version: $Name: $ $Revision: 1.13 $
+ Version: $Name: $ $Revision: 1.14 $
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
History: 18-Feb-04, ahu: created
07-Mar-04, ahu: isolated as a separate component
@@ -30,7 +30,7 @@
*/
// *****************************************************************************
#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.13 $ $RCSfile: canonmn.cpp,v $");
+EXIV2_RCSID("@(#) $Name: $ $Revision: 1.14 $ $RCSfile: canonmn.cpp,v $");
// *****************************************************************************
// included header files
@@ -78,7 +78,7 @@ namespace Exiv2 {
}
std::ostream& CanonMakerNote::printTag(std::ostream& os,
- uint16 tag,
+ uint16_t tag,
const Value& value) const
{
switch (tag) {
@@ -288,7 +288,7 @@ namespace Exiv2 {
const Value& value)
{
std::istringstream is(value.toString());
- uint32 l;
+ uint32_t l;
is >> l;
return os << std::setw(4) << std::setfill('0') << std::hex
<< ((l & 0xffff0000) >> 16)
diff --git a/src/canonmn.hpp b/src/canonmn.hpp
index 3a15dc7..05c958b 100644
--- a/src/canonmn.hpp
+++ b/src/canonmn.hpp
@@ -23,7 +23,7 @@
@brief Canon MakerNote implemented according to the specification
<a href="http://www.burren.cx/david/canon.html">
EXIF MakerNote of Canon</a> by David Burren
- @version $Name: $ $Revision: 1.10 $
+ @version $Name: $ $Revision: 1.11 $
@author Andreas Huggel (ahu)
<a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
@date 18-Feb-04, ahu: created<BR>
@@ -101,7 +101,7 @@ namespace Exiv2 {
//! Return the name of the makernote item ("Canon")
std::string ifdItem() const { return ifdItem_; }
std::ostream& printTag(std::ostream& os,
- uint16 tag,
+ uint16_t tag,
const Value& value) const;
//@}
diff --git a/src/datasets.cpp b/src/datasets.cpp
index 65739fd..fd7c22c 100644
--- a/src/datasets.cpp
+++ b/src/datasets.cpp
@@ -20,13 +20,13 @@
*/
/*
File: datasets.cpp
- Version: $Name: $ $Revision: 1.4 $
+ Version: $Name: $ $Revision: 1.5 $
Author(s): Brad Schick (brad) <schick at robotbattle.com>
History: 24-Jul-04, brad: created
*/
// *****************************************************************************
#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.4 $ $RCSfile: datasets.cpp,v $");
+EXIV2_RCSID("@(#) $Name: $ $Revision: 1.5 $ $RCSfile: datasets.cpp,v $");
// *****************************************************************************
// included header files
@@ -43,15 +43,15 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.4 $ $RCSfile: datasets.cpp,v $");
namespace Exiv2 {
DataSet::DataSet(
- uint16 number,
+ uint16_t number,
const char* name,
const char* desc,
bool mandatory,
bool repeatable,
- uint32 minbytes,
- uint32 maxbytes,
+ uint32_t minbytes,
+ uint32_t maxbytes,
TypeId type,
- uint16 recordId,
+ uint16_t recordId,
const char* photoshop
)
: number_(number), name_(name), desc_(desc), mandatory_(mandatory),
@@ -61,7 +61,7 @@ namespace Exiv2 {
}
RecordInfo::RecordInfo(
- uint16 recordId,
+ uint16_t recordId,
const char* name,
const char* desc
)
@@ -164,7 +164,7 @@ namespace Exiv2 {
const char* IptcDataSets::familyName_ = "Iptc";
- int IptcDataSets::dataSetIdx(uint16 number, uint16 recordId)
+ int IptcDataSets::dataSetIdx(uint16_t number, uint16_t recordId)
{
if( recordId != envelope && recordId != application2 ) return -1;
const DataSet* dataSet = records_[recordId];
@@ -176,7 +176,7 @@ namespace Exiv2 {
return idx;
}
- int IptcDataSets::dataSetIdx(const std::string& dataSetName, uint16 recordId)
+ int IptcDataSets::dataSetIdx(const std::string& dataSetName, uint16_t recordId)
{
if( recordId != envelope && recordId != application2 ) return -1;
const DataSet* dataSet = records_[recordId];
@@ -188,42 +188,42 @@ namespace Exiv2 {
return idx;
}
- TypeId IptcDataSets::dataSetType(uint16 number, uint16 recordId)
+ TypeId IptcDataSets::dataSetType(uint16_t number, uint16_t recordId)
{
int idx = dataSetIdx(number, recordId);
if (idx == -1) throw Error("No dataSet for record Id");
return records_[recordId][idx].type_;
}
- const char* IptcDataSets::dataSetName(uint16 number, uint16 recordId)
+ const char* IptcDataSets::dataSetName(uint16_t number, uint16_t recordId)
{
int idx = dataSetIdx(number, recordId);
if (idx == -1) throw Error("No dataSet for record Id");
return records_[recordId][idx].name_;
}
- const char* IptcDataSets::dataSetDesc(uint16 number, uint16 recordId)
+ const char* IptcDataSets::dataSetDesc(uint16_t number, uint16_t recordId)
{
int idx = dataSetIdx(number, recordId);
if (idx == -1) throw Error("No dataSet for record Id");
return records_[recordId][idx].desc_;
}
- const char* IptcDataSets::dataSetPsName(uint16 number, uint16 recordId)
+ const char* IptcDataSets::dataSetPsName(uint16_t number, uint16_t recordId)
{
int idx = dataSetIdx(number, recordId);
if (idx == -1) throw Error("No dataSet for record Id");
return records_[recordId][idx].photoshop_;
}
- bool IptcDataSets::dataSetRepeatable(uint16 number, uint16 recordId)
+ bool IptcDataSets::dataSetRepeatable(uint16_t number, uint16_t recordId)
{
int idx = dataSetIdx(number, recordId);
if (idx == -1) throw Error("No dataSet for record Id");
return records_[recordId][idx].repeatable_;
}
- const char* IptcDataSets::recordName(uint16 recordId)
+ const char* IptcDataSets::recordName(uint16_t recordId)
{
if( recordId != envelope && recordId != application2 ) {
throw Error("Unknown record");
@@ -231,7 +231,7 @@ namespace Exiv2 {
return recordInfo_[recordId].name_;
}
- const char* IptcDataSets::recordDesc(uint16 recordId)
+ const char* IptcDataSets::recordDesc(uint16_t recordId)
{
if( recordId != envelope && recordId != application2 ) {
throw Error("Unknown record");
@@ -239,9 +239,9 @@ namespace Exiv2 {
return recordInfo_[recordId].desc_;
}
- uint16 IptcDataSets::recordId(const std::string& recordName)
+ uint16_t IptcDataSets::recordId(const std::string& recordName)
{
- uint16 i;
+ uint16_t i;
for (i = application2; i > 0; --i) {
if (recordInfo_[i].name_ == recordName) break;
}
@@ -255,7 +255,7 @@ namespace Exiv2 {
+ "." + dataSet.name_;
}
- std::string IptcDataSets::makeKey(uint16 number, uint16 recordId)
+ std::string IptcDataSets::makeKey(uint16_t number, uint16_t recordId)
{
return std::string(familyName())
+ "." + std::string(recordName(recordId))
@@ -263,7 +263,7 @@ namespace Exiv2 {
}
// This 'database lookup' function returns a match if it exists
- std::pair<uint16, uint16> IptcDataSets::decomposeKey(const std::string& key)
+ std::pair<uint16_t, uint16_t> IptcDataSets::decomposeKey(const std::string& key)
{
// Get the type, record name and dataSet name parts of the key
std::string::size_type pos1 = key.find('.');
@@ -279,11 +279,11 @@ namespace Exiv2 {
if (dataSetName == "") throw Error("Invalid key");
// Use the parts of the key to find dataSet and recordInfo
- uint16 recId = recordId(recordName);
- if (recId == invalidRecord) return std::make_pair((uint16)0xffff, invalidRecord);
+ uint16_t recId = recordId(recordName);
+ if (recId == invalidRecord) return std::make_pair((uint16_t)0xffff, invalidRecord);
int idx = dataSetIdx(dataSetName, recId);
- if (idx == -1 ) return std::make_pair((uint16)0xffff, invalidRecord);
+ if (idx == -1 ) return std::make_pair((uint16_t)0xffff, invalidRecord);
return std::make_pair(records_[recId][idx].number_, recId);
} // IptcDataSets::decomposeKey
diff --git a/src/datasets.hpp b/src/datasets.hpp
index af746f2..0cd136b 100644
--- a/src/datasets.hpp
+++ b/src/datasets.hpp
@@ -21,7 +21,7 @@
/*!
@file datasets.hpp
@brief Iptc dataSet and type information
- @version $Name: $ $Revision: 1.3 $
+ @version $Name: $ $Revision: 1.4 $
@author Brad Schick (brad) <schick at robotbattle.com>
@date 24-Jul-04, brad: created
*/
@@ -47,8 +47,8 @@ namespace Exiv2 {
//! Contains information about one record
struct RecordInfo {
//! Constructor
- RecordInfo(uint16 recordId, const char* name, const char* desc);
- uint16 recordId_; //!< Record id
+ RecordInfo(uint16_t recordId, const char* name, const char* desc);
+ uint16_t recordId_; //!< Record id
const char* name_; //!< Record name (one word)
const char* desc_; //!< Record description
};
@@ -57,27 +57,27 @@ namespace Exiv2 {
struct DataSet {
//! Constructor
DataSet(
- uint16 number,
+ uint16_t number,
const char* name,
const char* desc,
bool mandatory,
bool repeatable,
- uint32 minbytes,
- uint32 maxbytes,
+ uint32_t minbytes,
+ uint32_t maxbytes,
TypeId type,
- uint16 recordId,
+ uint16_t recordId,
const char* photoshop
);
//@{
- uint16 number_;
+ uint16_t number_;
const char* name_;
const char* desc_;
bool mandatory_;
bool repeatable_;
- uint32 minbytes_;
- uint32 maxbytes_;
+ uint32_t minbytes_;
+ uint32_t maxbytes_;
TypeId type_;
- uint16 recordId_;
+ uint16_t recordId_;
const char* photoshop_;
//@}
}; // struct DataSet
@@ -92,84 +92,84 @@ namespace Exiv2 {
IIM4 standard (and not commonly used in images).
*/
//@{
- static const uint16 invalidRecord = 0;
- static const uint16 envelope = 1;
- static const uint16 application2 = 2;
+ static const uint16_t invalidRecord = 0;
+ static const uint16_t envelope = 1;
+ static const uint16_t application2 = 2;
//@}
//! @name Dataset identifiers
//@{
- static const uint16 ModelVersion = 0;
- static const uint16 Destination = 5;
- static const uint16 FileFormat = 20;
- static const uint16 FileVersion = 22;
- static const uint16 ServiceId = 30;
- static const uint16 EnvelopeNumber = 40;
- static const uint16 ProductId = 50;
- static const uint16 EnvelopePriority = 60;
- static const uint16 DateSent = 70;
- static const uint16 TimeSent = 80;
- static const uint16 CharacterSet = 90;
- static const uint16 UNO = 100;
- static const uint16 ARMId = 120;
- static const uint16 ARMVersion = 122;
- static const uint16 RecordVersion = 0;
- static const uint16 ObjectType = 3;
- static const uint16 ObjectAttribute = 4;
- static const uint16 ObjectName = 5;
- static const uint16 EditStatus = 7;
- static const uint16 EditorialUpdate = 8;
- static const uint16 Urgency = 10;
- static const uint16 Subject = 12;
- static const uint16 Category = 15;
- static const uint16 SuppCategory = 20;
- static const uint16 FixtureId = 22;
- static const uint16 Keywords = 25;
- static const uint16 LocationCode = 26;
- static const uint16 LocationName = 27;
- static const uint16 ReleaseDate = 30;
- static const uint16 ReleaseTime = 35;
- static const uint16 ExpirationDate = 37;
- static const uint16 ExpirationTime = 38;
- static const uint16 SpecialInstructions = 40;
- static const uint16 ActionAdvised = 42;
- static const uint16 ReferenceService = 45;
- static const uint16 ReferenceDate = 47;
- static const uint16 ReferenceNumber = 50;
- static const uint16 DateCreated = 55;
- static const uint16 TimeCreated = 60;
- static const uint16 DigitizationDate = 62;
- static const uint16 DigitizationTime = 63;
- static const uint16 Program = 65;
- static const uint16 ProgramVersion = 70;
- static const uint16 ObjectCycle = 75;
- static const uint16 Byline = 80;
- static const uint16 BylineTitle = 85;
- static const uint16 City = 90;
- static const uint16 SubLocation = 92;
- static const uint16 ProvinceState = 95;
- static const uint16 CountryCode = 100;
- static const uint16 CountryName = 101;
- static const uint16 TransmissionReference = 103;
- static const uint16 Headline = 105;
- static const uint16 Credit = 110;
- static const uint16 Source = 115;
- static const uint16 Copyright = 116;
- static const uint16 Contact = 118;
- static const uint16 Caption = 120;
- static const uint16 Writer = 122;
- static const uint16 RasterizedCaption = 125;
- static const uint16 ImageType = 130;
- static const uint16 ImageOrientation = 131;
- static const uint16 Language = 135;
- static const uint16 AudioType = 150;
- static const uint16 AudioRate = 151;
- static const uint16 AudioResolution = 152;
- static const uint16 AudioDuration = 153;
- static const uint16 AudioOutcue = 154;
- static const uint16 PreviewFormat = 200;
- static const uint16 PreviewVersion = 201;
- static const uint16 Preview = 202;
+ static const uint16_t ModelVersion = 0;
+ static const uint16_t Destination = 5;
+ static const uint16_t FileFormat = 20;
+ static const uint16_t FileVersion = 22;
+ static const uint16_t ServiceId = 30;
+ static const uint16_t EnvelopeNumber = 40;
+ static const uint16_t ProductId = 50;
+ static const uint16_t EnvelopePriority = 60;
+ static const uint16_t DateSent = 70;
+ static const uint16_t TimeSent = 80;
+ static const uint16_t CharacterSet = 90;
+ static const uint16_t UNO = 100;
+ static const uint16_t ARMId = 120;
+ static const uint16_t ARMVersion = 122;
+ static const uint16_t RecordVersion = 0;
+ static const uint16_t ObjectType = 3;
+ static const uint16_t ObjectAttribute = 4;
+ static const uint16_t ObjectName = 5;
+ static const uint16_t EditStatus = 7;
+ static const uint16_t EditorialUpdate = 8;
+ static const uint16_t Urgency = 10;
+ static const uint16_t Subject = 12;
+ static const uint16_t Category = 15;
+ static const uint16_t SuppCategory = 20;
+ static const uint16_t FixtureId = 22;
+ static const uint16_t Keywords = 25;
+ static const uint16_t LocationCode = 26;
+ static const uint16_t LocationName = 27;
+ static const uint16_t ReleaseDate = 30;
+ static const uint16_t ReleaseTime = 35;
+ static const uint16_t ExpirationDate = 37;
+ static const uint16_t ExpirationTime = 38;
+ static const uint16_t SpecialInstructions = 40;
+ static const uint16_t ActionAdvised = 42;
+ static const uint16_t ReferenceService = 45;
+ static const uint16_t ReferenceDate = 47;
+ static const uint16_t ReferenceNumber = 50;
+ static const uint16_t DateCreated = 55;
+ static const uint16_t TimeCreated = 60;
+ static const uint16_t DigitizationDate = 62;
+ static const uint16_t DigitizationTime = 63;
+ static const uint16_t Program = 65;
+ static const uint16_t ProgramVersion = 70;
+ static const uint16_t ObjectCycle = 75;
+ static const uint16_t Byline = 80;
+ static const uint16_t BylineTitle = 85;
+ static const uint16_t City = 90;
+ static const uint16_t SubLocation = 92;
+ static const uint16_t ProvinceState = 95;
+ static const uint16_t CountryCode = 100;
+ static const uint16_t CountryName = 101;
+ static const uint16_t TransmissionReference = 103;
+ static const uint16_t Headline = 105;
+ static const uint16_t Credit = 110;
+ static const uint16_t Source = 115;
+ static const uint16_t Copyright = 116;
+ static const uint16_t Contact = 118;
+ static const uint16_t Caption = 120;
+ static const uint16_t Writer = 122;
+ static const uint16_t RasterizedCaption = 125;
+ static const uint16_t ImageType = 130;
+ static const uint16_t ImageOrientation = 131;
+ static const uint16_t Language = 135;
+ static const uint16_t AudioType = 150;
+ static const uint16_t AudioRate = 151;
+ static const uint16_t AudioResolution = 152;
+ static const uint16_t AudioDuration = 153;
+ static const uint16_t AudioOutcue = 154;
+ static const uint16_t PreviewFormat = 200;
+ static const uint16_t PreviewVersion = 201;
+ static const uint16_t Preview = 202;
//@}
private:
@@ -194,7 +194,7 @@ namespace Exiv2 {
@throw Error ("No dataset for recordId") if there is no dataset info
for the given record id in the lookup tables.
*/
- static const char* dataSetName(uint16 number, uint16 recordId);
+ static const char* dataSetName(uint16_t number, uint16_t recordId);
/*!
@brief Return the description of the dataset.
@param number The dataset number
@@ -203,7 +203,7 @@ namespace Exiv2 {
@throw Error ("No dataset for recordId") if there is no dataset info
for the given record id in the lookup tables.
*/
- static const char* dataSetDesc(uint16 number, uint16 recordId);
+ static const char* dataSetDesc(uint16_t number, uint16_t recordId);
/*!
@brief Return the photohsop name of a given dataset.
@param number The dataset number
@@ -213,7 +213,7 @@ namespace Exiv2 {
@throw Error ("No dataset for recordId") if there is no dataset info
for the given record id in the lookup tables.
*/
- static const char* dataSetPsName(uint16 number, uint16 recordId);
+ static const char* dataSetPsName(uint16_t number, uint16_t recordId);
/*!
@brief Check if a given dataset is repeatable
@param number The dataset number
@@ -222,32 +222,32 @@ namespace Exiv2 {
@throw Error ("No dataset for recordId") if there is no dataset info
for the given record id in the lookup tables.
*/
- static bool dataSetRepeatable(uint16 number, uint16 recordId);
+ static bool dataSetRepeatable(uint16_t number, uint16_t recordId);
//! Return the dataSet number for dataset name and record id
- static uint16 dataSet(const std::string& dataSetName, uint16 recordId);
+ static uint16_t dataSet(const std::string& dataSetName, uint16_t recordId);
//! Return the type for dataSet number and Record id
- static TypeId dataSetType(uint16 number, uint16 recordId);
+ static TypeId dataSetType(uint16_t number, uint16_t recordId);
//! Return the name of the Record
- static const char* recordName(uint16 recordId);
+ static const char* recordName(uint16_t recordId);
/*!
@brief Return the description of a record
@param recordId Record Id number
@return the description of the Record
@throw Error("Unknown record");
*/
- static const char* recordDesc(uint16 recordId);
+ static const char* recordDesc(uint16_t recordId);
/*!
@brief Return the Id number of a record
@param recordName Name of a record type
@return the Id number of a Record
@throw Error("Unknown record");
*/
- static uint16 recordId(const std::string& recordName);
+ static uint16_t recordId(const std::string& recordName);
/*!
@brief Return the key for the dataSet number and record id. The key is
of the form '<b>Iptc</b>.recordName.dataSetName'.
*/
- static std::string makeKey(uint16 number, uint16 recordId);
+ static std::string makeKey(uint16_t number, uint16_t recordId);
/*!
@brief Return the key for the dataSet. The key is of the form
'<b>Iptc</b>.recordName.dataSetName'.
@@ -259,13 +259,13 @@ namespace Exiv2 {
@throw Error ("Invalid key") if the key cannot be parsed into
record name and dataSet name parts.
*/
- static std::pair<uint16, uint16> decomposeKey(const std::string& key);
+ static std::pair<uint16_t, uint16_t> decomposeKey(const std::string& key);
//! Print a list of all dataSets to output stream
static void dataSetList(std::ostream& os);
private:
- static int dataSetIdx(uint16 number, uint16 recordId);
- static int dataSetIdx(const std::string& dataSetName, uint16 recordId);
+ static int dataSetIdx(uint16_t number, uint16_t recordId);
+ static int dataSetIdx(const std::string& dataSetName, uint16_t recordId);
static const DataSet* records_[];
static const RecordInfo recordInfo_[];
diff --git a/src/exif.cpp b/src/exif.cpp
index a5c4a32..1f23ad7 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -20,14 +20,14 @@
*/
/*
File: exif.cpp
- Version: $Name: $ $Revision: 1.57 $
+ Version: $Name: $ $Revision: 1.58 $
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
History: 26-Jan-04, ahu: created
11-Feb-04, ahu: isolated as a component
*/
// *****************************************************************************
#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.57 $ $RCSfile: exif.cpp,v $");
+EXIV2_RCSID("@(#) $Name: $ $Revision: 1.58 $ $RCSfile: exif.cpp,v $");
// Define DEBUG_MAKERNOTE to output debug information to std::cerr
#undef DEBUG_MAKERNOTE
@@ -63,8 +63,8 @@ namespace {
*/
void setOffsetTag(Exiv2::Ifd& ifd,
int idx,
- Exiv2::uint16 tag,
- Exiv2::uint32 offset,
+ uint16_t tag,
+ uint32_t offset,
Exiv2::ByteOrder byteOrder);
}
@@ -119,7 +119,7 @@ namespace Exiv2 {
return ExifTags::tagName(tag(), ifdId());
}
- uint16 ExifKey::tag() const
+ uint16_t ExifKey::tag() const
{
if (tag_ == 0xffff) throw Error("Invalid key");
return tag_;
@@ -146,7 +146,7 @@ namespace Exiv2 {
void ExifKey::decomposeKey()
{
- std::pair<uint16, IfdId> p;
+ std::pair<uint16_t, IfdId> p;
if (ifdId_ == makerIfdId && pMakerNote_ != 0) {
p.first = pMakerNote_->decomposeKey(key_);
if (p.first == 0xffff) throw Error("Invalid key");
@@ -1160,7 +1160,7 @@ namespace Exiv2 {
else {
DataBuf buf(md->size());
md->copy(buf.pData_, byteOrder);
- entry->setValue(static_cast<uint16>(md->typeId()), md->count(),
+ entry->setValue(static_cast<uint16_t>(md->typeId()), md->count(),
buf.pData_, md->size());
}
}
@@ -1316,7 +1316,7 @@ namespace Exiv2 {
DataBuf buf(md.size());
md.copy(buf.pData_, byteOrder);
- e.setValue(static_cast<uint16>(md.typeId()), md.count(), buf.pData_, md.size());
+ e.setValue(static_cast<uint16_t>(md.typeId()), md.count(), buf.pData_, md.size());
ifd.add(e);
} // addToIfd
@@ -1345,7 +1345,7 @@ namespace Exiv2 {
DataBuf buf(md.size());
md.copy(buf.pData_, byteOrder);
- e.setValue(static_cast<uint16>(md.typeId()), md.count(),
+ e.setValue(static_cast<uint16_t>(md.typeId()), md.count(),
buf.pData_, md.size());
makerNote->add(e);
} // addToMakerNote
@@ -1363,10 +1363,10 @@ namespace Exiv2 {
return ExifTags::makeKey(entry.tag(), entry.ifdId());
}
- std::pair<uint16, IfdId> decomposeKey(const std::string& key,
+ std::pair<uint16_t, IfdId> decomposeKey(const std::string& key,
const MakerNote* makerNote)
{
- std::pair<uint16, IfdId> p = ExifTags::decomposeKey(key);
+ std::pair<uint16_t, IfdId> p = ExifTags::decomposeKey(key);
if (p.second == makerIfdId && makerNote != 0) {
p.first = makerNote->decomposeKey(key);
}
@@ -1381,8 +1381,8 @@ namespace {
void setOffsetTag(Exiv2::Ifd& ifd,
int idx,
- Exiv2::uint16 tag,
- Exiv2::uint32 offset,
+ uint16_t tag,
+ uint32_t offset,
Exiv2::ByteOrder byteOrder)
{
Exiv2::Ifd::iterator pos = ifd.findTag(tag);
diff --git a/src/exif.hpp b/src/exif.hpp
index 38d60c6..63071da 100644
--- a/src/exif.hpp
+++ b/src/exif.hpp
@@ -21,7 +21,7 @@
/*!
@file exif.hpp
@brief Encoding and decoding of Exif data
- @version $Name: $ $Revision: 1.50 $
+ @version $Name: $ $Revision: 1.51 $
@author Andreas Huggel (ahu)
<a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
@date 09-Jan-04, ahu: created
@@ -104,7 +104,7 @@ namespace Exiv2 {
@brief Return the tag.
@throw Error ("Invalid key") if the tag is not set.
*/
- virtual uint16 tag() const;
+ virtual uint16_t tag() const;
virtual ExifKey* clone() const;
//! Interpret and print the value of an Exif tag
@@ -144,7 +144,7 @@ namespace Exiv2 {
private:
// DATA
- uint16 tag_; //!< Tag value
+ uint16_t tag_; //!< Tag value
IfdId ifdId_; //!< The IFD associated with this tag
int idx_; //!< Unique id of an entry within one IFD
MakerNote* pMakerNote_; //!< Pointer to the associated MakerNote
@@ -212,7 +212,7 @@ namespace Exiv2 {
std::string tagName() const
{ return pKey_ == 0 ? "" : pKey_->tagName(); }
//! Return the tag
- uint16 tag() const
+ uint16_t tag() const
{ return pKey_ == 0 ? 0xffff : pKey_->tag(); }
//! Return the IFD id
IfdId ifdId() const
@@ -965,7 +965,7 @@ namespace Exiv2 {
@throw Error ("Invalid key") if the key cannot be parsed into
item item, section name and tag name parts.
*/
- std::pair<uint16, IfdId> decomposeKey(const std::string& key,
+ std::pair<uint16_t, IfdId> decomposeKey(const std::string& key,
const MakerNote* makerNote);
} // namespace Exiv2
diff --git a/src/fujimn.cpp b/src/fujimn.cpp
index cbf0d8b..45aec01 100644
--- a/src/fujimn.cpp
+++ b/src/fujimn.cpp
@@ -20,7 +20,7 @@
*/
/*
File: fujimn.cpp
- Version: $Name: $ $Revision: 1.10 $
+ Version: $Name: $ $Revision: 1.11 $
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
History: 18-Feb-04, ahu: created
07-Mar-04, ahu: isolated as a separate component
@@ -31,7 +31,7 @@
*/
// *****************************************************************************
#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.10 $ $RCSfile: fujimn.cpp,v $");
+EXIV2_RCSID("@(#) $Name: $ $Revision: 1.11 $ $RCSfile: fujimn.cpp,v $");
// *****************************************************************************
// included header files
@@ -119,7 +119,7 @@ namespace Exiv2 {
}
std::ostream& FujiMakerNote::printTag(std::ostream& os,
- uint16 tag,
+ uint16_t tag,
const Value& value) const
{
switch (tag) {
diff --git a/src/fujimn.hpp b/src/fujimn.hpp
index 1dd9cf9..bacb768 100644
--- a/src/fujimn.hpp
+++ b/src/fujimn.hpp
@@ -24,7 +24,7 @@
in Appendix 4: Makernote of Fujifilm of the document
<a href="http://park2.wakwak.com/%7Etsuruzoh/Computer/Digicams/exif-e.html">
Exif file format</a> by TsuruZoh Tachibanaya
- @version $Name: $ $Revision: 1.7 $
+ @version $Name: $ $Revision: 1.8 $
@author Andreas Huggel (ahu)
<a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
@date 11-Feb-04, ahu: created
@@ -109,7 +109,7 @@ namespace Exiv2 {
//! Return the name of the makernote item ("Fujifilm")
std::string ifdItem() const { return ifdItem_; }
std::ostream& printTag(std::ostream& os,
- uint16 tag,
+ uint16_t tag,
const Value& value) const;
//@}
diff --git a/src/ifd.cpp b/src/ifd.cpp
index 576d849..0cedf0c 100644
--- a/src/ifd.cpp
+++ b/src/ifd.cpp
@@ -20,14 +20,14 @@
*/
/*
File: ifd.cpp
- Version: $Name: $ $Revision: 1.25 $
+ Version: $Name: $ $Revision: 1.26 $
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
History: 26-Jan-04, ahu: created
11-Feb-04, ahu: isolated as a component
*/
// *****************************************************************************
#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.25 $ $RCSfile: ifd.cpp,v $");
+EXIV2_RCSID("@(#) $Name: $ $Revision: 1.26 $ $RCSfile: ifd.cpp,v $");
// *****************************************************************************
// included header files
@@ -103,7 +103,7 @@ namespace Exiv2 {
return *this;
} // Entry::operator=
- void Entry::setValue(uint32 data, ByteOrder byteOrder)
+ void Entry::setValue(uint32_t data, ByteOrder byteOrder)
{
if (pData_ == 0 || size_ < 4) {
assert(alloc_);
@@ -117,7 +117,7 @@ namespace Exiv2 {
count_ = 1;
}
- void Entry::setValue(uint16 type, uint32 count, const byte* buf, long len)
+ void Entry::setValue(uint16_t type, uint32_t count, const byte* buf, long len)
{
long dataSize = count * TypeInfo::typeSize(TypeId(type));
// No minimum size requirement, but make sure the buffer can hold the data
@@ -149,7 +149,7 @@ namespace Exiv2 {
count_ = count;
} // Entry::setValue
- const byte* Entry::component(uint32 n) const
+ const byte* Entry::component(uint32_t n) const
{
if (n >= count()) return 0;
return data() + n * typeSize();
@@ -163,7 +163,7 @@ namespace Exiv2 {
memset(pNext_, 0x0, 4);
}
- Ifd::Ifd(IfdId ifdId, uint32 offset)
+ Ifd::Ifd(IfdId ifdId, uint32_t offset)
: alloc_(true), ifdId_(ifdId), offset_(offset), dataOffset_(0),
pNext_(0), next_(0)
{
@@ -171,7 +171,7 @@ namespace Exiv2 {
memset(pNext_, 0x0, 4);
}
- Ifd::Ifd(IfdId ifdId, uint32 offset, bool alloc)
+ Ifd::Ifd(IfdId ifdId, uint32_t offset, bool alloc)
: alloc_(alloc), ifdId_(ifdId), offset_(offset), dataOffset_(0),
pNext_(0), next_(0)
{
@@ -294,7 +294,7 @@ namespace Exiv2 {
e.setIfdId(ifdId_);
e.setIdx(++idx);
e.setTag(i->tag_);
- uint32 tmpOffset =
+ uint32_t tmpOffset =
i->size_ > 4 ? i->offset_ - offset_ : i->offsetLoc_;
if (static_cast<unsigned long>(len) < tmpOffset + i->size_) {
// Todo: How to handle debug output like this
@@ -338,13 +338,13 @@ namespace Exiv2 {
FindEntryByIdx(idx));
}
- Ifd::const_iterator Ifd::findTag(uint16 tag) const
+ Ifd::const_iterator Ifd::findTag(uint16_t tag) const
{
return std::find_if(entries_.begin(), entries_.end(),
FindEntryByTag(tag));
}
- Ifd::iterator Ifd::findTag(uint16 tag)
+ Ifd::iterator Ifd::findTag(uint16_t tag)
{
return std::find_if(entries_.begin(), entries_.end(),
FindEntryByTag(tag));
@@ -356,7 +356,7 @@ namespace Exiv2 {
}
int Ifd::readSubIfd(
- Ifd& dest, const byte* buf, long len, ByteOrder byteOrder, uint16 tag
+ Ifd& dest, const byte* buf, long len, ByteOrder byteOrder, uint16_t tag
) const
{
int rc = 0;
@@ -378,7 +378,7 @@ namespace Exiv2 {
if (offset != 0) offset_ = offset;
// Add the number of entries to the data buffer
- us2Data(buf, static_cast<uint16>(entries_.size()), byteOrder);
+ us2Data(buf, static_cast<uint16_t>(entries_.size()), byteOrder);
long o = 2;
// Add all directory entries to the data buffer
@@ -438,7 +438,7 @@ namespace Exiv2 {
dataOffset_ = 0;
} // Ifd::clear
- void Ifd::setNext(uint32 next, ByteOrder byteOrder)
+ void Ifd::setNext(uint32_t next, ByteOrder byteOrder)
{
assert(pNext_);
ul2Data(pNext_, next, byteOrder);
@@ -453,7 +453,7 @@ namespace Exiv2 {
entries_.push_back(entry);
}
- int Ifd::erase(uint16 tag)
+ int Ifd::erase(uint16_t tag)
{
int idx = 0;
iterator pos = findTag(tag);
diff --git a/src/ifd.hpp b/src/ifd.hpp
index 6d01f16..0836426 100644
--- a/src/ifd.hpp
+++ b/src/ifd.hpp
@@ -21,7 +21,7 @@
/*!
@file ifd.hpp
@brief Encoding and decoding of IFD (%Image File Directory) data
- @version $Name: $ $Revision: 1.20 $
+ @version $Name: $ $Revision: 1.21 $
@author Andreas Huggel (ahu)
<a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
@date 09-Jan-04, ahu: created<BR>
@@ -77,7 +77,7 @@ namespace Exiv2 {
//! Assignment operator
Entry& operator=(const Entry& rhs);
//! Set the tag
- void setTag(uint16 tag) { tag_ = tag; }
+ void setTag(uint16_t tag) { tag_ = tag; }
//! Set the IFD id
void setIfdId(IfdId ifdId) { ifdId_ = ifdId; }
//! Set the index (unique id of an entry within one IFD)
@@ -85,7 +85,7 @@ namespace Exiv2 {
//! Set the pointer to the MakerNote
void setMakerNote(MakerNote* makerNote) { pMakerNote_ = makerNote; }
//! Set the offset. The offset is relative to the start of the IFD.
- void setOffset(uint32 offset) { offset_ = offset; }
+ void setOffset(uint32_t offset) { offset_ = offset; }
/*!
@brief Set the value of the entry to a single unsigned long component,
i.e., set the type of the entry to unsigned long, number of
@@ -99,7 +99,7 @@ namespace Exiv2 {
<BR>This method cannot be used to set the value of a newly created
%Entry in non-alloc mode.
*/
- void setValue(uint32 data, ByteOrder byteOrder);
+ void setValue(uint32_t data, ByteOrder byteOrder);
/*!
@brief Set type, count, the data buffer and its size.
@@ -126,15 +126,15 @@ namespace Exiv2 {
@throw Error ("Size too small") if size is not large enough to hold
count components of the given type.
*/
- void setValue(uint16 type, uint32 count, const byte* data, long size);
+ void setValue(uint16_t type, uint32_t count, const byte* data, long size);
//@}
//! @name Accessors
//@{
//! Return the tag
- uint16 tag() const { return tag_; }
+ uint16_t tag() const { return tag_; }
//! Return the type id.
- uint16 type() const { return type_; }
+ uint16_t type() const { return type_; }
//! Return the name of the type
const char* typeName() const
{ return TypeInfo::typeName(TypeId(type_)); }
@@ -148,7 +148,7 @@ namespace Exiv2 {
//! Return the pointer to the associated MakerNote
MakerNote* makerNote() const { return pMakerNote_; }
//! Return the number of components in the value
- uint32 count() const { return count_; }
+ uint32_t count() const { return count_; }
/*!
@brief Return the size of the data buffer in bytes.
@note There is no minimum size for the data buffer, except that it
@@ -156,7 +156,7 @@ namespace Exiv2 {
*/
long size() const { return size_; }
//! Return the offset from the start of the IFD to the data of the entry
- uint32 offset() const { return offset_; }
+ uint32_t offset() const { return offset_; }
/*!
@brief Return a pointer to the data area. Do not attempt to write
to this pointer.
@@ -166,7 +166,7 @@ namespace Exiv2 {
@brief Return a pointer to the n-th component, 0 if there is no
n-th component. Do not attempt to write to this pointer.
*/
- const byte* component(uint32 n) const;
+ const byte* component(uint32_t n) const;
//! Get the memory allocation mode
bool alloc() const { return alloc_; }
//@}
@@ -185,13 +185,13 @@ namespace Exiv2 {
//! Pointer to the associated MakerNote
MakerNote* pMakerNote_;
//! Tag
- uint16 tag_;
+ uint16_t tag_;
//! Type
- uint16 type_;
+ uint16_t type_;
//! Number of components
- uint32 count_;
+ uint32_t count_;
//! Offset from the start of the IFD to the data
- uint32 offset_;
+ uint32_t offset_;
/*!
Size of the data buffer holding the value in bytes, there is
no minimum size.
@@ -226,7 +226,7 @@ namespace Exiv2 {
class FindEntryByTag {
public:
//! Constructor, initializes the object with the tag to look for
- FindEntryByTag(uint16 tag) : tag_(tag) {}
+ FindEntryByTag(uint16_t tag) : tag_(tag) {}
/*!
@brief Returns true if the tag of the argument entry is equal
to that of the object.
@@ -235,7 +235,7 @@ namespace Exiv2 {
{ return tag_ == entry.tag(); }
private:
- uint16 tag_;
+ uint16_t tag_;
}; // class FindEntryByTag
@@ -285,13 +285,13 @@ namespace Exiv2 {
the IFD from the start of TIFF header. Memory management is
enabled.
*/
- Ifd(IfdId ifdId, uint32 offset);
+ Ifd(IfdId ifdId, uint32_t offset);
/*!
@brief Constructor. Allows to set the IFD identifier, offset of the
IFD from the start of TIFF header and choose whether or not
memory management is required for the Entries.
*/
- Ifd(IfdId ifdId, uint32 offset, bool alloc);
+ Ifd(IfdId ifdId, uint32_t offset, bool alloc);
//! Copy constructor
Ifd(const Ifd& rhs);
//! Destructor
@@ -344,7 +344,7 @@ namespace Exiv2 {
IFD. 0 is returned and no action is taken in this case.
*/
int readSubIfd(
- Ifd& dest, const byte* buf, long len, ByteOrder byteOrder, uint16 tag
+ Ifd& dest, const byte* buf, long len, ByteOrder byteOrder, uint16_t tag
) const;
/*!
@brief Copy the IFD to a data array, update the offsets of the IFD and
@@ -382,7 +382,7 @@ namespace Exiv2 {
@brief Set the offset of the next IFD. Byte order is needed to update
the underlying data buffer in non-alloc mode.
*/
- void setNext(uint32 next, ByteOrder byteOrder);
+ void setNext(uint32_t next, ByteOrder byteOrder);
/*!
@brief Add the entry to the IFD. No duplicate-check is performed,
i.e., it is possible to add multiple entries with the same tag.
@@ -395,7 +395,7 @@ namespace Exiv2 {
@brief Delete the directory entry with the given tag. Return the index
of the deleted entry or 0 if no entry with tag was found.
*/
- int erase(uint16 tag);
+ int erase(uint16_t tag);
/*!
@brief Delete the directory entry at iterator position pos, return the
position of the next entry. Note that iterators into the
@@ -412,7 +412,7 @@ namespace Exiv2 {
//! Find an IFD entry by idx, return an iterator into the entries list
iterator findIdx(int idx);
//! Find an IFD entry by tag, return an iterator into the entries list
- iterator findTag(uint16 tag);
+ iterator findTag(uint16_t tag);
//@}
//! @name Accessors
@@ -426,7 +426,7 @@ namespace Exiv2 {
//! Find an IFD entry by idx, return a const iterator into the entries list
const_iterator findIdx(int idx) const;
//! Find an IFD entry by tag, return a const iterator into the entries list
- const_iterator findTag(uint16 tag) const;
+ const_iterator findTag(uint16_t tag) const;
//! Get the IfdId of the IFD
IfdId ifdId() const { return ifdId_; }
//! Get the offset of the IFD from the start of the TIFF header
@@ -438,7 +438,7 @@ namespace Exiv2 {
*/
long dataOffset() const { return dataOffset_; }
//! Get the offset to the next IFD from the start of the TIFF header
- uint32 next() const { return next_; }
+ uint32_t next() const { return next_; }
//! Get the number of directory entries in the IFD
long count() const { return static_cast<long>(entries_.size()); }
//! Get the size of this IFD in bytes (IFD only, without data)
@@ -460,12 +460,12 @@ namespace Exiv2 {
private:
//! Helper structure to build IFD entries
struct PreEntry {
- uint16 tag_;
- uint16 type_;
- uint32 count_;
+ uint16_t tag_;
+ uint16_t type_;
+ uint32_t count_;
long size_;
long offsetLoc_;
- uint32 offset_;
+ uint32_t offset_;
};
//! cmpPreEntriesByOffset needs to know about PreEntry, that's all.
@@ -491,7 +491,7 @@ namespace Exiv2 {
//! Pointer to the offset of next IFD from the start of the TIFF header
byte* pNext_;
//! The offset of the next IFD as data value (always in sync with *pNext_)
- uint32 next_;
+ uint32_t next_;
}; // class Ifd
diff --git a/src/image.cpp b/src/image.cpp
index fd841af..d5739c8 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -20,7 +20,7 @@
*/
/*
File: image.cpp
- Version: $Name: $ $Revision: 1.25 $
+ Version: $Name: $ $Revision: 1.26 $
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
Brad Schick (brad) <schick at robotbattle.com>
History: 26-Jan-04, ahu: created
@@ -29,7 +29,7 @@
*/
// *****************************************************************************
#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.25 $ $RCSfile: image.cpp,v $");
+EXIV2_RCSID("@(#) $Name: $ $Revision: 1.26 $ $RCSfile: image.cpp,v $");
// *****************************************************************************
// included header files
@@ -159,7 +159,7 @@ namespace Exiv2 {
const byte JpegBase::app1_ = 0xe1;
const byte JpegBase::app13_ = 0xed;
const byte JpegBase::com_ = 0xfe;
- const uint16 JpegBase::iptc_ = 0x0404;
+ const uint16_t JpegBase::iptc_ = 0x0404;
const char JpegBase::exifId_[] = "Exif
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list