diff --git a/src/Makefile b/src/Makefile index 6389ba82..0468c0d1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,7 +20,7 @@ # 02111-1307, USA. # # File: Makefile -# Version: $Name: $ $Revision: 1.19 $ +# Version: $Name: $ $Revision: 1.20 $ # Author(s): Andreas Huggel (ahu) # History: 10-Dec-03, ahu: created # @@ -28,7 +28,7 @@ # Do NOT change this file! All system specific settings and configs # 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 # from config.mk. The idea is that configuring and porting the # software to a new platform should only require changes in config.mk. @@ -205,7 +205,7 @@ ifdef STATIC_LIBS $(BINARY): $(ARCHIVE) mn.o endif -$(EXIV2BIN): $(EXIV2OBJ) +$(EXIV2BIN): lib $(EXIV2OBJ) bin: lib $(BINARY) $(EXIV2BIN) diff --git a/src/actions.cpp b/src/actions.cpp index 7c474640..c13534d0 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -20,13 +20,13 @@ */ /* File: actions.cpp - Version: $Name: $ $Revision: 1.15 $ + Version: $Name: $ $Revision: 1.16 $ Author(s): Andreas Huggel (ahu) History: 08-Dec-03, ahu: created */ // ***************************************************************************** #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 @@ -756,7 +756,7 @@ namespace Action { return 1; } if (Params::instance().verbose_) { - std::cout << path << ": Adjusting timestamp by" + std::cout << "Adjusting '" << md->tagName() << "' by" << (adjustment_ < 0 ? " " : " +") << adjustment_ << " seconds to "; } diff --git a/src/utiltest.cpp b/src/utiltest.cpp index 81d15175..3fe9c56a 100644 --- a/src/utiltest.cpp +++ b/src/utiltest.cpp @@ -6,12 +6,12 @@ RCS information $Name: $ - $Revision: 1.2 $ + $Revision: 1.3 $ */ // ***************************************************************************** #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 @@ -20,9 +20,20 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.2 $ $RCSfile: utiltest.cpp,v $") #include #include +void testStrtol(); +void testStrError(); +void testPaths(); +void testPath(const std::string& path); + // ********************************************************************* // Main int main(int argc, char* const argv[]) +{ + testPaths(); + return 0; +} + +void testStrtol() { bool rc; long n(0); @@ -44,8 +55,6 @@ int main(int argc, char* const argv[]) std::cout << "s = `" << s << "' rc = " << rc << " n = " << n << "\n"; s = "12p"; rc = Util::strtol(s.c_str(), n); std::cout << "s = `" << s << "' rc = " << rc << " n = " << n << "\n"; - - return 0; } void testStrError() @@ -63,7 +72,6 @@ void testStrError() void testPaths() { std::string path; - void testPath(const std::string path); path = "/usr/lib"; 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 = ".emacs"; testPath(path); + path = ".emacs.gz"; testPath(path); path = "/tmp/image.jpg"; testPath(path); path = "/tmp/.image.jpg"; testPath(path); path = "/image.jpg"; testPath(path); @@ -84,9 +93,10 @@ void testPaths() path = "/////image.jpg"; testPath(path); path = "/foo.bar/image"; 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::setw(15) << Util::dirname(path) << " "