cut out noise in junit stacktrace for output, but keep them in log
[LibreOffice.git] / icc / SampleICC-1.3.2.patch
blobe150a95cf19603ce2fe266705f2f65c18587ae38
1 *** misc/SampleICC-1.3.2/configure Mon Aug 20 22:10:59 2007
2 --- misc/build/SampleICC-1.3.2/configure Fri Jan 25 14:23:09 2008
3 ***************
4 *** 19991,19997 ****
8 ! ac_config_files="$ac_config_files Makefile IccProfLib/Makefile Tools/Makefile Tools/CmdLine/Makefile Tools/CmdLine/IccApplyNamedCmm/Makefile Tools/CmdLine/IccApplyProfiles/Makefile Tools/CmdLine/IccDumpProfile/Makefile Tools/CmdLine/IccProfLibTest/Makefile Tools/CmdLine/IccStripUnknownTags/Makefile Tools/CmdLine/IccV4ToMPE/Makefile Contrib/Makefile Contrib/CmdLine/Makefile Contrib/CmdLine/create_CLUT_profile/Makefile Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile Contrib/CmdLine/create_display_profile/Makefile Contrib/ICC_utils/Makefile Contrib/Mac_OS_X/Makefile Contrib/Mac_OS_X/create_probe/Makefile Contrib/Mac_OS_X/extract_probe_data/Makefile Contrib/examples/Makefile Contrib/examples/RSR/Makefile Contrib/tests/Makefile Contrib/tests/flatten_AToB_tag/Makefile Contrib/tests/generate_device_codes/Makefile Contrib/tests/reconstruct_measurements/Makefile Contrib/tests/round_trip_PCS_LAB/Makefile"
9 cat >confcache <<\_ACEOF
10 # This file is a shell script that caches the results of configure
11 # tests run on this system so they can be shared between configure
12 --- 19991,19997 ----
16 ! ac_config_files="$ac_config_files Makefile IccProfLib/Makefile Tools/Makefile Tools/CmdLine/Makefile Tools/CmdLine/IccDumpProfile/Makefile Tools/CmdLine/IccProfLibTest/Makefile Tools/CmdLine/IccStripUnknownTags/Makefile Tools/CmdLine/IccV4ToMPE/Makefile Contrib/Makefile Contrib/CmdLine/Makefile Contrib/ICC_utils/Makefile Contrib/CmdLine/create_sRGB_profile/Makefile"
17 cat >confcache <<\_ACEOF
18 # This file is a shell script that caches the results of configure
19 # tests run on this system so they can be shared between configure
20 ***************
21 *** 20571,20578 ****
22 "IccProfLib/Makefile" ) CONFIG_FILES="$CONFIG_FILES IccProfLib/Makefile" ;;
23 "Tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/Makefile" ;;
24 "Tools/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/Makefile" ;;
25 - "Tools/CmdLine/IccApplyNamedCmm/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyNamedCmm/Makefile" ;;
26 - "Tools/CmdLine/IccApplyProfiles/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyProfiles/Makefile" ;;
27 "Tools/CmdLine/IccDumpProfile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccDumpProfile/Makefile" ;;
28 "Tools/CmdLine/IccProfLibTest/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccProfLibTest/Makefile" ;;
29 "Tools/CmdLine/IccStripUnknownTags/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccStripUnknownTags/Makefile" ;;
30 --- 20571,20576 ----
31 ***************
32 *** 20579,20598 ****
33 "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
34 "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
35 "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
36 ! "Contrib/CmdLine/create_CLUT_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile/Makefile" ;;
37 ! "Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ;;
38 ! "Contrib/CmdLine/create_display_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_display_profile/Makefile" ;;
39 "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
40 - "Contrib/Mac_OS_X/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/Makefile" ;;
41 - "Contrib/Mac_OS_X/create_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/create_probe/Makefile" ;;
42 - "Contrib/Mac_OS_X/extract_probe_data/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/extract_probe_data/Makefile" ;;
43 - "Contrib/examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/Makefile" ;;
44 - "Contrib/examples/RSR/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/RSR/Makefile" ;;
45 - "Contrib/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/Makefile" ;;
46 - "Contrib/tests/flatten_AToB_tag/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/flatten_AToB_tag/Makefile" ;;
47 - "Contrib/tests/generate_device_codes/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/generate_device_codes/Makefile" ;;
48 - "Contrib/tests/reconstruct_measurements/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/reconstruct_measurements/Makefile" ;;
49 - "Contrib/tests/round_trip_PCS_LAB/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/round_trip_PCS_LAB/Makefile" ;;
50 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
51 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
52 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
53 --- 20577,20584 ----
54 "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
55 "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
56 "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
57 ! "Contrib/CmdLine/create_sRGB_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_sRGB_profile/Makefile" ;;
58 "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
59 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
60 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
61 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
62 *** misc/SampleICC-1.3.2/Contrib/Makefile.in Mon Aug 20 22:10:37 2007
63 --- misc/build/SampleICC-1.3.2/Contrib/Makefile.in Fri Jan 25 14:23:09 2008
64 ***************
65 *** 103,120 ****
67 SUBDIRS = \
68 ICC_utils \
69 ! CmdLine \
70 ! examples \
71 ! Mac_OS_X \
72 ! tests
75 DIST_SUBDIRS = \
76 ICC_utils \
77 ! CmdLine \
78 ! examples \
79 ! Mac_OS_X \
80 ! tests
82 subdir = Contrib
83 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
84 --- 103,114 ----
86 SUBDIRS = \
87 ICC_utils \
88 ! CmdLine
91 DIST_SUBDIRS = \
92 ICC_utils \
93 ! CmdLine
95 subdir = Contrib
96 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
97 *** misc/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in Mon Aug 20 22:10:34 2007
98 --- misc/build/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in Fri Jan 25 14:23:09 2008
99 ***************
100 *** 102,116 ****
101 install_sh = @install_sh@
103 SUBDIRS = \
104 ! create_CLUT_profile \
105 ! create_CLUT_profile_from_probe \
106 ! create_display_profile
109 DIST_SUBDIRS = \
110 ! create_CLUT_profile \
111 ! create_CLUT_profile_from_probe \
112 ! create_display_profile
114 subdir = Contrib/CmdLine
115 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
116 --- 102,112 ----
117 install_sh = @install_sh@
119 SUBDIRS = \
120 ! create_sRGB_profile
123 DIST_SUBDIRS = \
124 ! create_sRGB_profile
126 subdir = Contrib/CmdLine
127 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
128 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in Mon Aug 20 22:10:35 2007
129 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in Fri Jan 25 14:23:09 2008
130 ***************
131 *** 133,139 ****
132 CONFIG_CLEAN_FILES =
133 LTLIBRARIES = $(lib_LTLIBRARIES)
135 ! libICC_utils_la_LIBADD =
136 am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
137 ICC_tool_exception.lo Vetters.lo
138 libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
139 --- 133,139 ----
140 CONFIG_CLEAN_FILES =
141 LTLIBRARIES = $(lib_LTLIBRARIES)
143 ! libICC_utils_la_LIBADD = $(LDADD)
144 am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
145 ICC_tool_exception.lo Vetters.lo
146 libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
147 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h Mon Aug 20 22:04:53 2007
148 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h Fri Jan 25 14:23:09 2008
149 ***************
150 *** 130,136 ****
152 // use one of these to force desired sort order in assoc. containers of DPX
153 bool
154 ! DPX::operator<(const DPX& p) const
156 return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
158 --- 130,136 ----
160 // use one of these to force desired sort order in assoc. containers of DPX
161 bool
162 ! operator<(const DPX& p) const
164 return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
166 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp Mon Aug 20 22:04:54 2007
167 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp Fri Jan 25 14:57:06 2008
168 ***************
169 *** 1,322 ****
170 ! /*
171 ! File: Vetters.cpp
173 ! Contains: Utility functions to handle common argument-checking tasks, in a
174 ! way that hides platform-specific details from higher-level code.
176 ! Version: V1
178 ! Copyright: © see below
179 ! */
181 ! /*
182 ! * The ICC Software License, Version 0.1
185 ! * Copyright (c) 2003-2006 The International Color Consortium. All rights
186 ! * reserved.
188 ! * Redistribution and use in source and binary forms, with or without
189 ! * modification, are permitted provided that the following conditions
190 ! * are met:
192 ! * 1. Redistributions of source code must retain the above copyright
193 ! * notice, this list of conditions and the following disclaimer.
195 ! * 2. Redistributions in binary form must reproduce the above copyright
196 ! * notice, this list of conditions and the following disclaimer in
197 ! * the documentation and/or other materials provided with the
198 ! * distribution.
200 ! * 3. The end-user documentation included with the redistribution,
201 ! * if any, must include the following acknowledgment:
202 ! * "This product includes software developed by the
203 ! * The International Color Consortium (www.color.org)"
204 ! * Alternately, this acknowledgment may appear in the software itself,
205 ! * if and wherever such third-party acknowledgments normally appear.
207 ! * 4. The names "ICC" and "The International Color Consortium" must
208 ! * not be used to imply that the ICC organization endorses or
209 ! * promotes products derived from this software without prior
210 ! * written permission. For written permission, please see
211 ! * <http://www.color.org/>.
214 ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
215 ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
216 ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
217 ! * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
218 ! * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
219 ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
220 ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
221 ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
222 ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
223 ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
224 ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
225 ! * SUCH DAMAGE.
226 ! * ====================================================================
228 ! * This software consists of voluntary contributions made by many
229 ! * individuals on behalf of the The International Color Consortium.
232 ! * Membership in the ICC is encouraged when this software is used for
233 ! * commercial purposes.
235 ! *
236 ! * For more information on The International Color Consortium, please
237 ! * see <http://www.color.org/>.
238 ! *
239 ! *
240 ! */
242 ! //////////////////////////////////////////////////////////////////////
243 ! // HISTORY:
244 ! //
245 ! // -Initial implementation by Joseph Goldstone sumer 2007
246 ! //
247 ! //////////////////////////////////////////////////////////////////////
249 ! #include "Vetters.h"
251 ! #include <sstream>
252 ! using namespace std;
254 ! #ifndef WIN32
255 ! #include <sys/errno.h>
256 ! #else
257 ! #include <string.h>
258 ! int strerror_r(int errnum, char *str, int strsize)
260 ! const char *errstr = strerror(errnum);
262 ! if (errstr) {
263 ! strncpy(str, errstr, strsize);
264 ! return 0;
267 ! return -1;
269 ! #define stat _stat
270 ! #endif
272 ! #include "ICC_tool_exception.h"
274 ! const char*
275 ! path_tail(const char* const s)
277 ! const char* tail = strdup(s);
278 ! const char* last_slash = strrchr(tail, '/');
279 ! if (last_slash != NULL)
280 ! tail = last_slash + 1;
281 ! return tail;
284 ! void
285 ! vet_as_int(const char* const s, const string& name,
286 ! const string& description)
288 ! istringstream ss(s);
289 ! int i;
290 ! ss >> i;
291 ! if (ss.fail())
293 ! ostringstream oss;
294 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
295 ! << " an integer. It should be an integer representing "
296 ! << description << ".";
297 ! throw ICC_tool_exception(oss.str());
301 ! void
302 ! vet_as_float(const char* const s, const string& name,
303 ! const string& description)
305 ! istringstream ss(s);
306 ! float i;
307 ! ss >> i;
308 ! if (ss.fail())
310 ! ostringstream oss;
311 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
312 ! << " a floating-point number. It should be a floating-point number"
313 ! << " representing " << description << ".";
314 ! throw ICC_tool_exception(oss.str());
318 ! #define STRERROR_BUF_SIZE 256
319 ! off_t
320 ! get_size(const char* const s)
321 ! {
322 ! struct stat sb;
323 ! int stat_returned = stat(s, &sb);
324 ! if (stat_returned < 0)
326 ! int stat_errno = errno;
327 ! char strerror_buf[STRERROR_BUF_SIZE];
328 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
329 ! ostringstream oss;
330 ! oss << "Could not access information for file `" << s << "': "
331 ! << strerror_buf;
332 ! throw ICC_tool_exception(oss.str());
334 ! return sb.st_size;
337 ! bool
338 ! check_mode(const char* const s, mode_t mode)
339 ! {
340 ! struct stat sb;
341 ! int stat_returned = stat(s, &sb);
342 ! if (stat_returned < 0)
344 ! int stat_errno = errno;
345 ! char strerror_buf[STRERROR_BUF_SIZE];
346 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
347 ! ostringstream oss;
348 ! oss << "Could not access information for file `" << s << "': "
349 ! << strerror_buf;
350 ! throw ICC_tool_exception(oss.str());
352 ! return (sb.st_mode & mode) != 0;
355 ! bool
356 ! is_existent_file_pathname(const char* const s)
358 ! struct stat sb;
359 ! return stat(s, &sb) == 0;
362 ! bool
363 ! is_plain_file_pathname(const char* const s)
365 ! return check_mode(s, S_IFREG);
368 ! bool
369 ! is_directory(const char* const s)
371 ! return check_mode(s, S_IFDIR);
374 ! const char* const
375 ! containing_directory(const char* const s)
377 ! if (strlen(s) == 0)
378 ! throw ICC_tool_exception("name of directory passed to containing_directory"
379 ! " function was zero-length.");
380 ! char* tmp = strdup(s);
381 ! // lop off any trailing seperator
382 ! if (tmp[strlen(tmp) - 1] == '/')
383 ! tmp[strlen(tmp) - 1] = 0;
384 ! if (strlen(tmp) == 0)
385 ! throw ICC_tool_exception("root directory (which has no containing"
386 ! " directory) passed to containing_directory"
387 ! " function");
388 ! char* idx = strrchr(tmp, '/');
389 ! if (idx != NULL)
391 ! *idx = 0;
392 ! return tmp;
394 ! char* current_directory = getenv("PWD");
395 ! if (current_directory == NULL)
396 ! throw ICC_tool_exception("pathname passed to containing_directory has no"
397 ! " embedded seperator, and there is no value for"
398 ! " PWD defined in the environment");
399 ! return strdup(current_directory);
402 ! bool
403 ! is_readable_pathname(const char* const s)
405 ! return check_mode(s, S_IRUSR)
406 ! || check_mode(s, S_IRGRP)
407 ! || check_mode(s, S_IROTH);
410 ! bool
411 ! is_writable_pathname(const char* const s)
413 ! return check_mode(s, S_IWUSR)
414 ! || check_mode(s, S_IWGRP)
415 ! || check_mode(s, S_IWOTH);
418 ! bool
419 ! is_pathname_of_empty_file(const char* const s)
421 ! return get_size(s) > 0;
424 ! void
425 ! vet_input_file_pathname(const char* const s, const string& name,
426 ! const string& description)
428 ! if (! is_plain_file_pathname(s))
430 ! ostringstream oss;
431 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
432 ! << " of a plain file (i.e. it is the pathname of a directory, or of a"
433 ! << " symbolic link, or of some other sort of special file.) It should be"
434 ! << " " << description << ".";
435 ! throw ICC_tool_exception(oss.str());
437 ! if (! is_readable_pathname(s))
439 ! ostringstream oss;
440 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
441 ! << " of a readable file (i.e. you do not have permission to read that"
442 ! << " file, or you do not have permission to read some directory"
443 ! << " containing that file.";
444 ! throw ICC_tool_exception(oss.str());
446 ! if (! is_pathname_of_empty_file(s))
448 ! ostringstream oss;
449 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
450 ! << " of an existing readable file, but that file is of zero length."
451 ! << " The argument should be " << description << ".";
452 ! throw ICC_tool_exception(oss.str());
456 ! void
457 ! vet_output_file_pathname(const char* const s, const string& name,
458 ! const string& description,
459 ! bool silent_overwrite_OK)
461 ! const char* const container = containing_directory(s);
462 ! if (! is_writable_pathname(container))
464 ! ostringstream oss;
465 ! oss << "The " << name << " argument given, `" << s << "', has a directory"
466 ! << " component which is not writable."
467 ! << " The argument should be " << description << ".";
468 ! throw ICC_tool_exception(oss.str());
470 ! if (is_existent_file_pathname(s))
472 ! if (is_plain_file_pathname(s))
473 ! if (is_writable_pathname(s))
475 ! if (! silent_overwrite_OK)
477 ! ostringstream oss;
478 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
479 ! << " file."
480 ! << " The argument should be " << description << ".";
481 ! throw ICC_tool_exception(oss.str());
483 ! } else {
484 ! ostringstream oss;
485 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
486 ! << " file which is not writable."
487 ! << " The argument should be " << description << ".";
488 ! throw ICC_tool_exception(oss.str());
492 --- 1,325 ----
493 ! /*
494 ! File: Vetters.cpp
496 ! Contains: Utility functions to handle common argument-checking tasks, in a
497 ! way that hides platform-specific details from higher-level code.
499 ! Version: V1
501 ! Copyright: © see below
502 ! */
504 ! /*
505 ! * The ICC Software License, Version 0.1
508 ! * Copyright (c) 2003-2006 The International Color Consortium. All rights
509 ! * reserved.
511 ! * Redistribution and use in source and binary forms, with or without
512 ! * modification, are permitted provided that the following conditions
513 ! * are met:
515 ! * 1. Redistributions of source code must retain the above copyright
516 ! * notice, this list of conditions and the following disclaimer.
518 ! * 2. Redistributions in binary form must reproduce the above copyright
519 ! * notice, this list of conditions and the following disclaimer in
520 ! * the documentation and/or other materials provided with the
521 ! * distribution.
523 ! * 3. The end-user documentation included with the redistribution,
524 ! * if any, must include the following acknowledgment:
525 ! * "This product includes software developed by the
526 ! * The International Color Consortium (www.color.org)"
527 ! * Alternately, this acknowledgment may appear in the software itself,
528 ! * if and wherever such third-party acknowledgments normally appear.
530 ! * 4. The names "ICC" and "The International Color Consortium" must
531 ! * not be used to imply that the ICC organization endorses or
532 ! * promotes products derived from this software without prior
533 ! * written permission. For written permission, please see
534 ! * <http://www.color.org/>.
537 ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
538 ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
539 ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
540 ! * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
541 ! * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
542 ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
543 ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
544 ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
545 ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
546 ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
547 ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
548 ! * SUCH DAMAGE.
549 ! * ====================================================================
551 ! * This software consists of voluntary contributions made by many
552 ! * individuals on behalf of the The International Color Consortium.
555 ! * Membership in the ICC is encouraged when this software is used for
556 ! * commercial purposes.
558 ! *
559 ! * For more information on The International Color Consortium, please
560 ! * see <http://www.color.org/>.
561 ! *
562 ! *
563 ! */
565 ! //////////////////////////////////////////////////////////////////////
566 ! // HISTORY:
567 ! //
568 ! // -Initial implementation by Joseph Goldstone sumer 2007
569 ! //
570 ! //////////////////////////////////////////////////////////////////////
572 ! #include "Vetters.h"
574 ! #include <sstream>
575 ! using namespace std;
577 ! #ifndef WIN32
578 ! #include <errno.h>
579 ! #else
580 ! #include <string.h>
581 ! #define stat _stat
582 ! #endif
584 ! #if defined WIN32 || defined sun
585 ! int strerror_r(int errnum, char *str, int strsize)
587 ! const char *errstr = strerror(errnum);
589 ! if (errstr) {
590 ! strncpy(str, errstr, strsize);
591 ! return 0;
594 ! return -1;
596 ! #endif
598 ! #include "ICC_tool_exception.h"
600 ! const char*
601 ! path_tail(const char* const s)
603 ! const char* tail = strdup(s);
604 ! const char* last_slash = strrchr(tail, '/');
605 ! if (last_slash != NULL)
606 ! tail = last_slash + 1;
607 ! return tail;
610 ! void
611 ! vet_as_int(const char* const s, const string& name,
612 ! const string& description)
614 ! istringstream ss(s);
615 ! int i;
616 ! ss >> i;
617 ! if (ss.fail())
619 ! ostringstream oss;
620 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
621 ! << " an integer. It should be an integer representing "
622 ! << description << ".";
623 ! throw ICC_tool_exception(oss.str());
627 ! void
628 ! vet_as_float(const char* const s, const string& name,
629 ! const string& description)
631 ! istringstream ss(s);
632 ! float i;
633 ! ss >> i;
634 ! if (ss.fail())
636 ! ostringstream oss;
637 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
638 ! << " a floating-point number. It should be a floating-point number"
639 ! << " representing " << description << ".";
640 ! throw ICC_tool_exception(oss.str());
644 ! #define STRERROR_BUF_SIZE 256
645 ! off_t
646 ! get_size(const char* const s)
647 ! {
648 ! struct stat sb;
649 ! int stat_returned = stat(s, &sb);
650 ! if (stat_returned < 0)
652 ! int stat_errno = errno;
653 ! char strerror_buf[STRERROR_BUF_SIZE];
654 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
655 ! ostringstream oss;
656 ! oss << "Could not access information for file `" << s << "': "
657 ! << strerror_buf;
658 ! throw ICC_tool_exception(oss.str());
660 ! return sb.st_size;
663 ! bool
664 ! check_mode(const char* const s, mode_t mode)
665 ! {
666 ! struct stat sb;
667 ! int stat_returned = stat(s, &sb);
668 ! if (stat_returned < 0)
670 ! int stat_errno = errno;
671 ! char strerror_buf[STRERROR_BUF_SIZE];
672 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
673 ! ostringstream oss;
674 ! oss << "Could not access information for file `" << s << "': "
675 ! << strerror_buf;
676 ! throw ICC_tool_exception(oss.str());
678 ! return (sb.st_mode & mode) != 0;
681 ! bool
682 ! is_existent_file_pathname(const char* const s)
684 ! struct stat sb;
685 ! return stat(s, &sb) == 0;
688 ! bool
689 ! is_plain_file_pathname(const char* const s)
691 ! return check_mode(s, S_IFREG);
694 ! bool
695 ! is_directory(const char* const s)
697 ! return check_mode(s, S_IFDIR);
700 ! const char* const
701 ! containing_directory(const char* const s)
703 ! if (strlen(s) == 0)
704 ! throw ICC_tool_exception("name of directory passed to containing_directory"
705 ! " function was zero-length.");
706 ! char* tmp = strdup(s);
707 ! // lop off any trailing seperator
708 ! if (tmp[strlen(tmp) - 1] == '/')
709 ! tmp[strlen(tmp) - 1] = 0;
710 ! if (strlen(tmp) == 0)
711 ! throw ICC_tool_exception("root directory (which has no containing"
712 ! " directory) passed to containing_directory"
713 ! " function");
714 ! char* idx = strrchr(tmp, '/');
715 ! if (idx != NULL)
717 ! *idx = 0;
718 ! return tmp;
720 ! char* current_directory = getenv("PWD");
721 ! if (current_directory == NULL)
722 ! throw ICC_tool_exception("pathname passed to containing_directory has no"
723 ! " embedded seperator, and there is no value for"
724 ! " PWD defined in the environment");
725 ! return strdup(current_directory);
728 ! bool
729 ! is_readable_pathname(const char* const s)
731 ! return check_mode(s, S_IRUSR)
732 ! || check_mode(s, S_IRGRP)
733 ! || check_mode(s, S_IROTH);
736 ! bool
737 ! is_writable_pathname(const char* const s)
739 ! return check_mode(s, S_IWUSR)
740 ! || check_mode(s, S_IWGRP)
741 ! || check_mode(s, S_IWOTH);
744 ! bool
745 ! is_pathname_of_empty_file(const char* const s)
747 ! return get_size(s) > 0;
750 ! void
751 ! vet_input_file_pathname(const char* const s, const string& name,
752 ! const string& description)
754 ! if (! is_plain_file_pathname(s))
756 ! ostringstream oss;
757 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
758 ! << " of a plain file (i.e. it is the pathname of a directory, or of a"
759 ! << " symbolic link, or of some other sort of special file.) It should be"
760 ! << " " << description << ".";
761 ! throw ICC_tool_exception(oss.str());
763 ! if (! is_readable_pathname(s))
765 ! ostringstream oss;
766 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
767 ! << " of a readable file (i.e. you do not have permission to read that"
768 ! << " file, or you do not have permission to read some directory"
769 ! << " containing that file.";
770 ! throw ICC_tool_exception(oss.str());
772 ! if (! is_pathname_of_empty_file(s))
774 ! ostringstream oss;
775 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
776 ! << " of an existing readable file, but that file is of zero length."
777 ! << " The argument should be " << description << ".";
778 ! throw ICC_tool_exception(oss.str());
782 ! void
783 ! vet_output_file_pathname(const char* const s, const string& name,
784 ! const string& description,
785 ! bool silent_overwrite_OK)
787 ! const char* const container = containing_directory(s);
788 ! if (! is_writable_pathname(container))
790 ! ostringstream oss;
791 ! oss << "The " << name << " argument given, `" << s << "', has a directory"
792 ! << " component which is not writable."
793 ! << " The argument should be " << description << ".";
794 ! throw ICC_tool_exception(oss.str());
796 ! if (is_existent_file_pathname(s))
798 ! if (is_plain_file_pathname(s))
799 ! if (is_writable_pathname(s))
801 ! if (! silent_overwrite_OK)
803 ! ostringstream oss;
804 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
805 ! << " file."
806 ! << " The argument should be " << description << ".";
807 ! throw ICC_tool_exception(oss.str());
809 ! } else {
810 ! ostringstream oss;
811 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
812 ! << " file which is not writable."
813 ! << " The argument should be " << description << ".";
814 ! throw ICC_tool_exception(oss.str());
818 *** misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp Mon Aug 20 22:05:00 2007
819 --- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp Fri Jan 25 14:23:09 2008
820 ***************
821 *** 78,84 ****
822 #include "IccIO.h"
823 #include "IccUtil.h"
824 #include <stdlib.h>
825 ! #include <memory.h>
826 #include <string.h>
828 #ifndef __max
829 --- 78,84 ----
830 #include "IccIO.h"
831 #include "IccUtil.h"
832 #include <stdlib.h>
833 ! #include <memory>
834 #include <string.h>
836 #ifndef __max
837 *** misc/SampleICC-1.3.2/IccProfLib/IccIO.h Mon Aug 20 22:05:00 2007
838 --- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.h Fri Jan 25 14:23:09 2008
839 ***************
840 *** 79,84 ****
841 --- 79,85 ----
842 #define _ICCIO_H
844 #include "IccDefs.h"
845 + #include "memory"
846 #include "stdio.h"
848 #ifdef USESAMPLEICCNAMESPACE
849 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Mon Aug 20 22:05:00 2007
850 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Fri Jan 25 14:23:09 2008
851 ***************
852 *** 136,152 ****
853 icChar sigBuf[30];
855 if (GetBAcsSig())
856 ! sDescription += "ELEM_bACS\r\n";
857 else
858 ! sDescription += "ELEM_eACS\r\n";
860 icGetSig(sigBuf, m_signature);
861 sDescription += " Signature = ";
862 sDescription += sigBuf;
863 ! sDescription += "\r\n";
865 if (m_pData) {
866 ! sDescription += "\r\nData Follows:\r\n";
868 icMemDump(sDescription, m_pData, m_nDataSize);
870 --- 136,152 ----
871 icChar sigBuf[30];
873 if (GetBAcsSig())
874 ! sDescription += "ELEM_bACS\n";
875 else
876 ! sDescription += "ELEM_eACS\n";
878 icGetSig(sigBuf, m_signature);
879 sDescription += " Signature = ";
880 sDescription += sigBuf;
881 ! sDescription += "\n";
883 if (m_pData) {
884 ! sDescription += "\nData Follows:\n";
886 icMemDump(sDescription, m_pData, m_nDataSize);
888 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Mon Aug 20 22:05:00 2007
889 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Fri Jan 25 14:23:09 2008
890 ***************
891 *** 218,249 ****
892 sprintf(buf, "%.8f", m_endPoint);
893 sDescription += buf;
895 ! sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
896 sDescription += buf;
898 switch(m_nFunctionType) {
899 case 0x0000:
900 if (m_params[1]==0.0 && m_params[2]==0.0)
901 ! sprintf(buf, "Y = %.8f\r\n\r\n", m_params[3]);
902 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
903 ! sprintf(buf, "Y = X\r\n\r\n");
904 else if (m_params[0]==1.0 && m_params[2]==0.0)
905 ! sprintf(buf, "Y = %.8f * X + %.8f\r\n\r\n",
906 m_params[1], m_params[3]);
907 else
908 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\r\n\r\n",
909 m_params[1], m_params[2], m_params[0], m_params[3]);
910 sDescription += buf;
911 return;
913 case 0x0001:
914 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\r\n\r\n",
915 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
916 sDescription += buf;
917 return;
919 case 0x0002:
920 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\r\n\r\n",
921 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
922 sDescription += buf;
923 return;
924 --- 218,249 ----
925 sprintf(buf, "%.8f", m_endPoint);
926 sDescription += buf;
928 ! sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
929 sDescription += buf;
931 switch(m_nFunctionType) {
932 case 0x0000:
933 if (m_params[1]==0.0 && m_params[2]==0.0)
934 ! sprintf(buf, "Y = %.8f\n\n", m_params[3]);
935 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
936 ! sprintf(buf, "Y = X\n\n");
937 else if (m_params[0]==1.0 && m_params[2]==0.0)
938 ! sprintf(buf, "Y = %.8f * X + %.8f\n\n",
939 m_params[1], m_params[3]);
940 else
941 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n",
942 m_params[1], m_params[2], m_params[0], m_params[3]);
943 sDescription += buf;
944 return;
946 case 0x0001:
947 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\n\n",
948 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
949 sDescription += buf;
950 return;
952 case 0x0002:
953 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
954 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
955 sDescription += buf;
956 return;
957 ***************
958 *** 250,260 ****
960 default:
961 int i;
962 ! sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
963 sDescription += buf;
965 for (i=0; i<m_nParameters; i++) {
966 ! sprintf(buf, "Param[%d] = %.8lf\r\n\r\n", i, m_params[i]);
967 sDescription += buf;
970 --- 250,260 ----
972 default:
973 int i;
974 ! sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
975 sDescription += buf;
977 for (i=0; i<m_nParameters; i++) {
978 ! sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
979 sDescription += buf;
982 ***************
983 *** 496,502 ****
984 if (m_nReserved || m_nReserved2) {
985 sReport += icValidateWarningMsg;
986 sReport += sSigName;
987 ! sReport += " formula curve has non zero reserved data.\r\n";
988 rv = icValidateWarning;
991 --- 496,502 ----
992 if (m_nReserved || m_nReserved2) {
993 sReport += icValidateWarningMsg;
994 sReport += sSigName;
995 ! sReport += " formula curve has non zero reserved data.\n";
996 rv = icValidateWarning;
999 ***************
1000 *** 505,517 ****
1001 if (!m_params || m_nParameters<4) {
1002 sReport += icValidateCriticalErrorMsg;
1003 sReport += sSigName;
1004 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1005 rv = icValidateCriticalError;
1007 else if (m_nParameters > 4) {
1008 sReport += icValidateWarningMsg;
1009 sReport += sSigName;
1010 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1011 rv = icValidateWarning;
1013 break;
1014 --- 505,517 ----
1015 if (!m_params || m_nParameters<4) {
1016 sReport += icValidateCriticalErrorMsg;
1017 sReport += sSigName;
1018 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1019 rv = icValidateCriticalError;
1021 else if (m_nParameters > 4) {
1022 sReport += icValidateWarningMsg;
1023 sReport += sSigName;
1024 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1025 rv = icValidateWarning;
1027 break;
1028 ***************
1029 *** 520,532 ****
1030 if (!m_params || m_nParameters<5) {
1031 sReport += icValidateCriticalErrorMsg;
1032 sReport += sSigName;
1033 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1034 rv = icValidateCriticalError;
1036 else if (m_nParameters > 5) {
1037 sReport += icValidateWarningMsg;
1038 sReport += sSigName;
1039 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1040 rv = icValidateWarning;
1042 break;
1043 --- 520,532 ----
1044 if (!m_params || m_nParameters<5) {
1045 sReport += icValidateCriticalErrorMsg;
1046 sReport += sSigName;
1047 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1048 rv = icValidateCriticalError;
1050 else if (m_nParameters > 5) {
1051 sReport += icValidateWarningMsg;
1052 sReport += sSigName;
1053 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1054 rv = icValidateWarning;
1056 break;
1057 ***************
1058 *** 535,547 ****
1059 if (!m_params || m_nParameters<5) {
1060 sReport += icValidateCriticalErrorMsg;
1061 sReport += sSigName;
1062 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1063 rv = icValidateCriticalError;
1065 else if (m_nParameters > 5) {
1066 sReport += icValidateWarningMsg;
1067 sReport += sSigName;
1068 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1069 rv = icValidateWarning;
1071 break;
1072 --- 535,547 ----
1073 if (!m_params || m_nParameters<5) {
1074 sReport += icValidateCriticalErrorMsg;
1075 sReport += sSigName;
1076 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1077 rv = icValidateCriticalError;
1079 else if (m_nParameters > 5) {
1080 sReport += icValidateWarningMsg;
1081 sReport += sSigName;
1082 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1083 rv = icValidateWarning;
1085 break;
1086 ***************
1087 *** 551,557 ****
1088 icChar buf[128];
1089 sReport += icValidateCriticalErrorMsg;
1090 sReport += sSigName;
1091 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\r\n", m_nFunctionType);
1092 sReport += buf;
1093 rv = icValidateCriticalError;
1095 --- 551,557 ----
1096 icChar buf[128];
1097 sReport += icValidateCriticalErrorMsg;
1098 sReport += sSigName;
1099 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
1100 sReport += buf;
1101 rv = icValidateCriticalError;
1103 ***************
1104 *** 727,733 ****
1105 sDescription += buf;
1108 ! sprintf(buf, "]\r\n");
1109 sDescription += buf;
1111 else {
1112 --- 727,733 ----
1113 sDescription += buf;
1116 ! sprintf(buf, "]\n");
1117 sDescription += buf;
1119 else {
1120 ***************
1121 *** 744,752 ****
1122 sprintf(buf, "%.8f", m_endPoint);
1123 sDescription += buf;
1125 ! sprintf(buf, "]\r\n");
1126 sDescription += buf;
1127 ! sDescription += "IN OUT\r\n";
1129 icUInt32Number i;
1131 --- 744,752 ----
1132 sprintf(buf, "%.8f", m_endPoint);
1133 sDescription += buf;
1135 ! sprintf(buf, "]\n");
1136 sDescription += buf;
1137 ! sDescription += "IN OUT\n";
1139 icUInt32Number i;
1141 ***************
1142 *** 754,764 ****
1143 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1145 for (i=0; i<m_nCount; i++) {
1146 ! sprintf(buf, "%.8f %.8f\r\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1147 sDescription += buf;
1150 ! sDescription += "\r\n";
1154 --- 754,764 ----
1155 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1157 for (i=0; i<m_nCount; i++) {
1158 ! sprintf(buf, "%.8f %.8f\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1159 sDescription += buf;
1162 ! sDescription += "\n";
1166 ***************
1167 *** 910,916 ****
1168 if (m_nReserved) {
1169 sReport += icValidateWarningMsg;
1170 sReport += sSigName;
1171 ! sReport += " sampled curve has non zero reserved data.\r\n";
1172 rv = icValidateWarning;
1175 --- 910,916 ----
1176 if (m_nReserved) {
1177 sReport += icValidateWarningMsg;
1178 sReport += sSigName;
1179 ! sReport += " sampled curve has non zero reserved data.\n";
1180 rv = icValidateWarning;
1183 ***************
1184 *** 917,929 ****
1185 if (m_nCount<2) {
1186 sReport += icValidateCriticalErrorMsg;
1187 sReport += sSigName;
1188 ! sReport += " sampled curve has too few sample points.\r\n";
1189 rv = icValidateCriticalError;
1191 else if (m_endPoint-m_startPoint == 0.0) {
1192 sReport += icValidateWarningMsg;
1193 sReport += sSigName;
1194 ! sReport += " sampled curve has a range of zero.\r\n";
1195 rv = icMaxStatus(rv, icValidateWarning);
1198 --- 917,929 ----
1199 if (m_nCount<2) {
1200 sReport += icValidateCriticalErrorMsg;
1201 sReport += sSigName;
1202 ! sReport += " sampled curve has too few sample points.\n";
1203 rv = icValidateCriticalError;
1205 else if (m_endPoint-m_startPoint == 0.0) {
1206 sReport += icValidateWarningMsg;
1207 sReport += sSigName;
1208 ! sReport += " sampled curve has a range of zero.\n";
1209 rv = icMaxStatus(rv, icValidateWarning);
1212 ***************
1213 *** 1054,1060 ****
1215 CIccCurveSegmentList::iterator i;
1217 ! sDescription += "BEGIN_CURVE\r\n";
1218 for (i=m_list->begin(); i!=m_list->end(); i++) {
1219 (*i)->Describe(sDescription);
1221 --- 1054,1060 ----
1223 CIccCurveSegmentList::iterator i;
1225 ! sDescription += "BEGIN_CURVE\n";
1226 for (i=m_list->begin(); i!=m_list->end(); i++) {
1227 (*i)->Describe(sDescription);
1229 ***************
1230 *** 1342,1348 ****
1231 if (m_nReserved1 || m_nReserved2) {
1232 sReport += icValidateWarningMsg;
1233 sReport += sSigName;
1234 ! sReport += " Segmented curve has non zero reserved data.\r\n";
1235 rv = icValidateWarning;
1238 --- 1342,1348 ----
1239 if (m_nReserved1 || m_nReserved2) {
1240 sReport += icValidateWarningMsg;
1241 sReport += sSigName;
1242 ! sReport += " Segmented curve has non zero reserved data.\n";
1243 rv = icValidateWarning;
1246 ***************
1247 *** 1349,1355 ****
1248 if (m_list->size()==0) {
1249 sReport += icValidateCriticalErrorMsg;
1250 sReport += sSigName;
1251 ! sReport += " Has Empty CurveSegment!\r\n";
1252 return icValidateCriticalError;
1255 --- 1349,1355 ----
1256 if (m_list->size()==0) {
1257 sReport += icValidateCriticalErrorMsg;
1258 sReport += sSigName;
1259 ! sReport += " Has Empty CurveSegment!\n";
1260 return icValidateCriticalError;
1263 ***************
1264 *** 1599,1609 ****
1265 icChar buf[81];
1266 int i;
1268 ! sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
1269 sDescription += buf;
1271 for (i=0; i<m_nInputChannels; i++) {
1272 ! sprintf(buf, "Curve %d of %d\r\n", i+1, m_nInputChannels);
1273 sDescription += buf;
1274 if (m_curve[i]) {
1275 m_curve[i]->Describe(sDescription);
1276 --- 1599,1609 ----
1277 icChar buf[81];
1278 int i;
1280 ! sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
1281 sDescription += buf;
1283 for (i=0; i<m_nInputChannels; i++) {
1284 ! sprintf(buf, "Curve %d of %d\n", i+1, m_nInputChannels);
1285 sDescription += buf;
1286 if (m_curve[i]) {
1287 m_curve[i]->Describe(sDescription);
1288 ***************
1289 *** 1877,1883 ****
1290 sReport += " - Element ";
1291 sSigName = Info.GetSigName(GetType());
1292 sReport += sSigName;
1293 ! sReport += " Has Empty Curve Element(s)!\r\n";
1294 return icValidateCriticalError;
1297 --- 1877,1883 ----
1298 sReport += " - Element ";
1299 sSigName = Info.GetSigName(GetType());
1300 sReport += sSigName;
1301 ! sReport += " Has Empty Curve Element(s)!\n";
1302 return icValidateCriticalError;
1305 ***************
1306 *** 2042,2048 ****
1307 int i, j;
1308 icFloatNumber *data = m_pMatrix;
1310 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
1311 sDescription += buf;
1313 for (j=0; j<m_nOutputChannels; j++) {
1314 --- 2042,2048 ----
1315 int i, j;
1316 icFloatNumber *data = m_pMatrix;
1318 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
1319 sDescription += buf;
1321 for (j=0; j<m_nOutputChannels; j++) {
1322 ***************
1323 *** 2052,2058 ****
1324 sprintf(buf, "%12.8lf", data[i]);
1325 sDescription += buf;
1327 ! sprintf(buf, " + %12.8lf\r\n", m_pConstants[j]);
1328 sDescription += buf;
1329 data += i;
1331 --- 2052,2058 ----
1332 sprintf(buf, "%12.8lf", data[i]);
1333 sDescription += buf;
1335 ! sprintf(buf, " + %12.8lf\n", m_pConstants[j]);
1336 sDescription += buf;
1337 data += i;
1339 ***************
1340 *** 2273,2279 ****
1341 sReport += " - Element ";
1342 sSigName = Info.GetSigName(GetType());
1343 sReport += sSigName;
1344 ! sReport += " Has Empty Matrix data!\r\n";
1345 return icValidateCriticalError;
1348 --- 2273,2279 ----
1349 sReport += " - Element ";
1350 sSigName = Info.GetSigName(GetType());
1351 sReport += sSigName;
1352 ! sReport += " Has Empty Matrix data!\n";
1353 return icValidateCriticalError;
1356 ***************
1357 *** 2620,2626 ****
1358 sReport += " - Element ";
1359 sSigName = Info.GetSigName(GetType());
1360 sReport += sSigName;
1361 ! sReport += " Has No CLUT!\r\n";
1362 return icValidateCriticalError;
1365 --- 2620,2626 ----
1366 sReport += " - Element ";
1367 sSigName = Info.GetSigName(GetType());
1368 sReport += sSigName;
1369 ! sReport += " Has No CLUT!\n";
1370 return icValidateCriticalError;
1373 *** misc/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h Mon Aug 20 22:05:00 2007
1374 --- misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h Fri Jan 25 14:23:09 2008
1375 ***************
1376 *** 87,93 ****
1377 #endif
1379 //PC, visual C++
1380 ! #if defined(_MSC_VER) && !defined(__MWERKS__) && defined(_M_IX86)
1382 //Define how 64 bit integers are represented
1383 #define ICCUINT64 unsigned __int64
1384 --- 87,93 ----
1385 #endif
1387 //PC, visual C++
1388 ! #if defined(_MSC_VER) && !defined(__MWERKS__)
1390 //Define how 64 bit integers are represented
1391 #define ICCUINT64 unsigned __int64
1392 ***************
1393 *** 107,126 ****
1395 #else // non-PC, perhaps Mac or Linux
1397 ! #define ICCUINT64 unsigned long long
1398 ! #define ICCINT64 long long
1399 ! #define ICUINT64TYPE unsigned long long
1400 ! #define ICINT64TYPE long long
1402 ! #if defined(__APPLE__)
1403 ! #if defined(__LITTLE_ENDIAN__)
1404 ! #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1405 ! #else
1406 ! #define ICC_BYTE_ORDER_BIG_ENDIAN
1407 ! #endif
1408 ! #else
1409 ! #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1410 ! #endif
1412 #define ICCPROFLIB_API
1413 #define ICCPROFLIB_EXTERN
1414 --- 107,129 ----
1416 #else // non-PC, perhaps Mac or Linux
1418 ! #include <sal/types.h>
1419 ! #include <osl/endian.h>
1421 ! #define ICCUINT64 sal_uInt64
1422 ! #define ICCINT64 sal_Int64
1423 ! #define ICUINT64TYPE sal_uInt64
1424 ! #define ICINT64TYPE sal_Int64
1425 ! #define ICINT32TYPE sal_Int32
1426 ! #define ICUINT32TYPE sal_uInt32
1428 ! #if defined(_LITTLE_ENDIAN)
1429 ! # define ICC_BYTE_ORDER_LITTLE_ENDIAN
1430 ! #elif defined(_BIG_ENDIAN)
1431 ! # define ICC_BYTE_ORDER_BIG_ENDIAN
1432 ! #else
1433 ! # error "ENDIAN unknown"
1434 ! #endif
1436 #define ICCPROFLIB_API
1437 #define ICCPROFLIB_EXTERN
1438 *** misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Mon Aug 20 22:05:00 2007
1439 --- misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Fri Jan 25 14:23:09 2008
1440 ***************
1441 *** 567,573 ****
1443 if (!ReadBasic(pIO)) {
1444 sReport += icValidateCriticalErrorMsg;
1445 ! sReport += " - Unable to read profile!**\r\n\tProfile has invalid structure!\r\n";
1446 Cleanup();
1448 return icValidateCriticalError;
1449 --- 567,573 ----
1451 if (!ReadBasic(pIO)) {
1452 sReport += icValidateCriticalErrorMsg;
1453 ! sReport += " - Unable to read profile!**\n\tProfile has invalid structure!\n";
1454 Cleanup();
1456 return icValidateCriticalError;
1457 ***************
1458 *** 576,582 ****
1459 // Check profile header
1460 if (!CheckFileSize(pIO)) {
1461 sReport += icValidateNonCompliantMsg;
1462 ! sReport += "Bad Header File Size\r\n";
1463 rv = icMaxStatus(rv, icValidateNonCompliant);
1466 --- 576,582 ----
1467 // Check profile header
1468 if (!CheckFileSize(pIO)) {
1469 sReport += icValidateNonCompliantMsg;
1470 ! sReport += "Bad Header File Size\n";
1471 rv = icMaxStatus(rv, icValidateNonCompliant);
1474 ***************
1475 *** 588,594 ****
1476 CalcProfileID(pIO, &profileID);
1477 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1478 sReport += icValidateNonCompliantMsg;
1479 ! sReport += "Bad Profile ID\r\n";
1481 rv = icMaxStatus(rv, icValidateNonCompliant);
1483 --- 588,594 ----
1484 CalcProfileID(pIO, &profileID);
1485 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1486 sReport += icValidateNonCompliantMsg;
1487 ! sReport += "Bad Profile ID\n";
1489 rv = icMaxStatus(rv, icValidateNonCompliant);
1491 ***************
1492 *** 601,607 ****
1493 sReport += icValidateCriticalErrorMsg;
1494 sReport += " - ";
1495 sReport += Info.GetTagSigName(i->TagInfo.sig);
1496 ! sReport += " - Tag has invalid structure!\r\n";
1498 rv = icMaxStatus(rv, icValidateCriticalError);
1500 --- 601,607 ----
1501 sReport += icValidateCriticalErrorMsg;
1502 sReport += " - ";
1503 sReport += Info.GetTagSigName(i->TagInfo.sig);
1504 ! sReport += " - Tag has invalid structure!\n";
1506 rv = icMaxStatus(rv, icValidateCriticalError);
1508 ***************
1509 *** 1026,1032 ****
1511 default:
1512 sReport += icValidateCriticalErrorMsg;
1513 ! sprintf(buf, " - %s: Unknown profile class!\r\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1514 sReport += buf;
1515 rv = icMaxStatus(rv, icValidateCriticalError);
1517 --- 1026,1032 ----
1519 default:
1520 sReport += icValidateCriticalErrorMsg;
1521 ! sprintf(buf, " - %s: Unknown profile class!\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1522 sReport += buf;
1523 rv = icMaxStatus(rv, icValidateCriticalError);
1525 ***************
1526 *** 1033,1039 ****
1528 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1529 sReport += icValidateCriticalErrorMsg;
1530 ! sprintf(buf, " - %s: Unknown color space!\r\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1531 sReport += buf;
1532 rv = icMaxStatus(rv, icValidateCriticalError);
1534 --- 1033,1039 ----
1536 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1537 sReport += icValidateCriticalErrorMsg;
1538 ! sprintf(buf, " - %s: Unknown color space!\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1539 sReport += buf;
1540 rv = icMaxStatus(rv, icValidateCriticalError);
1542 ***************
1543 *** 1041,1047 ****
1544 if (m_Header.deviceClass==icSigLinkClass) {
1545 if (!Info.IsValidSpace(m_Header.pcs)) {
1546 sReport += icValidateCriticalErrorMsg;
1547 ! sprintf(buf, " - %s: Unknown pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1548 sReport += buf;
1549 rv = icMaxStatus(rv, icValidateCriticalError);
1551 --- 1041,1047 ----
1552 if (m_Header.deviceClass==icSigLinkClass) {
1553 if (!Info.IsValidSpace(m_Header.pcs)) {
1554 sReport += icValidateCriticalErrorMsg;
1555 ! sprintf(buf, " - %s: Unknown pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1556 sReport += buf;
1557 rv = icMaxStatus(rv, icValidateCriticalError);
1559 ***************
1560 *** 1049,1055 ****
1561 else {
1562 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1563 sReport += icValidateCriticalErrorMsg;
1564 ! sprintf(buf, " - %s: Invalid pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1565 sReport += buf;
1566 rv = icMaxStatus(rv, icValidateCriticalError);
1568 --- 1049,1055 ----
1569 else {
1570 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1571 sReport += icValidateCriticalErrorMsg;
1572 ! sprintf(buf, " - %s: Invalid pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1573 sReport += buf;
1574 rv = icMaxStatus(rv, icValidateCriticalError);
1576 ***************
1577 *** 1068,1074 ****
1579 default:
1580 sReport += icValidateWarningMsg;
1581 ! sprintf(buf, " - %s: Unknown platform signature.\r\n", Info.GetPlatformSigName(m_Header.platform));
1582 sReport += buf;
1583 rv = icMaxStatus(rv, icValidateWarning);
1585 --- 1068,1074 ----
1587 default:
1588 sReport += icValidateWarningMsg;
1589 ! sprintf(buf, " - %s: Unknown platform signature.\n", Info.GetPlatformSigName(m_Header.platform));
1590 sReport += buf;
1591 rv = icMaxStatus(rv, icValidateWarning);
1593 ***************
1594 *** 1095,1101 ****
1596 default:
1597 sReport += icValidateWarningMsg;
1598 ! sprintf(buf, " - %s: Unregisterd CMM signature.\r\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1599 sReport += buf;
1600 rv = icMaxStatus(rv, icValidateWarning);
1602 --- 1095,1101 ----
1604 default:
1605 sReport += icValidateWarningMsg;
1606 ! sprintf(buf, " - %s: Unregistered CMM signature.\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1607 sReport += buf;
1608 rv = icMaxStatus(rv, icValidateWarning);
1610 ***************
1611 *** 1109,1115 ****
1613 default:
1614 sReport += icValidateCriticalErrorMsg;
1615 ! sprintf(buf, " - %s: Unknown rendering intent!\r\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1616 sReport += buf;
1617 rv = icMaxStatus(rv, icValidateCriticalError);
1619 --- 1109,1115 ----
1621 default:
1622 sReport += icValidateCriticalErrorMsg;
1623 ! sprintf(buf, " - %s: Unknown rendering intent!\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1624 sReport += buf;
1625 rv = icMaxStatus(rv, icValidateCriticalError);
1627 ***************
1628 *** 1120,1126 ****
1629 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1630 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1631 sReport += icValidateNonCompliantMsg;
1632 ! sReport += " - Non D50 Illuminant XYZ values.\r\n";
1633 rv = icMaxStatus(rv, icValidateNonCompliant);
1636 --- 1120,1126 ----
1637 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1638 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1639 sReport += icValidateNonCompliantMsg;
1640 ! sReport += " - Non D50 Illuminant XYZ values.\n";
1641 rv = icMaxStatus(rv, icValidateNonCompliant);
1644 ***************
1645 *** 1130,1136 ****
1647 if (sum) {
1648 sReport += icValidateNonCompliantMsg;
1649 ! sReport += " - Reserved value must be zero.\r\n";
1650 rv = icMaxStatus(rv, icValidateNonCompliant);
1653 --- 1130,1136 ----
1655 if (sum) {
1656 sReport += icValidateNonCompliantMsg;
1657 ! sReport += " - Reserved value must be zero.\n";
1658 rv = icMaxStatus(rv, icValidateNonCompliant);
1661 ***************
1662 *** 1163,1169 ****
1664 sReport += icValidateWarningMsg;
1665 sReport += buf;
1666 ! sReport += " - Tag exclusion test failed.\r\n";
1667 rv = false;
1670 --- 1163,1169 ----
1672 sReport += icValidateWarningMsg;
1673 sReport += buf;
1674 ! sReport += " - Tag exclusion test failed.\n";
1675 rv = false;
1678 ***************
1679 *** 1177,1183 ****
1681 sReport += icValidateWarningMsg;
1682 sReport += buf;
1683 ! sReport += " - Tag exclusion test failed.\r\n";
1684 rv = false;
1686 break;
1687 --- 1177,1183 ----
1689 sReport += icValidateWarningMsg;
1690 sReport += buf;
1691 ! sReport += " - Tag exclusion test failed.\n";
1692 rv = false;
1694 break;
1695 ***************
1696 *** 1192,1198 ****
1698 sReport += icValidateWarningMsg;
1699 sReport += buf;
1700 ! sReport += " - Tag exclusion test failed.\r\n";
1701 rv = false;
1703 break;
1704 --- 1192,1198 ----
1706 sReport += icValidateWarningMsg;
1707 sReport += buf;
1708 ! sReport += " - Tag exclusion test failed.\n";
1709 rv = false;
1711 break;
1712 ***************
1713 *** 1234,1240 ****
1714 if (!IsTypeValid(tagsig, typesig)) {
1715 sReport += icValidateNonCompliantMsg;
1716 sReport += buf;
1717 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\r\n", Info.GetTagTypeSigName(typesig));
1718 sReport += buf;
1719 rv = icMaxStatus(rv, icValidateNonCompliant);
1721 --- 1234,1240 ----
1722 if (!IsTypeValid(tagsig, typesig)) {
1723 sReport += icValidateNonCompliantMsg;
1724 sReport += buf;
1725 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\n", Info.GetTagTypeSigName(typesig));
1726 sReport += buf;
1727 rv = icMaxStatus(rv, icValidateNonCompliant);
1729 ***************
1730 *** 1477,1483 ****
1732 if (m_Tags->size() <= 0) {
1733 sReport += icValidateCriticalErrorMsg;
1734 ! sReport += "No tags present.\r\n";
1735 return icValidateCriticalError;
1738 --- 1477,1483 ----
1740 if (m_Tags->size() <= 0) {
1741 sReport += icValidateCriticalErrorMsg;
1742 ! sReport += "No tags present.\n";
1743 return icValidateCriticalError;
1746 ***************
1747 *** 1486,1492 ****
1748 if (!GetTag(icSigProfileDescriptionTag) ||
1749 !GetTag(icSigCopyrightTag)) {
1750 sReport += icValidateNonCompliantMsg;
1751 ! sReport += "Required tags missing.\r\n";
1752 rv = icMaxStatus(rv, icValidateNonCompliant);
1755 --- 1486,1492 ----
1756 if (!GetTag(icSigProfileDescriptionTag) ||
1757 !GetTag(icSigCopyrightTag)) {
1758 sReport += icValidateNonCompliantMsg;
1759 ! sReport += "Required tags missing.\n";
1760 rv = icMaxStatus(rv, icValidateNonCompliant);
1763 ***************
1764 *** 1495,1501 ****
1765 if (sig != icSigLinkClass) {
1766 if (!GetTag(icSigMediaWhitePointTag)) {
1767 sReport += icValidateCriticalErrorMsg;
1768 ! sReport += "Media white point tag missing.\r\n";
1769 rv = icMaxStatus(rv, icValidateCriticalError);
1772 --- 1495,1501 ----
1773 if (sig != icSigLinkClass) {
1774 if (!GetTag(icSigMediaWhitePointTag)) {
1775 sReport += icValidateCriticalErrorMsg;
1776 ! sReport += "Media white point tag missing.\n";
1777 rv = icMaxStatus(rv, icValidateCriticalError);
1780 ***************
1781 *** 1505,1511 ****
1782 if (m_Header.colorSpace == icSigGrayData) {
1783 if (!GetTag(icSigGrayTRCTag)) {
1784 sReport += icValidateCriticalErrorMsg;
1785 ! sReport += "Gray TRC tag missing.\r\n";
1786 rv = icMaxStatus(rv, icValidateCriticalError);
1789 --- 1505,1511 ----
1790 if (m_Header.colorSpace == icSigGrayData) {
1791 if (!GetTag(icSigGrayTRCTag)) {
1792 sReport += icValidateCriticalErrorMsg;
1793 ! sReport += "Gray TRC tag missing.\n";
1794 rv = icMaxStatus(rv, icValidateCriticalError);
1797 ***************
1798 *** 1515,1521 ****
1799 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1800 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1801 sReport += icValidateCriticalErrorMsg;
1802 ! sReport += "Critical tag(s) missing.\r\n";
1803 rv = icMaxStatus(rv, icValidateCriticalError);
1806 --- 1515,1521 ----
1807 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1808 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1809 sReport += icValidateCriticalErrorMsg;
1810 ! sReport += "Critical tag(s) missing.\n";
1811 rv = icMaxStatus(rv, icValidateCriticalError);
1814 ***************
1815 *** 1526,1532 ****
1816 if (m_Header.colorSpace == icSigGrayData) {
1817 if (!GetTag(icSigGrayTRCTag)) {
1818 sReport += icValidateCriticalErrorMsg;
1819 ! sReport += "Gray TRC tag missing.\r\n";
1820 rv = icMaxStatus(rv, icValidateCriticalError);
1823 --- 1526,1532 ----
1824 if (m_Header.colorSpace == icSigGrayData) {
1825 if (!GetTag(icSigGrayTRCTag)) {
1826 sReport += icValidateCriticalErrorMsg;
1827 ! sReport += "Gray TRC tag missing.\n";
1828 rv = icMaxStatus(rv, icValidateCriticalError);
1831 ***************
1832 *** 1536,1542 ****
1833 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1834 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1835 sReport += icValidateCriticalErrorMsg;
1836 ! sReport += "Critical tag(s) missing.\r\n";
1837 rv = icMaxStatus(rv, icValidateCriticalError);
1840 --- 1536,1542 ----
1841 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1842 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1843 sReport += icValidateCriticalErrorMsg;
1844 ! sReport += "Critical tag(s) missing.\n";
1845 rv = icMaxStatus(rv, icValidateCriticalError);
1848 ***************
1849 *** 1547,1553 ****
1850 if (m_Header.colorSpace == icSigGrayData) {
1851 if (!GetTag(icSigGrayTRCTag)) {
1852 sReport += icValidateCriticalErrorMsg;
1853 ! sReport += "Gray TRC tag missing.\r\n";
1854 rv = icMaxStatus(rv, icValidateCriticalError);
1857 --- 1547,1553 ----
1858 if (m_Header.colorSpace == icSigGrayData) {
1859 if (!GetTag(icSigGrayTRCTag)) {
1860 sReport += icValidateCriticalErrorMsg;
1861 ! sReport += "Gray TRC tag missing.\n";
1862 rv = icMaxStatus(rv, icValidateCriticalError);
1865 ***************
1866 *** 1556,1568 ****
1867 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1868 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1869 sReport += icValidateCriticalErrorMsg;
1870 ! sReport += "Critical tag(s) missing.\r\n";
1871 rv = icMaxStatus(rv, icValidateCriticalError);
1874 if (!GetTag(icSigGamutTag)) {
1875 sReport += icValidateNonCompliantMsg;
1876 ! sReport += "Gamut tag missing.\r\n";
1877 rv = icMaxStatus(rv, icValidateNonCompliant);
1880 --- 1556,1568 ----
1881 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1882 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1883 sReport += icValidateCriticalErrorMsg;
1884 ! sReport += "Critical tag(s) missing.\n";
1885 rv = icMaxStatus(rv, icValidateCriticalError);
1888 if (!GetTag(icSigGamutTag)) {
1889 sReport += icValidateNonCompliantMsg;
1890 ! sReport += "Gamut tag missing.\n";
1891 rv = icMaxStatus(rv, icValidateNonCompliant);
1894 ***************
1895 *** 1585,1591 ****
1896 case icSig16colorData:
1897 if (!GetTag(icSigColorantTableTag)) {
1898 sReport += icValidateNonCompliantMsg;
1899 ! sReport += "xCLR output profile is missing colorantTableTag\r\n";
1900 rv = icMaxStatus(rv, icValidateNonCompliant);
1903 --- 1585,1591 ----
1904 case icSig16colorData:
1905 if (!GetTag(icSigColorantTableTag)) {
1906 sReport += icValidateNonCompliantMsg;
1907 ! sReport += "xCLR output profile is missing colorantTableTag\n";
1908 rv = icMaxStatus(rv, icValidateNonCompliant);
1911 ***************
1912 *** 1599,1605 ****
1913 case icSigLinkClass:
1914 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1915 sReport += icValidateCriticalErrorMsg;
1916 ! sReport += "Critical tag(s) missing.\r\n";
1917 rv = icMaxStatus(rv, icValidateCriticalError);
1920 --- 1599,1605 ----
1921 case icSigLinkClass:
1922 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1923 sReport += icValidateCriticalErrorMsg;
1924 ! sReport += "Critical tag(s) missing.\n";
1925 rv = icMaxStatus(rv, icValidateCriticalError);
1928 ***************
1929 *** 1606,1612 ****
1930 if (icIsSpaceCLR(m_Header.colorSpace)) {
1931 if (!GetTag(icSigColorantTableTag)) {
1932 sReport += icValidateNonCompliantMsg;
1933 ! sReport += "Required tag(s) missing.\r\n";
1934 rv = icMaxStatus(rv, icValidateNonCompliant);
1937 --- 1606,1612 ----
1938 if (icIsSpaceCLR(m_Header.colorSpace)) {
1939 if (!GetTag(icSigColorantTableTag)) {
1940 sReport += icValidateNonCompliantMsg;
1941 ! sReport += "Required tag(s) missing.\n";
1942 rv = icMaxStatus(rv, icValidateNonCompliant);
1945 ***************
1946 *** 1614,1620 ****
1947 if (icIsSpaceCLR(m_Header.pcs)) {
1948 if (!GetTag(icSigColorantTableOutTag)) {
1949 sReport += icValidateNonCompliantMsg;
1950 ! sReport += "Required tag(s) missing.\r\n";
1951 rv = icMaxStatus(rv, icValidateNonCompliant);
1954 --- 1614,1620 ----
1955 if (icIsSpaceCLR(m_Header.pcs)) {
1956 if (!GetTag(icSigColorantTableOutTag)) {
1957 sReport += icValidateNonCompliantMsg;
1958 ! sReport += "Required tag(s) missing.\n";
1959 rv = icMaxStatus(rv, icValidateNonCompliant);
1962 ***************
1963 *** 1623,1629 ****
1964 case icSigColorSpaceClass:
1965 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1966 sReport += icValidateCriticalErrorMsg;
1967 ! sReport += "Critical tag(s) missing.\r\n";
1968 rv = icMaxStatus(rv, icValidateCriticalError);
1970 break;
1971 --- 1623,1629 ----
1972 case icSigColorSpaceClass:
1973 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1974 sReport += icValidateCriticalErrorMsg;
1975 ! sReport += "Critical tag(s) missing.\n";
1976 rv = icMaxStatus(rv, icValidateCriticalError);
1978 break;
1979 ***************
1980 *** 1631,1637 ****
1981 case icSigAbstractClass:
1982 if (!GetTag(icSigAToB0Tag)) {
1983 sReport += icValidateCriticalErrorMsg;
1984 ! sReport += "Critical tag(s) missing.\r\n";
1985 rv = icMaxStatus(rv, icValidateCriticalError);
1987 break;
1988 --- 1631,1637 ----
1989 case icSigAbstractClass:
1990 if (!GetTag(icSigAToB0Tag)) {
1991 sReport += icValidateCriticalErrorMsg;
1992 ! sReport += "Critical tag(s) missing.\n";
1993 rv = icMaxStatus(rv, icValidateCriticalError);
1995 break;
1996 ***************
1997 *** 1639,1645 ****
1998 case icSigNamedColorClass:
1999 if (!GetTag(icSigNamedColor2Tag)) {
2000 sReport += icValidateCriticalErrorMsg;
2001 ! sReport += "Critical tag(s) missing.\r\n";
2002 rv = icMaxStatus(rv, icValidateCriticalError);
2005 --- 1639,1645 ----
2006 case icSigNamedColorClass:
2007 if (!GetTag(icSigNamedColor2Tag)) {
2008 sReport += icValidateCriticalErrorMsg;
2009 ! sReport += "Critical tag(s) missing.\n";
2010 rv = icMaxStatus(rv, icValidateCriticalError);
2013 ***************
2014 *** 1647,1653 ****
2016 default:
2017 sReport += icValidateCriticalErrorMsg;
2018 ! sReport += "Unknown Profile Class.\r\n";
2019 rv = icMaxStatus(rv, icValidateCriticalError);
2020 break;
2022 --- 1647,1653 ----
2024 default:
2025 sReport += icValidateCriticalErrorMsg;
2026 ! sReport += "Unknown Profile Class.\n";
2027 rv = icMaxStatus(rv, icValidateCriticalError);
2028 break;
2030 ***************
2031 *** 1724,1730 ****
2032 // Check for duplicate tags
2033 if (!AreTagsUnique()) {
2034 sReport += icValidateWarning;
2035 ! sReport += " - There are duplicate tags.\r\n";
2036 rv =icMaxStatus(rv, icValidateWarning);
2039 --- 1724,1730 ----
2040 // Check for duplicate tags
2041 if (!AreTagsUnique()) {
2042 sReport += icValidateWarning;
2043 ! sReport += " - There are duplicate tags.\n";
2044 rv =icMaxStatus(rv, icValidateWarning);
2047 ***************
2048 *** 1979,1985 ****
2049 sReport = icValidateCriticalErrorMsg;
2050 sReport += " - ";
2051 sReport += szFilename;
2052 ! sReport += "- Invalid Filename\r\n";
2053 delete pFileIO;
2054 return NULL;
2056 --- 1979,1985 ----
2057 sReport = icValidateCriticalErrorMsg;
2058 sReport += " - ";
2059 sReport += szFilename;
2060 ! sReport += "- Invalid Filename\n";
2061 delete pFileIO;
2062 return NULL;
2064 *** misc/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Mon Aug 20 22:05:00 2007
2065 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Fri Jan 25 14:23:09 2008
2066 ***************
2067 *** 166,172 ****
2068 CIccInfo Info;
2069 sReport += icValidateNonCompliantMsg;
2070 sReport += Info.GetSigName(sig);
2071 ! sReport += " - Reserved Value must be zero.\r\n";
2073 rv = icValidateNonCompliant;
2075 --- 166,172 ----
2076 CIccInfo Info;
2077 sReport += icValidateNonCompliantMsg;
2078 sReport += Info.GetSigName(sig);
2079 ! sReport += " - Reserved Value must be zero.\n";
2081 rv = icValidateNonCompliant;
2083 ***************
2084 *** 340,346 ****
2085 sprintf(buf, "%u Bytes.", m_nSize-4);
2086 sDescription += buf;
2088 ! sDescription += "\r\n\r\nData Follows:\r\n";
2090 icMemDump(sDescription, m_pData+4, m_nSize-4);
2092 --- 340,346 ----
2093 sprintf(buf, "%u Bytes.", m_nSize-4);
2094 sDescription += buf;
2096 ! sDescription += "\n\nData Follows:\n";
2098 icMemDump(sDescription, m_pData+4, m_nSize-4);
2100 ***************
2101 *** 511,517 ****
2102 if (m_szText && *m_szText)
2103 sDescription += m_szText;
2105 ! sDescription += "\"\r\n";
2109 --- 511,517 ----
2110 if (m_szText && *m_szText)
2111 sDescription += m_szText;
2113 ! sDescription += "\"\n";
2117 ***************
2118 *** 629,635 ****
2119 if (m_nBufSize<7) {
2120 sReport += icValidateNonCompliantMsg;
2121 sReport += sSigName;
2122 ! sReport += " - Tag must have at least seven text characters.\r\n";
2123 rv = icMaxStatus(rv, icValidateNonCompliant);
2125 break;
2126 --- 629,635 ----
2127 if (m_nBufSize<7) {
2128 sReport += icValidateNonCompliantMsg;
2129 sReport += sSigName;
2130 ! sReport += " - Tag must have at least seven text characters.\n";
2131 rv = icMaxStatus(rv, icValidateNonCompliant);
2133 break;
2134 ***************
2135 *** 636,642 ****
2136 default:
2137 sReport += icValidateWarningMsg;
2138 sReport += sSigName;
2139 ! sReport += " - Unknown Tag.\r\n";
2140 rv = icMaxStatus(rv, icValidateWarning);
2142 int i;
2143 --- 636,642 ----
2144 default:
2145 sReport += icValidateWarningMsg;
2146 sReport += sSigName;
2147 ! sReport += " - Unknown Tag.\n";
2148 rv = icMaxStatus(rv, icValidateWarning);
2150 int i;
2151 ***************
2152 *** 644,650 ****
2153 if (m_szText[i]&0x80) {
2154 sReport += icValidateWarning;
2155 sReport += sSigName;
2156 ! sReport += " - Text do not contain 7bit data.\r\n";
2160 --- 644,650 ----
2161 if (m_szText[i]&0x80) {
2162 sReport += icValidateWarning;
2163 sReport += sSigName;
2164 ! sReport += " - Text do not contain 7bit data.\n";
2168 ***************
2169 *** 651,657 ****
2170 else {
2171 sReport += icValidateWarningMsg;
2172 sReport += sSigName;
2173 ! sReport += " - Empty Tag.\r\n";
2174 rv = icMaxStatus(rv, icValidateWarning);
2177 --- 651,657 ----
2178 else {
2179 sReport += icValidateWarningMsg;
2180 sReport += sSigName;
2181 ! sReport += " - Empty Tag.\n";
2182 rv = icMaxStatus(rv, icValidateWarning);
2185 ***************
2186 *** 941,947 ****
2187 if (m_szText && *m_szText)
2188 sDescription += m_szText;
2190 ! sDescription += "\"\r\n";
2194 --- 941,947 ----
2195 if (m_szText && *m_szText)
2196 sDescription += m_szText;
2198 ! sDescription += "\"\n";
2202 ***************
2203 *** 1101,1107 ****
2204 if (m_nScriptSize>67) {
2205 sReport += icValidateNonCompliantMsg;
2206 sReport += sSigName;
2207 ! sReport += " - ScriptCode count must not be greater than 67.\r\n";
2209 rv =icMaxStatus(rv, icValidateNonCompliant);
2211 --- 1101,1107 ----
2212 if (m_nScriptSize>67) {
2213 sReport += icValidateNonCompliantMsg;
2214 sReport += sSigName;
2215 ! sReport += " - ScriptCode count must not be greater than 67.\n";
2217 rv =icMaxStatus(rv, icValidateNonCompliant);
2219 ***************
2220 *** 1260,1266 ****
2221 CIccInfo Fmt;
2223 sDescription += Fmt.GetSigName(m_nSig);
2224 ! sDescription += "\r\n";
2228 --- 1260,1266 ----
2229 CIccInfo Fmt;
2231 sDescription += Fmt.GetSigName(m_nSig);
2232 ! sDescription += "\n";
2236 ***************
2237 *** 1320,1326 ****
2239 sReport += icValidateNonCompliantMsg;
2240 sReport += sSigName;
2241 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(m_nSig));
2242 sReport += buf;
2243 rv = icMaxStatus(rv, icValidateNonCompliant);
2245 --- 1320,1326 ----
2247 sReport += icValidateNonCompliantMsg;
2248 sReport += sSigName;
2249 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(m_nSig));
2250 sReport += buf;
2251 rv = icMaxStatus(rv, icValidateNonCompliant);
2253 ***************
2254 *** 1336,1342 ****
2256 sReport += icValidateNonCompliantMsg;
2257 sReport += sSigName;
2258 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\r\n", Info.GetSigName(m_nSig));
2259 sReport += buf;
2260 rv = icMaxStatus(rv, icValidateNonCompliant);
2262 --- 1336,1342 ----
2264 sReport += icValidateNonCompliantMsg;
2265 sReport += sSigName;
2266 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\n", Info.GetSigName(m_nSig));
2267 sReport += buf;
2268 rv = icMaxStatus(rv, icValidateNonCompliant);
2270 ***************
2271 *** 1355,1361 ****
2273 sReport += icValidateNonCompliantMsg;
2274 sReport += sSigName;
2275 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\r\n", Info.GetSigName(m_nSig));
2276 sReport += buf;
2277 rv = icMaxStatus(rv, icValidateNonCompliant);
2279 --- 1355,1361 ----
2281 sReport += icValidateNonCompliantMsg;
2282 sReport += sSigName;
2283 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\n", Info.GetSigName(m_nSig));
2284 sReport += buf;
2285 rv = icMaxStatus(rv, icValidateNonCompliant);
2287 ***************
2288 *** 1686,1692 ****
2290 sDescription.reserve(sDescription.size() + m_nSize*79);
2292 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\r\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2293 sDescription += buf;
2295 for (i=0; i<m_nSize; i++) {
2296 --- 1686,1692 ----
2298 sDescription.reserve(sDescription.size() + m_nSize*79);
2300 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2301 sDescription += buf;
2303 for (i=0; i<m_nSize; i++) {
2304 ***************
2305 *** 1717,1723 ****
2306 sDescription += buf;
2309 ! sDescription += "\r\n";
2311 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2313 --- 1717,1723 ----
2314 sDescription += buf;
2317 ! sDescription += "\n";
2319 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2321 ***************
2322 *** 2082,2088 ****
2323 if (!m_nSize) {
2324 sReport += icValidateWarningMsg;
2325 sReport += sSigName;
2326 ! sReport += " - Empty tag!\r\n";
2327 rv = icMaxStatus(rv, icValidateWarning);
2330 --- 2082,2088 ----
2331 if (!m_nSize) {
2332 sReport += icValidateWarningMsg;
2333 sReport += sSigName;
2334 ! sReport += " - Empty tag!\n";
2335 rv = icMaxStatus(rv, icValidateWarning);
2338 ***************
2339 *** 2092,2098 ****
2340 if (m_nDeviceCoords != nCoords) {
2341 sReport += icValidateNonCompliantMsg;
2342 sReport += sSigName;
2343 ! sReport += " - Incorrect number of device co-ordinates.\r\n";
2344 rv = icMaxStatus(rv, icValidateNonCompliant);
2347 --- 2092,2098 ----
2348 if (m_nDeviceCoords != nCoords) {
2349 sReport += icValidateNonCompliantMsg;
2350 sReport += sSigName;
2351 ! sReport += " - Incorrect number of device co-ordinates.\n";
2352 rv = icMaxStatus(rv, icValidateNonCompliant);
2355 ***************
2356 *** 2099,2105 ****
2357 else {
2358 sReport += icValidateWarningMsg;
2359 sReport += sSigName;
2360 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2361 rv = icMaxStatus(rv, icValidateWarning);
2364 --- 2099,2105 ----
2365 else {
2366 sReport += icValidateWarningMsg;
2367 sReport += sSigName;
2368 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2369 rv = icMaxStatus(rv, icValidateWarning);
2372 ***************
2373 *** 2285,2291 ****
2374 icChar buf[128];
2376 if (m_nSize == 1 ) {
2377 ! sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
2378 sDescription += buf;
2380 else {
2381 --- 2285,2291 ----
2382 icChar buf[128];
2384 if (m_nSize == 1 ) {
2385 ! sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
2386 sDescription += buf;
2388 else {
2389 ***************
2390 *** 2293,2299 ****
2391 sDescription.reserve(sDescription.size() + m_nSize*79);
2393 for (i=0; i<m_nSize; i++) {
2394 ! sprintf(buf, "value[%u]: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i, icFtoD(m_XYZ[i].X), icFtoD(m_XYZ[i].Y), icFtoD(m_XYZ[i].Z));
2395 sDescription += buf;
2398 --- 2293,2299 ----
2399 sDescription.reserve(sDescription.size() + m_nSize*79);
2401 for (i=0; i<m_nSize; i++) {
2402 ! sprintf(buf, "value[%u]: X=%.4lf, Y=%.4lf, Z=%.4lf\n", i, icFtoD(m_XYZ[i].X), icFtoD(m_XYZ[i].Y), icFtoD(m_XYZ[i].Z));
2403 sDescription += buf;
2406 ***************
2407 *** 2347,2353 ****
2408 if (!m_nSize) {
2409 sReport += icValidateWarningMsg;
2410 sReport += sSigName;
2411 ! sReport += " - Empty tag.\r\n";
2413 rv = icMaxStatus(rv, icValidateWarning);
2414 return rv;
2415 --- 2347,2353 ----
2416 if (!m_nSize) {
2417 sReport += icValidateWarningMsg;
2418 sReport += sSigName;
2419 ! sReport += " - Empty tag.\n";
2421 rv = icMaxStatus(rv, icValidateWarning);
2422 return rv;
2423 ***************
2424 *** 2553,2566 ****
2426 icUInt32Number i;
2427 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2428 ! sprintf(buf, "Number of Channels : %u\r\n", m_nChannels);
2429 sDescription += buf;
2431 ! sprintf(buf, "Colorant Encoding : %s\r\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2432 sDescription += buf;
2434 for (i=0; i<m_nChannels; i++) {
2435 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\r\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2436 sDescription += buf;
2439 --- 2553,2566 ----
2441 icUInt32Number i;
2442 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2443 ! sprintf(buf, "Number of Channels : %u\n", m_nChannels);
2444 sDescription += buf;
2446 ! sprintf(buf, "Colorant Encoding : %s\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2447 sDescription += buf;
2449 for (i=0; i<m_nChannels; i++) {
2450 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2451 sDescription += buf;
2454 ***************
2455 *** 2617,2623 ****
2456 if (m_nChannels!=3) {
2457 sReport += icValidateCriticalErrorMsg;
2458 sReport += sSigName;
2459 ! sReport += " - Number of device channels must be three.\r\n";
2460 rv = icMaxStatus(rv, icValidateCriticalError);
2463 --- 2617,2623 ----
2464 if (m_nChannels!=3) {
2465 sReport += icValidateCriticalErrorMsg;
2466 sReport += sSigName;
2467 ! sReport += " - Number of device channels must be three.\n";
2468 rv = icMaxStatus(rv, icValidateCriticalError);
2471 ***************
2472 *** 2629,2635 ****
2473 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2474 sReport += icValidateNonCompliantMsg;
2475 sReport += sSigName;
2476 ! sReport += " - Chromaticity data does not match specification.\r\n";
2477 rv = icMaxStatus(rv, icValidateNonCompliant);
2479 break;
2480 --- 2629,2635 ----
2481 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2482 sReport += icValidateNonCompliantMsg;
2483 sReport += sSigName;
2484 ! sReport += " - Chromaticity data does not match specification.\n";
2485 rv = icMaxStatus(rv, icValidateNonCompliant);
2487 break;
2488 ***************
2489 *** 2642,2648 ****
2490 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2491 sReport += icValidateNonCompliantMsg;
2492 sReport += sSigName;
2493 ! sReport += " - Chromaticity data does not match specification.\r\n";
2494 rv = icMaxStatus(rv, icValidateNonCompliant);
2496 break;
2497 --- 2642,2648 ----
2498 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2499 sReport += icValidateNonCompliantMsg;
2500 sReport += sSigName;
2501 ! sReport += " - Chromaticity data does not match specification.\n";
2502 rv = icMaxStatus(rv, icValidateNonCompliant);
2504 break;
2505 ***************
2506 *** 2655,2661 ****
2507 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2508 sReport += icValidateNonCompliantMsg;
2509 sReport += sSigName;
2510 ! sReport += " - Chromaticity data does not match specification.\r\n";
2511 rv = icMaxStatus(rv, icValidateNonCompliant);
2513 break;
2514 --- 2655,2661 ----
2515 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2516 sReport += icValidateNonCompliantMsg;
2517 sReport += sSigName;
2518 ! sReport += " - Chromaticity data does not match specification.\n";
2519 rv = icMaxStatus(rv, icValidateNonCompliant);
2521 break;
2522 ***************
2523 *** 2668,2674 ****
2524 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2525 sReport += icValidateNonCompliantMsg;
2526 sReport += sSigName;
2527 ! sReport += " - Chromaticity data does not match specification.\r\n";
2528 rv = icMaxStatus(rv, icValidateNonCompliant);
2530 break;
2531 --- 2668,2674 ----
2532 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2533 sReport += icValidateNonCompliantMsg;
2534 sReport += sSigName;
2535 ! sReport += " - Chromaticity data does not match specification.\n";
2536 rv = icMaxStatus(rv, icValidateNonCompliant);
2538 break;
2539 ***************
2540 *** 2678,2684 ****
2542 sReport += icValidateNonCompliantMsg;
2543 sReport += sSigName;
2544 ! sReport += " - Invalid colorant type encoding.\r\n";
2545 rv = icMaxStatus(rv, icValidateNonCompliant);
2548 --- 2678,2684 ----
2550 sReport += icValidateNonCompliantMsg;
2551 sReport += sSigName;
2552 ! sReport += " - Invalid colorant type encoding.\n";
2553 rv = icMaxStatus(rv, icValidateNonCompliant);
2556 ***************
2557 *** 2884,2892 ****
2559 if (m_nSize == 1 ) {
2560 if (Tsig==icSigS15Fixed16ArrayType)
2561 ! sprintf(buf, "Value = %.4lf\r\n", icFtoD(m_Num[0]));
2562 else
2563 ! sprintf(buf, "Value = %.4lf\r\n", icUFtoD(m_Num[0]));
2564 sDescription += buf;
2566 else {
2567 --- 2884,2892 ----
2569 if (m_nSize == 1 ) {
2570 if (Tsig==icSigS15Fixed16ArrayType)
2571 ! sprintf(buf, "Value = %.4lf\n", icFtoD(m_Num[0]));
2572 else
2573 ! sprintf(buf, "Value = %.4lf\n", icUFtoD(m_Num[0]));
2574 sDescription += buf;
2576 else {
2577 ***************
2578 *** 2893,2910 ****
2579 icUInt32Number i;
2581 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2582 ! sDescription += "Matrix Form:\r\n";
2583 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2585 ! sDescription += "\r\nArrayForm:\r\n";
2587 sDescription.reserve(sDescription.size() + m_nSize*79);
2589 for (i=0; i<m_nSize; i++) {
2590 if (Tsig==icSigS15Fixed16ArrayType)
2591 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icFtoD(m_Num[i]));
2592 else
2593 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icUFtoD(m_Num[i]));
2594 sDescription += buf;
2597 --- 2893,2910 ----
2598 icUInt32Number i;
2600 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2601 ! sDescription += "Matrix Form:\n";
2602 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2604 ! sDescription += "\nArrayForm:\n";
2606 sDescription.reserve(sDescription.size() + m_nSize*79);
2608 for (i=0; i<m_nSize; i++) {
2609 if (Tsig==icSigS15Fixed16ArrayType)
2610 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icFtoD(m_Num[i]));
2611 else
2612 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icUFtoD(m_Num[i]));
2613 sDescription += buf;
2616 ***************
2617 *** 3172,3178 ****
2618 icChar buf[128];
2620 if (m_nSize == 1 ) {
2621 ! sprintf(buf, "Value = %u (0x%x)\r\n", m_Num[0], m_Num[0]);
2622 sDescription += buf;
2624 else {
2625 --- 3172,3178 ----
2626 icChar buf[128];
2628 if (m_nSize == 1 ) {
2629 ! sprintf(buf, "Value = %u (0x%x)\n", m_Num[0], m_Num[0]);
2630 sDescription += buf;
2632 else {
2633 ***************
2634 *** 3180,3186 ****
2635 sDescription.reserve(sDescription.size() + m_nSize*79);
2637 for (i=0; i<m_nSize; i++) {
2638 ! sprintf(buf, "Value[%u] = %u (0x%x)\r\n", i, m_Num[i], m_Num[i]);
2639 sDescription += buf;
2642 --- 3180,3186 ----
2643 sDescription.reserve(sDescription.size() + m_nSize*79);
2645 for (i=0; i<m_nSize; i++) {
2646 ! sprintf(buf, "Value[%u] = %u (0x%x)\n", i, m_Num[i], m_Num[i]);
2647 sDescription += buf;
2650 ***************
2651 *** 3374,3388 ****
2652 CIccInfo Fmt;
2653 icChar buf[128];
2655 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\r\n";
2656 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n",
2657 icFtoD(m_Data.backing.X),
2658 icFtoD(m_Data.backing.Y),
2659 icFtoD(m_Data.backing.Z));
2660 sDescription += buf;
2661 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\r\n";
2662 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\r\n";
2663 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\r\n";
2667 --- 3374,3388 ----
2668 CIccInfo Fmt;
2669 icChar buf[128];
2671 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\n";
2672 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
2673 icFtoD(m_Data.backing.X),
2674 icFtoD(m_Data.backing.Y),
2675 icFtoD(m_Data.backing.Z));
2676 sDescription += buf;
2677 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\n";
2678 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\n";
2679 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\n";
2683 ***************
2684 *** 3416,3422 ****
2685 default:
2686 sReport += icValidateNonCompliantMsg;
2687 sReport += sSigName;
2688 ! sReport += " - Invalid standard observer encoding.\r\n";
2689 rv = icMaxStatus(rv, icValidateNonCompliant);
2692 --- 3416,3422 ----
2693 default:
2694 sReport += icValidateNonCompliantMsg;
2695 sReport += sSigName;
2696 ! sReport += " - Invalid standard observer encoding.\n";
2697 rv = icMaxStatus(rv, icValidateNonCompliant);
2700 ***************
2701 *** 3429,3435 ****
2702 default:
2703 sReport += icValidateNonCompliantMsg;
2704 sReport += sSigName;
2705 ! sReport += " - Invalid measurement geometry encoding.\r\n";
2706 rv = icMaxStatus(rv, icValidateNonCompliant);
2709 --- 3429,3435 ----
2710 default:
2711 sReport += icValidateNonCompliantMsg;
2712 sReport += sSigName;
2713 ! sReport += " - Invalid measurement geometry encoding.\n";
2714 rv = icMaxStatus(rv, icValidateNonCompliant);
2717 ***************
2718 *** 3448,3454 ****
2719 default:
2720 sReport += icValidateNonCompliantMsg;
2721 sReport += sSigName;
2722 ! sReport += " - Invalid standard illuminant encoding.\r\n";
2723 rv = icMaxStatus(rv, icValidateNonCompliant);
2726 --- 3448,3454 ----
2727 default:
2728 sReport += icValidateNonCompliantMsg;
2729 sReport += sSigName;
2730 ! sReport += " - Invalid standard illuminant encoding.\n";
2731 rv = icMaxStatus(rv, icValidateNonCompliant);
2734 ***************
2735 *** 3902,3910 ****
2737 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2738 if (i!=m_Strings->begin())
2739 ! sDescription += "\r\n";
2741 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\r\n",
2742 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2743 i->m_nCountryCode>>8, i->m_nCountryCode);
2745 --- 3902,3910 ----
2747 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2748 if (i!=m_Strings->begin())
2749 ! sDescription += "\n";
2751 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\n",
2752 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2753 i->m_nCountryCode>>8, i->m_nCountryCode);
2755 ***************
2756 *** 3919,3925 ****
2757 i->GetAnsi(szBuf, nSize);
2758 sDescription += "\"";
2759 sDescription += szBuf;
2760 ! sDescription += "\"\r\n";
2764 --- 3919,3925 ----
2765 i->GetAnsi(szBuf, nSize);
2766 sDescription += "\"";
2767 sDescription += szBuf;
2768 ! sDescription += "\"\n";
2772 ***************
2773 *** 3948,3954 ****
2774 if (!m_Strings->size()) {
2775 sReport += icValidateWarningMsg;
2776 sReport += sSigName;
2777 ! sReport += " - Empty tag!\r\n";
2778 rv = icMaxStatus(rv, icValidateWarning);
2781 --- 3948,3954 ----
2782 if (!m_Strings->size()) {
2783 sReport += icValidateWarningMsg;
2784 sReport += sSigName;
2785 ! sReport += " - Empty tag!\n";
2786 rv = icMaxStatus(rv, icValidateWarning);
2789 ***************
2790 *** 4246,4260 ****
2792 icChar buf[128];
2794 ! sDescription = "\r\nData:\r\n";
2796 if (IsTypeAscii()) {
2797 ! sprintf(buf, "%s\r\n", (icChar*)m_pData);
2798 sDescription += buf;
2800 else
2801 for (int i = 0; i<(int)m_nSize; i++) {
2802 ! sprintf(buf, "%d\r\n", m_pData[i]);
2803 sDescription += buf;
2806 --- 4246,4260 ----
2808 icChar buf[128];
2810 ! sDescription = "\nData:\n";
2812 if (IsTypeAscii()) {
2813 ! sprintf(buf, "%s\n", (icChar*)m_pData);
2814 sDescription += buf;
2816 else
2817 for (int i = 0; i<(int)m_nSize; i++) {
2818 ! sprintf(buf, "%d\n", m_pData[i]);
2819 sDescription += buf;
2822 ***************
2823 *** 4312,4318 ****
2824 default:
2825 sReport += icValidateNonCompliantMsg;
2826 sReport += sSigName;
2827 ! sReport += " - Invalid data flag encoding.\r\n";
2828 rv = icMaxStatus(rv, icValidateNonCompliant);
2831 --- 4312,4318 ----
2832 default:
2833 sReport += icValidateNonCompliantMsg;
2834 sReport += sSigName;
2835 ! sReport += " - Invalid data flag encoding.\n";
2836 rv = icMaxStatus(rv, icValidateNonCompliant);
2839 ***************
2840 *** 4477,4487 ****
2841 icChar buf[128];
2843 sDescription = "Date = ";
2844 ! sprintf(buf, "%u-%u-%u\r\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2845 sDescription += buf;
2847 sDescription += "Time = ";
2848 ! sprintf(buf, "%u:%u:%u\r\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2849 sDescription += buf;
2852 --- 4477,4487 ----
2853 icChar buf[128];
2855 sDescription = "Date = ";
2856 ! sprintf(buf, "%u-%u-%u\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2857 sDescription += buf;
2859 sDescription += "Time = ";
2860 ! sprintf(buf, "%u:%u:%u\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2861 sDescription += buf;
2864 ***************
2865 *** 4697,4708 ****
2867 icChar buf[128];
2869 ! sprintf(buf, "Colorant Count : %u\r\n", m_nCount);
2870 sDescription += buf;
2871 ! sDescription += "Order of Colorants:\r\n";
2873 for (int i=0; i<(int)m_nCount; i++) {
2874 ! sprintf(buf, "%u\r\n", m_pData[i]);
2875 sDescription += buf;
2878 --- 4697,4708 ----
2880 icChar buf[128];
2882 ! sprintf(buf, "Colorant Count : %u\n", m_nCount);
2883 sDescription += buf;
2884 ! sDescription += "Order of Colorants:\n";
2886 for (int i=0; i<(int)m_nCount; i++) {
2887 ! sprintf(buf, "%u\n", m_pData[i]);
2888 sDescription += buf;
2891 ***************
2892 *** 4757,4763 ****
2893 if (!pProfile) {
2894 sReport += icValidateWarningMsg;
2895 sReport += sSigName;
2896 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2897 rv = icMaxStatus(rv, icValidateWarning);
2898 return rv;
2900 --- 4757,4763 ----
2901 if (!pProfile) {
2902 sReport += icValidateWarningMsg;
2903 sReport += sSigName;
2904 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2905 rv = icMaxStatus(rv, icValidateWarning);
2906 return rv;
2908 ***************
2909 *** 4765,4771 ****
2910 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2911 sReport += icValidateNonCompliantMsg;
2912 sReport += sSigName;
2913 ! sReport += " - Incorrect number of colorants.\r\n";
2914 rv = icMaxStatus(rv, icValidateNonCompliant);
2917 --- 4765,4771 ----
2918 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2919 sReport += icValidateNonCompliantMsg;
2920 sReport += sSigName;
2921 ! sReport += " - Incorrect number of colorants.\n";
2922 rv = icMaxStatus(rv, icValidateNonCompliant);
2925 ***************
2926 *** 4977,4983 ****
2927 icUInt32Number i, nLen, nMaxLen=0;
2928 icFloatNumber Lab[3];
2930 ! sprintf(buf, "BEGIN_COLORANTS %u\r\n", m_nCount);
2931 sDescription += buf;
2933 for (i=0; i<m_nCount; i++) {
2934 --- 4977,4983 ----
2935 icUInt32Number i, nLen, nMaxLen=0;
2936 icFloatNumber Lab[3];
2938 ! sprintf(buf, "BEGIN_COLORANTS %u\n", m_nCount);
2939 sDescription += buf;
2941 for (i=0; i<m_nCount; i++) {
2942 ***************
2943 *** 4988,4998 ****
2944 sDescription += "# NAME ";
2946 if (m_PCS == icSigXYZData) {
2947 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\r\n");
2948 sDescription += buf;
2950 else {
2951 ! sprintf(buf, "Lab_L Lab_a Lab_b\r\n");
2952 sDescription += buf;
2954 for (i=0; i<m_nCount; i++) {
2955 --- 4988,4998 ----
2956 sDescription += "# NAME ";
2958 if (m_PCS == icSigXYZData) {
2959 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\n");
2960 sDescription += buf;
2962 else {
2963 ! sprintf(buf, "Lab_L Lab_a Lab_b\n");
2964 sDescription += buf;
2966 for (i=0; i<m_nCount; i++) {
2967 ***************
2968 *** 5003,5009 ****
2969 sDescription += buf;
2971 if (m_PCS == icSigXYZData) {
2972 ! sprintf(buf, "%7.4lf %7.4lf %7.4lf\r\n", icUSFtoD(m_pData[i].data[0]), icUSFtoD(m_pData[i].data[1]), icUSFtoD(m_pData[i].data[2]));
2973 sDescription += buf;
2975 else {
2976 --- 5003,5009 ----
2977 sDescription += buf;
2979 if (m_PCS == icSigXYZData) {
2980 ! sprintf(buf, "%7.4lf %7.4lf %7.4lf\n", icUSFtoD(m_pData[i].data[0]), icUSFtoD(m_pData[i].data[1]), icUSFtoD(m_pData[i].data[2]));
2981 sDescription += buf;
2983 else {
2984 ***************
2985 *** 5011,5017 ****
2986 Lab[1] = icU16toF(m_pData[i].data[1]);
2987 Lab[2] = icU16toF(m_pData[i].data[2]);
2988 icLabFromPcs(Lab);
2989 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\r\n", Lab[0], Lab[1], Lab[2]);
2990 sDescription += buf;
2993 --- 5011,5017 ----
2994 Lab[1] = icU16toF(m_pData[i].data[1]);
2995 Lab[2] = icU16toF(m_pData[i].data[2]);
2996 icLabFromPcs(Lab);
2997 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\n", Lab[0], Lab[1], Lab[2]);
2998 sDescription += buf;
3001 ***************
3002 *** 5066,5072 ****
3003 if (!pProfile) {
3004 sReport += icValidateWarningMsg;
3005 sReport += sSigName;
3006 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3007 rv = icMaxStatus(rv, icValidateWarning);
3008 return rv;
3010 --- 5066,5072 ----
3011 if (!pProfile) {
3012 sReport += icValidateWarningMsg;
3013 sReport += sSigName;
3014 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3015 rv = icMaxStatus(rv, icValidateWarning);
3016 return rv;
3018 ***************
3019 *** 5076,5082 ****
3020 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
3021 sReport += icValidateNonCompliantMsg;
3022 sReport += sSigName;
3023 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\r\n";
3024 rv = icMaxStatus(rv, icValidateNonCompliant);
3027 --- 5076,5082 ----
3028 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
3029 sReport += icValidateNonCompliantMsg;
3030 sReport += sSigName;
3031 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\n";
3032 rv = icMaxStatus(rv, icValidateNonCompliant);
3035 ***************
3036 *** 5084,5090 ****
3037 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3038 sReport += icValidateNonCompliantMsg;
3039 sReport += sSigName;
3040 ! sReport += " - Incorrect number of colorants.\r\n";
3041 rv = icMaxStatus(rv, icValidateNonCompliant);
3044 --- 5084,5090 ----
3045 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3046 sReport += icValidateNonCompliantMsg;
3047 sReport += sSigName;
3048 ! sReport += " - Incorrect number of colorants.\n";
3049 rv = icMaxStatus(rv, icValidateNonCompliant);
3052 ***************
3053 *** 5261,5273 ****
3054 icChar buf[128];
3055 CIccInfo Fmt;
3057 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
3058 icFtoD(m_XYZIllum.X),
3059 icFtoD(m_XYZIllum.Y),
3060 icFtoD(m_XYZIllum.Z));
3061 sDescription += buf;
3063 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
3064 icFtoD(m_XYZSurround.X),
3065 icFtoD(m_XYZSurround.Y),
3066 icFtoD(m_XYZSurround.Z));
3067 --- 5261,5273 ----
3068 icChar buf[128];
3069 CIccInfo Fmt;
3071 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3072 icFtoD(m_XYZIllum.X),
3073 icFtoD(m_XYZIllum.Y),
3074 icFtoD(m_XYZIllum.Z));
3075 sDescription += buf;
3077 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3078 icFtoD(m_XYZSurround.X),
3079 icFtoD(m_XYZSurround.Y),
3080 icFtoD(m_XYZSurround.Z));
3081 ***************
3082 *** 5276,5282 ****
3083 sDescription += "Illuminant Type: ";
3085 sDescription += Fmt.GetIlluminantName(m_illumType);
3086 ! sDescription += "\r\n";
3090 --- 5276,5282 ----
3091 sDescription += "Illuminant Type: ";
3093 sDescription += Fmt.GetIlluminantName(m_illumType);
3094 ! sDescription += "\n";
3098 ***************
3099 *** 5800,5831 ****
3100 icChar buf[128], buf2[28];
3101 icUInt32Number count=0;
3103 ! sprintf(buf, "Number of Profile Description Structures: %u\r\n", m_Descriptions->size());
3104 sDescription += buf;
3106 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3107 ! sDescription += "\r\n";
3109 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\r\n", count+1);
3110 sDescription += buf;
3112 ! sprintf(buf, "Device Manufacturer Signature: %s\r\n", icGetSig(buf2, i->m_deviceMfg, false));
3113 sDescription += buf;
3115 ! sprintf(buf, "Device Model Signature: %s\r\n", icGetSig(buf2, i->m_deviceModel, false));
3116 sDescription += buf;
3118 ! sprintf(buf, "Device Attributes: %08x%08x\r\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3119 sDescription += buf;
3121 ! sprintf(buf, "Device Technology Signature: %s\r\n", icGetSig(buf2, i->m_technology, false));
3122 sDescription += buf;
3124 ! sprintf(buf, "Description of device manufacturer: \r\n");
3125 sDescription += buf;
3126 i->m_deviceMfgDesc.Describe(sDescription);
3128 ! sprintf(buf, "Description of device model: \r\n");
3129 sDescription += buf;
3130 i->m_deviceModelDesc.Describe(sDescription);
3132 --- 5800,5831 ----
3133 icChar buf[128], buf2[28];
3134 icUInt32Number count=0;
3136 ! sprintf(buf, "Number of Profile Description Structures: %u\n", m_Descriptions->size());
3137 sDescription += buf;
3139 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3140 ! sDescription += "\n";
3142 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\n", count+1);
3143 sDescription += buf;
3145 ! sprintf(buf, "Device Manufacturer Signature: %s\n", icGetSig(buf2, i->m_deviceMfg, false));
3146 sDescription += buf;
3148 ! sprintf(buf, "Device Model Signature: %s\n", icGetSig(buf2, i->m_deviceModel, false));
3149 sDescription += buf;
3151 ! sprintf(buf, "Device Attributes: %08x%08x\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3152 sDescription += buf;
3154 ! sprintf(buf, "Device Technology Signature: %s\n", icGetSig(buf2, i->m_technology, false));
3155 sDescription += buf;
3157 ! sprintf(buf, "Description of device manufacturer: \n");
3158 sDescription += buf;
3159 i->m_deviceMfgDesc.Describe(sDescription);
3161 ! sprintf(buf, "Description of device model: \n");
3162 sDescription += buf;
3163 i->m_deviceModelDesc.Describe(sDescription);
3165 ***************
3166 *** 5886,5892 ****
3168 sReport += icValidateNonCompliantMsg;
3169 sReport += sSigName;
3170 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(i->m_technology));
3171 sReport += buf;
3172 rv = icMaxStatus(rv, icValidateNonCompliant);
3174 --- 5886,5892 ----
3176 sReport += icValidateNonCompliantMsg;
3177 sReport += sSigName;
3178 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(i->m_technology));
3179 sReport += buf;
3180 rv = icMaxStatus(rv, icValidateNonCompliant);
3182 ***************
3183 *** 5896,5902 ****
3184 sReport += icValidateNonCompliantMsg;
3185 sReport += sSigName;
3187 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\r\n";
3189 rv = icMaxStatus(rv, icValidateNonCompliant);
3191 --- 5896,5902 ----
3192 sReport += icValidateNonCompliantMsg;
3193 sReport += sSigName;
3195 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\n";
3197 rv = icMaxStatus(rv, icValidateNonCompliant);
3199 ***************
3200 *** 5905,5911 ****
3201 sReport += icValidateNonCompliantMsg;
3202 sReport += sSigName;
3204 ! sReport += " Contains non-aligned deviceModelDesc text tag information\r\n";
3206 rv = icMaxStatus(rv, icValidateNonCompliant);
3208 --- 5905,5911 ----
3209 sReport += icValidateNonCompliantMsg;
3210 sReport += sSigName;
3212 ! sReport += " Contains non-aligned deviceModelDesc text tag information\n";
3214 rv = icMaxStatus(rv, icValidateNonCompliant);
3216 ***************
3217 *** 6174,6198 ****
3218 CIccResponse16List::iterator j;
3220 sDescription += "Measurement Unit: ";
3221 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\r\n";
3224 for (int i=0; i<m_nChannels; i++) {
3225 nResponseList = m_Response16ListArray[i];
3227 ! sDescription += "\r\n";
3228 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i+1,
3229 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3230 sDescription += buf;
3232 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\r\n", i+1, nResponseList.size());
3233 sDescription += buf;
3235 ! sprintf(buf, "Measurement Data for Channel-%u follows:\r\n", i+1);
3236 sDescription += buf;
3238 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3239 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\r\n", j->deviceCode, icFtoD(j->measurementValue));
3240 sDescription += buf;
3243 --- 6174,6198 ----
3244 CIccResponse16List::iterator j;
3246 sDescription += "Measurement Unit: ";
3247 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\n";
3250 for (int i=0; i<m_nChannels; i++) {
3251 nResponseList = m_Response16ListArray[i];
3253 ! sDescription += "\n";
3254 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\n", i+1,
3255 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3256 sDescription += buf;
3258 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\n", i+1, nResponseList.size());
3259 sDescription += buf;
3261 ! sprintf(buf, "Measurement Data for Channel-%u follows:\n", i+1);
3262 sDescription += buf;
3264 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3265 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\n", j->deviceCode, icFtoD(j->measurementValue));
3266 sDescription += buf;
3269 ***************
3270 *** 6234,6240 ****
3271 default:
3272 sReport += icValidateNonCompliantMsg;
3273 sReport += sSigName;
3274 ! sReport += " - Unknown measurement unit signature.\r\n";
3275 rv = icMaxStatus(rv, icValidateNonCompliant);
3278 --- 6234,6240 ----
3279 default:
3280 sReport += icValidateNonCompliantMsg;
3281 sReport += sSigName;
3282 ! sReport += " - Unknown measurement unit signature.\n";
3283 rv = icMaxStatus(rv, icValidateNonCompliant);
3286 ***************
3287 *** 6241,6247 ****
3288 if (!m_nChannels) {
3289 sReport += icValidateNonCompliantMsg;
3290 sReport += sSigName;
3291 ! sReport += " - Incorrect number of channels.\r\n";
3292 rv = icMaxStatus(rv, icValidateNonCompliant);
3293 return rv;
3295 --- 6241,6247 ----
3296 if (!m_nChannels) {
3297 sReport += icValidateNonCompliantMsg;
3298 sReport += sSigName;
3299 ! sReport += " - Incorrect number of channels.\n";
3300 rv = icMaxStatus(rv, icValidateNonCompliant);
3301 return rv;
3303 ***************
3304 *** 6479,6495 ****
3305 CIccResponseCurveSet::iterator i;
3306 icChar buf[128];
3308 ! sprintf(buf, "Number of Channels: %u\r\n", m_nChannels);
3309 sDescription += buf;
3311 ! sprintf(buf, "Number of Measurement Types used: %u\r\n", m_ResponseCurves->size());
3312 sDescription += buf;
3314 int count = 0;
3315 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3316 ! sDescription += "\r\n";
3318 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\r\n", count+1);
3319 sDescription += buf;
3321 i->Describe(sDescription);
3322 --- 6479,6495 ----
3323 CIccResponseCurveSet::iterator i;
3324 icChar buf[128];
3326 ! sprintf(buf, "Number of Channels: %u\n", m_nChannels);
3327 sDescription += buf;
3329 ! sprintf(buf, "Number of Measurement Types used: %u\n", m_ResponseCurves->size());
3330 sDescription += buf;
3332 int count = 0;
3333 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3334 ! sDescription += "\n";
3336 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\n", count+1);
3337 sDescription += buf;
3339 i->Describe(sDescription);
3340 ***************
3341 *** 6658,6664 ****
3342 if (!pProfile) {
3343 sReport += icValidateWarningMsg;
3344 sReport += sSigName;
3345 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3346 rv = icMaxStatus(rv, icValidateWarning);
3347 return rv;
3349 --- 6658,6664 ----
3350 if (!pProfile) {
3351 sReport += icValidateWarningMsg;
3352 sReport += sSigName;
3353 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3354 rv = icMaxStatus(rv, icValidateWarning);
3355 return rv;
3357 ***************
3358 *** 6666,6678 ****
3359 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3360 sReport += icValidateWarningMsg;
3361 sReport += sSigName;
3362 ! sReport += " - Incorrect number of channels.\r\n";
3365 if (!GetNumResponseCurveTypes()) {
3366 sReport += icValidateWarningMsg;
3367 sReport += sSigName;
3368 ! sReport += " - Empty Tag!.\r\n";
3369 rv = icMaxStatus(rv, icValidateWarning);
3371 else {
3372 --- 6666,6678 ----
3373 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3374 sReport += icValidateWarningMsg;
3375 sReport += sSigName;
3376 ! sReport += " - Incorrect number of channels.\n";
3379 if (!GetNumResponseCurveTypes()) {
3380 sReport += icValidateWarningMsg;
3381 sReport += sSigName;
3382 ! sReport += " - Empty Tag!.\n";
3383 rv = icMaxStatus(rv, icValidateWarning);
3385 else {
3386 *** misc/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Mon Aug 20 22:05:00 2007
3387 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Fri Jan 25 14:23:09 2008
3388 ***************
3389 *** 323,345 ****
3390 icChar buf[128], *ptr;
3392 if (!m_nSize) {
3393 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3394 sDescription += buf;
3395 ! sDescription += "Y = X\r\n";
3397 else if (m_nSize==1) {
3398 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3399 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3400 sDescription += buf;
3401 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3402 sDescription += buf;
3404 else {
3405 int i;
3407 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\r\n");
3408 sDescription += buf;
3409 ! sDescription += "IN OUT\r\n";
3411 for (i=0; i<(int)m_nSize; i++) {
3412 ptr = buf;
3413 --- 323,345 ----
3414 icChar buf[128], *ptr;
3416 if (!m_nSize) {
3417 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3418 sDescription += buf;
3419 ! sDescription += "Y = X\n";
3421 else if (m_nSize==1) {
3422 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3423 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3424 sDescription += buf;
3425 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3426 sDescription += buf;
3428 else {
3429 int i;
3431 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\n");
3432 sDescription += buf;
3433 ! sDescription += "IN OUT\n";
3435 for (i=0; i<(int)m_nSize; i++) {
3436 ptr = buf;
3437 ***************
3438 *** 354,365 ****
3440 ptr += strlen(ptr);
3442 ! strcpy(ptr, "\r\n");
3444 sDescription += buf;
3447 ! sDescription += "\r\n";
3451 --- 354,365 ----
3453 ptr += strlen(ptr);
3455 ! strcpy(ptr, "\n");
3457 sDescription += buf;
3460 ! sDescription += "\n";
3464 ***************
3465 *** 383,405 ****
3466 icChar buf[128], *ptr;
3468 if (!m_nSize) {
3469 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3470 sDescription += buf;
3471 ! sDescription += "Y = X\r\n";
3473 else if (m_nSize==1) {
3474 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3475 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3476 sDescription += buf;
3477 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3478 sDescription += buf;
3480 else {
3481 int i;
3483 ! sprintf(buf, "BEGIN_LUT %s 1 1\r\n", szName);
3484 sDescription += buf;
3485 ! sDescription += "IN OUT\r\n";
3487 sDescription.reserve(sDescription.size() + m_nSize * 20);
3489 --- 383,405 ----
3490 icChar buf[128], *ptr;
3492 if (!m_nSize) {
3493 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3494 sDescription += buf;
3495 ! sDescription += "Y = X\n";
3497 else if (m_nSize==1) {
3498 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3499 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3500 sDescription += buf;
3501 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3502 sDescription += buf;
3504 else {
3505 int i;
3507 ! sprintf(buf, "BEGIN_LUT %s 1 1\n", szName);
3508 sDescription += buf;
3509 ! sDescription += "IN OUT\n";
3511 sDescription.reserve(sDescription.size() + m_nSize * 20);
3513 ***************
3514 *** 416,427 ****
3516 ptr += strlen(ptr);
3518 ! strcpy(ptr, "\r\n");
3520 sDescription += buf;
3523 ! sDescription += "\r\n";
3527 --- 416,427 ----
3529 ptr += strlen(ptr);
3531 ! strcpy(ptr, "\n");
3533 sDescription += buf;
3536 ! sDescription += "\n";
3540 ***************
3541 *** 614,620 ****
3542 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3543 sReport += icValidateWarningMsg;
3544 sReport += sSigName;
3545 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3546 rv = icMaxStatus(rv, icValidateWarning);
3549 --- 614,620 ----
3550 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3551 sReport += icValidateWarningMsg;
3552 sReport += sSigName;
3553 ! sReport += " - Curve cannot be accurately inverted.\n";
3554 rv = icMaxStatus(rv, icValidateWarning);
3557 ***************
3558 *** 822,877 ****
3560 icChar buf[128];
3562 ! sprintf(buf, "FunctionType: %04Xh\r\n", m_nFunctionType);
3563 sDescription += buf;
3565 switch(m_nFunctionType) {
3566 case 0x0000:
3567 ! sprintf(buf, "Y = X ^ %.4lf\r\n", icFtoD(m_Param[0]));
3568 sDescription += buf;
3569 return;
3571 case 0x0001:
3572 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\r\n",
3573 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3574 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3575 sDescription += buf;
3577 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\r\n",
3578 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3579 sDescription += buf;
3580 return;
3582 case 0x0002:
3583 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\r\n",
3584 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3585 icFtoD(m_Param[3]),
3586 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3587 sDescription += buf;
3589 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\r\n", icFtoD(m_Param[3]),
3590 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3591 sDescription += buf;
3592 return;
3594 case 0x0003:
3595 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\r\n",
3596 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3597 icFtoD(m_Param[4]));
3598 sDescription += buf;
3600 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\r\n",
3601 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3602 sDescription += buf;
3603 return;
3605 case 0x0004:
3606 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\r\n",
3607 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3608 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3609 sDescription += buf;
3611 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\r\n",
3612 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3613 sDescription += buf;
3614 return;
3615 --- 822,877 ----
3617 icChar buf[128];
3619 ! sprintf(buf, "FunctionType: %04Xh\n", m_nFunctionType);
3620 sDescription += buf;
3622 switch(m_nFunctionType) {
3623 case 0x0000:
3624 ! sprintf(buf, "Y = X ^ %.4lf\n", icFtoD(m_Param[0]));
3625 sDescription += buf;
3626 return;
3628 case 0x0001:
3629 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\n",
3630 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3631 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3632 sDescription += buf;
3634 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\n",
3635 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3636 sDescription += buf;
3637 return;
3639 case 0x0002:
3640 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\n",
3641 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3642 icFtoD(m_Param[3]),
3643 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3644 sDescription += buf;
3646 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\n", icFtoD(m_Param[3]),
3647 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3648 sDescription += buf;
3649 return;
3651 case 0x0003:
3652 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\n",
3653 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3654 icFtoD(m_Param[4]));
3655 sDescription += buf;
3657 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\n",
3658 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3659 sDescription += buf;
3660 return;
3662 case 0x0004:
3663 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\n",
3664 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3665 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3666 sDescription += buf;
3668 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\n",
3669 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3670 sDescription += buf;
3671 return;
3672 ***************
3673 *** 878,888 ****
3675 default:
3676 int i;
3677 ! sprintf(buf, "Unknown Function with %d parameters:\r\n");
3678 sDescription += buf;
3680 for (i=0; i<m_nNumParam; i++) {
3681 ! sprintf(buf, "Param[%d] = %.4lf\r\n", i, icFtoD(m_Param[i]));
3682 sDescription += buf;
3685 --- 878,888 ----
3687 default:
3688 int i;
3689 ! sprintf(buf, "Unknown Function with %d parameters:\n", m_nNumParam);
3690 sDescription += buf;
3692 for (i=0; i<m_nNumParam; i++) {
3693 ! sprintf(buf, "Param[%d] = %.4lf\n", i, icFtoD(m_Param[i]));
3694 sDescription += buf;
3697 ***************
3698 *** 907,916 ****
3700 icChar buf[128];
3702 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3703 sDescription += buf;
3704 Describe(sDescription);
3705 ! sDescription += "\r\n";
3709 --- 907,916 ----
3711 icChar buf[128];
3713 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3714 sDescription += buf;
3715 Describe(sDescription);
3716 ! sDescription += "\n";
3720 ***************
3721 *** 1106,1112 ****
3722 if (m_nReserved2!=0) {
3723 sReport += icValidateNonCompliantMsg;
3724 sReport += sSigName;
3725 ! sReport += " - Reserved Value must be zero.\r\n";
3727 rv = icMaxStatus(rv, icValidateNonCompliant);
3729 --- 1106,1112 ----
3730 if (m_nReserved2!=0) {
3731 sReport += icValidateNonCompliantMsg;
3732 sReport += sSigName;
3733 ! sReport += " - Reserved Value must be zero.\n";
3735 rv = icMaxStatus(rv, icValidateNonCompliant);
3737 ***************
3738 *** 1116,1122 ****
3739 if (m_nNumParam!=1) {
3740 sReport += icValidateCriticalErrorMsg;
3741 sReport += sSigName;
3742 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3743 rv = icMaxStatus(rv, icValidateCriticalError);
3745 break;
3746 --- 1116,1122 ----
3747 if (m_nNumParam!=1) {
3748 sReport += icValidateCriticalErrorMsg;
3749 sReport += sSigName;
3750 ! sReport += " - Number of parameters inconsistent with function type.\n";
3751 rv = icMaxStatus(rv, icValidateCriticalError);
3753 break;
3754 ***************
3755 *** 1125,1131 ****
3756 if (m_nNumParam!=3) {
3757 sReport += icValidateCriticalErrorMsg;
3758 sReport += sSigName;
3759 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3760 rv = icMaxStatus(rv, icValidateCriticalError);
3762 break;
3763 --- 1125,1131 ----
3764 if (m_nNumParam!=3) {
3765 sReport += icValidateCriticalErrorMsg;
3766 sReport += sSigName;
3767 ! sReport += " - Number of parameters inconsistent with function type.\n";
3768 rv = icMaxStatus(rv, icValidateCriticalError);
3770 break;
3771 ***************
3772 *** 1134,1140 ****
3773 if (m_nNumParam!=4) {
3774 sReport += icValidateCriticalErrorMsg;
3775 sReport += sSigName;
3776 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3777 rv = icMaxStatus(rv, icValidateCriticalError);
3779 break;
3780 --- 1134,1140 ----
3781 if (m_nNumParam!=4) {
3782 sReport += icValidateCriticalErrorMsg;
3783 sReport += sSigName;
3784 ! sReport += " - Number of parameters inconsistent with function type.\n";
3785 rv = icMaxStatus(rv, icValidateCriticalError);
3787 break;
3788 ***************
3789 *** 1143,1149 ****
3790 if (m_nNumParam!=5) {
3791 sReport += icValidateCriticalErrorMsg;
3792 sReport += sSigName;
3793 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3794 rv = icMaxStatus(rv, icValidateCriticalError);
3796 break;
3797 --- 1143,1149 ----
3798 if (m_nNumParam!=5) {
3799 sReport += icValidateCriticalErrorMsg;
3800 sReport += sSigName;
3801 ! sReport += " - Number of parameters inconsistent with function type.\n";
3802 rv = icMaxStatus(rv, icValidateCriticalError);
3804 break;
3805 ***************
3806 *** 1152,1158 ****
3807 if (m_nNumParam!=7) {
3808 sReport += icValidateCriticalErrorMsg;
3809 sReport += sSigName;
3810 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3811 rv = icMaxStatus(rv, icValidateCriticalError);
3813 break;
3814 --- 1152,1158 ----
3815 if (m_nNumParam!=7) {
3816 sReport += icValidateCriticalErrorMsg;
3817 sReport += sSigName;
3818 ! sReport += " - Number of parameters inconsistent with function type.\n";
3819 rv = icMaxStatus(rv, icValidateCriticalError);
3821 break;
3822 ***************
3823 *** 1160,1166 ****
3824 default:
3825 sReport += icValidateCriticalErrorMsg;
3826 sReport += sSigName;
3827 ! sReport += " - Unknown function type.\r\n";
3828 rv = icMaxStatus(rv, icValidateCriticalError);
3831 --- 1160,1166 ----
3832 default:
3833 sReport += icValidateCriticalErrorMsg;
3834 sReport += sSigName;
3835 ! sReport += " - Unknown function type.\n";
3836 rv = icMaxStatus(rv, icValidateCriticalError);
3839 ***************
3840 *** 1170,1176 ****
3841 if (lval>0.0 || uval<1.0) {
3842 sReport += icValidateWarningMsg;
3843 sReport += sSigName;
3844 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3845 rv = icMaxStatus(rv, icValidateWarning);
3848 --- 1170,1176 ----
3849 if (lval>0.0 || uval<1.0) {
3850 sReport += icValidateWarningMsg;
3851 sReport += sSigName;
3852 ! sReport += " - Curve cannot be accurately inverted.\n";
3853 rv = icMaxStatus(rv, icValidateWarning);
3856 ***************
3857 *** 1255,1286 ****
3859 icChar buf[128];
3861 ! sprintf(buf, "BEGIN_MATRIX %s\r\n", szName);
3862 sDescription += buf;
3864 if (!m_bUseConstants) {
3865 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3866 m_e[0], m_e[1], m_e[2]);
3867 sDescription += buf;
3868 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3869 m_e[3], m_e[4], m_e[5]);
3870 sDescription += buf;
3871 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3872 m_e[6], m_e[7], m_e[8]);
3873 sDescription += buf;
3875 else {
3876 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3877 m_e[0], m_e[1], m_e[2], m_e[9]);
3878 sDescription += buf;
3879 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3880 m_e[3], m_e[4], m_e[5], m_e[10]);
3881 sDescription += buf;
3882 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3883 m_e[6], m_e[7], m_e[8], m_e[11]);
3884 sDescription += buf;
3886 ! sDescription += "\r\n";
3890 --- 1255,1286 ----
3892 icChar buf[128];
3894 ! sprintf(buf, "BEGIN_MATRIX %s\n", szName);
3895 sDescription += buf;
3897 if (!m_bUseConstants) {
3898 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3899 m_e[0], m_e[1], m_e[2]);
3900 sDescription += buf;
3901 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3902 m_e[3], m_e[4], m_e[5]);
3903 sDescription += buf;
3904 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3905 m_e[6], m_e[7], m_e[8]);
3906 sDescription += buf;
3908 else {
3909 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3910 m_e[0], m_e[1], m_e[2], m_e[9]);
3911 sDescription += buf;
3912 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3913 m_e[3], m_e[4], m_e[5], m_e[10]);
3914 sDescription += buf;
3915 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3916 m_e[6], m_e[7], m_e[8], m_e[11]);
3917 sDescription += buf;
3919 ! sDescription += "\n";
3923 ***************
3924 *** 1377,1383 ****
3925 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3926 sReport += icValidateNonCompliantMsg;
3927 sReport += sSigName;
3928 ! sReport += " - Matrix must be identity.\r\n";
3929 rv = icValidateNonCompliant;
3932 --- 1377,1383 ----
3933 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3934 sReport += icValidateNonCompliantMsg;
3935 sReport += sSigName;
3936 ! sReport += " - Matrix must be identity.\n";
3937 rv = icValidateNonCompliant;
3940 ***************
3941 *** 1754,1760 ****
3943 ptr += sprintf(ptr, " %s", m_pVal);
3945 ! strcpy(ptr, "\r\n");
3946 sDescription += (const icChar*)m_pOutText;
3949 --- 1754,1760 ----
3951 ptr += sprintf(ptr, " %s", m_pVal);
3953 ! strcpy(ptr, "\n");
3954 sDescription += (const icChar*)m_pOutText;
3957 ***************
3958 *** 1866,1872 ****
3959 icChar szOutText[2048], szColor[40];
3960 int i, len;
3962 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\r\n", szName, m_nInput, m_nOutput);
3963 sDescription += szOutText;
3965 for (i=0; i<m_nInput; i++) {
3966 --- 1866,1872 ----
3967 icChar szOutText[2048], szColor[40];
3968 int i, len;
3970 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\n", szName, m_nInput, m_nOutput);
3971 sDescription += szOutText;
3973 for (i=0; i<m_nInput; i++) {
3974 ***************
3975 *** 1883,1889 ****
3976 sDescription += szOutText;
3979 ! sDescription += "\r\n";
3981 len = 0;
3982 for (i=0; i<m_nInput; i++) {
3983 --- 1883,1889 ----
3984 sDescription += szOutText;
3987 ! sDescription += "\n";
3989 len = 0;
3990 for (i=0; i<m_nInput; i++) {
3991 ***************
3992 *** 1907,1913 ****
3994 Iterate(sDescription, 0, 0);
3996 ! sDescription += "\r\n";
4000 --- 1907,1913 ----
4002 Iterate(sDescription, 0, 0);
4004 ! sDescription += "\n";
4008 ***************
4009 *** 2693,2699 ****
4010 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
4011 sReport += icValidateNonCompliantMsg;
4012 sReport += sSigName;
4013 ! sReport += " - Reserved Value must be zero.\r\n";
4015 rv = icValidateNonCompliant;
4017 --- 2693,2699 ----
4018 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
4019 sReport += icValidateNonCompliantMsg;
4020 sReport += sSigName;
4021 ! sReport += " - Reserved Value must be zero.\n";
4023 rv = icValidateNonCompliant;
4025 ***************
4026 *** 2704,2710 ****
4027 if (m_GridPoints[i]<2) {
4028 sReport += icValidateCriticalErrorMsg;
4029 sReport += sSigName;
4030 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\r\n",i );
4031 sReport += temp;
4032 rv = icMaxStatus(rv, icValidateCriticalError);
4034 --- 2704,2710 ----
4035 if (m_GridPoints[i]<2) {
4036 sReport += icValidateCriticalErrorMsg;
4037 sReport += sSigName;
4038 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\n",i );
4039 sReport += temp;
4040 rv = icMaxStatus(rv, icValidateCriticalError);
4042 ***************
4043 *** 3122,3128 ****
4044 if (!pProfile) {
4045 sReport += icValidateWarningMsg;
4046 sReport += sSigName;
4047 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4048 rv = icMaxStatus(rv, icValidateWarning);
4049 return rv;
4051 --- 3122,3128 ----
4052 if (!pProfile) {
4053 sReport += icValidateWarningMsg;
4054 sReport += sSigName;
4055 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4056 rv = icMaxStatus(rv, icValidateWarning);
4057 return rv;
4059 ***************
4060 *** 3138,3144 ****
4061 if (m_nInput!=nInput) {
4062 sReport += icValidateCriticalErrorMsg;
4063 sReport += sSigName;
4064 ! sReport += " - Incorrect number of input channels.\r\n";
4065 rv = icMaxStatus(rv, icValidateCriticalError);
4068 --- 3138,3144 ----
4069 if (m_nInput!=nInput) {
4070 sReport += icValidateCriticalErrorMsg;
4071 sReport += sSigName;
4072 ! sReport += " - Incorrect number of input channels.\n";
4073 rv = icMaxStatus(rv, icValidateCriticalError);
4076 ***************
4077 *** 3146,3152 ****
4078 if (m_nOutput!=nOutput) {
4079 sReport += icValidateCriticalErrorMsg;
4080 sReport += sSigName;
4081 ! sReport += " - Incorrect number of output channels.\r\n";
4082 rv = icMaxStatus(rv, icValidateCriticalError);
4085 --- 3146,3152 ----
4086 if (m_nOutput!=nOutput) {
4087 sReport += icValidateCriticalErrorMsg;
4088 sReport += sSigName;
4089 ! sReport += " - Incorrect number of output channels.\n";
4090 rv = icMaxStatus(rv, icValidateCriticalError);
4093 ***************
4094 *** 3160,3166 ****
4095 if (m_nInput!=nInput) {
4096 sReport += icValidateCriticalErrorMsg;
4097 sReport += sSigName;
4098 ! sReport += " - Incorrect number of input channels.\r\n";
4099 rv = icMaxStatus(rv, icValidateCriticalError);
4102 --- 3160,3166 ----
4103 if (m_nInput!=nInput) {
4104 sReport += icValidateCriticalErrorMsg;
4105 sReport += sSigName;
4106 ! sReport += " - Incorrect number of input channels.\n";
4107 rv = icMaxStatus(rv, icValidateCriticalError);
4110 ***************
4111 *** 3168,3174 ****
4112 if (m_nOutput!=nOutput) {
4113 sReport += icValidateCriticalErrorMsg;
4114 sReport += sSigName;
4115 ! sReport += " - Incorrect number of output channels.\r\n";
4116 rv = icMaxStatus(rv, icValidateCriticalError);
4119 --- 3168,3174 ----
4120 if (m_nOutput!=nOutput) {
4121 sReport += icValidateCriticalErrorMsg;
4122 sReport += sSigName;
4123 ! sReport += " - Incorrect number of output channels.\n";
4124 rv = icMaxStatus(rv, icValidateCriticalError);
4127 ***************
4128 *** 3180,3186 ****
4129 if (m_nInput!=nInput) {
4130 sReport += icValidateCriticalErrorMsg;
4131 sReport += sSigName;
4132 ! sReport += " - Incorrect number of input channels.\r\n";
4133 rv = icMaxStatus(rv, icValidateCriticalError);
4136 --- 3180,3186 ----
4137 if (m_nInput!=nInput) {
4138 sReport += icValidateCriticalErrorMsg;
4139 sReport += sSigName;
4140 ! sReport += " - Incorrect number of input channels.\n";
4141 rv = icMaxStatus(rv, icValidateCriticalError);
4144 ***************
4145 *** 3188,3194 ****
4146 if (m_nOutput!=nOutput) {
4147 sReport += icValidateCriticalErrorMsg;
4148 sReport += sSigName;
4149 ! sReport += " - Incorrect number of output channels.\r\n";
4150 rv = icMaxStatus(rv, icValidateCriticalError);
4153 --- 3188,3194 ----
4154 if (m_nOutput!=nOutput) {
4155 sReport += icValidateCriticalErrorMsg;
4156 sReport += sSigName;
4157 ! sReport += " - Incorrect number of output channels.\n";
4158 rv = icMaxStatus(rv, icValidateCriticalError);
4161 ***************
4162 *** 3206,3212 ****
4163 if (!m_CLUT) {
4164 sReport += icValidateCriticalErrorMsg;
4165 sReport += sSigName;
4166 ! sReport += " - CLUT must be present.\r\n";
4167 rv = icMaxStatus(rv, icValidateCriticalError);
4170 --- 3206,3212 ----
4171 if (!m_CLUT) {
4172 sReport += icValidateCriticalErrorMsg;
4173 sReport += sSigName;
4174 ! sReport += " - CLUT must be present.\n";
4175 rv = icMaxStatus(rv, icValidateCriticalError);
4178 ***************
4179 *** 3748,3754 ****
4180 else {
4181 sReport += icValidateCriticalErrorMsg;
4182 sReport += sSigName;
4183 ! sReport += " - Incorrect number of B-curves.\r\n";
4184 rv = icMaxStatus(rv, icValidateCriticalError);
4187 --- 3748,3754 ----
4188 else {
4189 sReport += icValidateCriticalErrorMsg;
4190 sReport += sSigName;
4191 ! sReport += " - Incorrect number of B-curves.\n";
4192 rv = icMaxStatus(rv, icValidateCriticalError);
4195 ***************
4196 *** 3762,3768 ****
4197 else {
4198 sReport += icValidateCriticalErrorMsg;
4199 sReport += sSigName;
4200 ! sReport += " - Incorrect number of M-curves.\r\n";
4201 rv = icMaxStatus(rv, icValidateCriticalError);
4204 --- 3762,3768 ----
4205 else {
4206 sReport += icValidateCriticalErrorMsg;
4207 sReport += sSigName;
4208 ! sReport += " - Incorrect number of M-curves.\n";
4209 rv = icMaxStatus(rv, icValidateCriticalError);
4212 ***************
4213 *** 3772,3778 ****
4214 if (!m_CLUT) {
4215 sReport += icValidateNonCompliantMsg;
4216 sReport += sSigName;
4217 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4219 rv = icMaxStatus(rv, icValidateNonCompliant);
4221 --- 3772,3778 ----
4222 if (!m_CLUT) {
4223 sReport += icValidateNonCompliantMsg;
4224 sReport += sSigName;
4225 ! sReport += " - CLUT must be present if using A-curves.\n";
4227 rv = icMaxStatus(rv, icValidateNonCompliant);
4229 ***************
4230 *** 3784,3790 ****
4231 else {
4232 sReport += icValidateCriticalErrorMsg;
4233 sReport += sSigName;
4234 ! sReport += " - Incorrect number of A-curves.\r\n";
4235 rv = icMaxStatus(rv, icValidateCriticalError);
4238 --- 3784,3790 ----
4239 else {
4240 sReport += icValidateCriticalErrorMsg;
4241 sReport += sSigName;
4242 ! sReport += " - Incorrect number of A-curves.\n";
4243 rv = icMaxStatus(rv, icValidateCriticalError);
4246 ***************
4247 *** 3876,3882 ****
4248 if (!pProfile) {
4249 sReport += icValidateWarningMsg;
4250 sReport += sSigName;
4251 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4252 rv = icMaxStatus(rv, icValidateCriticalError);
4253 return rv;
4255 --- 3876,3882 ----
4256 if (!pProfile) {
4257 sReport += icValidateWarningMsg;
4258 sReport += sSigName;
4259 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4260 rv = icMaxStatus(rv, icValidateCriticalError);
4261 return rv;
4263 ***************
4264 *** 3900,3906 ****
4265 if (m_nOutput!=nOutput) {
4266 sReport += icValidateCriticalErrorMsg;
4267 sReport += sSigName;
4268 ! sReport += " - Incorrect number of output channels.\r\n";
4269 rv = icMaxStatus(rv, icValidateCriticalError);
4272 --- 3900,3906 ----
4273 if (m_nOutput!=nOutput) {
4274 sReport += icValidateCriticalErrorMsg;
4275 sReport += sSigName;
4276 ! sReport += " - Incorrect number of output channels.\n";
4277 rv = icMaxStatus(rv, icValidateCriticalError);
4280 ***************
4281 *** 3913,3919 ****
4282 else {
4283 sReport += icValidateCriticalErrorMsg;
4284 sReport += sSigName;
4285 ! sReport += " - Incorrect number of B-curves.\r\n";
4286 rv = icMaxStatus(rv, icValidateCriticalError);
4289 --- 3913,3919 ----
4290 else {
4291 sReport += icValidateCriticalErrorMsg;
4292 sReport += sSigName;
4293 ! sReport += " - Incorrect number of B-curves.\n";
4294 rv = icMaxStatus(rv, icValidateCriticalError);
4297 ***************
4298 *** 3927,3933 ****
4299 else {
4300 sReport += icValidateCriticalErrorMsg;
4301 sReport += sSigName;
4302 ! sReport += " - Incorrect number of M-curves.\r\n";
4303 rv = icMaxStatus(rv, icValidateCriticalError);
4306 --- 3927,3933 ----
4307 else {
4308 sReport += icValidateCriticalErrorMsg;
4309 sReport += sSigName;
4310 ! sReport += " - Incorrect number of M-curves.\n";
4311 rv = icMaxStatus(rv, icValidateCriticalError);
4314 ***************
4315 *** 3937,3943 ****
4316 if (!m_CLUT) {
4317 sReport += icValidateNonCompliantMsg;
4318 sReport += sSigName;
4319 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4321 rv = icMaxStatus(rv, icValidateNonCompliant);
4323 --- 3937,3943 ----
4324 if (!m_CLUT) {
4325 sReport += icValidateNonCompliantMsg;
4326 sReport += sSigName;
4327 ! sReport += " - CLUT must be present if using A-curves.\n";
4329 rv = icMaxStatus(rv, icValidateNonCompliant);
4331 ***************
4332 *** 3949,3955 ****
4333 else {
4334 sReport += icValidateCriticalErrorMsg;
4335 sReport += sSigName;
4336 ! sReport += " - Incorrect number of A-curves.\r\n";
4337 rv = icMaxStatus(rv, icValidateCriticalError);
4340 --- 3949,3955 ----
4341 else {
4342 sReport += icValidateCriticalErrorMsg;
4343 sReport += sSigName;
4344 ! sReport += " - Incorrect number of A-curves.\n";
4345 rv = icMaxStatus(rv, icValidateCriticalError);
4348 ***************
4349 *** 4311,4317 ****
4350 if (pTagCurve->GetSize()==1) {
4351 sReport += icValidateCriticalErrorMsg;
4352 sReport += sSigName;
4353 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4354 rv = icMaxStatus(rv, icValidateCriticalError);
4357 --- 4311,4317 ----
4358 if (pTagCurve->GetSize()==1) {
4359 sReport += icValidateCriticalErrorMsg;
4360 sReport += sSigName;
4361 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4362 rv = icMaxStatus(rv, icValidateCriticalError);
4365 ***************
4366 *** 4319,4325 ****
4367 else {
4368 sReport += icValidateCriticalErrorMsg;
4369 sReport += sSigName;
4370 ! sReport += " - Incorrect number of B-curves.\r\n";
4371 rv = icMaxStatus(rv, icValidateCriticalError);
4374 --- 4319,4325 ----
4375 else {
4376 sReport += icValidateCriticalErrorMsg;
4377 sReport += sSigName;
4378 ! sReport += " - Incorrect number of B-curves.\n";
4379 rv = icMaxStatus(rv, icValidateCriticalError);
4382 ***************
4383 *** 4336,4342 ****
4384 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4385 sReport += icValidateWarningMsg;
4386 sReport += sSigName;
4387 ! sReport += " - Matrix must be identity.\r\n";
4388 rv = icMaxStatus(rv, icValidateWarning);
4391 --- 4336,4342 ----
4392 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4393 sReport += icValidateWarningMsg;
4394 sReport += sSigName;
4395 ! sReport += " - Matrix must be identity.\n";
4396 rv = icMaxStatus(rv, icValidateWarning);
4399 ***************
4400 *** 4351,4357 ****
4401 if (pTagCurve->GetSize()==1) {
4402 sReport += icValidateCriticalErrorMsg;
4403 sReport += sSigName;
4404 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4405 rv = icMaxStatus(rv, icValidateCriticalError);
4408 --- 4351,4357 ----
4409 if (pTagCurve->GetSize()==1) {
4410 sReport += icValidateCriticalErrorMsg;
4411 sReport += sSigName;
4412 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4413 rv = icMaxStatus(rv, icValidateCriticalError);
4416 ***************
4417 *** 4359,4365 ****
4418 else {
4419 sReport += icValidateCriticalErrorMsg;
4420 sReport += sSigName;
4421 ! sReport += " - Incorrect number of A-curves.\r\n";
4422 rv = icMaxStatus(rv, icValidateCriticalError);
4425 --- 4359,4365 ----
4426 else {
4427 sReport += icValidateCriticalErrorMsg;
4428 sReport += sSigName;
4429 ! sReport += " - Incorrect number of A-curves.\n";
4430 rv = icMaxStatus(rv, icValidateCriticalError);
4433 ***************
4434 *** 4721,4727 ****
4435 if (pTagCurve->GetSize()==1) {
4436 sReport += icValidateCriticalErrorMsg;
4437 sReport += sSigName;
4438 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4439 rv = icMaxStatus(rv, icValidateCriticalError);
4442 --- 4721,4727 ----
4443 if (pTagCurve->GetSize()==1) {
4444 sReport += icValidateCriticalErrorMsg;
4445 sReport += sSigName;
4446 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4447 rv = icMaxStatus(rv, icValidateCriticalError);
4450 ***************
4451 *** 4729,4735 ****
4452 else {
4453 sReport += icValidateCriticalErrorMsg;
4454 sReport += sSigName;
4455 ! sReport += " - Incorrect number of B-curves.\r\n";
4456 rv = icMaxStatus(rv, icValidateCriticalError);
4459 --- 4729,4735 ----
4460 else {
4461 sReport += icValidateCriticalErrorMsg;
4462 sReport += sSigName;
4463 ! sReport += " - Incorrect number of B-curves.\n";
4464 rv = icMaxStatus(rv, icValidateCriticalError);
4467 ***************
4468 *** 4746,4752 ****
4469 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4470 sReport += icValidateWarningMsg;
4471 sReport += sSigName;
4472 ! sReport += " - Matrix must be identity.\r\n";
4473 rv = icMaxStatus(rv, icValidateWarning);
4476 --- 4746,4752 ----
4477 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4478 sReport += icValidateWarningMsg;
4479 sReport += sSigName;
4480 ! sReport += " - Matrix must be identity.\n";
4481 rv = icMaxStatus(rv, icValidateWarning);
4484 ***************
4485 *** 4761,4767 ****
4486 if (pTagCurve->GetSize()==1) {
4487 sReport += icValidateCriticalErrorMsg;
4488 sReport += sSigName;
4489 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4490 rv = icMaxStatus(rv, icValidateCriticalError);
4493 --- 4761,4767 ----
4494 if (pTagCurve->GetSize()==1) {
4495 sReport += icValidateCriticalErrorMsg;
4496 sReport += sSigName;
4497 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4498 rv = icMaxStatus(rv, icValidateCriticalError);
4501 ***************
4502 *** 4769,4775 ****
4503 else {
4504 sReport += icValidateCriticalErrorMsg;
4505 sReport += sSigName;
4506 ! sReport += " - Incorrect number of A-curves.\r\n";
4507 rv = icMaxStatus(rv, icValidateCriticalError);
4510 --- 4769,4775 ----
4511 else {
4512 sReport += icValidateCriticalErrorMsg;
4513 sReport += sSigName;
4514 ! sReport += " - Incorrect number of A-curves.\n";
4515 rv = icMaxStatus(rv, icValidateCriticalError);
4518 *** misc/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Mon Aug 20 22:05:00 2007
4519 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Fri Jan 25 14:23:09 2008
4520 ***************
4521 *** 218,224 ****
4522 icGetSig(sigbuf, m_sig), m_nSize);
4523 sDescription += buf;
4525 ! sDescription += "\r\n\r\nData Follows:\r\n";
4527 icMemDump(sDescription, m_pData, m_nSize);
4529 --- 218,224 ----
4530 icGetSig(sigbuf, m_sig), m_nSize);
4531 sDescription += buf;
4533 ! sDescription += "\n\nData Follows:\n";
4535 icMemDump(sDescription, m_pData, m_nSize);
4537 ***************
4538 *** 364,370 ****
4539 sReport += " - Contains unknown processing element type (";
4540 icGetSig(buf, m_sig, true);
4541 sReport += buf;
4542 ! sReport += ").\r\n";
4544 return icValidateCriticalError;
4546 --- 364,370 ----
4547 sReport += " - Contains unknown processing element type (";
4548 icGetSig(buf, m_sig, true);
4549 sReport += buf;
4550 ! sReport += ").\n";
4552 return icValidateCriticalError;
4554 ***************
4555 *** 392,398 ****
4556 sReport += " - Element ";
4557 sSigName = Info.GetSigName(GetType());
4558 sReport += sSigName;
4559 ! sReport += " - Reserved Value must be zero.\r\n";
4561 rv = icValidateNonCompliant;
4563 --- 392,398 ----
4564 sReport += " - Element ";
4565 sSigName = Info.GetSigName(GetType());
4566 sReport += sSigName;
4567 ! sReport += " - Reserved Value must be zero.\n";
4569 rv = icValidateNonCompliant;
4571 ***************
4572 *** 738,755 ****
4574 icChar buf[128];
4576 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\r\n", m_nInputChannels, m_nOutputChannels);
4577 sDescription += buf;
4578 ! sDescription += "\r\n";
4580 CIccMultiProcessElementList::iterator i;
4581 int j;
4583 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4584 ! sprintf(buf, "PROCESS_ELEMENT #%d\r\n", j+1);
4585 sDescription += buf;
4586 i->ptr->Describe(sDescription);
4587 ! sDescription += "\r\n";
4591 --- 738,755 ----
4593 icChar buf[128];
4595 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\n", m_nInputChannels, m_nOutputChannels);
4596 sDescription += buf;
4597 ! sDescription += "\n";
4599 CIccMultiProcessElementList::iterator i;
4600 int j;
4602 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4603 ! sprintf(buf, "PROCESS_ELEMENT #%d\n", j+1);
4604 sDescription += buf;
4605 i->ptr->Describe(sDescription);
4606 ! sDescription += "\n";
4610 ***************
4611 *** 1207,1219 ****
4612 if (m_nInputChannels != m_nOutputChannels) {
4613 sReport += icValidateCriticalErrorMsg;
4614 sReport += sSigName;
4615 ! sReport += " No processing elements and input and output channels do not match!\r\n";
4616 return icValidateCriticalError;
4618 else {
4619 sReport += icValidateWarningMsg;
4620 sReport += sSigName;
4621 ! sReport += " No processing elements.\r\n";
4622 return icValidateWarning;
4625 --- 1207,1219 ----
4626 if (m_nInputChannels != m_nOutputChannels) {
4627 sReport += icValidateCriticalErrorMsg;
4628 sReport += sSigName;
4629 ! sReport += " No processing elements and input and output channels do not match!\n";
4630 return icValidateCriticalError;
4632 else {
4633 sReport += icValidateWarningMsg;
4634 sReport += sSigName;
4635 ! sReport += " No processing elements.\n";
4636 return icValidateWarning;
4639 ***************
4640 *** 1224,1230 ****
4641 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4642 sReport += icValidateCriticalErrorMsg;
4643 sReport += sSigName;
4644 ! sReport += " Mis-matching number of input channels!\r\n";
4645 return icValidateCriticalError;
4648 --- 1224,1230 ----
4649 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4650 sReport += icValidateCriticalErrorMsg;
4651 sReport += sSigName;
4652 ! sReport += " Mis-matching number of input channels!\n";
4653 return icValidateCriticalError;
4656 ***************
4657 *** 1239,1245 ****
4658 sReport += "->";
4659 sReport += i->ptr->GetClassName();
4661 ! sReport += " Mis-matching number of channels!\r\n";
4662 return icValidateCriticalError;
4665 --- 1239,1245 ----
4666 sReport += "->";
4667 sReport += i->ptr->GetClassName();
4669 ! sReport += " Mis-matching number of channels!\n";
4670 return icValidateCriticalError;
4673 ***************
4674 *** 1251,1257 ****
4675 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4676 sReport += icValidateCriticalErrorMsg;
4677 sReport += sSigName;
4678 ! sReport += " Mis-matching number of output channels!\r\n";
4679 return icValidateCriticalError;
4682 --- 1251,1257 ----
4683 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4684 sReport += icValidateCriticalErrorMsg;
4685 sReport += sSigName;
4686 ! sReport += " Mis-matching number of output channels!\n";
4687 return icValidateCriticalError;
4690 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Mon Aug 20 22:05:00 2007
4691 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Fri Jan 25 14:23:09 2008
4692 ***************
4693 *** 234,240 ****
4695 std::string Dump;
4697 ! sDescription += "ProfileID:\r\n";
4699 int i;
4700 char buf[20];
4701 --- 234,240 ----
4703 std::string Dump;
4705 ! sDescription += "ProfileID:\n";
4707 int i;
4708 char buf[20];
4709 ***************
4710 *** 244,255 ****
4711 sprintf(buf, "%2x", m_profileID.ID8[i]);
4712 sDescription += buf;
4714 ! sDescription += "\r\n";
4716 ! sDescription += "Description:\r\n";
4717 m_desc.Describe(sDescription);
4719 ! sDescription += "\r\n";
4723 --- 244,255 ----
4724 sprintf(buf, "%2x", m_profileID.ID8[i]);
4725 sDescription += buf;
4727 ! sDescription += "\n";
4729 ! sDescription += "Description:\n";
4730 m_desc.Describe(sDescription);
4732 ! sDescription += "\n";
4736 ***************
4737 *** 434,454 ****
4739 icChar buf[128];
4741 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\r\n");
4742 sDescription += buf;
4743 ! sDescription += "\r\n";
4745 int i;
4746 CIccProfileIdDescList::iterator j;
4747 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4748 ! sprintf(buf, "ProfileDescription_%d:\r\n", i+1);
4749 sDescription += buf;
4750 j->Describe(sDescription);
4753 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\r\n");
4754 sDescription += buf;
4755 ! sDescription += "\r\n";
4759 --- 434,454 ----
4761 icChar buf[128];
4763 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\n");
4764 sDescription += buf;
4765 ! sDescription += "\n";
4767 int i;
4768 CIccProfileIdDescList::iterator j;
4769 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4770 ! sprintf(buf, "ProfileDescription_%d:\n", i+1);
4771 sDescription += buf;
4772 j->Describe(sDescription);
4775 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\n");
4776 sDescription += buf;
4777 ! sDescription += "\n";
4781 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Mon Aug 20 22:05:00 2007
4782 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Fri Jan 25 14:23:09 2008
4783 ***************
4784 *** 161,164 ****
4786 #endif
4788 ! #endif //_ICCTAGPROFSEQID_H
4789 --- 161,164 ----
4791 #endif
4793 ! #endif //_ICCTAGPROFSEQID_H
4794 *** misc/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Mon Aug 20 22:05:00 2007
4795 --- misc/build/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Fri Jan 25 14:23:09 2008
4796 ***************
4797 *** 79,85 ****
4798 #include "IccUtil.h"
4799 #include "IccTagFactory.h"
4800 #include <stdlib.h>
4801 ! #include <memory.h>
4802 #include <ctype.h>
4803 #include <math.h>
4804 #include <string.h>
4805 --- 79,85 ----
4806 #include "IccUtil.h"
4807 #include "IccTagFactory.h"
4808 #include <stdlib.h>
4809 ! #include <memory>
4810 #include <ctype.h>
4811 #include <math.h>
4812 #include <string.h>
4813 ***************
4814 *** 678,688 ****
4816 icChar buf[128];
4818 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4819 sDump += buf;
4820 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4821 sDump += buf;
4822 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4823 sDump += buf;
4826 --- 679,689 ----
4828 icChar buf[128];
4830 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4831 sDump += buf;
4832 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4833 sDump += buf;
4834 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4835 sDump += buf;
4838 ***************
4839 *** 1516,1534 ****
4841 if (XYZ.X < 0) {
4842 sReport += icValidateNonCompliantMsg;
4843 ! sReport += " - XYZNumber: Negative X value!\r\n";
4844 rv = icValidateNonCompliant;
4847 if (XYZ.Y < 0) {
4848 sReport += icValidateNonCompliantMsg;
4849 ! sReport += " - XYZNumber: Negative Y value!\r\n";
4850 rv = icMaxStatus(rv, icValidateNonCompliant);
4853 if (XYZ.Z < 0) {
4854 sReport += icValidateNonCompliantMsg;
4855 ! sReport += " - XYZNumber: Negative Z value!\r\n";
4856 rv = icMaxStatus(rv, icValidateNonCompliant);
4859 --- 1517,1535 ----
4861 if (XYZ.X < 0) {
4862 sReport += icValidateNonCompliantMsg;
4863 ! sReport += " - XYZNumber: Negative X value!\n";
4864 rv = icValidateNonCompliant;
4867 if (XYZ.Y < 0) {
4868 sReport += icValidateNonCompliantMsg;
4869 ! sReport += " - XYZNumber: Negative Y value!\n";
4870 rv = icMaxStatus(rv, icValidateNonCompliant);
4873 if (XYZ.Z < 0) {
4874 sReport += icValidateNonCompliantMsg;
4875 ! sReport += " - XYZNumber: Negative Z value!\n";
4876 rv = icMaxStatus(rv, icValidateNonCompliant);
4879 ***************
4880 *** 1548,1554 ****
4881 icChar buf[128];
4882 if (dateTime.year<1992) {
4883 sReport += icValidateWarningMsg;
4884 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4885 sReport += buf;
4886 rv = icValidateWarning;
4888 --- 1549,1555 ----
4889 icChar buf[128];
4890 if (dateTime.year<1992) {
4891 sReport += icValidateWarningMsg;
4892 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4893 sReport += buf;
4894 rv = icValidateWarning;
4896 ***************
4897 *** 1557,1563 ****
4898 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4899 if (dateTime.year>(year+1)) {
4900 sReport += icValidateWarningMsg;
4901 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4902 sReport += buf;
4903 rv = icMaxStatus(rv, icValidateWarning);
4905 --- 1558,1564 ----
4906 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4907 if (dateTime.year>(year+1)) {
4908 sReport += icValidateWarningMsg;
4909 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4910 sReport += buf;
4911 rv = icMaxStatus(rv, icValidateWarning);
4913 ***************
4914 *** 1565,1571 ****
4915 else {
4916 if (dateTime.year>year) {
4917 sReport += icValidateWarningMsg;
4918 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4919 sReport += buf;
4920 rv = icMaxStatus(rv, icValidateWarning);
4922 --- 1566,1572 ----
4923 else {
4924 if (dateTime.year>year) {
4925 sReport += icValidateWarningMsg;
4926 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4927 sReport += buf;
4928 rv = icMaxStatus(rv, icValidateWarning);
4930 ***************
4931 *** 1573,1579 ****
4933 if (dateTime.month<1 || dateTime.month>12) {
4934 sReport += icValidateWarningMsg;
4935 ! sprintf(buf," - %u: Invalid month!\r\n",dateTime.month);
4936 sReport += buf;
4937 rv = icMaxStatus(rv, icValidateWarning);
4939 --- 1574,1580 ----
4941 if (dateTime.month<1 || dateTime.month>12) {
4942 sReport += icValidateWarningMsg;
4943 ! sprintf(buf," - %u: Invalid month!\n",dateTime.month);
4944 sReport += buf;
4945 rv = icMaxStatus(rv, icValidateWarning);
4947 ***************
4948 *** 1580,1586 ****
4950 if (dateTime.day<1 || dateTime.day>31) {
4951 sReport += icValidateWarningMsg;
4952 ! sprintf(buf," - %u: Invalid day!\r\n",dateTime.day);
4953 sReport += buf;
4954 rv = icMaxStatus(rv, icValidateWarning);
4956 --- 1581,1587 ----
4958 if (dateTime.day<1 || dateTime.day>31) {
4959 sReport += icValidateWarningMsg;
4960 ! sprintf(buf," - %u: Invalid day!\n",dateTime.day);
4961 sReport += buf;
4962 rv = icMaxStatus(rv, icValidateWarning);
4964 ***************
4965 *** 1588,1594 ****
4966 if (dateTime.month==2) {
4967 if (dateTime.day>29) {
4968 sReport += icValidateWarningMsg;
4969 ! sprintf(buf," - %u: Invalid day for February!\r\n",dateTime.day);
4970 sReport += buf;
4971 rv = icMaxStatus(rv, icValidateWarning);
4973 --- 1589,1595 ----
4974 if (dateTime.month==2) {
4975 if (dateTime.day>29) {
4976 sReport += icValidateWarningMsg;
4977 ! sprintf(buf," - %u: Invalid day for February!\n",dateTime.day);
4978 sReport += buf;
4979 rv = icMaxStatus(rv, icValidateWarning);
4981 ***************
4982 *** 1596,1602 ****
4983 if (dateTime.day==29) {
4984 if ((dateTime.year%4)!=0) {
4985 sReport += icValidateWarningMsg;
4986 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\r\n",dateTime.day, dateTime.year);
4987 sReport += buf;
4988 rv = icMaxStatus(rv, icValidateWarning);
4990 --- 1597,1603 ----
4991 if (dateTime.day==29) {
4992 if ((dateTime.year%4)!=0) {
4993 sReport += icValidateWarningMsg;
4994 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\n",dateTime.day, dateTime.year);
4995 sReport += buf;
4996 rv = icMaxStatus(rv, icValidateWarning);
4998 ***************
4999 *** 1605,1611 ****
5001 if (dateTime.hours>23) {
5002 sReport += icValidateWarningMsg;
5003 ! sprintf(buf," - %u: Invalid hour!\r\n",dateTime.hours);
5004 sReport += buf;
5005 rv = icMaxStatus(rv, icValidateWarning);
5007 --- 1606,1612 ----
5009 if (dateTime.hours>23) {
5010 sReport += icValidateWarningMsg;
5011 ! sprintf(buf," - %u: Invalid hour!\n",dateTime.hours);
5012 sReport += buf;
5013 rv = icMaxStatus(rv, icValidateWarning);
5015 ***************
5016 *** 1612,1618 ****
5018 if (dateTime.minutes>59) {
5019 sReport += icValidateWarningMsg;
5020 ! sprintf(buf," - %u: Invalid minutes!\r\n",dateTime.minutes);
5021 sReport += buf;
5022 rv = icMaxStatus(rv, icValidateWarning);
5024 --- 1613,1619 ----
5026 if (dateTime.minutes>59) {
5027 sReport += icValidateWarningMsg;
5028 ! sprintf(buf," - %u: Invalid minutes!\n",dateTime.minutes);
5029 sReport += buf;
5030 rv = icMaxStatus(rv, icValidateWarning);
5032 ***************
5033 *** 1619,1625 ****
5035 if (dateTime.seconds>59) {
5036 sReport += icValidateWarningMsg;
5037 ! sprintf(buf," - %u: Invalid seconds!\r\n",dateTime.hours);
5038 sReport += buf;
5039 rv = icMaxStatus(rv, icValidateWarning);
5041 --- 1620,1626 ----
5043 if (dateTime.seconds>59) {
5044 sReport += icValidateWarningMsg;
5045 ! sprintf(buf," - %u: Invalid seconds!\n",dateTime.hours);
5046 sReport += buf;
5047 rv = icMaxStatus(rv, icValidateWarning);
5049 *** misc/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Mon Aug 20 22:05:00 2007
5050 --- misc/build/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Fri Jan 25 14:23:09 2008
5051 ***************
5052 *** 659,668 ****
5053 typedef enum {
5054 icFlare0 = 0x00000000, /* 0% flare */
5055 icFlare100 = 0x00000001, /* 100% flare */
5056 } icMeasurementFlare;
5058 /** Convenience Enum Definition - Not defined in ICC specification*/
5059 ! #define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)
5060 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5063 --- 659,669 ----
5064 typedef enum {
5065 icFlare0 = 0x00000000, /* 0% flare */
5066 icFlare100 = 0x00000001, /* 100% flare */
5067 + icMaxEnumFlare = 0xFFFFFFFF
5068 } icMeasurementFlare;
5070 /** Convenience Enum Definition - Not defined in ICC specification*/
5071 ! /*#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)*/
5072 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5075 *** misc/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Mon Aug 20 22:10:42 2007
5076 --- misc/build/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Fri Jan 25 14:23:09 2008
5077 ***************
5078 *** 101,117 ****
5079 am__quote = @am__quote@
5080 install_sh = @install_sh@
5082 ! SUBDIRS = IccApplyNamedCmm \
5083 ! @SICC_ICC_APPLY_PROFILES@ \
5084 ! IccDumpProfile \
5085 IccProfLibTest \
5086 IccStripUnknownTags \
5087 IccV4ToMPE
5090 ! DIST_SUBDIRS = IccApplyNamedCmm \
5091 ! IccApplyProfiles \
5092 ! IccDumpProfile \
5093 IccProfLibTest \
5094 IccStripUnknownTags \
5095 IccV4ToMPE
5096 --- 101,113 ----
5097 am__quote = @am__quote@
5098 install_sh = @install_sh@
5100 ! SUBDIRS = IccDumpProfile \
5101 IccProfLibTest \
5102 IccStripUnknownTags \
5103 IccV4ToMPE
5106 ! DIST_SUBDIRS = IccDumpProfile \
5107 IccProfLibTest \
5108 IccStripUnknownTags \
5109 IccV4ToMPE
5110 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2007-08-20 22:04:53.000000000 +0200
5111 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2008-01-31 13:53:16.000000000 +0100
5112 ***************
5113 *** 77,82 ****
5114 --- 77,84 ----
5116 //////////////////////////////////////////////////////////////////////
5118 + #include <stdlib.h>
5119 + #include <string.h>
5120 #include <iostream>
5121 #include <fstream>
5122 #include <sstream>
5123 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2007-08-20 22:04:54.000000000 +0200
5124 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2008-01-31 13:54:51.000000000 +0100
5125 ***************
5126 *** 83,88 ****
5127 --- 83,89 ----
5128 #ifndef __DEFINED_ICC_TOOL_EXCEPTION_H__
5129 #define __DEFINED_ICC_TOOL_EXCEPTION_H__
5131 + #include <string.h>
5132 #include <exception>
5133 #include <string>
5135 *** misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2007-08-20 22:05:00.000000000 +0200
5136 --- misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2008-01-31 13:49:54.000000000 +0100
5137 ***************
5138 *** 79,84 ****
5139 --- 79,86 ----
5140 #pragma warning( disable: 4786) //disable warning in <list.h>
5141 #endif
5143 + #include <stdlib.h>
5144 + #include <string.h>
5145 #include "IccCmm.h"
5146 #include "IccTag.h"
5147 #include "IccIO.h"
5148 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2007-08-20 22:04:53.000000000 +0200
5149 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2008-01-31 14:05:58.000000000 +0100
5150 ***************
5151 *** 83,88 ****
5152 --- 83,89 ----
5153 #include <string>
5154 #include <sys/types.h>
5155 #include <sys/stat.h>
5156 + #include <stdlib.h>
5158 #ifdef WIN32
5159 typedef unsigned short mode_t;
5160 --- misc/SampleICC-1.3.2/IccProfLib/md5.cpp
5161 +++ misc/build/SampleICC-1.3.2/IccProfLib/md5.cpp
5162 @@ -26,6 +26,7 @@
5164 #include "md5.h"
5165 #include <memory.h>
5166 +#include <string.h>
5168 static void MD5Transform (UINT4 [4], unsigned char [64]);
5169 static void Encode (unsigned char *, UINT4 *, unsigned int);