Blame SOURCES/dcraw-9.21-lcms2-error-reporting.patch
|
 |
674369 |
From affda75b7d868350d7ef9e7a67367826fb3e950d Mon Sep 17 00:00:00 2001
|
|
 |
674369 |
From: Nils Philippsen <nils@redhat.com>
|
|
 |
674369 |
Date: Wed, 4 Sep 2013 17:13:49 +0200
|
|
 |
674369 |
Subject: [PATCH] Report errors with LCMS version 2.x.
|
|
 |
674369 |
|
|
 |
674369 |
---
|
|
 |
674369 |
dcraw.c | 8 ++++++++
|
|
 |
674369 |
1 file changed, 8 insertions(+)
|
|
 |
674369 |
|
|
 |
674369 |
diff --git a/dcraw.c b/dcraw.c
|
|
 |
674369 |
index 6f8dbbe..d80db64 100644
|
|
 |
674369 |
--- a/dcraw.c
|
|
 |
674369 |
+++ b/dcraw.c
|
|
 |
674369 |
@@ -8902,6 +8902,13 @@ notraw:
|
|
 |
674369 |
}
|
|
 |
674369 |
|
|
 |
674369 |
#ifndef NO_LCMS
|
|
 |
674369 |
+static void lcms2_error_show_handler (cmsContext ContextID,
|
|
 |
674369 |
+ cmsUInt32Number ErrorCode,
|
|
 |
674369 |
+ const char *Text)
|
|
 |
674369 |
+{
|
|
 |
674369 |
+ fprintf (stderr, "lcms2: Error #%d; %s\n", ErrorCode, Text);
|
|
 |
674369 |
+}
|
|
 |
674369 |
+
|
|
 |
674369 |
void CLASS apply_profile (const char *input, const char *output)
|
|
 |
674369 |
{
|
|
 |
674369 |
char *prof;
|
|
 |
674369 |
@@ -8910,6 +8917,7 @@ void CLASS apply_profile (const char *input, const char *output)
|
|
 |
674369 |
FILE *fp;
|
|
 |
674369 |
unsigned size;
|
|
 |
674369 |
|
|
 |
674369 |
+ cmsSetLogErrorHandler (lcms2_error_show_handler);
|
|
 |
674369 |
if (strcmp (input, "embed"))
|
|
 |
674369 |
hInProfile = cmsOpenProfileFromFile (input, "r");
|
|
 |
674369 |
else if (profile_length) {
|
|
 |
674369 |
--
|
|
 |
674369 |
1.9.0
|
|
 |
674369 |
|