File: 0002-Only-warn-once-about-the-missing-ICC-support.patch

package info (click to toggle)
mupdf 1.25.1%2Bds1-6
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 21,620 kB
  • sloc: ansic: 270,929; python: 20,709; java: 6,916; javascript: 1,865; makefile: 1,130; xml: 550; sh: 430; cpp: 325; cs: 313; awk: 10; sed: 7; lisp: 3
file content (26 lines) | stat: -rw-r--r-- 689 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Celejar <celejar@gmail.com>
Date: Fri, 28 Feb 2020 05:30:01 +0000
Subject: Only warn once about the missing ICC support

---
 source/fitz/colorspace.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c
index 14fd231..1492dee 100644
--- a/source/fitz/colorspace.c
+++ b/source/fitz/colorspace.c
@@ -109,7 +109,12 @@ void fz_new_colorspace_context(fz_context *ctx)
 
 void fz_enable_icc(fz_context *ctx)
 {
-	fz_warn(ctx, "ICC support is not available");
+	static int warned = 0;
+
+	if (!warned) {
+		fz_warn(ctx, "ICC support is not available");
+		warned = 1;
+	}
 }
 
 void fz_disable_icc(fz_context *ctx)