[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:37:03 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=59e1a6f
The following commit has been merged in the master branch:
commit 59e1a6f29fc19bad6a9a9d4fbaaa62be450a6710
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sat Mar 19 06:50:19 2005 +0000
Added an EXV_ prefix to precompiler defines (still not to all yet - I don't like the idea of "exv_size_t" or "exv_const" - but hopefully to those more likely to create conflicts). Fixes bug #420
---
src/Makefile | 7 +++++--
src/actions.cpp | 14 +++++++-------
src/basicio.cpp | 4 ++--
src/exif.cpp | 2 +-
src/exiv2.cpp | 2 +-
src/exv_msvc.h | 16 ++++++++--------
src/getopt_win32.c | 2 +-
src/image.cpp | 2 +-
src/jpgimage.cpp | 8 +++-----
src/private.h | 8 ++++----
src/types.hpp | 2 +-
src/utils.cpp | 18 +++++++++---------
12 files changed, 43 insertions(+), 42 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index 47ce6c8..a2ae7f0 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -134,7 +134,7 @@ ifeq ($(strip $(MAKECMDGOALS)),)
else
# ...or the target is _not_ one in the list of targets below.
NOINCLUDE = uninstall uninstall-lib check doc ctags mostlyclean clean \
- install-header uninstall-header distclean maintainer-clean
+ install-header uninstall-header distclean maintainer-clean exv_conf.h
ifneq ($(MAKECMDGOALS), $(filter $(MAKECMDGOALS), $(NOINCLUDE)))
-include $(DEP)
endif
@@ -175,8 +175,11 @@ $(sort $(BINOBJ) $(EXIV2OBJ) $(MCOBJ) mn.o): %.o: %.cpp
types.hpp: exv_conf.h
actions.cpp exiv2.cpp image.cpp utils.cpp: exv_conf.h
+#exv_conf.h: $(top_srcdir)/config/config.h
+# cp -f $(top_srcdir)/config/config.h exv_conf.h
+
exv_conf.h: $(top_srcdir)/config/config.h
- cp -f $(top_srcdir)/config/config.h exv_conf.h
+ sed 's/#define \([A-Z]\)/#define EXV_/; s/#undef \([A-Z]\)/#undef EXV_/' < $< > $@
mn.cpp: ./mn.sh
./mn.sh
diff --git a/src/actions.cpp b/src/actions.cpp
index 7763c54..7f34076 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -44,7 +44,7 @@ EXIV2_RCSID("@(#) $Id$");
#include "exif.hpp"
#include "canonmn.hpp"
#include "iptc.hpp"
-#ifndef HAVE_TIMEGM
+#ifndef EXV_HAVE_TIMEGM
# include "timegm.h"
#endif
@@ -61,7 +61,7 @@ EXIV2_RCSID("@(#) $Id$");
#include <cassert>
#include <sys/types.h> // for stat()
#include <sys/stat.h> // for stat()
-#ifdef HAVE_UNISTD_H
+#ifdef EXV_HAVE_UNISTD_H
# include <unistd.h> // for stat()
#endif
@@ -723,7 +723,7 @@ namespace Action {
return 1;
}
std::string newPath
- = Util::dirname(path) + SEPERATOR_STR + basename + Util::suffix(path);
+ = Util::dirname(path) + EXV_SEPERATOR_STR + basename + Util::suffix(path);
if ( Util::dirname(newPath) == Util::dirname(path)
&& Util::basename(newPath) == Util::basename(path)) {
if (Params::instance().verbose_) {
@@ -880,7 +880,7 @@ namespace Action {
if (Params::instance().target_ & ~Params::ctThumb) {
std::string directory = Params::instance().directory_;
if (directory.empty()) directory = Util::dirname(path_);
- std::string exvPath = directory + SEPERATOR_STR
+ std::string exvPath = directory + EXV_SEPERATOR_STR
+ Util::basename(path_, true) + ".exv";
if (!Params::instance().force_ && Util::fileExists(exvPath)) {
std::cout << Params::instance().progname()
@@ -927,7 +927,7 @@ namespace Action {
std::string directory = Params::instance().directory_;
if (directory.empty()) directory = Util::dirname(path_);
- std::string thumb = directory + SEPERATOR_STR
+ std::string thumb = directory + EXV_SEPERATOR_STR
+ Util::basename(path_, true) + "-thumb";
std::string thumbExt = exifData.thumbnailExtension();
if (thumbExt.empty()) {
@@ -983,7 +983,7 @@ namespace Action {
|| Params::instance().target_ & Params::ctComment) {
std::string directory = Params::instance().directory_;
if (directory.empty()) directory = Util::dirname(path);
- std::string exvPath = directory + SEPERATOR_STR
+ std::string exvPath = directory + EXV_SEPERATOR_STR
+ Util::basename(path, true) + ".exv";
rc = metacopy(exvPath, path, true);
}
@@ -1000,7 +1000,7 @@ namespace Action {
{
std::string directory = Params::instance().directory_;
if (directory.empty()) directory = Util::dirname(path);
- std::string thumbPath = directory + SEPERATOR_STR
+ std::string thumbPath = directory + EXV_SEPERATOR_STR
+ Util::basename(path, true) + "-thumb.jpg";
if (!Util::fileExists(thumbPath, true)) {
std::cerr << thumbPath
diff --git a/src/basicio.cpp b/src/basicio.cpp
index 57bff61..078e998 100644
--- a/src/basicio.cpp
+++ b/src/basicio.cpp
@@ -40,10 +40,10 @@ EXIV2_RCSID("@(#) $Id$");
#include <cassert>
#include <sys/types.h> // for stat()
#include <sys/stat.h> // for stat()
-#ifdef HAVE_PROCESS_H
+#ifdef EXV_HAVE_PROCESS_H
# include <process.h>
#endif
-#ifdef HAVE_UNISTD_H
+#ifdef EXV_HAVE_UNISTD_H
# include <unistd.h> // for getpid, stat
#endif
diff --git a/src/exif.cpp b/src/exif.cpp
index 04a0107..f257299 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -55,7 +55,7 @@ EXIV2_RCSID("@(#) $Id$");
#include <cstdio>
#include <sys/types.h> // for stat()
#include <sys/stat.h> // for stat()
-#ifdef HAVE_UNISTD_H
+#ifdef EXV_HAVE_UNISTD_H
# include <unistd.h> // for stat()
#endif
diff --git a/src/exiv2.cpp b/src/exiv2.cpp
index d1629c4..00c1572 100644
--- a/src/exiv2.cpp
+++ b/src/exiv2.cpp
@@ -159,7 +159,7 @@ Params& Params::instance()
void Params::version(std::ostream& os) const
{
- os << PACKAGE_STRING << ", "
+ os << EXV_PACKAGE_STRING << ", "
<< "Copyright (C) 2004, 2005 Andreas Huggel.
"
<< "This is free software; see the source for copying conditions. "
<< "There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR "
diff --git a/src/exv_msvc.h b/src/exv_msvc.h
index e6a140e..319bf0f 100644
--- a/src/exv_msvc.h
+++ b/src/exv_msvc.h
@@ -14,28 +14,28 @@
#ifdef _MSC_VER
/* Define to 1 if you have the <process.h> header file. */
-#define HAVE_PROCESS_H 1
+#define EXV_HAVE_PROCESS_H 1
/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "ahuggel at gmx.net"
+#define EXV_PACKAGE_BUGREPORT "ahuggel at gmx.net"
/* Define to the full name of this package. */
-#define PACKAGE_NAME "Exiv2"
+#define EXV_PACKAGE_NAME "Exiv2"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Exiv2 0.6.2"
+#define EXV_PACKAGE_STRING "Exiv2 0.6.2"
/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "exiv2"
+#define EXV_PACKAGE_TARNAME "exiv2"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.6.2"
+#define EXV_PACKAGE_VERSION "0.6.2"
/* Define to `int' if <sys/types.h> does not define pid_t. */
#define pid_t int
/* File path seperator */
-#define SEPERATOR_STR "\"
-#define SEPERATOR_CHR '\'
+#define EXV_SEPERATOR_STR "\"
+#define EXV_SEPERATOR_CHR '\'
#endif /* _MSC_VER */
diff --git a/src/getopt_win32.c b/src/getopt_win32.c
index 838feec..a08f2f2 100644
--- a/src/getopt_win32.c
+++ b/src/getopt_win32.c
@@ -37,7 +37,7 @@
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not __GNUC__ */
-#if defined (HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__))))
+#if defined (EXV_HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__))))
#include <alloca.h>
#else
#ifndef _AIX
diff --git a/src/image.cpp b/src/image.cpp
index 87c2847..fbc9af2 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -56,7 +56,7 @@ EXIV2_RCSID("@(#) $Id$");
#ifdef _MSC_VER
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
-#ifdef HAVE_UNISTD_H
+#ifdef EXV_HAVE_UNISTD_H
# include <unistd.h> // stat
#endif
diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp
index ef0235b..da9a0e3 100644
--- a/src/jpgimage.cpp
+++ b/src/jpgimage.cpp
@@ -32,12 +32,10 @@ EXIV2_RCSID("@(#) $Id$");
// *****************************************************************************
// included header files
-#ifdef HAVE_CONFIG_H
-# include <config.h>
+#ifdef _MSC_VER
+# include "exv_msvc.h"
#else
-# ifdef _MSC_VER
-# include <config_win32.h>
-# endif
+# include "exv_conf.h"
#endif
#include "jpgimage.hpp"
diff --git a/src/private.h b/src/private.h
index d900f79..afacb36 100644
--- a/src/private.h
+++ b/src/private.h
@@ -59,18 +59,18 @@ static char privatehid[] = "@(#)private.h 7.53";
/* ahu: deleted include sys/wait.h and WIFEXITED, WEXITSTATUS macros */
-#if HAVE_UNISTD_H - 0
+#if EXV_HAVE_UNISTD_H - 0
#include "unistd.h" /* for F_OK and R_OK */
-#endif /* HAVE_UNISTD_H - 0 */
+#endif /* EXV_HAVE_UNISTD_H - 0 */
-#if !(HAVE_UNISTD_H - 0)
+#if !(EXV_HAVE_UNISTD_H - 0)
#ifndef F_OK
#define F_OK 0
#endif /* !defined F_OK */
#ifndef R_OK
#define R_OK 4
#endif /* !defined R_OK */
-#endif /* !(HAVE_UNISTD_H - 0) */
+#endif /* !(EXV_HAVE_UNISTD_H - 0) */
/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
diff --git a/src/types.hpp b/src/types.hpp
index bf8ec5c..3ffe118 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -45,7 +45,7 @@
#include <utility>
#include <sstream>
#include <cstdio>
-#ifdef HAVE_STDINT_H
+#ifdef EXV_HAVE_STDINT_H
# include <stdint.h>
#endif
diff --git a/src/utils.cpp b/src/utils.cpp
index a8af1a7..741cdae 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -45,7 +45,7 @@ EXIV2_RCSID("@(#) $Id$");
# include "getopt_win32.h"
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
-#ifdef HAVE_UNISTD_H
+#ifdef EXV_HAVE_UNISTD_H
# include <unistd.h> // for getopt(), stat()
#endif
#include <errno.h>
@@ -100,15 +100,15 @@ int Getopt::getopt(int argc, char* const argv[], const std::string& optstring)
if (path == "") return ".";
// Strip trailing slashes
std::string p = path;
- while (p.length() > 1 && p[p.length()-1] == SEPERATOR_CHR) {
+ while (p.length() > 1 && p[p.length()-1] == EXV_SEPERATOR_CHR) {
p = p.substr(0, p.length()-1);
}
- if (p == SEPERATOR_STR) return SEPERATOR_STR;
- std::string::size_type idx = p.rfind(SEPERATOR_CHR);
+ if (p == EXV_SEPERATOR_STR) return EXV_SEPERATOR_STR;
+ std::string::size_type idx = p.rfind(EXV_SEPERATOR_CHR);
if (idx == std::string::npos) return ".";
- if (idx == 0) return SEPERATOR_STR;
+ if (idx == 0) return EXV_SEPERATOR_STR;
p = p.substr(0, idx);
- while (p.length() > 1 && p[p.length()-1] == SEPERATOR_CHR) {
+ while (p.length() > 1 && p[p.length()-1] == EXV_SEPERATOR_CHR) {
p = p.substr(0, p.length()-1);
}
return p;
@@ -119,11 +119,11 @@ int Getopt::getopt(int argc, char* const argv[], const std::string& optstring)
if (path == "") return ".";
// Strip trailing slashes
std::string p = path;
- while (p.length() > 1 && p[p.length()-1] == SEPERATOR_CHR) {
+ while (p.length() > 1 && p[p.length()-1] == EXV_SEPERATOR_CHR) {
p = p.substr(0, p.length()-1);
}
- if (p == SEPERATOR_STR) return p;
- std::string::size_type idx = p.rfind(SEPERATOR_CHR);
+ if (p == EXV_SEPERATOR_STR) return p;
+ std::string::size_type idx = p.rfind(EXV_SEPERATOR_CHR);
if (idx != std::string::npos) p = p.substr(idx+1);
if (delsuffix) p = p.substr(0, p.length() - suffix(p).length());
return p;
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list