diff --git a/src/actions.cpp b/src/actions.cpp
index 4084949f..5bbb7454 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -121,7 +121,7 @@ namespace {
@brief Rename a file according to a timestamp value.
@param path The original file path. Contains the new path on exit.
- @param tm Pointer to a buffer with the broken-down time to rename
+ @param tm Pointer to a buffer with the broken-down time to rename
the file to.
@return 0 if successful, -1 if the file was skipped, 1 on error.
*/
@@ -719,8 +719,8 @@ namespace Action {
rc = renameFile(newPath, &tm);
if (rc == -1) return 0; // skip
}
- if ( 0 == rc
- && ( Params::instance().preserve_
+ if ( 0 == rc
+ && ( Params::instance().preserve_
|| Params::instance().timestamp_
|| Params::instance().timestampOnly_)) {
ts.touch(newPath);
@@ -1024,9 +1024,9 @@ namespace Action {
if (!Params::instance().jpegComment_.empty()) {
if (Params::instance().verbose_) {
- std::cout << "Setting Jpeg comment '"
+ std::cout << "Setting Jpeg comment '"
<< Params::instance().jpegComment_
- << "'"
+ << "'"
<< std::endl;
}
image_->setComment(Params::instance().jpegComment_);
@@ -1477,7 +1477,7 @@ namespace {
<< path << "\n";
return 1;
}
- newPath = Util::dirname(path) + EXV_SEPERATOR_STR
+ newPath = Util::dirname(path) + EXV_SEPERATOR_STR
+ basename + Util::suffix(path);
if ( Util::dirname(newPath) == Util::dirname(path)
&& Util::basename(newPath) == Util::basename(path)) {
diff --git a/src/actions.hpp b/src/actions.hpp
index 83b29a85..3a344ddd 100644
--- a/src/actions.hpp
+++ b/src/actions.hpp
@@ -58,7 +58,7 @@ namespace Exiv2 {
namespace Action {
//! Enumerates all tasks
- enum TaskType { none, adjust, print, rename, erase, extract, insert,
+ enum TaskType { none, adjust, print, rename, erase, extract, insert,
modify, fixiso };
// *****************************************************************************
diff --git a/src/crwimage.cpp b/src/crwimage.cpp
index 7a89949c..80d2859e 100644
--- a/src/crwimage.cpp
+++ b/src/crwimage.cpp
@@ -326,7 +326,7 @@ namespace Exiv2 {
CiffComponent::~CiffComponent()
{
- if (isAllocated_) delete[] pData_;
+ if (isAllocated_) delete[] pData_;
}
CiffDirectory::~CiffDirectory()
@@ -347,7 +347,7 @@ namespace Exiv2 {
{
throw Error(34, "CiffEntry::add");
} // CiffEntry::doAdd
-
+
void CiffDirectory::doAdd(AutoPtr component)
{
components_.push_back(component.release());
@@ -412,7 +412,7 @@ namespace Exiv2 {
#ifdef DEBUG
std::cout << " Entry for tag 0x"
<< std::hex << tagId() << " (0x" << tag()
- << "), " << std::dec << size_
+ << "), " << std::dec << size_
<< " Bytes, Offset is " << offset_ << "\n";
#endif
@@ -520,15 +520,15 @@ namespace Exiv2 {
}
}
- uint32_t CiffComponent::write(Blob& blob,
- ByteOrder byteOrder,
+ uint32_t CiffComponent::write(Blob& blob,
+ ByteOrder byteOrder,
uint32_t offset)
{
return doWrite(blob, byteOrder, offset);
}
- uint32_t CiffEntry::doWrite(Blob& blob,
- ByteOrder /*byteOrder*/,
+ uint32_t CiffEntry::doWrite(Blob& blob,
+ ByteOrder /*byteOrder*/,
uint32_t offset)
{
return writeValueData(blob, offset);
@@ -538,7 +538,7 @@ namespace Exiv2 {
{
if (dataLocation() == valueData) {
#ifdef DEBUG
- std::cout << " Data for tag 0x" << std::hex << tagId()
+ std::cout << " Data for tag 0x" << std::hex << tagId()
<< ", " << std::dec << size_ << " Bytes\n";
#endif
offset_ = offset;
@@ -553,8 +553,8 @@ namespace Exiv2 {
return offset;
} // CiffComponent::writeValueData
- uint32_t CiffDirectory::doWrite(Blob& blob,
- ByteOrder byteOrder,
+ uint32_t CiffDirectory::doWrite(Blob& blob,
+ ByteOrder byteOrder,
uint32_t offset)
{
#ifdef DEBUG
@@ -577,7 +577,7 @@ namespace Exiv2 {
append(blob, buf, 2);
dirOffset += 2;
- // Directory entries
+ // Directory entries
for (Components::iterator i = b; i != e; ++i) {
(*i)->writeDirEntry(blob, byteOrder);
dirOffset += 10;
@@ -603,9 +603,9 @@ namespace Exiv2 {
void CiffComponent::writeDirEntry(Blob& blob, ByteOrder byteOrder) const
{
#ifdef DEBUG
- std::cout << " Directory entry for tag 0x"
+ std::cout << " Directory entry for tag 0x"
<< std::hex << tagId() << " (0x" << tag()
- << "), " << std::dec << size_
+ << "), " << std::dec << size_
<< " Bytes, Offset is " << offset_ << "\n";
#endif
byte buf[4];
@@ -742,13 +742,13 @@ namespace Exiv2 {
return pRootDir_->findComponent(crwTagId, crwDir);
} // CiffHeader::findComponent
- CiffComponent* CiffComponent::findComponent(uint16_t crwTagId,
+ CiffComponent* CiffComponent::findComponent(uint16_t crwTagId,
uint16_t crwDir) const
{
return doFindComponent(crwTagId, crwDir);
} // CiffComponent::findComponent
- CiffComponent* CiffComponent::doFindComponent(uint16_t crwTagId,
+ CiffComponent* CiffComponent::doFindComponent(uint16_t crwTagId,
uint16_t crwDir) const
{
if (tagId() == crwTagId && dir() == crwDir) {
@@ -757,8 +757,8 @@ namespace Exiv2 {
return 0;
} // CiffComponent::doFindComponent
- CiffComponent* CiffDirectory::doFindComponent(uint16_t crwTagId,
- uint16_t crwDir) const
+ CiffComponent* CiffDirectory::doFindComponent(uint16_t crwTagId,
+ uint16_t crwDir) const
{
CiffComponent* cc = 0;
const Components::const_iterator b = components_.begin();
@@ -1144,7 +1144,7 @@ namespace Exiv2 {
void CrwMap::encode(CiffHeader* pHead, const Image& image)
{
- for (const CrwMapping* cmi = crwMapping_;
+ for (const CrwMapping* cmi = crwMapping_;
cmi->ifdId_ != ifdIdNotSet; ++cmi) {
if (cmi->fromExif_ != 0) {
cmi->fromExif_(image, cmi, pHead);
@@ -1158,12 +1158,12 @@ namespace Exiv2 {
{
assert(pCrwMapping != 0);
assert(pHead != 0);
-
+
// Determine the source Exif metadatum
ExifKey ek(pCrwMapping->tag_, ExifTags::ifdItem(pCrwMapping->ifdId_));
ExifData::const_iterator ed = image.exifData().findKey(ek);
- // Set the new value or remove the entry
+ // Set the new value or remove the entry
if (ed != image.exifData().end()) {
DataBuf buf(ed->size());
ed->copy(buf.pData_, pHead->byteOrder());
@@ -1183,7 +1183,7 @@ namespace Exiv2 {
std::string comment = image.comment();
- CiffComponent* cc = pHead->findComponent(pCrwMapping->crwTagId_,
+ CiffComponent* cc = pHead->findComponent(pCrwMapping->crwTagId_,
pCrwMapping->crwDir_);
if (!comment.empty()) {
uint32_t size = static_cast
You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., + with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA. */ /*! diff --git a/src/exif.cpp b/src/exif.cpp index 4ae03f40..808f4d3c 100644 --- a/src/exif.cpp +++ b/src/exif.cpp @@ -185,7 +185,7 @@ namespace Exiv2 { void Exifdatum::setValue(const Entry& e, ByteOrder byteOrder) { TypeId t = TypeId(e.type()); - // Hack: On the fly type conversion for Exif.Photo.UserComment + // Hack: On the fly type conversion for Exif.Photo.UserComment if (e.tag() == 0x9286 && e.ifdId() == exifIfdId && e.type() == undefined) { t = comment; } diff --git a/src/exif.hpp b/src/exif.hpp index e9fccaf6..2386b053 100644 --- a/src/exif.hpp +++ b/src/exif.hpp @@ -867,7 +867,7 @@ namespace Exiv2 { return exifDatum; } /*! - @brief Returns the IfdId of the first Exif makernote tag it finds in the + @brief Returns the IfdId of the first Exif makernote tag it finds in the Exif metadata or ifdIdNotSet if there is no Exif makernote tag. */ IfdId hasMakerNote(const ExifData& exifData); diff --git a/src/exiv2.cpp b/src/exiv2.cpp index b8c6108c..ac0626b0 100644 --- a/src/exiv2.cpp +++ b/src/exiv2.cpp @@ -475,7 +475,7 @@ int Params::evalModify(int opt, const std::string& optarg) action_ = Action::modify; // fallthrough case Action::modify: - if (opt == 'c') jpegComment_ = optarg; + if (opt == 'c') jpegComment_ = optarg; if (opt == 'm') cmdFiles_.push_back(optarg); // parse the files later if (opt == 'M') cmdLines_.push_back(optarg); // parse the commands later break; @@ -594,7 +594,7 @@ int Params::getopt(int argc, char* const argv[]) << ": Adjust action requires option -a time\n"; rc = 1; } - if ( action_ == Action::modify + if ( action_ == Action::modify && cmdFiles_.empty() && cmdLines_.empty() && jpegComment_.empty()) { std::cerr << progname() << ": Modify action requires at least one -c, -m or -M option\n"; diff --git a/src/exiv2.hpp b/src/exiv2.hpp index d7b176c7..f3bddf19 100644 --- a/src/exiv2.hpp +++ b/src/exiv2.hpp @@ -135,8 +135,8 @@ public: bool verbose_; //!< Verbose (talkative) option flag. bool force_; //!< Force overwrites flag. bool preserve_; //!< Preserve timestamps flag. - bool timestamp_; //!< Rename also sets the file timestamp. - bool timestampOnly_; //!< Rename only sets the file timestamp. + bool timestamp_; //!< Rename also sets the file timestamp. + bool timestampOnly_; //!< Rename only sets the file timestamp. FileExistsPolicy fileExistsPolicy_; //!< What to do if file to rename exists. bool adjust_; //!< Adjustment flag. PrintMode printMode_; //!< Print mode. diff --git a/src/ifd.cpp b/src/ifd.cpp index 7531d5db..39458081 100644 --- a/src/ifd.cpp +++ b/src/ifd.cpp @@ -433,11 +433,11 @@ namespace Exiv2 { // Set the size to at least for bytes to accomodate offset-data #ifndef SUPPRESS_WARNINGS if (i->type_ < 1 || i->type_ > 10 || i->type_ == 6) { - std::cerr << "Warning: " - << ExifTags::ifdName(ifdId_) << " tag 0x" + std::cerr << "Warning: " + << ExifTags::ifdName(ifdId_) << " tag 0x" << std::setw(4) << std::setfill('0') << std::hex << i->tag_ << " has invalid Exif type " - << std::dec << i->type_ + << std::dec << i->type_ << "; using 7 (undefined).\n"; } #endif diff --git a/src/image.hpp b/src/image.hpp index 171f2e3e..509b64d2 100644 --- a/src/image.hpp +++ b/src/image.hpp @@ -246,7 +246,7 @@ namespace Exiv2 { //! @name Creators //@{ //! Constructor taking a bitmap of the metadata types, which are supported - Image(uint16_t supportedMetadata) + Image(uint16_t supportedMetadata) : supportedMetadata_(supportedMetadata) {} //@} diff --git a/src/types.hpp b/src/types.hpp index d7ae0e43..855c5e4e 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -292,7 +292,7 @@ namespace Exiv2 { /*! @brief Converts a string in the form "%Y:%m:%d %H:%M:%S", e.g., - "2007:05:24 12:31:55" to broken down time format, + "2007:05:24 12:31:55" to broken down time format, returns 0 if successful, else 1. */ int exifTime(const char* buf, struct tm* tm); diff --git a/src/value.hpp b/src/value.hpp index 2bffab2f..8ad99af3 100644 --- a/src/value.hpp +++ b/src/value.hpp @@ -808,7 +808,7 @@ namespace Exiv2 { //! @name Manipulators //@{ /*! - @brief Set time from \em buf if it conforms to \em format + @brief Set time from \em buf if it conforms to \em format (3 input items). This function only sets the hour, minute and second parts of time_. @@ -819,7 +819,7 @@ namespace Exiv2 { */ int scanTime3(const char* buf, const char* format); /*! - @brief Set time from \em buf if it conforms to \em format + @brief Set time from \em buf if it conforms to \em format (6 input items). This function sets all parts of time_.