[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:46:26 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=30f2797
The following commit has been merged in the master branch:
commit 30f279787f1262d1f4eab03f77b59bc97a6ccf59
Author: Robin Mills <robin at clanmills.com>
Date: Thu Apr 21 11:26:29 2016 +0000
#1169 Fix submitted.
---
include/exiv2/exv_msvc.h | 5 +++--
samples/exifprint.cpp | 24 ++++++++++++++++++------
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/include/exiv2/exv_msvc.h b/include/exiv2/exv_msvc.h
index aaec995..9b96cc2 100644
--- a/include/exiv2/exv_msvc.h
+++ b/include/exiv2/exv_msvc.h
@@ -85,6 +85,7 @@
/* Define Windows unicode path support. */
/* #undef EXV_UNICODE_PATH */
+#define EXV_UNICODE_PATH 1
/* Define to `const' or to empty, depending on the second argument of `iconv'. */
@@ -116,7 +117,7 @@
#define EXV_HAVE_REALLOC 1
/* Define to 1 if stdbool.h conforms to C99. */
-/* #undef EXV_HAVE_STDBOOL_H */
+#define EXV_HAVE_STDBOOL_H 1
/* Define to 1 if you have the <stdint.h> header file. */
/* #undef EXV_HAVE_STDINT_H */
@@ -164,7 +165,7 @@
/* #undef EXV_HAVE_UNISTD_H */
/* Define to 1 if you have the `vprintf' function. */
-#define EXV_HAVE_VPRINTF 1
+/* #undef EXV_HAVE_VPRINTF */
/* Define to 1 if you have the <wchar.h> header file. */
/* #undef EXV_HAVE_WCHAR_H */
diff --git a/samples/exifprint.cpp b/samples/exifprint.cpp
index bf8828d..59d968a 100644
--- a/samples/exifprint.cpp
+++ b/samples/exifprint.cpp
@@ -8,28 +8,40 @@
#include <iomanip>
#include <cassert>
-int main(int argc, char* const argv[])
+#ifdef EXV_UNICODE_PATH
+#define TCHAR wchar_t
+#define _tstrcmp wcscmp
+#define _T(s) L ##s
+#else
+#define TCHAR char
+#define _tstrcmp strcmp
+#define _T(s) s
+#define wcout cout
+#define wmain main
+#endif
+int wmain(int argc, TCHAR* const argv[])
try {
+ TCHAR* prog = argv[0];
+ TCHAR* file = argv[1];
if (argc != 2) {
- std::cout << "Usage: " << argv[0] << " file
";
+ std::wcout << _T("Usage: ") << prog << _T(" file") << std::endl;
return 1;
}
- if ( strcmp(argv[1],"--version") == 0 ) {
+ if ( _tstrcmp(file,_T("--version")) == 0 ) {
exv_grep_keys_t keys;
Exiv2::dumpLibraryInfo(std::cout,keys);
return 0;
}
- Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(argv[1]);
+ Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(file);
assert(image.get() != 0);
image->readMetadata();
Exiv2::ExifData &exifData = image->exifData();
if (exifData.empty()) {
- std::string error(argv[1]);
- error += ": No Exif data found in the file";
+ std::string error("No Exif data found in the file");
throw Exiv2::Error(1, error);
}
Exiv2::ExifData::const_iterator end = exifData.end();
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list