Minor fixes

v0.27.3
Andreas Huggel 21 years ago
parent 1211167329
commit c9976d1ab8

@ -20,7 +20,7 @@
# 02111-1307, USA. # 02111-1307, USA.
# #
# File: Makefile # File: Makefile
# Version: $Name: $ $Revision: 1.19 $ # Version: $Name: $ $Revision: 1.20 $
# Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net> # Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
# History: 10-Dec-03, ahu: created # History: 10-Dec-03, ahu: created
# #
@ -28,7 +28,7 @@
# Do NOT change this file! All system specific settings and configs # Do NOT change this file! All system specific settings and configs
# go into config.mk. # go into config.mk.
# #
# This makefile contains (supposedly) generic build rules to build a # This makefile contains (supposedly) generic build rules to build the
# library and applications. It includes all system specific settings # library and applications. It includes all system specific settings
# from config.mk. The idea is that configuring and porting the # from config.mk. The idea is that configuring and porting the
# software to a new platform should only require changes in config.mk. # software to a new platform should only require changes in config.mk.
@ -205,7 +205,7 @@ ifdef STATIC_LIBS
$(BINARY): $(ARCHIVE) mn.o $(BINARY): $(ARCHIVE) mn.o
endif endif
$(EXIV2BIN): $(EXIV2OBJ) $(EXIV2BIN): lib $(EXIV2OBJ)
bin: lib $(BINARY) $(EXIV2BIN) bin: lib $(BINARY) $(EXIV2BIN)

@ -20,13 +20,13 @@
*/ */
/* /*
File: actions.cpp File: actions.cpp
Version: $Name: $ $Revision: 1.15 $ Version: $Name: $ $Revision: 1.16 $
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net> Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
History: 08-Dec-03, ahu: created History: 08-Dec-03, ahu: created
*/ */
// ***************************************************************************** // *****************************************************************************
#include "rcsid.hpp" #include "rcsid.hpp"
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.15 $ $RCSfile: actions.cpp,v $") EXIV2_RCSID("@(#) $Name: $ $Revision: 1.16 $ $RCSfile: actions.cpp,v $")
// ***************************************************************************** // *****************************************************************************
// included header files // included header files
@ -756,7 +756,7 @@ namespace Action {
return 1; return 1;
} }
if (Params::instance().verbose_) { if (Params::instance().verbose_) {
std::cout << path << ": Adjusting timestamp by" std::cout << "Adjusting '" << md->tagName() << "' by"
<< (adjustment_ < 0 ? " " : " +") << (adjustment_ < 0 ? " " : " +")
<< adjustment_ << " seconds to "; << adjustment_ << " seconds to ";
} }

@ -6,12 +6,12 @@
RCS information RCS information
$Name: $ $Name: $
$Revision: 1.2 $ $Revision: 1.3 $
*/ */
// ***************************************************************************** // *****************************************************************************
#include "rcsid.hpp" #include "rcsid.hpp"
EXIV2_RCSID("@(#) $Name: $ $Revision: 1.2 $ $RCSfile: utiltest.cpp,v $") EXIV2_RCSID("@(#) $Name: $ $Revision: 1.3 $ $RCSfile: utiltest.cpp,v $")
// ********************************************************************* // *********************************************************************
// included header files // included header files
@ -20,9 +20,20 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.2 $ $RCSfile: utiltest.cpp,v $")
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
void testStrtol();
void testStrError();
void testPaths();
void testPath(const std::string& path);
// ********************************************************************* // *********************************************************************
// Main // Main
int main(int argc, char* const argv[]) int main(int argc, char* const argv[])
{
testPaths();
return 0;
}
void testStrtol()
{ {
bool rc; bool rc;
long n(0); long n(0);
@ -44,8 +55,6 @@ int main(int argc, char* const argv[])
std::cout << "s = `" << s << "' rc = " << rc << " n = " << n << "\n"; std::cout << "s = `" << s << "' rc = " << rc << " n = " << n << "\n";
s = "12p"; rc = Util::strtol(s.c_str(), n); s = "12p"; rc = Util::strtol(s.c_str(), n);
std::cout << "s = `" << s << "' rc = " << rc << " n = " << n << "\n"; std::cout << "s = `" << s << "' rc = " << rc << " n = " << n << "\n";
return 0;
} }
void testStrError() void testStrError()
@ -63,7 +72,6 @@ void testStrError()
void testPaths() void testPaths()
{ {
std::string path; std::string path;
void testPath(const std::string path);
path = "/usr/lib"; testPath(path); path = "/usr/lib"; testPath(path);
path = "/usr/"; testPath(path); path = "/usr/"; testPath(path);
path = "usr"; testPath(path); path = "usr"; testPath(path);
@ -76,6 +84,7 @@ void testPaths()
path = "/usr/.emacs//"; testPath(path); path = "/usr/.emacs//"; testPath(path);
path = "usr/.emacs"; testPath(path); path = "usr/.emacs"; testPath(path);
path = ".emacs"; testPath(path); path = ".emacs"; testPath(path);
path = ".emacs.gz"; testPath(path);
path = "/tmp/image.jpg"; testPath(path); path = "/tmp/image.jpg"; testPath(path);
path = "/tmp/.image.jpg"; testPath(path); path = "/tmp/.image.jpg"; testPath(path);
path = "/image.jpg"; testPath(path); path = "/image.jpg"; testPath(path);
@ -84,9 +93,10 @@ void testPaths()
path = "/////image.jpg"; testPath(path); path = "/////image.jpg"; testPath(path);
path = "/foo.bar/image"; testPath(path); path = "/foo.bar/image"; testPath(path);
path = "/foo.bar/images.tar.gz"; testPath(path); path = "/foo.bar/images.tar.gz"; testPath(path);
path = "d:\\foo.bar\\images.tar.gz"; testPath(path);
} }
void testPath(const std::string path) void testPath(const std::string& path)
{ {
std::cout << std::setw(15) << path << " " std::cout << std::setw(15) << path << " "
<< std::setw(15) << Util::dirname(path) << " " << std::setw(15) << Util::dirname(path) << " "

Loading…
Cancel
Save