update dev300-m58
[ooovba.git] / icc / SampleICC-1.3.2.patch
blobed072b63afaa5c53c583eada544f938ef9983b1b
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:24:00 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:24:00 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:24:00 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:24:00 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:24:00 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:49:56 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,329 ----
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 ! #ifdef sun
579 ! #include <errno.h>
580 ! #else
581 ! #include <sys/errno.h>
582 ! #endif
583 ! #else
584 ! #include <string.h>
585 ! #define stat _stat
586 ! #endif
588 ! #if defined WIN32 || defined sun
589 ! int strerror_r(int errnum, char *str, int strsize)
591 ! const char *errstr = strerror(errnum);
593 ! if (errstr) {
594 ! strncpy(str, errstr, strsize);
595 ! return 0;
598 ! return -1;
600 ! #endif
602 ! #include "ICC_tool_exception.h"
604 ! const char*
605 ! path_tail(const char* const s)
607 ! const char* tail = strdup(s);
608 ! const char* last_slash = strrchr(tail, '/');
609 ! if (last_slash != NULL)
610 ! tail = last_slash + 1;
611 ! return tail;
614 ! void
615 ! vet_as_int(const char* const s, const string& name,
616 ! const string& description)
618 ! istringstream ss(s);
619 ! int i;
620 ! ss >> i;
621 ! if (ss.fail())
623 ! ostringstream oss;
624 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
625 ! << " an integer. It should be an integer representing "
626 ! << description << ".";
627 ! throw ICC_tool_exception(oss.str());
631 ! void
632 ! vet_as_float(const char* const s, const string& name,
633 ! const string& description)
635 ! istringstream ss(s);
636 ! float i;
637 ! ss >> i;
638 ! if (ss.fail())
640 ! ostringstream oss;
641 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
642 ! << " a floating-point number. It should be a floating-point number"
643 ! << " representing " << description << ".";
644 ! throw ICC_tool_exception(oss.str());
648 ! #define STRERROR_BUF_SIZE 256
649 ! off_t
650 ! get_size(const char* const s)
651 ! {
652 ! struct stat sb;
653 ! int stat_returned = stat(s, &sb);
654 ! if (stat_returned < 0)
656 ! int stat_errno = errno;
657 ! char strerror_buf[STRERROR_BUF_SIZE];
658 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
659 ! ostringstream oss;
660 ! oss << "Could not access information for file `" << s << "': "
661 ! << strerror_buf;
662 ! throw ICC_tool_exception(oss.str());
664 ! return sb.st_size;
667 ! bool
668 ! check_mode(const char* const s, mode_t mode)
669 ! {
670 ! struct stat sb;
671 ! int stat_returned = stat(s, &sb);
672 ! if (stat_returned < 0)
674 ! int stat_errno = errno;
675 ! char strerror_buf[STRERROR_BUF_SIZE];
676 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
677 ! ostringstream oss;
678 ! oss << "Could not access information for file `" << s << "': "
679 ! << strerror_buf;
680 ! throw ICC_tool_exception(oss.str());
682 ! return (sb.st_mode & mode) != 0;
685 ! bool
686 ! is_existent_file_pathname(const char* const s)
688 ! struct stat sb;
689 ! return stat(s, &sb) == 0;
692 ! bool
693 ! is_plain_file_pathname(const char* const s)
695 ! return check_mode(s, S_IFREG);
698 ! bool
699 ! is_directory(const char* const s)
701 ! return check_mode(s, S_IFDIR);
704 ! const char* const
705 ! containing_directory(const char* const s)
707 ! if (strlen(s) == 0)
708 ! throw ICC_tool_exception("name of directory passed to containing_directory"
709 ! " function was zero-length.");
710 ! char* tmp = strdup(s);
711 ! // lop off any trailing seperator
712 ! if (tmp[strlen(tmp) - 1] == '/')
713 ! tmp[strlen(tmp) - 1] = 0;
714 ! if (strlen(tmp) == 0)
715 ! throw ICC_tool_exception("root directory (which has no containing"
716 ! " directory) passed to containing_directory"
717 ! " function");
718 ! char* idx = strrchr(tmp, '/');
719 ! if (idx != NULL)
721 ! *idx = 0;
722 ! return tmp;
724 ! char* current_directory = getenv("PWD");
725 ! if (current_directory == NULL)
726 ! throw ICC_tool_exception("pathname passed to containing_directory has no"
727 ! " embedded seperator, and there is no value for"
728 ! " PWD defined in the environment");
729 ! return strdup(current_directory);
732 ! bool
733 ! is_readable_pathname(const char* const s)
735 ! return check_mode(s, S_IRUSR)
736 ! || check_mode(s, S_IRGRP)
737 ! || check_mode(s, S_IROTH);
740 ! bool
741 ! is_writable_pathname(const char* const s)
743 ! return check_mode(s, S_IWUSR)
744 ! || check_mode(s, S_IWGRP)
745 ! || check_mode(s, S_IWOTH);
748 ! bool
749 ! is_pathname_of_empty_file(const char* const s)
751 ! return get_size(s) > 0;
754 ! void
755 ! vet_input_file_pathname(const char* const s, const string& name,
756 ! const string& description)
758 ! if (! is_plain_file_pathname(s))
760 ! ostringstream oss;
761 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
762 ! << " of a plain file (i.e. it is the pathname of a directory, or of a"
763 ! << " symbolic link, or of some other sort of special file.) It should be"
764 ! << " " << description << ".";
765 ! throw ICC_tool_exception(oss.str());
767 ! if (! is_readable_pathname(s))
769 ! ostringstream oss;
770 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
771 ! << " of a readable file (i.e. you do not have permission to read that"
772 ! << " file, or you do not have permission to read some directory"
773 ! << " containing that file.";
774 ! throw ICC_tool_exception(oss.str());
776 ! if (! is_pathname_of_empty_file(s))
778 ! ostringstream oss;
779 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
780 ! << " of an existing readable file, but that file is of zero length."
781 ! << " The argument should be " << description << ".";
782 ! throw ICC_tool_exception(oss.str());
786 ! void
787 ! vet_output_file_pathname(const char* const s, const string& name,
788 ! const string& description,
789 ! bool silent_overwrite_OK)
791 ! const char* const container = containing_directory(s);
792 ! if (! is_writable_pathname(container))
794 ! ostringstream oss;
795 ! oss << "The " << name << " argument given, `" << s << "', has a directory"
796 ! << " component which is not writable."
797 ! << " The argument should be " << description << ".";
798 ! throw ICC_tool_exception(oss.str());
800 ! if (is_existent_file_pathname(s))
802 ! if (is_plain_file_pathname(s))
803 ! if (is_writable_pathname(s))
805 ! if (! silent_overwrite_OK)
807 ! ostringstream oss;
808 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
809 ! << " file."
810 ! << " The argument should be " << description << ".";
811 ! throw ICC_tool_exception(oss.str());
813 ! } else {
814 ! ostringstream oss;
815 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
816 ! << " file which is not writable."
817 ! << " The argument should be " << description << ".";
818 ! throw ICC_tool_exception(oss.str());
822 *** misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp Mon Aug 20 22:05:00 2007
823 --- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp Fri Jan 25 14:25:33 2008
824 ***************
825 *** 78,84 ****
826 #include "IccIO.h"
827 #include "IccUtil.h"
828 #include <stdlib.h>
829 ! #include <memory.h>
830 #include <string.h>
832 #ifndef __max
833 --- 78,84 ----
834 #include "IccIO.h"
835 #include "IccUtil.h"
836 #include <stdlib.h>
837 ! #include <memory>
838 #include <string.h>
840 #ifndef __max
841 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Mon Aug 20 22:05:00 2007
842 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Fri Jan 25 14:24:00 2008
843 ***************
844 *** 136,152 ****
845 icChar sigBuf[30];
847 if (GetBAcsSig())
848 ! sDescription += "ELEM_bACS\r\n";
849 else
850 ! sDescription += "ELEM_eACS\r\n";
852 icGetSig(sigBuf, m_signature);
853 sDescription += " Signature = ";
854 sDescription += sigBuf;
855 ! sDescription += "\r\n";
857 if (m_pData) {
858 ! sDescription += "\r\nData Follows:\r\n";
860 icMemDump(sDescription, m_pData, m_nDataSize);
862 --- 136,152 ----
863 icChar sigBuf[30];
865 if (GetBAcsSig())
866 ! sDescription += "ELEM_bACS\n";
867 else
868 ! sDescription += "ELEM_eACS\n";
870 icGetSig(sigBuf, m_signature);
871 sDescription += " Signature = ";
872 sDescription += sigBuf;
873 ! sDescription += "\n";
875 if (m_pData) {
876 ! sDescription += "\nData Follows:\n";
878 icMemDump(sDescription, m_pData, m_nDataSize);
880 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Mon Aug 20 22:05:00 2007
881 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Fri Jan 25 14:24:00 2008
882 ***************
883 *** 218,249 ****
884 sprintf(buf, "%.8f", m_endPoint);
885 sDescription += buf;
887 ! sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
888 sDescription += buf;
890 switch(m_nFunctionType) {
891 case 0x0000:
892 if (m_params[1]==0.0 && m_params[2]==0.0)
893 ! sprintf(buf, "Y = %.8f\r\n\r\n", m_params[3]);
894 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
895 ! sprintf(buf, "Y = X\r\n\r\n");
896 else if (m_params[0]==1.0 && m_params[2]==0.0)
897 ! sprintf(buf, "Y = %.8f * X + %.8f\r\n\r\n",
898 m_params[1], m_params[3]);
899 else
900 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\r\n\r\n",
901 m_params[1], m_params[2], m_params[0], m_params[3]);
902 sDescription += buf;
903 return;
905 case 0x0001:
906 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\r\n\r\n",
907 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
908 sDescription += buf;
909 return;
911 case 0x0002:
912 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\r\n\r\n",
913 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
914 sDescription += buf;
915 return;
916 --- 218,249 ----
917 sprintf(buf, "%.8f", m_endPoint);
918 sDescription += buf;
920 ! sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
921 sDescription += buf;
923 switch(m_nFunctionType) {
924 case 0x0000:
925 if (m_params[1]==0.0 && m_params[2]==0.0)
926 ! sprintf(buf, "Y = %.8f\n\n", m_params[3]);
927 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
928 ! sprintf(buf, "Y = X\n\n");
929 else if (m_params[0]==1.0 && m_params[2]==0.0)
930 ! sprintf(buf, "Y = %.8f * X + %.8f\n\n",
931 m_params[1], m_params[3]);
932 else
933 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n",
934 m_params[1], m_params[2], m_params[0], m_params[3]);
935 sDescription += buf;
936 return;
938 case 0x0001:
939 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\n\n",
940 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
941 sDescription += buf;
942 return;
944 case 0x0002:
945 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
946 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
947 sDescription += buf;
948 return;
949 ***************
950 *** 250,260 ****
952 default:
953 int i;
954 ! sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
955 sDescription += buf;
957 for (i=0; i<m_nParameters; i++) {
958 ! sprintf(buf, "Param[%d] = %.8lf\r\n\r\n", i, m_params[i]);
959 sDescription += buf;
962 --- 250,260 ----
964 default:
965 int i;
966 ! sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
967 sDescription += buf;
969 for (i=0; i<m_nParameters; i++) {
970 ! sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
971 sDescription += buf;
974 ***************
975 *** 496,502 ****
976 if (m_nReserved || m_nReserved2) {
977 sReport += icValidateWarningMsg;
978 sReport += sSigName;
979 ! sReport += " formula curve has non zero reserved data.\r\n";
980 rv = icValidateWarning;
983 --- 496,502 ----
984 if (m_nReserved || m_nReserved2) {
985 sReport += icValidateWarningMsg;
986 sReport += sSigName;
987 ! sReport += " formula curve has non zero reserved data.\n";
988 rv = icValidateWarning;
991 ***************
992 *** 505,517 ****
993 if (!m_params || m_nParameters<4) {
994 sReport += icValidateCriticalErrorMsg;
995 sReport += sSigName;
996 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
997 rv = icValidateCriticalError;
999 else if (m_nParameters > 4) {
1000 sReport += icValidateWarningMsg;
1001 sReport += sSigName;
1002 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1003 rv = icValidateWarning;
1005 break;
1006 --- 505,517 ----
1007 if (!m_params || m_nParameters<4) {
1008 sReport += icValidateCriticalErrorMsg;
1009 sReport += sSigName;
1010 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1011 rv = icValidateCriticalError;
1013 else if (m_nParameters > 4) {
1014 sReport += icValidateWarningMsg;
1015 sReport += sSigName;
1016 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1017 rv = icValidateWarning;
1019 break;
1020 ***************
1021 *** 520,532 ****
1022 if (!m_params || m_nParameters<5) {
1023 sReport += icValidateCriticalErrorMsg;
1024 sReport += sSigName;
1025 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1026 rv = icValidateCriticalError;
1028 else if (m_nParameters > 5) {
1029 sReport += icValidateWarningMsg;
1030 sReport += sSigName;
1031 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1032 rv = icValidateWarning;
1034 break;
1035 --- 520,532 ----
1036 if (!m_params || m_nParameters<5) {
1037 sReport += icValidateCriticalErrorMsg;
1038 sReport += sSigName;
1039 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1040 rv = icValidateCriticalError;
1042 else if (m_nParameters > 5) {
1043 sReport += icValidateWarningMsg;
1044 sReport += sSigName;
1045 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1046 rv = icValidateWarning;
1048 break;
1049 ***************
1050 *** 535,547 ****
1051 if (!m_params || m_nParameters<5) {
1052 sReport += icValidateCriticalErrorMsg;
1053 sReport += sSigName;
1054 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1055 rv = icValidateCriticalError;
1057 else if (m_nParameters > 5) {
1058 sReport += icValidateWarningMsg;
1059 sReport += sSigName;
1060 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1061 rv = icValidateWarning;
1063 break;
1064 --- 535,547 ----
1065 if (!m_params || m_nParameters<5) {
1066 sReport += icValidateCriticalErrorMsg;
1067 sReport += sSigName;
1068 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1069 rv = icValidateCriticalError;
1071 else if (m_nParameters > 5) {
1072 sReport += icValidateWarningMsg;
1073 sReport += sSigName;
1074 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1075 rv = icValidateWarning;
1077 break;
1078 ***************
1079 *** 551,557 ****
1080 icChar buf[128];
1081 sReport += icValidateCriticalErrorMsg;
1082 sReport += sSigName;
1083 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\r\n", m_nFunctionType);
1084 sReport += buf;
1085 rv = icValidateCriticalError;
1087 --- 551,557 ----
1088 icChar buf[128];
1089 sReport += icValidateCriticalErrorMsg;
1090 sReport += sSigName;
1091 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
1092 sReport += buf;
1093 rv = icValidateCriticalError;
1095 ***************
1096 *** 727,733 ****
1097 sDescription += buf;
1100 ! sprintf(buf, "]\r\n");
1101 sDescription += buf;
1103 else {
1104 --- 727,733 ----
1105 sDescription += buf;
1108 ! sprintf(buf, "]\n");
1109 sDescription += buf;
1111 else {
1112 ***************
1113 *** 744,752 ****
1114 sprintf(buf, "%.8f", m_endPoint);
1115 sDescription += buf;
1117 ! sprintf(buf, "]\r\n");
1118 sDescription += buf;
1119 ! sDescription += "IN OUT\r\n";
1121 icUInt32Number i;
1123 --- 744,752 ----
1124 sprintf(buf, "%.8f", m_endPoint);
1125 sDescription += buf;
1127 ! sprintf(buf, "]\n");
1128 sDescription += buf;
1129 ! sDescription += "IN OUT\n";
1131 icUInt32Number i;
1133 ***************
1134 *** 754,764 ****
1135 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1137 for (i=0; i<m_nCount; i++) {
1138 ! sprintf(buf, "%.8f %.8f\r\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1139 sDescription += buf;
1142 ! sDescription += "\r\n";
1146 --- 754,764 ----
1147 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1149 for (i=0; i<m_nCount; i++) {
1150 ! sprintf(buf, "%.8f %.8f\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1151 sDescription += buf;
1154 ! sDescription += "\n";
1158 ***************
1159 *** 910,916 ****
1160 if (m_nReserved) {
1161 sReport += icValidateWarningMsg;
1162 sReport += sSigName;
1163 ! sReport += " sampled curve has non zero reserved data.\r\n";
1164 rv = icValidateWarning;
1167 --- 910,916 ----
1168 if (m_nReserved) {
1169 sReport += icValidateWarningMsg;
1170 sReport += sSigName;
1171 ! sReport += " sampled curve has non zero reserved data.\n";
1172 rv = icValidateWarning;
1175 ***************
1176 *** 917,929 ****
1177 if (m_nCount<2) {
1178 sReport += icValidateCriticalErrorMsg;
1179 sReport += sSigName;
1180 ! sReport += " sampled curve has too few sample points.\r\n";
1181 rv = icValidateCriticalError;
1183 else if (m_endPoint-m_startPoint == 0.0) {
1184 sReport += icValidateWarningMsg;
1185 sReport += sSigName;
1186 ! sReport += " sampled curve has a range of zero.\r\n";
1187 rv = icMaxStatus(rv, icValidateWarning);
1190 --- 917,929 ----
1191 if (m_nCount<2) {
1192 sReport += icValidateCriticalErrorMsg;
1193 sReport += sSigName;
1194 ! sReport += " sampled curve has too few sample points.\n";
1195 rv = icValidateCriticalError;
1197 else if (m_endPoint-m_startPoint == 0.0) {
1198 sReport += icValidateWarningMsg;
1199 sReport += sSigName;
1200 ! sReport += " sampled curve has a range of zero.\n";
1201 rv = icMaxStatus(rv, icValidateWarning);
1204 ***************
1205 *** 1054,1060 ****
1207 CIccCurveSegmentList::iterator i;
1209 ! sDescription += "BEGIN_CURVE\r\n";
1210 for (i=m_list->begin(); i!=m_list->end(); i++) {
1211 (*i)->Describe(sDescription);
1213 --- 1054,1060 ----
1215 CIccCurveSegmentList::iterator i;
1217 ! sDescription += "BEGIN_CURVE\n";
1218 for (i=m_list->begin(); i!=m_list->end(); i++) {
1219 (*i)->Describe(sDescription);
1221 ***************
1222 *** 1342,1348 ****
1223 if (m_nReserved1 || m_nReserved2) {
1224 sReport += icValidateWarningMsg;
1225 sReport += sSigName;
1226 ! sReport += " Segmented curve has non zero reserved data.\r\n";
1227 rv = icValidateWarning;
1230 --- 1342,1348 ----
1231 if (m_nReserved1 || m_nReserved2) {
1232 sReport += icValidateWarningMsg;
1233 sReport += sSigName;
1234 ! sReport += " Segmented curve has non zero reserved data.\n";
1235 rv = icValidateWarning;
1238 ***************
1239 *** 1349,1355 ****
1240 if (m_list->size()==0) {
1241 sReport += icValidateCriticalErrorMsg;
1242 sReport += sSigName;
1243 ! sReport += " Has Empty CurveSegment!\r\n";
1244 return icValidateCriticalError;
1247 --- 1349,1355 ----
1248 if (m_list->size()==0) {
1249 sReport += icValidateCriticalErrorMsg;
1250 sReport += sSigName;
1251 ! sReport += " Has Empty CurveSegment!\n";
1252 return icValidateCriticalError;
1255 ***************
1256 *** 1599,1609 ****
1257 icChar buf[81];
1258 int i;
1260 ! sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
1261 sDescription += buf;
1263 for (i=0; i<m_nInputChannels; i++) {
1264 ! sprintf(buf, "Curve %d of %d\r\n", i+1, m_nInputChannels);
1265 sDescription += buf;
1266 if (m_curve[i]) {
1267 m_curve[i]->Describe(sDescription);
1268 --- 1599,1609 ----
1269 icChar buf[81];
1270 int i;
1272 ! sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
1273 sDescription += buf;
1275 for (i=0; i<m_nInputChannels; i++) {
1276 ! sprintf(buf, "Curve %d of %d\n", i+1, m_nInputChannels);
1277 sDescription += buf;
1278 if (m_curve[i]) {
1279 m_curve[i]->Describe(sDescription);
1280 ***************
1281 *** 1877,1883 ****
1282 sReport += " - Element ";
1283 sSigName = Info.GetSigName(GetType());
1284 sReport += sSigName;
1285 ! sReport += " Has Empty Curve Element(s)!\r\n";
1286 return icValidateCriticalError;
1289 --- 1877,1883 ----
1290 sReport += " - Element ";
1291 sSigName = Info.GetSigName(GetType());
1292 sReport += sSigName;
1293 ! sReport += " Has Empty Curve Element(s)!\n";
1294 return icValidateCriticalError;
1297 ***************
1298 *** 2042,2048 ****
1299 int i, j;
1300 icFloatNumber *data = m_pMatrix;
1302 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
1303 sDescription += buf;
1305 for (j=0; j<m_nOutputChannels; j++) {
1306 --- 2042,2048 ----
1307 int i, j;
1308 icFloatNumber *data = m_pMatrix;
1310 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
1311 sDescription += buf;
1313 for (j=0; j<m_nOutputChannels; j++) {
1314 ***************
1315 *** 2052,2058 ****
1316 sprintf(buf, "%12.8lf", data[i]);
1317 sDescription += buf;
1319 ! sprintf(buf, " + %12.8lf\r\n", m_pConstants[j]);
1320 sDescription += buf;
1321 data += i;
1323 --- 2052,2058 ----
1324 sprintf(buf, "%12.8lf", data[i]);
1325 sDescription += buf;
1327 ! sprintf(buf, " + %12.8lf\n", m_pConstants[j]);
1328 sDescription += buf;
1329 data += i;
1331 ***************
1332 *** 2273,2279 ****
1333 sReport += " - Element ";
1334 sSigName = Info.GetSigName(GetType());
1335 sReport += sSigName;
1336 ! sReport += " Has Empty Matrix data!\r\n";
1337 return icValidateCriticalError;
1340 --- 2273,2279 ----
1341 sReport += " - Element ";
1342 sSigName = Info.GetSigName(GetType());
1343 sReport += sSigName;
1344 ! sReport += " Has Empty Matrix data!\n";
1345 return icValidateCriticalError;
1348 ***************
1349 *** 2620,2626 ****
1350 sReport += " - Element ";
1351 sSigName = Info.GetSigName(GetType());
1352 sReport += sSigName;
1353 ! sReport += " Has No CLUT!\r\n";
1354 return icValidateCriticalError;
1357 --- 2620,2626 ----
1358 sReport += " - Element ";
1359 sSigName = Info.GetSigName(GetType());
1360 sReport += sSigName;
1361 ! sReport += " Has No CLUT!\n";
1362 return icValidateCriticalError;
1365 *** misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Mon Aug 20 22:05:00 2007
1366 --- misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Fri Jan 25 14:24:00 2008
1367 ***************
1368 *** 567,573 ****
1370 if (!ReadBasic(pIO)) {
1371 sReport += icValidateCriticalErrorMsg;
1372 ! sReport += " - Unable to read profile!**\r\n\tProfile has invalid structure!\r\n";
1373 Cleanup();
1375 return icValidateCriticalError;
1376 --- 567,573 ----
1378 if (!ReadBasic(pIO)) {
1379 sReport += icValidateCriticalErrorMsg;
1380 ! sReport += " - Unable to read profile!**\n\tProfile has invalid structure!\n";
1381 Cleanup();
1383 return icValidateCriticalError;
1384 ***************
1385 *** 576,582 ****
1386 // Check profile header
1387 if (!CheckFileSize(pIO)) {
1388 sReport += icValidateNonCompliantMsg;
1389 ! sReport += "Bad Header File Size\r\n";
1390 rv = icMaxStatus(rv, icValidateNonCompliant);
1393 --- 576,582 ----
1394 // Check profile header
1395 if (!CheckFileSize(pIO)) {
1396 sReport += icValidateNonCompliantMsg;
1397 ! sReport += "Bad Header File Size\n";
1398 rv = icMaxStatus(rv, icValidateNonCompliant);
1401 ***************
1402 *** 588,594 ****
1403 CalcProfileID(pIO, &profileID);
1404 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1405 sReport += icValidateNonCompliantMsg;
1406 ! sReport += "Bad Profile ID\r\n";
1408 rv = icMaxStatus(rv, icValidateNonCompliant);
1410 --- 588,594 ----
1411 CalcProfileID(pIO, &profileID);
1412 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1413 sReport += icValidateNonCompliantMsg;
1414 ! sReport += "Bad Profile ID\n";
1416 rv = icMaxStatus(rv, icValidateNonCompliant);
1418 ***************
1419 *** 601,607 ****
1420 sReport += icValidateCriticalErrorMsg;
1421 sReport += " - ";
1422 sReport += Info.GetTagSigName(i->TagInfo.sig);
1423 ! sReport += " - Tag has invalid structure!\r\n";
1425 rv = icMaxStatus(rv, icValidateCriticalError);
1427 --- 601,607 ----
1428 sReport += icValidateCriticalErrorMsg;
1429 sReport += " - ";
1430 sReport += Info.GetTagSigName(i->TagInfo.sig);
1431 ! sReport += " - Tag has invalid structure!\n";
1433 rv = icMaxStatus(rv, icValidateCriticalError);
1435 ***************
1436 *** 1026,1032 ****
1438 default:
1439 sReport += icValidateCriticalErrorMsg;
1440 ! sprintf(buf, " - %s: Unknown profile class!\r\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1441 sReport += buf;
1442 rv = icMaxStatus(rv, icValidateCriticalError);
1444 --- 1026,1032 ----
1446 default:
1447 sReport += icValidateCriticalErrorMsg;
1448 ! sprintf(buf, " - %s: Unknown profile class!\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1449 sReport += buf;
1450 rv = icMaxStatus(rv, icValidateCriticalError);
1452 ***************
1453 *** 1033,1039 ****
1455 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1456 sReport += icValidateCriticalErrorMsg;
1457 ! sprintf(buf, " - %s: Unknown color space!\r\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1458 sReport += buf;
1459 rv = icMaxStatus(rv, icValidateCriticalError);
1461 --- 1033,1039 ----
1463 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1464 sReport += icValidateCriticalErrorMsg;
1465 ! sprintf(buf, " - %s: Unknown color space!\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1466 sReport += buf;
1467 rv = icMaxStatus(rv, icValidateCriticalError);
1469 ***************
1470 *** 1041,1047 ****
1471 if (m_Header.deviceClass==icSigLinkClass) {
1472 if (!Info.IsValidSpace(m_Header.pcs)) {
1473 sReport += icValidateCriticalErrorMsg;
1474 ! sprintf(buf, " - %s: Unknown pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1475 sReport += buf;
1476 rv = icMaxStatus(rv, icValidateCriticalError);
1478 --- 1041,1047 ----
1479 if (m_Header.deviceClass==icSigLinkClass) {
1480 if (!Info.IsValidSpace(m_Header.pcs)) {
1481 sReport += icValidateCriticalErrorMsg;
1482 ! sprintf(buf, " - %s: Unknown pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1483 sReport += buf;
1484 rv = icMaxStatus(rv, icValidateCriticalError);
1486 ***************
1487 *** 1049,1055 ****
1488 else {
1489 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1490 sReport += icValidateCriticalErrorMsg;
1491 ! sprintf(buf, " - %s: Invalid pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1492 sReport += buf;
1493 rv = icMaxStatus(rv, icValidateCriticalError);
1495 --- 1049,1055 ----
1496 else {
1497 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1498 sReport += icValidateCriticalErrorMsg;
1499 ! sprintf(buf, " - %s: Invalid pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1500 sReport += buf;
1501 rv = icMaxStatus(rv, icValidateCriticalError);
1503 ***************
1504 *** 1068,1074 ****
1506 default:
1507 sReport += icValidateWarningMsg;
1508 ! sprintf(buf, " - %s: Unknown platform signature.\r\n", Info.GetPlatformSigName(m_Header.platform));
1509 sReport += buf;
1510 rv = icMaxStatus(rv, icValidateWarning);
1512 --- 1068,1074 ----
1514 default:
1515 sReport += icValidateWarningMsg;
1516 ! sprintf(buf, " - %s: Unknown platform signature.\n", Info.GetPlatformSigName(m_Header.platform));
1517 sReport += buf;
1518 rv = icMaxStatus(rv, icValidateWarning);
1520 ***************
1521 *** 1095,1101 ****
1523 default:
1524 sReport += icValidateWarningMsg;
1525 ! sprintf(buf, " - %s: Unregisterd CMM signature.\r\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1526 sReport += buf;
1527 rv = icMaxStatus(rv, icValidateWarning);
1529 --- 1095,1101 ----
1531 default:
1532 sReport += icValidateWarningMsg;
1533 ! sprintf(buf, " - %s: Unregisterd CMM signature.\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1534 sReport += buf;
1535 rv = icMaxStatus(rv, icValidateWarning);
1537 ***************
1538 *** 1109,1115 ****
1540 default:
1541 sReport += icValidateCriticalErrorMsg;
1542 ! sprintf(buf, " - %s: Unknown rendering intent!\r\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1543 sReport += buf;
1544 rv = icMaxStatus(rv, icValidateCriticalError);
1546 --- 1109,1115 ----
1548 default:
1549 sReport += icValidateCriticalErrorMsg;
1550 ! sprintf(buf, " - %s: Unknown rendering intent!\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1551 sReport += buf;
1552 rv = icMaxStatus(rv, icValidateCriticalError);
1554 ***************
1555 *** 1120,1126 ****
1556 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1557 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1558 sReport += icValidateNonCompliantMsg;
1559 ! sReport += " - Non D50 Illuminant XYZ values.\r\n";
1560 rv = icMaxStatus(rv, icValidateNonCompliant);
1563 --- 1120,1126 ----
1564 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1565 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1566 sReport += icValidateNonCompliantMsg;
1567 ! sReport += " - Non D50 Illuminant XYZ values.\n";
1568 rv = icMaxStatus(rv, icValidateNonCompliant);
1571 ***************
1572 *** 1130,1136 ****
1574 if (sum) {
1575 sReport += icValidateNonCompliantMsg;
1576 ! sReport += " - Reserved value must be zero.\r\n";
1577 rv = icMaxStatus(rv, icValidateNonCompliant);
1580 --- 1130,1136 ----
1582 if (sum) {
1583 sReport += icValidateNonCompliantMsg;
1584 ! sReport += " - Reserved value must be zero.\n";
1585 rv = icMaxStatus(rv, icValidateNonCompliant);
1588 ***************
1589 *** 1163,1169 ****
1591 sReport += icValidateWarningMsg;
1592 sReport += buf;
1593 ! sReport += " - Tag exclusion test failed.\r\n";
1594 rv = false;
1597 --- 1163,1169 ----
1599 sReport += icValidateWarningMsg;
1600 sReport += buf;
1601 ! sReport += " - Tag exclusion test failed.\n";
1602 rv = false;
1605 ***************
1606 *** 1177,1183 ****
1608 sReport += icValidateWarningMsg;
1609 sReport += buf;
1610 ! sReport += " - Tag exclusion test failed.\r\n";
1611 rv = false;
1613 break;
1614 --- 1177,1183 ----
1616 sReport += icValidateWarningMsg;
1617 sReport += buf;
1618 ! sReport += " - Tag exclusion test failed.\n";
1619 rv = false;
1621 break;
1622 ***************
1623 *** 1192,1198 ****
1625 sReport += icValidateWarningMsg;
1626 sReport += buf;
1627 ! sReport += " - Tag exclusion test failed.\r\n";
1628 rv = false;
1630 break;
1631 --- 1192,1198 ----
1633 sReport += icValidateWarningMsg;
1634 sReport += buf;
1635 ! sReport += " - Tag exclusion test failed.\n";
1636 rv = false;
1638 break;
1639 ***************
1640 *** 1234,1240 ****
1641 if (!IsTypeValid(tagsig, typesig)) {
1642 sReport += icValidateNonCompliantMsg;
1643 sReport += buf;
1644 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\r\n", Info.GetTagTypeSigName(typesig));
1645 sReport += buf;
1646 rv = icMaxStatus(rv, icValidateNonCompliant);
1648 --- 1234,1240 ----
1649 if (!IsTypeValid(tagsig, typesig)) {
1650 sReport += icValidateNonCompliantMsg;
1651 sReport += buf;
1652 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\n", Info.GetTagTypeSigName(typesig));
1653 sReport += buf;
1654 rv = icMaxStatus(rv, icValidateNonCompliant);
1656 ***************
1657 *** 1477,1483 ****
1659 if (m_Tags->size() <= 0) {
1660 sReport += icValidateCriticalErrorMsg;
1661 ! sReport += "No tags present.\r\n";
1662 return icValidateCriticalError;
1665 --- 1477,1483 ----
1667 if (m_Tags->size() <= 0) {
1668 sReport += icValidateCriticalErrorMsg;
1669 ! sReport += "No tags present.\n";
1670 return icValidateCriticalError;
1673 ***************
1674 *** 1486,1492 ****
1675 if (!GetTag(icSigProfileDescriptionTag) ||
1676 !GetTag(icSigCopyrightTag)) {
1677 sReport += icValidateNonCompliantMsg;
1678 ! sReport += "Required tags missing.\r\n";
1679 rv = icMaxStatus(rv, icValidateNonCompliant);
1682 --- 1486,1492 ----
1683 if (!GetTag(icSigProfileDescriptionTag) ||
1684 !GetTag(icSigCopyrightTag)) {
1685 sReport += icValidateNonCompliantMsg;
1686 ! sReport += "Required tags missing.\n";
1687 rv = icMaxStatus(rv, icValidateNonCompliant);
1690 ***************
1691 *** 1495,1501 ****
1692 if (sig != icSigLinkClass) {
1693 if (!GetTag(icSigMediaWhitePointTag)) {
1694 sReport += icValidateCriticalErrorMsg;
1695 ! sReport += "Media white point tag missing.\r\n";
1696 rv = icMaxStatus(rv, icValidateCriticalError);
1699 --- 1495,1501 ----
1700 if (sig != icSigLinkClass) {
1701 if (!GetTag(icSigMediaWhitePointTag)) {
1702 sReport += icValidateCriticalErrorMsg;
1703 ! sReport += "Media white point tag missing.\n";
1704 rv = icMaxStatus(rv, icValidateCriticalError);
1707 ***************
1708 *** 1505,1511 ****
1709 if (m_Header.colorSpace == icSigGrayData) {
1710 if (!GetTag(icSigGrayTRCTag)) {
1711 sReport += icValidateCriticalErrorMsg;
1712 ! sReport += "Gray TRC tag missing.\r\n";
1713 rv = icMaxStatus(rv, icValidateCriticalError);
1716 --- 1505,1511 ----
1717 if (m_Header.colorSpace == icSigGrayData) {
1718 if (!GetTag(icSigGrayTRCTag)) {
1719 sReport += icValidateCriticalErrorMsg;
1720 ! sReport += "Gray TRC tag missing.\n";
1721 rv = icMaxStatus(rv, icValidateCriticalError);
1724 ***************
1725 *** 1515,1521 ****
1726 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1727 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1728 sReport += icValidateCriticalErrorMsg;
1729 ! sReport += "Critical tag(s) missing.\r\n";
1730 rv = icMaxStatus(rv, icValidateCriticalError);
1733 --- 1515,1521 ----
1734 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1735 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1736 sReport += icValidateCriticalErrorMsg;
1737 ! sReport += "Critical tag(s) missing.\n";
1738 rv = icMaxStatus(rv, icValidateCriticalError);
1741 ***************
1742 *** 1526,1532 ****
1743 if (m_Header.colorSpace == icSigGrayData) {
1744 if (!GetTag(icSigGrayTRCTag)) {
1745 sReport += icValidateCriticalErrorMsg;
1746 ! sReport += "Gray TRC tag missing.\r\n";
1747 rv = icMaxStatus(rv, icValidateCriticalError);
1750 --- 1526,1532 ----
1751 if (m_Header.colorSpace == icSigGrayData) {
1752 if (!GetTag(icSigGrayTRCTag)) {
1753 sReport += icValidateCriticalErrorMsg;
1754 ! sReport += "Gray TRC tag missing.\n";
1755 rv = icMaxStatus(rv, icValidateCriticalError);
1758 ***************
1759 *** 1536,1542 ****
1760 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1761 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1762 sReport += icValidateCriticalErrorMsg;
1763 ! sReport += "Critical tag(s) missing.\r\n";
1764 rv = icMaxStatus(rv, icValidateCriticalError);
1767 --- 1536,1542 ----
1768 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1769 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1770 sReport += icValidateCriticalErrorMsg;
1771 ! sReport += "Critical tag(s) missing.\n";
1772 rv = icMaxStatus(rv, icValidateCriticalError);
1775 ***************
1776 *** 1547,1553 ****
1777 if (m_Header.colorSpace == icSigGrayData) {
1778 if (!GetTag(icSigGrayTRCTag)) {
1779 sReport += icValidateCriticalErrorMsg;
1780 ! sReport += "Gray TRC tag missing.\r\n";
1781 rv = icMaxStatus(rv, icValidateCriticalError);
1784 --- 1547,1553 ----
1785 if (m_Header.colorSpace == icSigGrayData) {
1786 if (!GetTag(icSigGrayTRCTag)) {
1787 sReport += icValidateCriticalErrorMsg;
1788 ! sReport += "Gray TRC tag missing.\n";
1789 rv = icMaxStatus(rv, icValidateCriticalError);
1792 ***************
1793 *** 1556,1568 ****
1794 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1795 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1796 sReport += icValidateCriticalErrorMsg;
1797 ! sReport += "Critical tag(s) missing.\r\n";
1798 rv = icMaxStatus(rv, icValidateCriticalError);
1801 if (!GetTag(icSigGamutTag)) {
1802 sReport += icValidateNonCompliantMsg;
1803 ! sReport += "Gamut tag missing.\r\n";
1804 rv = icMaxStatus(rv, icValidateNonCompliant);
1807 --- 1556,1568 ----
1808 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1809 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1810 sReport += icValidateCriticalErrorMsg;
1811 ! sReport += "Critical tag(s) missing.\n";
1812 rv = icMaxStatus(rv, icValidateCriticalError);
1815 if (!GetTag(icSigGamutTag)) {
1816 sReport += icValidateNonCompliantMsg;
1817 ! sReport += "Gamut tag missing.\n";
1818 rv = icMaxStatus(rv, icValidateNonCompliant);
1821 ***************
1822 *** 1585,1591 ****
1823 case icSig16colorData:
1824 if (!GetTag(icSigColorantTableTag)) {
1825 sReport += icValidateNonCompliantMsg;
1826 ! sReport += "xCLR output profile is missing colorantTableTag\r\n";
1827 rv = icMaxStatus(rv, icValidateNonCompliant);
1830 --- 1585,1591 ----
1831 case icSig16colorData:
1832 if (!GetTag(icSigColorantTableTag)) {
1833 sReport += icValidateNonCompliantMsg;
1834 ! sReport += "xCLR output profile is missing colorantTableTag\n";
1835 rv = icMaxStatus(rv, icValidateNonCompliant);
1838 ***************
1839 *** 1599,1605 ****
1840 case icSigLinkClass:
1841 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1842 sReport += icValidateCriticalErrorMsg;
1843 ! sReport += "Critical tag(s) missing.\r\n";
1844 rv = icMaxStatus(rv, icValidateCriticalError);
1847 --- 1599,1605 ----
1848 case icSigLinkClass:
1849 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1850 sReport += icValidateCriticalErrorMsg;
1851 ! sReport += "Critical tag(s) missing.\n";
1852 rv = icMaxStatus(rv, icValidateCriticalError);
1855 ***************
1856 *** 1606,1612 ****
1857 if (icIsSpaceCLR(m_Header.colorSpace)) {
1858 if (!GetTag(icSigColorantTableTag)) {
1859 sReport += icValidateNonCompliantMsg;
1860 ! sReport += "Required tag(s) missing.\r\n";
1861 rv = icMaxStatus(rv, icValidateNonCompliant);
1864 --- 1606,1612 ----
1865 if (icIsSpaceCLR(m_Header.colorSpace)) {
1866 if (!GetTag(icSigColorantTableTag)) {
1867 sReport += icValidateNonCompliantMsg;
1868 ! sReport += "Required tag(s) missing.\n";
1869 rv = icMaxStatus(rv, icValidateNonCompliant);
1872 ***************
1873 *** 1614,1620 ****
1874 if (icIsSpaceCLR(m_Header.pcs)) {
1875 if (!GetTag(icSigColorantTableOutTag)) {
1876 sReport += icValidateNonCompliantMsg;
1877 ! sReport += "Required tag(s) missing.\r\n";
1878 rv = icMaxStatus(rv, icValidateNonCompliant);
1881 --- 1614,1620 ----
1882 if (icIsSpaceCLR(m_Header.pcs)) {
1883 if (!GetTag(icSigColorantTableOutTag)) {
1884 sReport += icValidateNonCompliantMsg;
1885 ! sReport += "Required tag(s) missing.\n";
1886 rv = icMaxStatus(rv, icValidateNonCompliant);
1889 ***************
1890 *** 1623,1629 ****
1891 case icSigColorSpaceClass:
1892 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1893 sReport += icValidateCriticalErrorMsg;
1894 ! sReport += "Critical tag(s) missing.\r\n";
1895 rv = icMaxStatus(rv, icValidateCriticalError);
1897 break;
1898 --- 1623,1629 ----
1899 case icSigColorSpaceClass:
1900 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1901 sReport += icValidateCriticalErrorMsg;
1902 ! sReport += "Critical tag(s) missing.\n";
1903 rv = icMaxStatus(rv, icValidateCriticalError);
1905 break;
1906 ***************
1907 *** 1631,1637 ****
1908 case icSigAbstractClass:
1909 if (!GetTag(icSigAToB0Tag)) {
1910 sReport += icValidateCriticalErrorMsg;
1911 ! sReport += "Critical tag(s) missing.\r\n";
1912 rv = icMaxStatus(rv, icValidateCriticalError);
1914 break;
1915 --- 1631,1637 ----
1916 case icSigAbstractClass:
1917 if (!GetTag(icSigAToB0Tag)) {
1918 sReport += icValidateCriticalErrorMsg;
1919 ! sReport += "Critical tag(s) missing.\n";
1920 rv = icMaxStatus(rv, icValidateCriticalError);
1922 break;
1923 ***************
1924 *** 1639,1645 ****
1925 case icSigNamedColorClass:
1926 if (!GetTag(icSigNamedColor2Tag)) {
1927 sReport += icValidateCriticalErrorMsg;
1928 ! sReport += "Critical tag(s) missing.\r\n";
1929 rv = icMaxStatus(rv, icValidateCriticalError);
1932 --- 1639,1645 ----
1933 case icSigNamedColorClass:
1934 if (!GetTag(icSigNamedColor2Tag)) {
1935 sReport += icValidateCriticalErrorMsg;
1936 ! sReport += "Critical tag(s) missing.\n";
1937 rv = icMaxStatus(rv, icValidateCriticalError);
1940 ***************
1941 *** 1647,1653 ****
1943 default:
1944 sReport += icValidateCriticalErrorMsg;
1945 ! sReport += "Unknown Profile Class.\r\n";
1946 rv = icMaxStatus(rv, icValidateCriticalError);
1947 break;
1949 --- 1647,1653 ----
1951 default:
1952 sReport += icValidateCriticalErrorMsg;
1953 ! sReport += "Unknown Profile Class.\n";
1954 rv = icMaxStatus(rv, icValidateCriticalError);
1955 break;
1957 ***************
1958 *** 1724,1730 ****
1959 // Check for duplicate tags
1960 if (!AreTagsUnique()) {
1961 sReport += icValidateWarning;
1962 ! sReport += " - There are duplicate tags.\r\n";
1963 rv =icMaxStatus(rv, icValidateWarning);
1966 --- 1724,1730 ----
1967 // Check for duplicate tags
1968 if (!AreTagsUnique()) {
1969 sReport += icValidateWarning;
1970 ! sReport += " - There are duplicate tags.\n";
1971 rv =icMaxStatus(rv, icValidateWarning);
1974 ***************
1975 *** 1979,1985 ****
1976 sReport = icValidateCriticalErrorMsg;
1977 sReport += " - ";
1978 sReport += szFilename;
1979 ! sReport += "- Invalid Filename\r\n";
1980 delete pFileIO;
1981 return NULL;
1983 --- 1979,1985 ----
1984 sReport = icValidateCriticalErrorMsg;
1985 sReport += " - ";
1986 sReport += szFilename;
1987 ! sReport += "- Invalid Filename\n";
1988 delete pFileIO;
1989 return NULL;
1991 *** misc/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Mon Aug 20 22:05:00 2007
1992 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Fri Jan 25 14:24:00 2008
1993 ***************
1994 *** 166,172 ****
1995 CIccInfo Info;
1996 sReport += icValidateNonCompliantMsg;
1997 sReport += Info.GetSigName(sig);
1998 ! sReport += " - Reserved Value must be zero.\r\n";
2000 rv = icValidateNonCompliant;
2002 --- 166,172 ----
2003 CIccInfo Info;
2004 sReport += icValidateNonCompliantMsg;
2005 sReport += Info.GetSigName(sig);
2006 ! sReport += " - Reserved Value must be zero.\n";
2008 rv = icValidateNonCompliant;
2010 ***************
2011 *** 340,346 ****
2012 sprintf(buf, "%u Bytes.", m_nSize-4);
2013 sDescription += buf;
2015 ! sDescription += "\r\n\r\nData Follows:\r\n";
2017 icMemDump(sDescription, m_pData+4, m_nSize-4);
2019 --- 340,346 ----
2020 sprintf(buf, "%u Bytes.", m_nSize-4);
2021 sDescription += buf;
2023 ! sDescription += "\n\nData Follows:\n";
2025 icMemDump(sDescription, m_pData+4, m_nSize-4);
2027 ***************
2028 *** 511,517 ****
2029 if (m_szText && *m_szText)
2030 sDescription += m_szText;
2032 ! sDescription += "\"\r\n";
2036 --- 511,517 ----
2037 if (m_szText && *m_szText)
2038 sDescription += m_szText;
2040 ! sDescription += "\"\n";
2044 ***************
2045 *** 629,635 ****
2046 if (m_nBufSize<7) {
2047 sReport += icValidateNonCompliantMsg;
2048 sReport += sSigName;
2049 ! sReport += " - Tag must have at least seven text characters.\r\n";
2050 rv = icMaxStatus(rv, icValidateNonCompliant);
2052 break;
2053 --- 629,635 ----
2054 if (m_nBufSize<7) {
2055 sReport += icValidateNonCompliantMsg;
2056 sReport += sSigName;
2057 ! sReport += " - Tag must have at least seven text characters.\n";
2058 rv = icMaxStatus(rv, icValidateNonCompliant);
2060 break;
2061 ***************
2062 *** 636,642 ****
2063 default:
2064 sReport += icValidateWarningMsg;
2065 sReport += sSigName;
2066 ! sReport += " - Unknown Tag.\r\n";
2067 rv = icMaxStatus(rv, icValidateWarning);
2069 int i;
2070 --- 636,642 ----
2071 default:
2072 sReport += icValidateWarningMsg;
2073 sReport += sSigName;
2074 ! sReport += " - Unknown Tag.\n";
2075 rv = icMaxStatus(rv, icValidateWarning);
2077 int i;
2078 ***************
2079 *** 644,650 ****
2080 if (m_szText[i]&0x80) {
2081 sReport += icValidateWarning;
2082 sReport += sSigName;
2083 ! sReport += " - Text do not contain 7bit data.\r\n";
2087 --- 644,650 ----
2088 if (m_szText[i]&0x80) {
2089 sReport += icValidateWarning;
2090 sReport += sSigName;
2091 ! sReport += " - Text do not contain 7bit data.\n";
2095 ***************
2096 *** 651,657 ****
2097 else {
2098 sReport += icValidateWarningMsg;
2099 sReport += sSigName;
2100 ! sReport += " - Empty Tag.\r\n";
2101 rv = icMaxStatus(rv, icValidateWarning);
2104 --- 651,657 ----
2105 else {
2106 sReport += icValidateWarningMsg;
2107 sReport += sSigName;
2108 ! sReport += " - Empty Tag.\n";
2109 rv = icMaxStatus(rv, icValidateWarning);
2112 ***************
2113 *** 941,947 ****
2114 if (m_szText && *m_szText)
2115 sDescription += m_szText;
2117 ! sDescription += "\"\r\n";
2121 --- 941,947 ----
2122 if (m_szText && *m_szText)
2123 sDescription += m_szText;
2125 ! sDescription += "\"\n";
2129 ***************
2130 *** 1101,1107 ****
2131 if (m_nScriptSize>67) {
2132 sReport += icValidateNonCompliantMsg;
2133 sReport += sSigName;
2134 ! sReport += " - ScriptCode count must not be greater than 67.\r\n";
2136 rv =icMaxStatus(rv, icValidateNonCompliant);
2138 --- 1101,1107 ----
2139 if (m_nScriptSize>67) {
2140 sReport += icValidateNonCompliantMsg;
2141 sReport += sSigName;
2142 ! sReport += " - ScriptCode count must not be greater than 67.\n";
2144 rv =icMaxStatus(rv, icValidateNonCompliant);
2146 ***************
2147 *** 1260,1266 ****
2148 CIccInfo Fmt;
2150 sDescription += Fmt.GetSigName(m_nSig);
2151 ! sDescription += "\r\n";
2155 --- 1260,1266 ----
2156 CIccInfo Fmt;
2158 sDescription += Fmt.GetSigName(m_nSig);
2159 ! sDescription += "\n";
2163 ***************
2164 *** 1320,1326 ****
2166 sReport += icValidateNonCompliantMsg;
2167 sReport += sSigName;
2168 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(m_nSig));
2169 sReport += buf;
2170 rv = icMaxStatus(rv, icValidateNonCompliant);
2172 --- 1320,1326 ----
2174 sReport += icValidateNonCompliantMsg;
2175 sReport += sSigName;
2176 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(m_nSig));
2177 sReport += buf;
2178 rv = icMaxStatus(rv, icValidateNonCompliant);
2180 ***************
2181 *** 1336,1342 ****
2183 sReport += icValidateNonCompliantMsg;
2184 sReport += sSigName;
2185 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\r\n", Info.GetSigName(m_nSig));
2186 sReport += buf;
2187 rv = icMaxStatus(rv, icValidateNonCompliant);
2189 --- 1336,1342 ----
2191 sReport += icValidateNonCompliantMsg;
2192 sReport += sSigName;
2193 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\n", Info.GetSigName(m_nSig));
2194 sReport += buf;
2195 rv = icMaxStatus(rv, icValidateNonCompliant);
2197 ***************
2198 *** 1355,1361 ****
2200 sReport += icValidateNonCompliantMsg;
2201 sReport += sSigName;
2202 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\r\n", Info.GetSigName(m_nSig));
2203 sReport += buf;
2204 rv = icMaxStatus(rv, icValidateNonCompliant);
2206 --- 1355,1361 ----
2208 sReport += icValidateNonCompliantMsg;
2209 sReport += sSigName;
2210 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\n", Info.GetSigName(m_nSig));
2211 sReport += buf;
2212 rv = icMaxStatus(rv, icValidateNonCompliant);
2214 ***************
2215 *** 1686,1692 ****
2217 sDescription.reserve(sDescription.size() + m_nSize*79);
2219 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\r\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2220 sDescription += buf;
2222 for (i=0; i<m_nSize; i++) {
2223 --- 1686,1692 ----
2225 sDescription.reserve(sDescription.size() + m_nSize*79);
2227 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2228 sDescription += buf;
2230 for (i=0; i<m_nSize; i++) {
2231 ***************
2232 *** 1717,1723 ****
2233 sDescription += buf;
2236 ! sDescription += "\r\n";
2238 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2240 --- 1717,1723 ----
2241 sDescription += buf;
2244 ! sDescription += "\n";
2246 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2248 ***************
2249 *** 2082,2088 ****
2250 if (!m_nSize) {
2251 sReport += icValidateWarningMsg;
2252 sReport += sSigName;
2253 ! sReport += " - Empty tag!\r\n";
2254 rv = icMaxStatus(rv, icValidateWarning);
2257 --- 2082,2088 ----
2258 if (!m_nSize) {
2259 sReport += icValidateWarningMsg;
2260 sReport += sSigName;
2261 ! sReport += " - Empty tag!\n";
2262 rv = icMaxStatus(rv, icValidateWarning);
2265 ***************
2266 *** 2092,2098 ****
2267 if (m_nDeviceCoords != nCoords) {
2268 sReport += icValidateNonCompliantMsg;
2269 sReport += sSigName;
2270 ! sReport += " - Incorrect number of device co-ordinates.\r\n";
2271 rv = icMaxStatus(rv, icValidateNonCompliant);
2274 --- 2092,2098 ----
2275 if (m_nDeviceCoords != nCoords) {
2276 sReport += icValidateNonCompliantMsg;
2277 sReport += sSigName;
2278 ! sReport += " - Incorrect number of device co-ordinates.\n";
2279 rv = icMaxStatus(rv, icValidateNonCompliant);
2282 ***************
2283 *** 2099,2105 ****
2284 else {
2285 sReport += icValidateWarningMsg;
2286 sReport += sSigName;
2287 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2288 rv = icMaxStatus(rv, icValidateWarning);
2291 --- 2099,2105 ----
2292 else {
2293 sReport += icValidateWarningMsg;
2294 sReport += sSigName;
2295 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2296 rv = icMaxStatus(rv, icValidateWarning);
2299 ***************
2300 *** 2285,2291 ****
2301 icChar buf[128];
2303 if (m_nSize == 1 ) {
2304 ! 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));
2305 sDescription += buf;
2307 else {
2308 --- 2285,2291 ----
2309 icChar buf[128];
2311 if (m_nSize == 1 ) {
2312 ! sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
2313 sDescription += buf;
2315 else {
2316 ***************
2317 *** 2293,2299 ****
2318 sDescription.reserve(sDescription.size() + m_nSize*79);
2320 for (i=0; i<m_nSize; i++) {
2321 ! 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));
2322 sDescription += buf;
2325 --- 2293,2299 ----
2326 sDescription.reserve(sDescription.size() + m_nSize*79);
2328 for (i=0; i<m_nSize; i++) {
2329 ! 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));
2330 sDescription += buf;
2333 ***************
2334 *** 2347,2353 ****
2335 if (!m_nSize) {
2336 sReport += icValidateWarningMsg;
2337 sReport += sSigName;
2338 ! sReport += " - Empty tag.\r\n";
2340 rv = icMaxStatus(rv, icValidateWarning);
2341 return rv;
2342 --- 2347,2353 ----
2343 if (!m_nSize) {
2344 sReport += icValidateWarningMsg;
2345 sReport += sSigName;
2346 ! sReport += " - Empty tag.\n";
2348 rv = icMaxStatus(rv, icValidateWarning);
2349 return rv;
2350 ***************
2351 *** 2553,2566 ****
2353 icUInt32Number i;
2354 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2355 ! sprintf(buf, "Number of Channels : %u\r\n", m_nChannels);
2356 sDescription += buf;
2358 ! sprintf(buf, "Colorant Encoding : %s\r\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2359 sDescription += buf;
2361 for (i=0; i<m_nChannels; i++) {
2362 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\r\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2363 sDescription += buf;
2366 --- 2553,2566 ----
2368 icUInt32Number i;
2369 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2370 ! sprintf(buf, "Number of Channels : %u\n", m_nChannels);
2371 sDescription += buf;
2373 ! sprintf(buf, "Colorant Encoding : %s\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2374 sDescription += buf;
2376 for (i=0; i<m_nChannels; i++) {
2377 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2378 sDescription += buf;
2381 ***************
2382 *** 2617,2623 ****
2383 if (m_nChannels!=3) {
2384 sReport += icValidateCriticalErrorMsg;
2385 sReport += sSigName;
2386 ! sReport += " - Number of device channels must be three.\r\n";
2387 rv = icMaxStatus(rv, icValidateCriticalError);
2390 --- 2617,2623 ----
2391 if (m_nChannels!=3) {
2392 sReport += icValidateCriticalErrorMsg;
2393 sReport += sSigName;
2394 ! sReport += " - Number of device channels must be three.\n";
2395 rv = icMaxStatus(rv, icValidateCriticalError);
2398 ***************
2399 *** 2629,2635 ****
2400 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2401 sReport += icValidateNonCompliantMsg;
2402 sReport += sSigName;
2403 ! sReport += " - Chromaticity data does not match specification.\r\n";
2404 rv = icMaxStatus(rv, icValidateNonCompliant);
2406 break;
2407 --- 2629,2635 ----
2408 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2409 sReport += icValidateNonCompliantMsg;
2410 sReport += sSigName;
2411 ! sReport += " - Chromaticity data does not match specification.\n";
2412 rv = icMaxStatus(rv, icValidateNonCompliant);
2414 break;
2415 ***************
2416 *** 2642,2648 ****
2417 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2418 sReport += icValidateNonCompliantMsg;
2419 sReport += sSigName;
2420 ! sReport += " - Chromaticity data does not match specification.\r\n";
2421 rv = icMaxStatus(rv, icValidateNonCompliant);
2423 break;
2424 --- 2642,2648 ----
2425 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2426 sReport += icValidateNonCompliantMsg;
2427 sReport += sSigName;
2428 ! sReport += " - Chromaticity data does not match specification.\n";
2429 rv = icMaxStatus(rv, icValidateNonCompliant);
2431 break;
2432 ***************
2433 *** 2655,2661 ****
2434 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2435 sReport += icValidateNonCompliantMsg;
2436 sReport += sSigName;
2437 ! sReport += " - Chromaticity data does not match specification.\r\n";
2438 rv = icMaxStatus(rv, icValidateNonCompliant);
2440 break;
2441 --- 2655,2661 ----
2442 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2443 sReport += icValidateNonCompliantMsg;
2444 sReport += sSigName;
2445 ! sReport += " - Chromaticity data does not match specification.\n";
2446 rv = icMaxStatus(rv, icValidateNonCompliant);
2448 break;
2449 ***************
2450 *** 2668,2674 ****
2451 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2452 sReport += icValidateNonCompliantMsg;
2453 sReport += sSigName;
2454 ! sReport += " - Chromaticity data does not match specification.\r\n";
2455 rv = icMaxStatus(rv, icValidateNonCompliant);
2457 break;
2458 --- 2668,2674 ----
2459 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2460 sReport += icValidateNonCompliantMsg;
2461 sReport += sSigName;
2462 ! sReport += " - Chromaticity data does not match specification.\n";
2463 rv = icMaxStatus(rv, icValidateNonCompliant);
2465 break;
2466 ***************
2467 *** 2678,2684 ****
2469 sReport += icValidateNonCompliantMsg;
2470 sReport += sSigName;
2471 ! sReport += " - Invalid colorant type encoding.\r\n";
2472 rv = icMaxStatus(rv, icValidateNonCompliant);
2475 --- 2678,2684 ----
2477 sReport += icValidateNonCompliantMsg;
2478 sReport += sSigName;
2479 ! sReport += " - Invalid colorant type encoding.\n";
2480 rv = icMaxStatus(rv, icValidateNonCompliant);
2483 ***************
2484 *** 2884,2892 ****
2486 if (m_nSize == 1 ) {
2487 if (Tsig==icSigS15Fixed16ArrayType)
2488 ! sprintf(buf, "Value = %.4lf\r\n", icFtoD(m_Num[0]));
2489 else
2490 ! sprintf(buf, "Value = %.4lf\r\n", icUFtoD(m_Num[0]));
2491 sDescription += buf;
2493 else {
2494 --- 2884,2892 ----
2496 if (m_nSize == 1 ) {
2497 if (Tsig==icSigS15Fixed16ArrayType)
2498 ! sprintf(buf, "Value = %.4lf\n", icFtoD(m_Num[0]));
2499 else
2500 ! sprintf(buf, "Value = %.4lf\n", icUFtoD(m_Num[0]));
2501 sDescription += buf;
2503 else {
2504 ***************
2505 *** 2893,2910 ****
2506 icUInt32Number i;
2508 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2509 ! sDescription += "Matrix Form:\r\n";
2510 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2512 ! sDescription += "\r\nArrayForm:\r\n";
2514 sDescription.reserve(sDescription.size() + m_nSize*79);
2516 for (i=0; i<m_nSize; i++) {
2517 if (Tsig==icSigS15Fixed16ArrayType)
2518 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icFtoD(m_Num[i]));
2519 else
2520 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icUFtoD(m_Num[i]));
2521 sDescription += buf;
2524 --- 2893,2910 ----
2525 icUInt32Number i;
2527 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2528 ! sDescription += "Matrix Form:\n";
2529 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2531 ! sDescription += "\nArrayForm:\n";
2533 sDescription.reserve(sDescription.size() + m_nSize*79);
2535 for (i=0; i<m_nSize; i++) {
2536 if (Tsig==icSigS15Fixed16ArrayType)
2537 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icFtoD(m_Num[i]));
2538 else
2539 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icUFtoD(m_Num[i]));
2540 sDescription += buf;
2543 ***************
2544 *** 3172,3178 ****
2545 icChar buf[128];
2547 if (m_nSize == 1 ) {
2548 ! sprintf(buf, "Value = %u (0x%x)\r\n", m_Num[0], m_Num[0]);
2549 sDescription += buf;
2551 else {
2552 --- 3172,3178 ----
2553 icChar buf[128];
2555 if (m_nSize == 1 ) {
2556 ! sprintf(buf, "Value = %u (0x%x)\n", m_Num[0], m_Num[0]);
2557 sDescription += buf;
2559 else {
2560 ***************
2561 *** 3180,3186 ****
2562 sDescription.reserve(sDescription.size() + m_nSize*79);
2564 for (i=0; i<m_nSize; i++) {
2565 ! sprintf(buf, "Value[%u] = %u (0x%x)\r\n", i, m_Num[i], m_Num[i]);
2566 sDescription += buf;
2569 --- 3180,3186 ----
2570 sDescription.reserve(sDescription.size() + m_nSize*79);
2572 for (i=0; i<m_nSize; i++) {
2573 ! sprintf(buf, "Value[%u] = %u (0x%x)\n", i, m_Num[i], m_Num[i]);
2574 sDescription += buf;
2577 ***************
2578 *** 3374,3388 ****
2579 CIccInfo Fmt;
2580 icChar buf[128];
2582 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\r\n";
2583 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n",
2584 icFtoD(m_Data.backing.X),
2585 icFtoD(m_Data.backing.Y),
2586 icFtoD(m_Data.backing.Z));
2587 sDescription += buf;
2588 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\r\n";
2589 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\r\n";
2590 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\r\n";
2594 --- 3374,3388 ----
2595 CIccInfo Fmt;
2596 icChar buf[128];
2598 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\n";
2599 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
2600 icFtoD(m_Data.backing.X),
2601 icFtoD(m_Data.backing.Y),
2602 icFtoD(m_Data.backing.Z));
2603 sDescription += buf;
2604 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\n";
2605 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\n";
2606 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\n";
2610 ***************
2611 *** 3416,3422 ****
2612 default:
2613 sReport += icValidateNonCompliantMsg;
2614 sReport += sSigName;
2615 ! sReport += " - Invalid standard observer encoding.\r\n";
2616 rv = icMaxStatus(rv, icValidateNonCompliant);
2619 --- 3416,3422 ----
2620 default:
2621 sReport += icValidateNonCompliantMsg;
2622 sReport += sSigName;
2623 ! sReport += " - Invalid standard observer encoding.\n";
2624 rv = icMaxStatus(rv, icValidateNonCompliant);
2627 ***************
2628 *** 3429,3435 ****
2629 default:
2630 sReport += icValidateNonCompliantMsg;
2631 sReport += sSigName;
2632 ! sReport += " - Invalid measurement geometry encoding.\r\n";
2633 rv = icMaxStatus(rv, icValidateNonCompliant);
2636 --- 3429,3435 ----
2637 default:
2638 sReport += icValidateNonCompliantMsg;
2639 sReport += sSigName;
2640 ! sReport += " - Invalid measurement geometry encoding.\n";
2641 rv = icMaxStatus(rv, icValidateNonCompliant);
2644 ***************
2645 *** 3448,3454 ****
2646 default:
2647 sReport += icValidateNonCompliantMsg;
2648 sReport += sSigName;
2649 ! sReport += " - Invalid standard illuminant encoding.\r\n";
2650 rv = icMaxStatus(rv, icValidateNonCompliant);
2653 --- 3448,3454 ----
2654 default:
2655 sReport += icValidateNonCompliantMsg;
2656 sReport += sSigName;
2657 ! sReport += " - Invalid standard illuminant encoding.\n";
2658 rv = icMaxStatus(rv, icValidateNonCompliant);
2661 ***************
2662 *** 3902,3910 ****
2664 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2665 if (i!=m_Strings->begin())
2666 ! sDescription += "\r\n";
2668 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\r\n",
2669 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2670 i->m_nCountryCode>>8, i->m_nCountryCode);
2672 --- 3902,3910 ----
2674 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2675 if (i!=m_Strings->begin())
2676 ! sDescription += "\n";
2678 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\n",
2679 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2680 i->m_nCountryCode>>8, i->m_nCountryCode);
2682 ***************
2683 *** 3919,3925 ****
2684 i->GetAnsi(szBuf, nSize);
2685 sDescription += "\"";
2686 sDescription += szBuf;
2687 ! sDescription += "\"\r\n";
2691 --- 3919,3925 ----
2692 i->GetAnsi(szBuf, nSize);
2693 sDescription += "\"";
2694 sDescription += szBuf;
2695 ! sDescription += "\"\n";
2699 ***************
2700 *** 3948,3954 ****
2701 if (!m_Strings->size()) {
2702 sReport += icValidateWarningMsg;
2703 sReport += sSigName;
2704 ! sReport += " - Empty tag!\r\n";
2705 rv = icMaxStatus(rv, icValidateWarning);
2708 --- 3948,3954 ----
2709 if (!m_Strings->size()) {
2710 sReport += icValidateWarningMsg;
2711 sReport += sSigName;
2712 ! sReport += " - Empty tag!\n";
2713 rv = icMaxStatus(rv, icValidateWarning);
2716 ***************
2717 *** 4246,4260 ****
2719 icChar buf[128];
2721 ! sDescription = "\r\nData:\r\n";
2723 if (IsTypeAscii()) {
2724 ! sprintf(buf, "%s\r\n", (icChar*)m_pData);
2725 sDescription += buf;
2727 else
2728 for (int i = 0; i<(int)m_nSize; i++) {
2729 ! sprintf(buf, "%d\r\n", m_pData[i]);
2730 sDescription += buf;
2733 --- 4246,4260 ----
2735 icChar buf[128];
2737 ! sDescription = "\nData:\n";
2739 if (IsTypeAscii()) {
2740 ! sprintf(buf, "%s\n", (icChar*)m_pData);
2741 sDescription += buf;
2743 else
2744 for (int i = 0; i<(int)m_nSize; i++) {
2745 ! sprintf(buf, "%d\n", m_pData[i]);
2746 sDescription += buf;
2749 ***************
2750 *** 4312,4318 ****
2751 default:
2752 sReport += icValidateNonCompliantMsg;
2753 sReport += sSigName;
2754 ! sReport += " - Invalid data flag encoding.\r\n";
2755 rv = icMaxStatus(rv, icValidateNonCompliant);
2758 --- 4312,4318 ----
2759 default:
2760 sReport += icValidateNonCompliantMsg;
2761 sReport += sSigName;
2762 ! sReport += " - Invalid data flag encoding.\n";
2763 rv = icMaxStatus(rv, icValidateNonCompliant);
2766 ***************
2767 *** 4477,4487 ****
2768 icChar buf[128];
2770 sDescription = "Date = ";
2771 ! sprintf(buf, "%u-%u-%u\r\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2772 sDescription += buf;
2774 sDescription += "Time = ";
2775 ! sprintf(buf, "%u:%u:%u\r\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2776 sDescription += buf;
2779 --- 4477,4487 ----
2780 icChar buf[128];
2782 sDescription = "Date = ";
2783 ! sprintf(buf, "%u-%u-%u\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2784 sDescription += buf;
2786 sDescription += "Time = ";
2787 ! sprintf(buf, "%u:%u:%u\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2788 sDescription += buf;
2791 ***************
2792 *** 4697,4708 ****
2794 icChar buf[128];
2796 ! sprintf(buf, "Colorant Count : %u\r\n", m_nCount);
2797 sDescription += buf;
2798 ! sDescription += "Order of Colorants:\r\n";
2800 for (int i=0; i<(int)m_nCount; i++) {
2801 ! sprintf(buf, "%u\r\n", m_pData[i]);
2802 sDescription += buf;
2805 --- 4697,4708 ----
2807 icChar buf[128];
2809 ! sprintf(buf, "Colorant Count : %u\n", m_nCount);
2810 sDescription += buf;
2811 ! sDescription += "Order of Colorants:\n";
2813 for (int i=0; i<(int)m_nCount; i++) {
2814 ! sprintf(buf, "%u\n", m_pData[i]);
2815 sDescription += buf;
2818 ***************
2819 *** 4757,4763 ****
2820 if (!pProfile) {
2821 sReport += icValidateWarningMsg;
2822 sReport += sSigName;
2823 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2824 rv = icMaxStatus(rv, icValidateWarning);
2825 return rv;
2827 --- 4757,4763 ----
2828 if (!pProfile) {
2829 sReport += icValidateWarningMsg;
2830 sReport += sSigName;
2831 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2832 rv = icMaxStatus(rv, icValidateWarning);
2833 return rv;
2835 ***************
2836 *** 4765,4771 ****
2837 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2838 sReport += icValidateNonCompliantMsg;
2839 sReport += sSigName;
2840 ! sReport += " - Incorrect number of colorants.\r\n";
2841 rv = icMaxStatus(rv, icValidateNonCompliant);
2844 --- 4765,4771 ----
2845 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2846 sReport += icValidateNonCompliantMsg;
2847 sReport += sSigName;
2848 ! sReport += " - Incorrect number of colorants.\n";
2849 rv = icMaxStatus(rv, icValidateNonCompliant);
2852 ***************
2853 *** 4977,4983 ****
2854 icUInt32Number i, nLen, nMaxLen=0;
2855 icFloatNumber Lab[3];
2857 ! sprintf(buf, "BEGIN_COLORANTS %u\r\n", m_nCount);
2858 sDescription += buf;
2860 for (i=0; i<m_nCount; i++) {
2861 --- 4977,4983 ----
2862 icUInt32Number i, nLen, nMaxLen=0;
2863 icFloatNumber Lab[3];
2865 ! sprintf(buf, "BEGIN_COLORANTS %u\n", m_nCount);
2866 sDescription += buf;
2868 for (i=0; i<m_nCount; i++) {
2869 ***************
2870 *** 4988,4998 ****
2871 sDescription += "# NAME ";
2873 if (m_PCS == icSigXYZData) {
2874 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\r\n");
2875 sDescription += buf;
2877 else {
2878 ! sprintf(buf, "Lab_L Lab_a Lab_b\r\n");
2879 sDescription += buf;
2881 for (i=0; i<m_nCount; i++) {
2882 --- 4988,4998 ----
2883 sDescription += "# NAME ";
2885 if (m_PCS == icSigXYZData) {
2886 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\n");
2887 sDescription += buf;
2889 else {
2890 ! sprintf(buf, "Lab_L Lab_a Lab_b\n");
2891 sDescription += buf;
2893 for (i=0; i<m_nCount; i++) {
2894 ***************
2895 *** 5003,5009 ****
2896 sDescription += buf;
2898 if (m_PCS == icSigXYZData) {
2899 ! 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]));
2900 sDescription += buf;
2902 else {
2903 --- 5003,5009 ----
2904 sDescription += buf;
2906 if (m_PCS == icSigXYZData) {
2907 ! 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]));
2908 sDescription += buf;
2910 else {
2911 ***************
2912 *** 5011,5017 ****
2913 Lab[1] = icU16toF(m_pData[i].data[1]);
2914 Lab[2] = icU16toF(m_pData[i].data[2]);
2915 icLabFromPcs(Lab);
2916 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\r\n", Lab[0], Lab[1], Lab[2]);
2917 sDescription += buf;
2920 --- 5011,5017 ----
2921 Lab[1] = icU16toF(m_pData[i].data[1]);
2922 Lab[2] = icU16toF(m_pData[i].data[2]);
2923 icLabFromPcs(Lab);
2924 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\n", Lab[0], Lab[1], Lab[2]);
2925 sDescription += buf;
2928 ***************
2929 *** 5066,5072 ****
2930 if (!pProfile) {
2931 sReport += icValidateWarningMsg;
2932 sReport += sSigName;
2933 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2934 rv = icMaxStatus(rv, icValidateWarning);
2935 return rv;
2937 --- 5066,5072 ----
2938 if (!pProfile) {
2939 sReport += icValidateWarningMsg;
2940 sReport += sSigName;
2941 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2942 rv = icMaxStatus(rv, icValidateWarning);
2943 return rv;
2945 ***************
2946 *** 5076,5082 ****
2947 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
2948 sReport += icValidateNonCompliantMsg;
2949 sReport += sSigName;
2950 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\r\n";
2951 rv = icMaxStatus(rv, icValidateNonCompliant);
2954 --- 5076,5082 ----
2955 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
2956 sReport += icValidateNonCompliantMsg;
2957 sReport += sSigName;
2958 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\n";
2959 rv = icMaxStatus(rv, icValidateNonCompliant);
2962 ***************
2963 *** 5084,5090 ****
2964 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2965 sReport += icValidateNonCompliantMsg;
2966 sReport += sSigName;
2967 ! sReport += " - Incorrect number of colorants.\r\n";
2968 rv = icMaxStatus(rv, icValidateNonCompliant);
2971 --- 5084,5090 ----
2972 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2973 sReport += icValidateNonCompliantMsg;
2974 sReport += sSigName;
2975 ! sReport += " - Incorrect number of colorants.\n";
2976 rv = icMaxStatus(rv, icValidateNonCompliant);
2979 ***************
2980 *** 5261,5273 ****
2981 icChar buf[128];
2982 CIccInfo Fmt;
2984 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
2985 icFtoD(m_XYZIllum.X),
2986 icFtoD(m_XYZIllum.Y),
2987 icFtoD(m_XYZIllum.Z));
2988 sDescription += buf;
2990 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
2991 icFtoD(m_XYZSurround.X),
2992 icFtoD(m_XYZSurround.Y),
2993 icFtoD(m_XYZSurround.Z));
2994 --- 5261,5273 ----
2995 icChar buf[128];
2996 CIccInfo Fmt;
2998 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
2999 icFtoD(m_XYZIllum.X),
3000 icFtoD(m_XYZIllum.Y),
3001 icFtoD(m_XYZIllum.Z));
3002 sDescription += buf;
3004 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3005 icFtoD(m_XYZSurround.X),
3006 icFtoD(m_XYZSurround.Y),
3007 icFtoD(m_XYZSurround.Z));
3008 ***************
3009 *** 5276,5282 ****
3010 sDescription += "Illuminant Type: ";
3012 sDescription += Fmt.GetIlluminantName(m_illumType);
3013 ! sDescription += "\r\n";
3017 --- 5276,5282 ----
3018 sDescription += "Illuminant Type: ";
3020 sDescription += Fmt.GetIlluminantName(m_illumType);
3021 ! sDescription += "\n";
3025 ***************
3026 *** 5800,5831 ****
3027 icChar buf[128], buf2[28];
3028 icUInt32Number count=0;
3030 ! sprintf(buf, "Number of Profile Description Structures: %u\r\n", m_Descriptions->size());
3031 sDescription += buf;
3033 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3034 ! sDescription += "\r\n";
3036 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\r\n", count+1);
3037 sDescription += buf;
3039 ! sprintf(buf, "Device Manufacturer Signature: %s\r\n", icGetSig(buf2, i->m_deviceMfg, false));
3040 sDescription += buf;
3042 ! sprintf(buf, "Device Model Signature: %s\r\n", icGetSig(buf2, i->m_deviceModel, false));
3043 sDescription += buf;
3045 ! sprintf(buf, "Device Attributes: %08x%08x\r\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3046 sDescription += buf;
3048 ! sprintf(buf, "Device Technology Signature: %s\r\n", icGetSig(buf2, i->m_technology, false));
3049 sDescription += buf;
3051 ! sprintf(buf, "Description of device manufacturer: \r\n");
3052 sDescription += buf;
3053 i->m_deviceMfgDesc.Describe(sDescription);
3055 ! sprintf(buf, "Description of device model: \r\n");
3056 sDescription += buf;
3057 i->m_deviceModelDesc.Describe(sDescription);
3059 --- 5800,5831 ----
3060 icChar buf[128], buf2[28];
3061 icUInt32Number count=0;
3063 ! sprintf(buf, "Number of Profile Description Structures: %u\n", m_Descriptions->size());
3064 sDescription += buf;
3066 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3067 ! sDescription += "\n";
3069 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\n", count+1);
3070 sDescription += buf;
3072 ! sprintf(buf, "Device Manufacturer Signature: %s\n", icGetSig(buf2, i->m_deviceMfg, false));
3073 sDescription += buf;
3075 ! sprintf(buf, "Device Model Signature: %s\n", icGetSig(buf2, i->m_deviceModel, false));
3076 sDescription += buf;
3078 ! sprintf(buf, "Device Attributes: %08x%08x\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3079 sDescription += buf;
3081 ! sprintf(buf, "Device Technology Signature: %s\n", icGetSig(buf2, i->m_technology, false));
3082 sDescription += buf;
3084 ! sprintf(buf, "Description of device manufacturer: \n");
3085 sDescription += buf;
3086 i->m_deviceMfgDesc.Describe(sDescription);
3088 ! sprintf(buf, "Description of device model: \n");
3089 sDescription += buf;
3090 i->m_deviceModelDesc.Describe(sDescription);
3092 ***************
3093 *** 5886,5892 ****
3095 sReport += icValidateNonCompliantMsg;
3096 sReport += sSigName;
3097 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(i->m_technology));
3098 sReport += buf;
3099 rv = icMaxStatus(rv, icValidateNonCompliant);
3101 --- 5886,5892 ----
3103 sReport += icValidateNonCompliantMsg;
3104 sReport += sSigName;
3105 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(i->m_technology));
3106 sReport += buf;
3107 rv = icMaxStatus(rv, icValidateNonCompliant);
3109 ***************
3110 *** 5896,5902 ****
3111 sReport += icValidateNonCompliantMsg;
3112 sReport += sSigName;
3114 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\r\n";
3116 rv = icMaxStatus(rv, icValidateNonCompliant);
3118 --- 5896,5902 ----
3119 sReport += icValidateNonCompliantMsg;
3120 sReport += sSigName;
3122 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\n";
3124 rv = icMaxStatus(rv, icValidateNonCompliant);
3126 ***************
3127 *** 5905,5911 ****
3128 sReport += icValidateNonCompliantMsg;
3129 sReport += sSigName;
3131 ! sReport += " Contains non-aligned deviceModelDesc text tag information\r\n";
3133 rv = icMaxStatus(rv, icValidateNonCompliant);
3135 --- 5905,5911 ----
3136 sReport += icValidateNonCompliantMsg;
3137 sReport += sSigName;
3139 ! sReport += " Contains non-aligned deviceModelDesc text tag information\n";
3141 rv = icMaxStatus(rv, icValidateNonCompliant);
3143 ***************
3144 *** 6174,6198 ****
3145 CIccResponse16List::iterator j;
3147 sDescription += "Measurement Unit: ";
3148 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\r\n";
3151 for (int i=0; i<m_nChannels; i++) {
3152 nResponseList = m_Response16ListArray[i];
3154 ! sDescription += "\r\n";
3155 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i+1,
3156 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3157 sDescription += buf;
3159 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\r\n", i+1, nResponseList.size());
3160 sDescription += buf;
3162 ! sprintf(buf, "Measurement Data for Channel-%u follows:\r\n", i+1);
3163 sDescription += buf;
3165 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3166 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\r\n", j->deviceCode, icFtoD(j->measurementValue));
3167 sDescription += buf;
3170 --- 6174,6198 ----
3171 CIccResponse16List::iterator j;
3173 sDescription += "Measurement Unit: ";
3174 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\n";
3177 for (int i=0; i<m_nChannels; i++) {
3178 nResponseList = m_Response16ListArray[i];
3180 ! sDescription += "\n";
3181 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\n", i+1,
3182 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3183 sDescription += buf;
3185 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\n", i+1, nResponseList.size());
3186 sDescription += buf;
3188 ! sprintf(buf, "Measurement Data for Channel-%u follows:\n", i+1);
3189 sDescription += buf;
3191 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3192 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\n", j->deviceCode, icFtoD(j->measurementValue));
3193 sDescription += buf;
3196 ***************
3197 *** 6234,6240 ****
3198 default:
3199 sReport += icValidateNonCompliantMsg;
3200 sReport += sSigName;
3201 ! sReport += " - Unknown measurement unit signature.\r\n";
3202 rv = icMaxStatus(rv, icValidateNonCompliant);
3205 --- 6234,6240 ----
3206 default:
3207 sReport += icValidateNonCompliantMsg;
3208 sReport += sSigName;
3209 ! sReport += " - Unknown measurement unit signature.\n";
3210 rv = icMaxStatus(rv, icValidateNonCompliant);
3213 ***************
3214 *** 6241,6247 ****
3215 if (!m_nChannels) {
3216 sReport += icValidateNonCompliantMsg;
3217 sReport += sSigName;
3218 ! sReport += " - Incorrect number of channels.\r\n";
3219 rv = icMaxStatus(rv, icValidateNonCompliant);
3220 return rv;
3222 --- 6241,6247 ----
3223 if (!m_nChannels) {
3224 sReport += icValidateNonCompliantMsg;
3225 sReport += sSigName;
3226 ! sReport += " - Incorrect number of channels.\n";
3227 rv = icMaxStatus(rv, icValidateNonCompliant);
3228 return rv;
3230 ***************
3231 *** 6479,6495 ****
3232 CIccResponseCurveSet::iterator i;
3233 icChar buf[128];
3235 ! sprintf(buf, "Number of Channels: %u\r\n", m_nChannels);
3236 sDescription += buf;
3238 ! sprintf(buf, "Number of Measurement Types used: %u\r\n", m_ResponseCurves->size());
3239 sDescription += buf;
3241 int count = 0;
3242 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3243 ! sDescription += "\r\n";
3245 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\r\n", count+1);
3246 sDescription += buf;
3248 i->Describe(sDescription);
3249 --- 6479,6495 ----
3250 CIccResponseCurveSet::iterator i;
3251 icChar buf[128];
3253 ! sprintf(buf, "Number of Channels: %u\n", m_nChannels);
3254 sDescription += buf;
3256 ! sprintf(buf, "Number of Measurement Types used: %u\n", m_ResponseCurves->size());
3257 sDescription += buf;
3259 int count = 0;
3260 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3261 ! sDescription += "\n";
3263 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\n", count+1);
3264 sDescription += buf;
3266 i->Describe(sDescription);
3267 ***************
3268 *** 6658,6664 ****
3269 if (!pProfile) {
3270 sReport += icValidateWarningMsg;
3271 sReport += sSigName;
3272 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3273 rv = icMaxStatus(rv, icValidateWarning);
3274 return rv;
3276 --- 6658,6664 ----
3277 if (!pProfile) {
3278 sReport += icValidateWarningMsg;
3279 sReport += sSigName;
3280 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3281 rv = icMaxStatus(rv, icValidateWarning);
3282 return rv;
3284 ***************
3285 *** 6666,6678 ****
3286 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3287 sReport += icValidateWarningMsg;
3288 sReport += sSigName;
3289 ! sReport += " - Incorrect number of channels.\r\n";
3292 if (!GetNumResponseCurveTypes()) {
3293 sReport += icValidateWarningMsg;
3294 sReport += sSigName;
3295 ! sReport += " - Empty Tag!.\r\n";
3296 rv = icMaxStatus(rv, icValidateWarning);
3298 else {
3299 --- 6666,6678 ----
3300 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3301 sReport += icValidateWarningMsg;
3302 sReport += sSigName;
3303 ! sReport += " - Incorrect number of channels.\n";
3306 if (!GetNumResponseCurveTypes()) {
3307 sReport += icValidateWarningMsg;
3308 sReport += sSigName;
3309 ! sReport += " - Empty Tag!.\n";
3310 rv = icMaxStatus(rv, icValidateWarning);
3312 else {
3313 *** misc/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Mon Aug 20 22:05:00 2007
3314 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Fri Jan 25 14:24:00 2008
3315 ***************
3316 *** 323,345 ****
3317 icChar buf[128], *ptr;
3319 if (!m_nSize) {
3320 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3321 sDescription += buf;
3322 ! sDescription += "Y = X\r\n";
3324 else if (m_nSize==1) {
3325 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3326 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3327 sDescription += buf;
3328 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3329 sDescription += buf;
3331 else {
3332 int i;
3334 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\r\n");
3335 sDescription += buf;
3336 ! sDescription += "IN OUT\r\n";
3338 for (i=0; i<(int)m_nSize; i++) {
3339 ptr = buf;
3340 --- 323,345 ----
3341 icChar buf[128], *ptr;
3343 if (!m_nSize) {
3344 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3345 sDescription += buf;
3346 ! sDescription += "Y = X\n";
3348 else if (m_nSize==1) {
3349 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3350 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3351 sDescription += buf;
3352 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3353 sDescription += buf;
3355 else {
3356 int i;
3358 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\n");
3359 sDescription += buf;
3360 ! sDescription += "IN OUT\n";
3362 for (i=0; i<(int)m_nSize; i++) {
3363 ptr = buf;
3364 ***************
3365 *** 354,365 ****
3367 ptr += strlen(ptr);
3369 ! strcpy(ptr, "\r\n");
3371 sDescription += buf;
3374 ! sDescription += "\r\n";
3378 --- 354,365 ----
3380 ptr += strlen(ptr);
3382 ! strcpy(ptr, "\n");
3384 sDescription += buf;
3387 ! sDescription += "\n";
3391 ***************
3392 *** 383,405 ****
3393 icChar buf[128], *ptr;
3395 if (!m_nSize) {
3396 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3397 sDescription += buf;
3398 ! sDescription += "Y = X\r\n";
3400 else if (m_nSize==1) {
3401 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3402 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3403 sDescription += buf;
3404 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3405 sDescription += buf;
3407 else {
3408 int i;
3410 ! sprintf(buf, "BEGIN_LUT %s 1 1\r\n", szName);
3411 sDescription += buf;
3412 ! sDescription += "IN OUT\r\n";
3414 sDescription.reserve(sDescription.size() + m_nSize * 20);
3416 --- 383,405 ----
3417 icChar buf[128], *ptr;
3419 if (!m_nSize) {
3420 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3421 sDescription += buf;
3422 ! sDescription += "Y = X\n";
3424 else if (m_nSize==1) {
3425 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3426 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3427 sDescription += buf;
3428 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3429 sDescription += buf;
3431 else {
3432 int i;
3434 ! sprintf(buf, "BEGIN_LUT %s 1 1\n", szName);
3435 sDescription += buf;
3436 ! sDescription += "IN OUT\n";
3438 sDescription.reserve(sDescription.size() + m_nSize * 20);
3440 ***************
3441 *** 416,427 ****
3443 ptr += strlen(ptr);
3445 ! strcpy(ptr, "\r\n");
3447 sDescription += buf;
3450 ! sDescription += "\r\n";
3454 --- 416,427 ----
3456 ptr += strlen(ptr);
3458 ! strcpy(ptr, "\n");
3460 sDescription += buf;
3463 ! sDescription += "\n";
3467 ***************
3468 *** 614,620 ****
3469 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3470 sReport += icValidateWarningMsg;
3471 sReport += sSigName;
3472 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3473 rv = icMaxStatus(rv, icValidateWarning);
3476 --- 614,620 ----
3477 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3478 sReport += icValidateWarningMsg;
3479 sReport += sSigName;
3480 ! sReport += " - Curve cannot be accurately inverted.\n";
3481 rv = icMaxStatus(rv, icValidateWarning);
3484 ***************
3485 *** 822,877 ****
3487 icChar buf[128];
3489 ! sprintf(buf, "FunctionType: %04Xh\r\n", m_nFunctionType);
3490 sDescription += buf;
3492 switch(m_nFunctionType) {
3493 case 0x0000:
3494 ! sprintf(buf, "Y = X ^ %.4lf\r\n", icFtoD(m_Param[0]));
3495 sDescription += buf;
3496 return;
3498 case 0x0001:
3499 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\r\n",
3500 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3501 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3502 sDescription += buf;
3504 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\r\n",
3505 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3506 sDescription += buf;
3507 return;
3509 case 0x0002:
3510 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\r\n",
3511 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3512 icFtoD(m_Param[3]),
3513 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3514 sDescription += buf;
3516 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\r\n", icFtoD(m_Param[3]),
3517 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3518 sDescription += buf;
3519 return;
3521 case 0x0003:
3522 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\r\n",
3523 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3524 icFtoD(m_Param[4]));
3525 sDescription += buf;
3527 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\r\n",
3528 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3529 sDescription += buf;
3530 return;
3532 case 0x0004:
3533 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\r\n",
3534 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3535 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3536 sDescription += buf;
3538 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\r\n",
3539 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3540 sDescription += buf;
3541 return;
3542 --- 822,877 ----
3544 icChar buf[128];
3546 ! sprintf(buf, "FunctionType: %04Xh\n", m_nFunctionType);
3547 sDescription += buf;
3549 switch(m_nFunctionType) {
3550 case 0x0000:
3551 ! sprintf(buf, "Y = X ^ %.4lf\n", icFtoD(m_Param[0]));
3552 sDescription += buf;
3553 return;
3555 case 0x0001:
3556 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\n",
3557 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3558 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3559 sDescription += buf;
3561 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\n",
3562 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3563 sDescription += buf;
3564 return;
3566 case 0x0002:
3567 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\n",
3568 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3569 icFtoD(m_Param[3]),
3570 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3571 sDescription += buf;
3573 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\n", icFtoD(m_Param[3]),
3574 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3575 sDescription += buf;
3576 return;
3578 case 0x0003:
3579 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\n",
3580 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3581 icFtoD(m_Param[4]));
3582 sDescription += buf;
3584 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\n",
3585 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3586 sDescription += buf;
3587 return;
3589 case 0x0004:
3590 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\n",
3591 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3592 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3593 sDescription += buf;
3595 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\n",
3596 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3597 sDescription += buf;
3598 return;
3599 ***************
3600 *** 878,888 ****
3602 default:
3603 int i;
3604 ! sprintf(buf, "Unknown Function with %d parameters:\r\n");
3605 sDescription += buf;
3607 for (i=0; i<m_nNumParam; i++) {
3608 ! sprintf(buf, "Param[%d] = %.4lf\r\n", i, icFtoD(m_Param[i]));
3609 sDescription += buf;
3612 --- 878,888 ----
3614 default:
3615 int i;
3616 ! sprintf(buf, "Unknown Function with %d parameters:\n", m_nNumParam);
3617 sDescription += buf;
3619 for (i=0; i<m_nNumParam; i++) {
3620 ! sprintf(buf, "Param[%d] = %.4lf\n", i, icFtoD(m_Param[i]));
3621 sDescription += buf;
3624 ***************
3625 *** 907,916 ****
3627 icChar buf[128];
3629 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3630 sDescription += buf;
3631 Describe(sDescription);
3632 ! sDescription += "\r\n";
3636 --- 907,916 ----
3638 icChar buf[128];
3640 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3641 sDescription += buf;
3642 Describe(sDescription);
3643 ! sDescription += "\n";
3647 ***************
3648 *** 1106,1112 ****
3649 if (m_nReserved2!=0) {
3650 sReport += icValidateNonCompliantMsg;
3651 sReport += sSigName;
3652 ! sReport += " - Reserved Value must be zero.\r\n";
3654 rv = icMaxStatus(rv, icValidateNonCompliant);
3656 --- 1106,1112 ----
3657 if (m_nReserved2!=0) {
3658 sReport += icValidateNonCompliantMsg;
3659 sReport += sSigName;
3660 ! sReport += " - Reserved Value must be zero.\n";
3662 rv = icMaxStatus(rv, icValidateNonCompliant);
3664 ***************
3665 *** 1116,1122 ****
3666 if (m_nNumParam!=1) {
3667 sReport += icValidateCriticalErrorMsg;
3668 sReport += sSigName;
3669 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3670 rv = icMaxStatus(rv, icValidateCriticalError);
3672 break;
3673 --- 1116,1122 ----
3674 if (m_nNumParam!=1) {
3675 sReport += icValidateCriticalErrorMsg;
3676 sReport += sSigName;
3677 ! sReport += " - Number of parameters inconsistent with function type.\n";
3678 rv = icMaxStatus(rv, icValidateCriticalError);
3680 break;
3681 ***************
3682 *** 1125,1131 ****
3683 if (m_nNumParam!=3) {
3684 sReport += icValidateCriticalErrorMsg;
3685 sReport += sSigName;
3686 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3687 rv = icMaxStatus(rv, icValidateCriticalError);
3689 break;
3690 --- 1125,1131 ----
3691 if (m_nNumParam!=3) {
3692 sReport += icValidateCriticalErrorMsg;
3693 sReport += sSigName;
3694 ! sReport += " - Number of parameters inconsistent with function type.\n";
3695 rv = icMaxStatus(rv, icValidateCriticalError);
3697 break;
3698 ***************
3699 *** 1134,1140 ****
3700 if (m_nNumParam!=4) {
3701 sReport += icValidateCriticalErrorMsg;
3702 sReport += sSigName;
3703 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3704 rv = icMaxStatus(rv, icValidateCriticalError);
3706 break;
3707 --- 1134,1140 ----
3708 if (m_nNumParam!=4) {
3709 sReport += icValidateCriticalErrorMsg;
3710 sReport += sSigName;
3711 ! sReport += " - Number of parameters inconsistent with function type.\n";
3712 rv = icMaxStatus(rv, icValidateCriticalError);
3714 break;
3715 ***************
3716 *** 1143,1149 ****
3717 if (m_nNumParam!=5) {
3718 sReport += icValidateCriticalErrorMsg;
3719 sReport += sSigName;
3720 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3721 rv = icMaxStatus(rv, icValidateCriticalError);
3723 break;
3724 --- 1143,1149 ----
3725 if (m_nNumParam!=5) {
3726 sReport += icValidateCriticalErrorMsg;
3727 sReport += sSigName;
3728 ! sReport += " - Number of parameters inconsistent with function type.\n";
3729 rv = icMaxStatus(rv, icValidateCriticalError);
3731 break;
3732 ***************
3733 *** 1152,1158 ****
3734 if (m_nNumParam!=7) {
3735 sReport += icValidateCriticalErrorMsg;
3736 sReport += sSigName;
3737 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3738 rv = icMaxStatus(rv, icValidateCriticalError);
3740 break;
3741 --- 1152,1158 ----
3742 if (m_nNumParam!=7) {
3743 sReport += icValidateCriticalErrorMsg;
3744 sReport += sSigName;
3745 ! sReport += " - Number of parameters inconsistent with function type.\n";
3746 rv = icMaxStatus(rv, icValidateCriticalError);
3748 break;
3749 ***************
3750 *** 1160,1166 ****
3751 default:
3752 sReport += icValidateCriticalErrorMsg;
3753 sReport += sSigName;
3754 ! sReport += " - Unknown function type.\r\n";
3755 rv = icMaxStatus(rv, icValidateCriticalError);
3758 --- 1160,1166 ----
3759 default:
3760 sReport += icValidateCriticalErrorMsg;
3761 sReport += sSigName;
3762 ! sReport += " - Unknown function type.\n";
3763 rv = icMaxStatus(rv, icValidateCriticalError);
3766 ***************
3767 *** 1170,1176 ****
3768 if (lval>0.0 || uval<1.0) {
3769 sReport += icValidateWarningMsg;
3770 sReport += sSigName;
3771 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3772 rv = icMaxStatus(rv, icValidateWarning);
3775 --- 1170,1176 ----
3776 if (lval>0.0 || uval<1.0) {
3777 sReport += icValidateWarningMsg;
3778 sReport += sSigName;
3779 ! sReport += " - Curve cannot be accurately inverted.\n";
3780 rv = icMaxStatus(rv, icValidateWarning);
3783 ***************
3784 *** 1255,1286 ****
3786 icChar buf[128];
3788 ! sprintf(buf, "BEGIN_MATRIX %s\r\n", szName);
3789 sDescription += buf;
3791 if (!m_bUseConstants) {
3792 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3793 m_e[0], m_e[1], m_e[2]);
3794 sDescription += buf;
3795 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3796 m_e[3], m_e[4], m_e[5]);
3797 sDescription += buf;
3798 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3799 m_e[6], m_e[7], m_e[8]);
3800 sDescription += buf;
3802 else {
3803 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3804 m_e[0], m_e[1], m_e[2], m_e[9]);
3805 sDescription += buf;
3806 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3807 m_e[3], m_e[4], m_e[5], m_e[10]);
3808 sDescription += buf;
3809 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3810 m_e[6], m_e[7], m_e[8], m_e[11]);
3811 sDescription += buf;
3813 ! sDescription += "\r\n";
3817 --- 1255,1286 ----
3819 icChar buf[128];
3821 ! sprintf(buf, "BEGIN_MATRIX %s\n", szName);
3822 sDescription += buf;
3824 if (!m_bUseConstants) {
3825 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3826 m_e[0], m_e[1], m_e[2]);
3827 sDescription += buf;
3828 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3829 m_e[3], m_e[4], m_e[5]);
3830 sDescription += buf;
3831 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3832 m_e[6], m_e[7], m_e[8]);
3833 sDescription += buf;
3835 else {
3836 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3837 m_e[0], m_e[1], m_e[2], m_e[9]);
3838 sDescription += buf;
3839 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3840 m_e[3], m_e[4], m_e[5], m_e[10]);
3841 sDescription += buf;
3842 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3843 m_e[6], m_e[7], m_e[8], m_e[11]);
3844 sDescription += buf;
3846 ! sDescription += "\n";
3850 ***************
3851 *** 1377,1383 ****
3852 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3853 sReport += icValidateNonCompliantMsg;
3854 sReport += sSigName;
3855 ! sReport += " - Matrix must be identity.\r\n";
3856 rv = icValidateNonCompliant;
3859 --- 1377,1383 ----
3860 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3861 sReport += icValidateNonCompliantMsg;
3862 sReport += sSigName;
3863 ! sReport += " - Matrix must be identity.\n";
3864 rv = icValidateNonCompliant;
3867 ***************
3868 *** 1754,1760 ****
3870 ptr += sprintf(ptr, " %s", m_pVal);
3872 ! strcpy(ptr, "\r\n");
3873 sDescription += (const icChar*)m_pOutText;
3876 --- 1754,1760 ----
3878 ptr += sprintf(ptr, " %s", m_pVal);
3880 ! strcpy(ptr, "\n");
3881 sDescription += (const icChar*)m_pOutText;
3884 ***************
3885 *** 1866,1872 ****
3886 icChar szOutText[2048], szColor[40];
3887 int i, len;
3889 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\r\n", szName, m_nInput, m_nOutput);
3890 sDescription += szOutText;
3892 for (i=0; i<m_nInput; i++) {
3893 --- 1866,1872 ----
3894 icChar szOutText[2048], szColor[40];
3895 int i, len;
3897 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\n", szName, m_nInput, m_nOutput);
3898 sDescription += szOutText;
3900 for (i=0; i<m_nInput; i++) {
3901 ***************
3902 *** 1883,1889 ****
3903 sDescription += szOutText;
3906 ! sDescription += "\r\n";
3908 len = 0;
3909 for (i=0; i<m_nInput; i++) {
3910 --- 1883,1889 ----
3911 sDescription += szOutText;
3914 ! sDescription += "\n";
3916 len = 0;
3917 for (i=0; i<m_nInput; i++) {
3918 ***************
3919 *** 1907,1913 ****
3921 Iterate(sDescription, 0, 0);
3923 ! sDescription += "\r\n";
3927 --- 1907,1913 ----
3929 Iterate(sDescription, 0, 0);
3931 ! sDescription += "\n";
3935 ***************
3936 *** 2693,2699 ****
3937 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
3938 sReport += icValidateNonCompliantMsg;
3939 sReport += sSigName;
3940 ! sReport += " - Reserved Value must be zero.\r\n";
3942 rv = icValidateNonCompliant;
3944 --- 2693,2699 ----
3945 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
3946 sReport += icValidateNonCompliantMsg;
3947 sReport += sSigName;
3948 ! sReport += " - Reserved Value must be zero.\n";
3950 rv = icValidateNonCompliant;
3952 ***************
3953 *** 2704,2710 ****
3954 if (m_GridPoints[i]<2) {
3955 sReport += icValidateCriticalErrorMsg;
3956 sReport += sSigName;
3957 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\r\n",i );
3958 sReport += temp;
3959 rv = icMaxStatus(rv, icValidateCriticalError);
3961 --- 2704,2710 ----
3962 if (m_GridPoints[i]<2) {
3963 sReport += icValidateCriticalErrorMsg;
3964 sReport += sSigName;
3965 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\n",i );
3966 sReport += temp;
3967 rv = icMaxStatus(rv, icValidateCriticalError);
3969 ***************
3970 *** 3122,3128 ****
3971 if (!pProfile) {
3972 sReport += icValidateWarningMsg;
3973 sReport += sSigName;
3974 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3975 rv = icMaxStatus(rv, icValidateWarning);
3976 return rv;
3978 --- 3122,3128 ----
3979 if (!pProfile) {
3980 sReport += icValidateWarningMsg;
3981 sReport += sSigName;
3982 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3983 rv = icMaxStatus(rv, icValidateWarning);
3984 return rv;
3986 ***************
3987 *** 3138,3144 ****
3988 if (m_nInput!=nInput) {
3989 sReport += icValidateCriticalErrorMsg;
3990 sReport += sSigName;
3991 ! sReport += " - Incorrect number of input channels.\r\n";
3992 rv = icMaxStatus(rv, icValidateCriticalError);
3995 --- 3138,3144 ----
3996 if (m_nInput!=nInput) {
3997 sReport += icValidateCriticalErrorMsg;
3998 sReport += sSigName;
3999 ! sReport += " - Incorrect number of input channels.\n";
4000 rv = icMaxStatus(rv, icValidateCriticalError);
4003 ***************
4004 *** 3146,3152 ****
4005 if (m_nOutput!=nOutput) {
4006 sReport += icValidateCriticalErrorMsg;
4007 sReport += sSigName;
4008 ! sReport += " - Incorrect number of output channels.\r\n";
4009 rv = icMaxStatus(rv, icValidateCriticalError);
4012 --- 3146,3152 ----
4013 if (m_nOutput!=nOutput) {
4014 sReport += icValidateCriticalErrorMsg;
4015 sReport += sSigName;
4016 ! sReport += " - Incorrect number of output channels.\n";
4017 rv = icMaxStatus(rv, icValidateCriticalError);
4020 ***************
4021 *** 3160,3166 ****
4022 if (m_nInput!=nInput) {
4023 sReport += icValidateCriticalErrorMsg;
4024 sReport += sSigName;
4025 ! sReport += " - Incorrect number of input channels.\r\n";
4026 rv = icMaxStatus(rv, icValidateCriticalError);
4029 --- 3160,3166 ----
4030 if (m_nInput!=nInput) {
4031 sReport += icValidateCriticalErrorMsg;
4032 sReport += sSigName;
4033 ! sReport += " - Incorrect number of input channels.\n";
4034 rv = icMaxStatus(rv, icValidateCriticalError);
4037 ***************
4038 *** 3168,3174 ****
4039 if (m_nOutput!=nOutput) {
4040 sReport += icValidateCriticalErrorMsg;
4041 sReport += sSigName;
4042 ! sReport += " - Incorrect number of output channels.\r\n";
4043 rv = icMaxStatus(rv, icValidateCriticalError);
4046 --- 3168,3174 ----
4047 if (m_nOutput!=nOutput) {
4048 sReport += icValidateCriticalErrorMsg;
4049 sReport += sSigName;
4050 ! sReport += " - Incorrect number of output channels.\n";
4051 rv = icMaxStatus(rv, icValidateCriticalError);
4054 ***************
4055 *** 3180,3186 ****
4056 if (m_nInput!=nInput) {
4057 sReport += icValidateCriticalErrorMsg;
4058 sReport += sSigName;
4059 ! sReport += " - Incorrect number of input channels.\r\n";
4060 rv = icMaxStatus(rv, icValidateCriticalError);
4063 --- 3180,3186 ----
4064 if (m_nInput!=nInput) {
4065 sReport += icValidateCriticalErrorMsg;
4066 sReport += sSigName;
4067 ! sReport += " - Incorrect number of input channels.\n";
4068 rv = icMaxStatus(rv, icValidateCriticalError);
4071 ***************
4072 *** 3188,3194 ****
4073 if (m_nOutput!=nOutput) {
4074 sReport += icValidateCriticalErrorMsg;
4075 sReport += sSigName;
4076 ! sReport += " - Incorrect number of output channels.\r\n";
4077 rv = icMaxStatus(rv, icValidateCriticalError);
4080 --- 3188,3194 ----
4081 if (m_nOutput!=nOutput) {
4082 sReport += icValidateCriticalErrorMsg;
4083 sReport += sSigName;
4084 ! sReport += " - Incorrect number of output channels.\n";
4085 rv = icMaxStatus(rv, icValidateCriticalError);
4088 ***************
4089 *** 3206,3212 ****
4090 if (!m_CLUT) {
4091 sReport += icValidateCriticalErrorMsg;
4092 sReport += sSigName;
4093 ! sReport += " - CLUT must be present.\r\n";
4094 rv = icMaxStatus(rv, icValidateCriticalError);
4097 --- 3206,3212 ----
4098 if (!m_CLUT) {
4099 sReport += icValidateCriticalErrorMsg;
4100 sReport += sSigName;
4101 ! sReport += " - CLUT must be present.\n";
4102 rv = icMaxStatus(rv, icValidateCriticalError);
4105 ***************
4106 *** 3748,3754 ****
4107 else {
4108 sReport += icValidateCriticalErrorMsg;
4109 sReport += sSigName;
4110 ! sReport += " - Incorrect number of B-curves.\r\n";
4111 rv = icMaxStatus(rv, icValidateCriticalError);
4114 --- 3748,3754 ----
4115 else {
4116 sReport += icValidateCriticalErrorMsg;
4117 sReport += sSigName;
4118 ! sReport += " - Incorrect number of B-curves.\n";
4119 rv = icMaxStatus(rv, icValidateCriticalError);
4122 ***************
4123 *** 3762,3768 ****
4124 else {
4125 sReport += icValidateCriticalErrorMsg;
4126 sReport += sSigName;
4127 ! sReport += " - Incorrect number of M-curves.\r\n";
4128 rv = icMaxStatus(rv, icValidateCriticalError);
4131 --- 3762,3768 ----
4132 else {
4133 sReport += icValidateCriticalErrorMsg;
4134 sReport += sSigName;
4135 ! sReport += " - Incorrect number of M-curves.\n";
4136 rv = icMaxStatus(rv, icValidateCriticalError);
4139 ***************
4140 *** 3772,3778 ****
4141 if (!m_CLUT) {
4142 sReport += icValidateNonCompliantMsg;
4143 sReport += sSigName;
4144 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4146 rv = icMaxStatus(rv, icValidateNonCompliant);
4148 --- 3772,3778 ----
4149 if (!m_CLUT) {
4150 sReport += icValidateNonCompliantMsg;
4151 sReport += sSigName;
4152 ! sReport += " - CLUT must be present if using A-curves.\n";
4154 rv = icMaxStatus(rv, icValidateNonCompliant);
4156 ***************
4157 *** 3784,3790 ****
4158 else {
4159 sReport += icValidateCriticalErrorMsg;
4160 sReport += sSigName;
4161 ! sReport += " - Incorrect number of A-curves.\r\n";
4162 rv = icMaxStatus(rv, icValidateCriticalError);
4165 --- 3784,3790 ----
4166 else {
4167 sReport += icValidateCriticalErrorMsg;
4168 sReport += sSigName;
4169 ! sReport += " - Incorrect number of A-curves.\n";
4170 rv = icMaxStatus(rv, icValidateCriticalError);
4173 ***************
4174 *** 3876,3882 ****
4175 if (!pProfile) {
4176 sReport += icValidateWarningMsg;
4177 sReport += sSigName;
4178 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4179 rv = icMaxStatus(rv, icValidateCriticalError);
4180 return rv;
4182 --- 3876,3882 ----
4183 if (!pProfile) {
4184 sReport += icValidateWarningMsg;
4185 sReport += sSigName;
4186 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4187 rv = icMaxStatus(rv, icValidateCriticalError);
4188 return rv;
4190 ***************
4191 *** 3900,3906 ****
4192 if (m_nOutput!=nOutput) {
4193 sReport += icValidateCriticalErrorMsg;
4194 sReport += sSigName;
4195 ! sReport += " - Incorrect number of output channels.\r\n";
4196 rv = icMaxStatus(rv, icValidateCriticalError);
4199 --- 3900,3906 ----
4200 if (m_nOutput!=nOutput) {
4201 sReport += icValidateCriticalErrorMsg;
4202 sReport += sSigName;
4203 ! sReport += " - Incorrect number of output channels.\n";
4204 rv = icMaxStatus(rv, icValidateCriticalError);
4207 ***************
4208 *** 3913,3919 ****
4209 else {
4210 sReport += icValidateCriticalErrorMsg;
4211 sReport += sSigName;
4212 ! sReport += " - Incorrect number of B-curves.\r\n";
4213 rv = icMaxStatus(rv, icValidateCriticalError);
4216 --- 3913,3919 ----
4217 else {
4218 sReport += icValidateCriticalErrorMsg;
4219 sReport += sSigName;
4220 ! sReport += " - Incorrect number of B-curves.\n";
4221 rv = icMaxStatus(rv, icValidateCriticalError);
4224 ***************
4225 *** 3927,3933 ****
4226 else {
4227 sReport += icValidateCriticalErrorMsg;
4228 sReport += sSigName;
4229 ! sReport += " - Incorrect number of M-curves.\r\n";
4230 rv = icMaxStatus(rv, icValidateCriticalError);
4233 --- 3927,3933 ----
4234 else {
4235 sReport += icValidateCriticalErrorMsg;
4236 sReport += sSigName;
4237 ! sReport += " - Incorrect number of M-curves.\n";
4238 rv = icMaxStatus(rv, icValidateCriticalError);
4241 ***************
4242 *** 3937,3943 ****
4243 if (!m_CLUT) {
4244 sReport += icValidateNonCompliantMsg;
4245 sReport += sSigName;
4246 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4248 rv = icMaxStatus(rv, icValidateNonCompliant);
4250 --- 3937,3943 ----
4251 if (!m_CLUT) {
4252 sReport += icValidateNonCompliantMsg;
4253 sReport += sSigName;
4254 ! sReport += " - CLUT must be present if using A-curves.\n";
4256 rv = icMaxStatus(rv, icValidateNonCompliant);
4258 ***************
4259 *** 3949,3955 ****
4260 else {
4261 sReport += icValidateCriticalErrorMsg;
4262 sReport += sSigName;
4263 ! sReport += " - Incorrect number of A-curves.\r\n";
4264 rv = icMaxStatus(rv, icValidateCriticalError);
4267 --- 3949,3955 ----
4268 else {
4269 sReport += icValidateCriticalErrorMsg;
4270 sReport += sSigName;
4271 ! sReport += " - Incorrect number of A-curves.\n";
4272 rv = icMaxStatus(rv, icValidateCriticalError);
4275 ***************
4276 *** 4311,4317 ****
4277 if (pTagCurve->GetSize()==1) {
4278 sReport += icValidateCriticalErrorMsg;
4279 sReport += sSigName;
4280 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4281 rv = icMaxStatus(rv, icValidateCriticalError);
4284 --- 4311,4317 ----
4285 if (pTagCurve->GetSize()==1) {
4286 sReport += icValidateCriticalErrorMsg;
4287 sReport += sSigName;
4288 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4289 rv = icMaxStatus(rv, icValidateCriticalError);
4292 ***************
4293 *** 4319,4325 ****
4294 else {
4295 sReport += icValidateCriticalErrorMsg;
4296 sReport += sSigName;
4297 ! sReport += " - Incorrect number of B-curves.\r\n";
4298 rv = icMaxStatus(rv, icValidateCriticalError);
4301 --- 4319,4325 ----
4302 else {
4303 sReport += icValidateCriticalErrorMsg;
4304 sReport += sSigName;
4305 ! sReport += " - Incorrect number of B-curves.\n";
4306 rv = icMaxStatus(rv, icValidateCriticalError);
4309 ***************
4310 *** 4336,4342 ****
4311 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4312 sReport += icValidateWarningMsg;
4313 sReport += sSigName;
4314 ! sReport += " - Matrix must be identity.\r\n";
4315 rv = icMaxStatus(rv, icValidateWarning);
4318 --- 4336,4342 ----
4319 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4320 sReport += icValidateWarningMsg;
4321 sReport += sSigName;
4322 ! sReport += " - Matrix must be identity.\n";
4323 rv = icMaxStatus(rv, icValidateWarning);
4326 ***************
4327 *** 4351,4357 ****
4328 if (pTagCurve->GetSize()==1) {
4329 sReport += icValidateCriticalErrorMsg;
4330 sReport += sSigName;
4331 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4332 rv = icMaxStatus(rv, icValidateCriticalError);
4335 --- 4351,4357 ----
4336 if (pTagCurve->GetSize()==1) {
4337 sReport += icValidateCriticalErrorMsg;
4338 sReport += sSigName;
4339 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4340 rv = icMaxStatus(rv, icValidateCriticalError);
4343 ***************
4344 *** 4359,4365 ****
4345 else {
4346 sReport += icValidateCriticalErrorMsg;
4347 sReport += sSigName;
4348 ! sReport += " - Incorrect number of A-curves.\r\n";
4349 rv = icMaxStatus(rv, icValidateCriticalError);
4352 --- 4359,4365 ----
4353 else {
4354 sReport += icValidateCriticalErrorMsg;
4355 sReport += sSigName;
4356 ! sReport += " - Incorrect number of A-curves.\n";
4357 rv = icMaxStatus(rv, icValidateCriticalError);
4360 ***************
4361 *** 4721,4727 ****
4362 if (pTagCurve->GetSize()==1) {
4363 sReport += icValidateCriticalErrorMsg;
4364 sReport += sSigName;
4365 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4366 rv = icMaxStatus(rv, icValidateCriticalError);
4369 --- 4721,4727 ----
4370 if (pTagCurve->GetSize()==1) {
4371 sReport += icValidateCriticalErrorMsg;
4372 sReport += sSigName;
4373 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4374 rv = icMaxStatus(rv, icValidateCriticalError);
4377 ***************
4378 *** 4729,4735 ****
4379 else {
4380 sReport += icValidateCriticalErrorMsg;
4381 sReport += sSigName;
4382 ! sReport += " - Incorrect number of B-curves.\r\n";
4383 rv = icMaxStatus(rv, icValidateCriticalError);
4386 --- 4729,4735 ----
4387 else {
4388 sReport += icValidateCriticalErrorMsg;
4389 sReport += sSigName;
4390 ! sReport += " - Incorrect number of B-curves.\n";
4391 rv = icMaxStatus(rv, icValidateCriticalError);
4394 ***************
4395 *** 4746,4752 ****
4396 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4397 sReport += icValidateWarningMsg;
4398 sReport += sSigName;
4399 ! sReport += " - Matrix must be identity.\r\n";
4400 rv = icMaxStatus(rv, icValidateWarning);
4403 --- 4746,4752 ----
4404 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4405 sReport += icValidateWarningMsg;
4406 sReport += sSigName;
4407 ! sReport += " - Matrix must be identity.\n";
4408 rv = icMaxStatus(rv, icValidateWarning);
4411 ***************
4412 *** 4761,4767 ****
4413 if (pTagCurve->GetSize()==1) {
4414 sReport += icValidateCriticalErrorMsg;
4415 sReport += sSigName;
4416 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4417 rv = icMaxStatus(rv, icValidateCriticalError);
4420 --- 4761,4767 ----
4421 if (pTagCurve->GetSize()==1) {
4422 sReport += icValidateCriticalErrorMsg;
4423 sReport += sSigName;
4424 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4425 rv = icMaxStatus(rv, icValidateCriticalError);
4428 ***************
4429 *** 4769,4775 ****
4430 else {
4431 sReport += icValidateCriticalErrorMsg;
4432 sReport += sSigName;
4433 ! sReport += " - Incorrect number of A-curves.\r\n";
4434 rv = icMaxStatus(rv, icValidateCriticalError);
4437 --- 4769,4775 ----
4438 else {
4439 sReport += icValidateCriticalErrorMsg;
4440 sReport += sSigName;
4441 ! sReport += " - Incorrect number of A-curves.\n";
4442 rv = icMaxStatus(rv, icValidateCriticalError);
4445 *** misc/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Mon Aug 20 22:05:00 2007
4446 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Fri Jan 25 14:24:00 2008
4447 ***************
4448 *** 218,224 ****
4449 icGetSig(sigbuf, m_sig), m_nSize);
4450 sDescription += buf;
4452 ! sDescription += "\r\n\r\nData Follows:\r\n";
4454 icMemDump(sDescription, m_pData, m_nSize);
4456 --- 218,224 ----
4457 icGetSig(sigbuf, m_sig), m_nSize);
4458 sDescription += buf;
4460 ! sDescription += "\n\nData Follows:\n";
4462 icMemDump(sDescription, m_pData, m_nSize);
4464 ***************
4465 *** 364,370 ****
4466 sReport += " - Contains unknown processing element type (";
4467 icGetSig(buf, m_sig, true);
4468 sReport += buf;
4469 ! sReport += ").\r\n";
4471 return icValidateCriticalError;
4473 --- 364,370 ----
4474 sReport += " - Contains unknown processing element type (";
4475 icGetSig(buf, m_sig, true);
4476 sReport += buf;
4477 ! sReport += ").\n";
4479 return icValidateCriticalError;
4481 ***************
4482 *** 392,398 ****
4483 sReport += " - Element ";
4484 sSigName = Info.GetSigName(GetType());
4485 sReport += sSigName;
4486 ! sReport += " - Reserved Value must be zero.\r\n";
4488 rv = icValidateNonCompliant;
4490 --- 392,398 ----
4491 sReport += " - Element ";
4492 sSigName = Info.GetSigName(GetType());
4493 sReport += sSigName;
4494 ! sReport += " - Reserved Value must be zero.\n";
4496 rv = icValidateNonCompliant;
4498 ***************
4499 *** 738,755 ****
4501 icChar buf[128];
4503 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\r\n", m_nInputChannels, m_nOutputChannels);
4504 sDescription += buf;
4505 ! sDescription += "\r\n";
4507 CIccMultiProcessElementList::iterator i;
4508 int j;
4510 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4511 ! sprintf(buf, "PROCESS_ELEMENT #%d\r\n", j+1);
4512 sDescription += buf;
4513 i->ptr->Describe(sDescription);
4514 ! sDescription += "\r\n";
4518 --- 738,755 ----
4520 icChar buf[128];
4522 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\n", m_nInputChannels, m_nOutputChannels);
4523 sDescription += buf;
4524 ! sDescription += "\n";
4526 CIccMultiProcessElementList::iterator i;
4527 int j;
4529 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4530 ! sprintf(buf, "PROCESS_ELEMENT #%d\n", j+1);
4531 sDescription += buf;
4532 i->ptr->Describe(sDescription);
4533 ! sDescription += "\n";
4537 ***************
4538 *** 1207,1219 ****
4539 if (m_nInputChannels != m_nOutputChannels) {
4540 sReport += icValidateCriticalErrorMsg;
4541 sReport += sSigName;
4542 ! sReport += " No processing elements and input and output channels do not match!\r\n";
4543 return icValidateCriticalError;
4545 else {
4546 sReport += icValidateWarningMsg;
4547 sReport += sSigName;
4548 ! sReport += " No processing elements.\r\n";
4549 return icValidateWarning;
4552 --- 1207,1219 ----
4553 if (m_nInputChannels != m_nOutputChannels) {
4554 sReport += icValidateCriticalErrorMsg;
4555 sReport += sSigName;
4556 ! sReport += " No processing elements and input and output channels do not match!\n";
4557 return icValidateCriticalError;
4559 else {
4560 sReport += icValidateWarningMsg;
4561 sReport += sSigName;
4562 ! sReport += " No processing elements.\n";
4563 return icValidateWarning;
4566 ***************
4567 *** 1224,1230 ****
4568 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4569 sReport += icValidateCriticalErrorMsg;
4570 sReport += sSigName;
4571 ! sReport += " Mis-matching number of input channels!\r\n";
4572 return icValidateCriticalError;
4575 --- 1224,1230 ----
4576 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4577 sReport += icValidateCriticalErrorMsg;
4578 sReport += sSigName;
4579 ! sReport += " Mis-matching number of input channels!\n";
4580 return icValidateCriticalError;
4583 ***************
4584 *** 1239,1245 ****
4585 sReport += "->";
4586 sReport += i->ptr->GetClassName();
4588 ! sReport += " Mis-matching number of channels!\r\n";
4589 return icValidateCriticalError;
4592 --- 1239,1245 ----
4593 sReport += "->";
4594 sReport += i->ptr->GetClassName();
4596 ! sReport += " Mis-matching number of channels!\n";
4597 return icValidateCriticalError;
4600 ***************
4601 *** 1251,1257 ****
4602 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4603 sReport += icValidateCriticalErrorMsg;
4604 sReport += sSigName;
4605 ! sReport += " Mis-matching number of output channels!\r\n";
4606 return icValidateCriticalError;
4609 --- 1251,1257 ----
4610 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4611 sReport += icValidateCriticalErrorMsg;
4612 sReport += sSigName;
4613 ! sReport += " Mis-matching number of output channels!\n";
4614 return icValidateCriticalError;
4617 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Mon Aug 20 22:05:00 2007
4618 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Fri Jan 25 14:24:00 2008
4619 ***************
4620 *** 234,240 ****
4622 std::string Dump;
4624 ! sDescription += "ProfileID:\r\n";
4626 int i;
4627 char buf[20];
4628 --- 234,240 ----
4630 std::string Dump;
4632 ! sDescription += "ProfileID:\n";
4634 int i;
4635 char buf[20];
4636 ***************
4637 *** 244,255 ****
4638 sprintf(buf, "%2x", m_profileID.ID8[i]);
4639 sDescription += buf;
4641 ! sDescription += "\r\n";
4643 ! sDescription += "Description:\r\n";
4644 m_desc.Describe(sDescription);
4646 ! sDescription += "\r\n";
4650 --- 244,255 ----
4651 sprintf(buf, "%2x", m_profileID.ID8[i]);
4652 sDescription += buf;
4654 ! sDescription += "\n";
4656 ! sDescription += "Description:\n";
4657 m_desc.Describe(sDescription);
4659 ! sDescription += "\n";
4663 ***************
4664 *** 434,454 ****
4666 icChar buf[128];
4668 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\r\n");
4669 sDescription += buf;
4670 ! sDescription += "\r\n";
4672 int i;
4673 CIccProfileIdDescList::iterator j;
4674 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4675 ! sprintf(buf, "ProfileDescription_%d:\r\n", i+1);
4676 sDescription += buf;
4677 j->Describe(sDescription);
4680 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\r\n");
4681 sDescription += buf;
4682 ! sDescription += "\r\n";
4686 --- 434,454 ----
4688 icChar buf[128];
4690 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\n");
4691 sDescription += buf;
4692 ! sDescription += "\n";
4694 int i;
4695 CIccProfileIdDescList::iterator j;
4696 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4697 ! sprintf(buf, "ProfileDescription_%d:\n", i+1);
4698 sDescription += buf;
4699 j->Describe(sDescription);
4702 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\n");
4703 sDescription += buf;
4704 ! sDescription += "\n";
4708 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Mon Aug 20 22:05:00 2007
4709 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Fri Jan 25 14:24:00 2008
4710 ***************
4711 *** 161,164 ****
4713 #endif
4715 ! #endif //_ICCTAGPROFSEQID_H
4716 --- 161,164 ----
4718 #endif
4720 ! #endif //_ICCTAGPROFSEQID_H
4721 *** misc/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Mon Aug 20 22:05:00 2007
4722 --- misc/build/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Fri Jan 25 14:27:16 2008
4723 ***************
4724 *** 79,85 ****
4725 #include "IccUtil.h"
4726 #include "IccTagFactory.h"
4727 #include <stdlib.h>
4728 ! #include <memory.h>
4729 #include <ctype.h>
4730 #include <math.h>
4731 #include <string.h>
4732 --- 79,85 ----
4733 #include "IccUtil.h"
4734 #include "IccTagFactory.h"
4735 #include <stdlib.h>
4736 ! #include <memory>
4737 #include <ctype.h>
4738 #include <math.h>
4739 #include <string.h>
4740 ***************
4741 *** 678,688 ****
4743 icChar buf[128];
4745 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4746 sDump += buf;
4747 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4748 sDump += buf;
4749 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4750 sDump += buf;
4753 --- 679,689 ----
4755 icChar buf[128];
4757 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4758 sDump += buf;
4759 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4760 sDump += buf;
4761 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4762 sDump += buf;
4765 ***************
4766 *** 1516,1534 ****
4768 if (XYZ.X < 0) {
4769 sReport += icValidateNonCompliantMsg;
4770 ! sReport += " - XYZNumber: Negative X value!\r\n";
4771 rv = icValidateNonCompliant;
4774 if (XYZ.Y < 0) {
4775 sReport += icValidateNonCompliantMsg;
4776 ! sReport += " - XYZNumber: Negative Y value!\r\n";
4777 rv = icMaxStatus(rv, icValidateNonCompliant);
4780 if (XYZ.Z < 0) {
4781 sReport += icValidateNonCompliantMsg;
4782 ! sReport += " - XYZNumber: Negative Z value!\r\n";
4783 rv = icMaxStatus(rv, icValidateNonCompliant);
4786 --- 1517,1535 ----
4788 if (XYZ.X < 0) {
4789 sReport += icValidateNonCompliantMsg;
4790 ! sReport += " - XYZNumber: Negative X value!\n";
4791 rv = icValidateNonCompliant;
4794 if (XYZ.Y < 0) {
4795 sReport += icValidateNonCompliantMsg;
4796 ! sReport += " - XYZNumber: Negative Y value!\n";
4797 rv = icMaxStatus(rv, icValidateNonCompliant);
4800 if (XYZ.Z < 0) {
4801 sReport += icValidateNonCompliantMsg;
4802 ! sReport += " - XYZNumber: Negative Z value!\n";
4803 rv = icMaxStatus(rv, icValidateNonCompliant);
4806 ***************
4807 *** 1548,1554 ****
4808 icChar buf[128];
4809 if (dateTime.year<1992) {
4810 sReport += icValidateWarningMsg;
4811 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4812 sReport += buf;
4813 rv = icValidateWarning;
4815 --- 1549,1555 ----
4816 icChar buf[128];
4817 if (dateTime.year<1992) {
4818 sReport += icValidateWarningMsg;
4819 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4820 sReport += buf;
4821 rv = icValidateWarning;
4823 ***************
4824 *** 1557,1563 ****
4825 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4826 if (dateTime.year>(year+1)) {
4827 sReport += icValidateWarningMsg;
4828 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4829 sReport += buf;
4830 rv = icMaxStatus(rv, icValidateWarning);
4832 --- 1558,1564 ----
4833 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4834 if (dateTime.year>(year+1)) {
4835 sReport += icValidateWarningMsg;
4836 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4837 sReport += buf;
4838 rv = icMaxStatus(rv, icValidateWarning);
4840 ***************
4841 *** 1565,1571 ****
4842 else {
4843 if (dateTime.year>year) {
4844 sReport += icValidateWarningMsg;
4845 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4846 sReport += buf;
4847 rv = icMaxStatus(rv, icValidateWarning);
4849 --- 1566,1572 ----
4850 else {
4851 if (dateTime.year>year) {
4852 sReport += icValidateWarningMsg;
4853 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4854 sReport += buf;
4855 rv = icMaxStatus(rv, icValidateWarning);
4857 ***************
4858 *** 1573,1579 ****
4860 if (dateTime.month<1 || dateTime.month>12) {
4861 sReport += icValidateWarningMsg;
4862 ! sprintf(buf," - %u: Invalid month!\r\n",dateTime.month);
4863 sReport += buf;
4864 rv = icMaxStatus(rv, icValidateWarning);
4866 --- 1574,1580 ----
4868 if (dateTime.month<1 || dateTime.month>12) {
4869 sReport += icValidateWarningMsg;
4870 ! sprintf(buf," - %u: Invalid month!\n",dateTime.month);
4871 sReport += buf;
4872 rv = icMaxStatus(rv, icValidateWarning);
4874 ***************
4875 *** 1580,1586 ****
4877 if (dateTime.day<1 || dateTime.day>31) {
4878 sReport += icValidateWarningMsg;
4879 ! sprintf(buf," - %u: Invalid day!\r\n",dateTime.day);
4880 sReport += buf;
4881 rv = icMaxStatus(rv, icValidateWarning);
4883 --- 1581,1587 ----
4885 if (dateTime.day<1 || dateTime.day>31) {
4886 sReport += icValidateWarningMsg;
4887 ! sprintf(buf," - %u: Invalid day!\n",dateTime.day);
4888 sReport += buf;
4889 rv = icMaxStatus(rv, icValidateWarning);
4891 ***************
4892 *** 1588,1594 ****
4893 if (dateTime.month==2) {
4894 if (dateTime.day>29) {
4895 sReport += icValidateWarningMsg;
4896 ! sprintf(buf," - %u: Invalid day for February!\r\n",dateTime.day);
4897 sReport += buf;
4898 rv = icMaxStatus(rv, icValidateWarning);
4900 --- 1589,1595 ----
4901 if (dateTime.month==2) {
4902 if (dateTime.day>29) {
4903 sReport += icValidateWarningMsg;
4904 ! sprintf(buf," - %u: Invalid day for February!\n",dateTime.day);
4905 sReport += buf;
4906 rv = icMaxStatus(rv, icValidateWarning);
4908 ***************
4909 *** 1596,1602 ****
4910 if (dateTime.day==29) {
4911 if ((dateTime.year%4)!=0) {
4912 sReport += icValidateWarningMsg;
4913 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\r\n",dateTime.day, dateTime.year);
4914 sReport += buf;
4915 rv = icMaxStatus(rv, icValidateWarning);
4917 --- 1597,1603 ----
4918 if (dateTime.day==29) {
4919 if ((dateTime.year%4)!=0) {
4920 sReport += icValidateWarningMsg;
4921 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\n",dateTime.day, dateTime.year);
4922 sReport += buf;
4923 rv = icMaxStatus(rv, icValidateWarning);
4925 ***************
4926 *** 1605,1611 ****
4928 if (dateTime.hours>23) {
4929 sReport += icValidateWarningMsg;
4930 ! sprintf(buf," - %u: Invalid hour!\r\n",dateTime.hours);
4931 sReport += buf;
4932 rv = icMaxStatus(rv, icValidateWarning);
4934 --- 1606,1612 ----
4936 if (dateTime.hours>23) {
4937 sReport += icValidateWarningMsg;
4938 ! sprintf(buf," - %u: Invalid hour!\n",dateTime.hours);
4939 sReport += buf;
4940 rv = icMaxStatus(rv, icValidateWarning);
4942 ***************
4943 *** 1612,1618 ****
4945 if (dateTime.minutes>59) {
4946 sReport += icValidateWarningMsg;
4947 ! sprintf(buf," - %u: Invalid minutes!\r\n",dateTime.minutes);
4948 sReport += buf;
4949 rv = icMaxStatus(rv, icValidateWarning);
4951 --- 1613,1619 ----
4953 if (dateTime.minutes>59) {
4954 sReport += icValidateWarningMsg;
4955 ! sprintf(buf," - %u: Invalid minutes!\n",dateTime.minutes);
4956 sReport += buf;
4957 rv = icMaxStatus(rv, icValidateWarning);
4959 ***************
4960 *** 1619,1625 ****
4962 if (dateTime.seconds>59) {
4963 sReport += icValidateWarningMsg;
4964 ! sprintf(buf," - %u: Invalid seconds!\r\n",dateTime.hours);
4965 sReport += buf;
4966 rv = icMaxStatus(rv, icValidateWarning);
4968 --- 1620,1626 ----
4970 if (dateTime.seconds>59) {
4971 sReport += icValidateWarningMsg;
4972 ! sprintf(buf," - %u: Invalid seconds!\n",dateTime.hours);
4973 sReport += buf;
4974 rv = icMaxStatus(rv, icValidateWarning);
4976 *** misc/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Mon Aug 20 22:05:00 2007
4977 --- misc/build/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Fri Jan 25 14:24:00 2008
4978 ***************
4979 *** 659,668 ****
4980 typedef enum {
4981 icFlare0 = 0x00000000, /* 0% flare */
4982 icFlare100 = 0x00000001, /* 100% flare */
4983 } icMeasurementFlare;
4985 /** Convenience Enum Definition - Not defined in ICC specification*/
4986 ! #define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)
4987 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
4990 --- 659,669 ----
4991 typedef enum {
4992 icFlare0 = 0x00000000, /* 0% flare */
4993 icFlare100 = 0x00000001, /* 100% flare */
4994 + icMaxEnumFlare = 0xFFFFFFFF
4995 } icMeasurementFlare;
4997 /** Convenience Enum Definition - Not defined in ICC specification*/
4998 ! /*#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)*/
4999 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5002 *** misc/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Mon Aug 20 22:10:42 2007
5003 --- misc/build/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Fri Jan 25 14:24:00 2008
5004 ***************
5005 *** 101,117 ****
5006 am__quote = @am__quote@
5007 install_sh = @install_sh@
5009 ! SUBDIRS = IccApplyNamedCmm \
5010 ! @SICC_ICC_APPLY_PROFILES@ \
5011 ! IccDumpProfile \
5012 IccProfLibTest \
5013 IccStripUnknownTags \
5014 IccV4ToMPE
5017 ! DIST_SUBDIRS = IccApplyNamedCmm \
5018 ! IccApplyProfiles \
5019 ! IccDumpProfile \
5020 IccProfLibTest \
5021 IccStripUnknownTags \
5022 IccV4ToMPE
5023 --- 101,113 ----
5024 am__quote = @am__quote@
5025 install_sh = @install_sh@
5027 ! SUBDIRS = IccDumpProfile \
5028 IccProfLibTest \
5029 IccStripUnknownTags \
5030 IccV4ToMPE
5033 ! DIST_SUBDIRS = IccDumpProfile \
5034 IccProfLibTest \
5035 IccStripUnknownTags \
5036 IccV4ToMPE
5037 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2007-08-20 22:04:53.000000000 +0200
5038 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2008-01-31 13:53:16.000000000 +0100
5039 ***************
5040 *** 77,82 ****
5041 --- 77,84 ----
5043 //////////////////////////////////////////////////////////////////////
5045 + #include <stdlib.h>
5046 + #include <string.h>
5047 #include <iostream>
5048 #include <fstream>
5049 #include <sstream>
5050 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2007-08-20 22:04:54.000000000 +0200
5051 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2008-01-31 13:54:51.000000000 +0100
5052 ***************
5053 *** 83,88 ****
5054 --- 83,89 ----
5055 #ifndef __DEFINED_ICC_TOOL_EXCEPTION_H__
5056 #define __DEFINED_ICC_TOOL_EXCEPTION_H__
5058 + #include <string.h>
5059 #include <exception>
5060 #include <string>
5062 *** misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2007-08-20 22:05:00.000000000 +0200
5063 --- misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2008-01-31 13:49:54.000000000 +0100
5064 ***************
5065 *** 79,84 ****
5066 --- 79,86 ----
5067 #pragma warning( disable: 4786) //disable warning in <list.h>
5068 #endif
5070 + #include <stdlib.h>
5071 + #include <string.h>
5072 #include "IccCmm.h"
5073 #include "IccTag.h"
5074 #include "IccIO.h"
5075 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2007-08-20 22:04:53.000000000 +0200
5076 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2008-01-31 14:05:58.000000000 +0100
5077 ***************
5078 *** 83,88 ****
5079 --- 83,89 ----
5080 #include <string>
5081 #include <sys/types.h>
5082 #include <sys/stat.h>
5083 + #include <stdlib.h>
5085 #ifdef WIN32
5086 typedef unsigned short mode_t;