merge the formfield patch from ooo-build
[ooovba.git] / icc / SampleICC-1.3.2-bendian.patch
bloba4988a2d6287def06a02c8b021372b3e35ec58ae
1 *** misc/SampleICC-1.3.2/configure Mon Aug 20 22:10:59 2007
2 --- misc/build/SampleICC-1.3.2/configure Fri Jan 25 14:23:09 2008
3 ***************
4 *** 19991,19997 ****
8 ! ac_config_files="$ac_config_files Makefile IccProfLib/Makefile Tools/Makefile Tools/CmdLine/Makefile Tools/CmdLine/IccApplyNamedCmm/Makefile Tools/CmdLine/IccApplyProfiles/Makefile Tools/CmdLine/IccDumpProfile/Makefile Tools/CmdLine/IccProfLibTest/Makefile Tools/CmdLine/IccStripUnknownTags/Makefile Tools/CmdLine/IccV4ToMPE/Makefile Contrib/Makefile Contrib/CmdLine/Makefile Contrib/CmdLine/create_CLUT_profile/Makefile Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile Contrib/CmdLine/create_display_profile/Makefile Contrib/ICC_utils/Makefile Contrib/Mac_OS_X/Makefile Contrib/Mac_OS_X/create_probe/Makefile Contrib/Mac_OS_X/extract_probe_data/Makefile Contrib/examples/Makefile Contrib/examples/RSR/Makefile Contrib/tests/Makefile Contrib/tests/flatten_AToB_tag/Makefile Contrib/tests/generate_device_codes/Makefile Contrib/tests/reconstruct_measurements/Makefile Contrib/tests/round_trip_PCS_LAB/Makefile"
9 cat >confcache <<\_ACEOF
10 # This file is a shell script that caches the results of configure
11 # tests run on this system so they can be shared between configure
12 --- 19991,19997 ----
16 ! ac_config_files="$ac_config_files Makefile IccProfLib/Makefile Tools/Makefile Tools/CmdLine/Makefile Tools/CmdLine/IccDumpProfile/Makefile Tools/CmdLine/IccProfLibTest/Makefile Tools/CmdLine/IccStripUnknownTags/Makefile Tools/CmdLine/IccV4ToMPE/Makefile Contrib/Makefile Contrib/CmdLine/Makefile Contrib/ICC_utils/Makefile Contrib/CmdLine/create_sRGB_profile/Makefile"
17 cat >confcache <<\_ACEOF
18 # This file is a shell script that caches the results of configure
19 # tests run on this system so they can be shared between configure
20 ***************
21 *** 20571,20578 ****
22 "IccProfLib/Makefile" ) CONFIG_FILES="$CONFIG_FILES IccProfLib/Makefile" ;;
23 "Tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/Makefile" ;;
24 "Tools/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/Makefile" ;;
25 - "Tools/CmdLine/IccApplyNamedCmm/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyNamedCmm/Makefile" ;;
26 - "Tools/CmdLine/IccApplyProfiles/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyProfiles/Makefile" ;;
27 "Tools/CmdLine/IccDumpProfile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccDumpProfile/Makefile" ;;
28 "Tools/CmdLine/IccProfLibTest/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccProfLibTest/Makefile" ;;
29 "Tools/CmdLine/IccStripUnknownTags/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccStripUnknownTags/Makefile" ;;
30 --- 20571,20576 ----
31 ***************
32 *** 20579,20598 ****
33 "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
34 "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
35 "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
36 ! "Contrib/CmdLine/create_CLUT_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile/Makefile" ;;
37 ! "Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ;;
38 ! "Contrib/CmdLine/create_display_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_display_profile/Makefile" ;;
39 "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
40 - "Contrib/Mac_OS_X/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/Makefile" ;;
41 - "Contrib/Mac_OS_X/create_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/create_probe/Makefile" ;;
42 - "Contrib/Mac_OS_X/extract_probe_data/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/extract_probe_data/Makefile" ;;
43 - "Contrib/examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/Makefile" ;;
44 - "Contrib/examples/RSR/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/RSR/Makefile" ;;
45 - "Contrib/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/Makefile" ;;
46 - "Contrib/tests/flatten_AToB_tag/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/flatten_AToB_tag/Makefile" ;;
47 - "Contrib/tests/generate_device_codes/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/generate_device_codes/Makefile" ;;
48 - "Contrib/tests/reconstruct_measurements/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/reconstruct_measurements/Makefile" ;;
49 - "Contrib/tests/round_trip_PCS_LAB/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/round_trip_PCS_LAB/Makefile" ;;
50 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
51 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
52 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
53 --- 20577,20584 ----
54 "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
55 "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
56 "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
57 ! "Contrib/CmdLine/create_sRGB_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_sRGB_profile/Makefile" ;;
58 "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
59 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
60 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
61 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
62 *** misc/SampleICC-1.3.2/Contrib/Makefile.in Mon Aug 20 22:10:37 2007
63 --- misc/build/SampleICC-1.3.2/Contrib/Makefile.in Fri Jan 25 14:23:09 2008
64 ***************
65 *** 103,120 ****
67 SUBDIRS = \
68 ICC_utils \
69 ! CmdLine \
70 ! examples \
71 ! Mac_OS_X \
72 ! tests
75 DIST_SUBDIRS = \
76 ICC_utils \
77 ! CmdLine \
78 ! examples \
79 ! Mac_OS_X \
80 ! tests
82 subdir = Contrib
83 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
84 --- 103,114 ----
86 SUBDIRS = \
87 ICC_utils \
88 ! CmdLine
91 DIST_SUBDIRS = \
92 ICC_utils \
93 ! CmdLine
95 subdir = Contrib
96 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
97 *** misc/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in Mon Aug 20 22:10:34 2007
98 --- misc/build/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in Fri Jan 25 14:23:09 2008
99 ***************
100 *** 102,116 ****
101 install_sh = @install_sh@
103 SUBDIRS = \
104 ! create_CLUT_profile \
105 ! create_CLUT_profile_from_probe \
106 ! create_display_profile
109 DIST_SUBDIRS = \
110 ! create_CLUT_profile \
111 ! create_CLUT_profile_from_probe \
112 ! create_display_profile
114 subdir = Contrib/CmdLine
115 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
116 --- 102,112 ----
117 install_sh = @install_sh@
119 SUBDIRS = \
120 ! create_sRGB_profile
123 DIST_SUBDIRS = \
124 ! create_sRGB_profile
126 subdir = Contrib/CmdLine
127 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
128 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in Mon Aug 20 22:10:35 2007
129 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in Fri Jan 25 14:23:09 2008
130 ***************
131 *** 133,139 ****
132 CONFIG_CLEAN_FILES =
133 LTLIBRARIES = $(lib_LTLIBRARIES)
135 ! libICC_utils_la_LIBADD =
136 am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
137 ICC_tool_exception.lo Vetters.lo
138 libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
139 --- 133,139 ----
140 CONFIG_CLEAN_FILES =
141 LTLIBRARIES = $(lib_LTLIBRARIES)
143 ! libICC_utils_la_LIBADD = $(LDADD)
144 am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
145 ICC_tool_exception.lo Vetters.lo
146 libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
147 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h Mon Aug 20 22:04:53 2007
148 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h Fri Jan 25 14:23:09 2008
149 ***************
150 *** 130,136 ****
152 // use one of these to force desired sort order in assoc. containers of DPX
153 bool
154 ! DPX::operator<(const DPX& p) const
156 return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
158 --- 130,136 ----
160 // use one of these to force desired sort order in assoc. containers of DPX
161 bool
162 ! operator<(const DPX& p) const
164 return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
166 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp Mon Aug 20 22:04:54 2007
167 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp Fri Jan 25 14:57:06 2008
168 ***************
169 *** 1,322 ****
170 ! /*
171 ! File: Vetters.cpp
173 ! Contains: Utility functions to handle common argument-checking tasks, in a
174 ! way that hides platform-specific details from higher-level code.
176 ! Version: V1
178 ! Copyright: © see below
179 ! */
181 ! /*
182 ! * The ICC Software License, Version 0.1
185 ! * Copyright (c) 2003-2006 The International Color Consortium. All rights
186 ! * reserved.
188 ! * Redistribution and use in source and binary forms, with or without
189 ! * modification, are permitted provided that the following conditions
190 ! * are met:
192 ! * 1. Redistributions of source code must retain the above copyright
193 ! * notice, this list of conditions and the following disclaimer.
195 ! * 2. Redistributions in binary form must reproduce the above copyright
196 ! * notice, this list of conditions and the following disclaimer in
197 ! * the documentation and/or other materials provided with the
198 ! * distribution.
200 ! * 3. The end-user documentation included with the redistribution,
201 ! * if any, must include the following acknowledgment:
202 ! * "This product includes software developed by the
203 ! * The International Color Consortium (www.color.org)"
204 ! * Alternately, this acknowledgment may appear in the software itself,
205 ! * if and wherever such third-party acknowledgments normally appear.
207 ! * 4. The names "ICC" and "The International Color Consortium" must
208 ! * not be used to imply that the ICC organization endorses or
209 ! * promotes products derived from this software without prior
210 ! * written permission. For written permission, please see
211 ! * <http://www.color.org/>.
214 ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
215 ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
216 ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
217 ! * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
218 ! * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
219 ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
220 ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
221 ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
222 ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
223 ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
224 ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
225 ! * SUCH DAMAGE.
226 ! * ====================================================================
228 ! * This software consists of voluntary contributions made by many
229 ! * individuals on behalf of the The International Color Consortium.
232 ! * Membership in the ICC is encouraged when this software is used for
233 ! * commercial purposes.
235 ! *
236 ! * For more information on The International Color Consortium, please
237 ! * see <http://www.color.org/>.
238 ! *
239 ! *
240 ! */
242 ! //////////////////////////////////////////////////////////////////////
243 ! // HISTORY:
244 ! //
245 ! // -Initial implementation by Joseph Goldstone sumer 2007
246 ! //
247 ! //////////////////////////////////////////////////////////////////////
249 ! #include "Vetters.h"
251 ! #include <sstream>
252 ! using namespace std;
254 ! #ifndef WIN32
255 ! #include <sys/errno.h>
256 ! #else
257 ! #include <string.h>
258 ! int strerror_r(int errnum, char *str, int strsize)
260 ! const char *errstr = strerror(errnum);
262 ! if (errstr) {
263 ! strncpy(str, errstr, strsize);
264 ! return 0;
267 ! return -1;
269 ! #define stat _stat
270 ! #endif
272 ! #include "ICC_tool_exception.h"
274 ! const char*
275 ! path_tail(const char* const s)
277 ! const char* tail = strdup(s);
278 ! const char* last_slash = strrchr(tail, '/');
279 ! if (last_slash != NULL)
280 ! tail = last_slash + 1;
281 ! return tail;
284 ! void
285 ! vet_as_int(const char* const s, const string& name,
286 ! const string& description)
288 ! istringstream ss(s);
289 ! int i;
290 ! ss >> i;
291 ! if (ss.fail())
293 ! ostringstream oss;
294 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
295 ! << " an integer. It should be an integer representing "
296 ! << description << ".";
297 ! throw ICC_tool_exception(oss.str());
301 ! void
302 ! vet_as_float(const char* const s, const string& name,
303 ! const string& description)
305 ! istringstream ss(s);
306 ! float i;
307 ! ss >> i;
308 ! if (ss.fail())
310 ! ostringstream oss;
311 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
312 ! << " a floating-point number. It should be a floating-point number"
313 ! << " representing " << description << ".";
314 ! throw ICC_tool_exception(oss.str());
318 ! #define STRERROR_BUF_SIZE 256
319 ! off_t
320 ! get_size(const char* const s)
321 ! {
322 ! struct stat sb;
323 ! int stat_returned = stat(s, &sb);
324 ! if (stat_returned < 0)
326 ! int stat_errno = errno;
327 ! char strerror_buf[STRERROR_BUF_SIZE];
328 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
329 ! ostringstream oss;
330 ! oss << "Could not access information for file `" << s << "': "
331 ! << strerror_buf;
332 ! throw ICC_tool_exception(oss.str());
334 ! return sb.st_size;
337 ! bool
338 ! check_mode(const char* const s, mode_t mode)
339 ! {
340 ! struct stat sb;
341 ! int stat_returned = stat(s, &sb);
342 ! if (stat_returned < 0)
344 ! int stat_errno = errno;
345 ! char strerror_buf[STRERROR_BUF_SIZE];
346 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
347 ! ostringstream oss;
348 ! oss << "Could not access information for file `" << s << "': "
349 ! << strerror_buf;
350 ! throw ICC_tool_exception(oss.str());
352 ! return (sb.st_mode & mode) != 0;
355 ! bool
356 ! is_existent_file_pathname(const char* const s)
358 ! struct stat sb;
359 ! return stat(s, &sb) == 0;
362 ! bool
363 ! is_plain_file_pathname(const char* const s)
365 ! return check_mode(s, S_IFREG);
368 ! bool
369 ! is_directory(const char* const s)
371 ! return check_mode(s, S_IFDIR);
374 ! const char* const
375 ! containing_directory(const char* const s)
377 ! if (strlen(s) == 0)
378 ! throw ICC_tool_exception("name of directory passed to containing_directory"
379 ! " function was zero-length.");
380 ! char* tmp = strdup(s);
381 ! // lop off any trailing seperator
382 ! if (tmp[strlen(tmp) - 1] == '/')
383 ! tmp[strlen(tmp) - 1] = 0;
384 ! if (strlen(tmp) == 0)
385 ! throw ICC_tool_exception("root directory (which has no containing"
386 ! " directory) passed to containing_directory"
387 ! " function");
388 ! char* idx = strrchr(tmp, '/');
389 ! if (idx != NULL)
391 ! *idx = 0;
392 ! return tmp;
394 ! char* current_directory = getenv("PWD");
395 ! if (current_directory == NULL)
396 ! throw ICC_tool_exception("pathname passed to containing_directory has no"
397 ! " embedded seperator, and there is no value for"
398 ! " PWD defined in the environment");
399 ! return strdup(current_directory);
402 ! bool
403 ! is_readable_pathname(const char* const s)
405 ! return check_mode(s, S_IRUSR)
406 ! || check_mode(s, S_IRGRP)
407 ! || check_mode(s, S_IROTH);
410 ! bool
411 ! is_writable_pathname(const char* const s)
413 ! return check_mode(s, S_IWUSR)
414 ! || check_mode(s, S_IWGRP)
415 ! || check_mode(s, S_IWOTH);
418 ! bool
419 ! is_pathname_of_empty_file(const char* const s)
421 ! return get_size(s) > 0;
424 ! void
425 ! vet_input_file_pathname(const char* const s, const string& name,
426 ! const string& description)
428 ! if (! is_plain_file_pathname(s))
430 ! ostringstream oss;
431 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
432 ! << " of a plain file (i.e. it is the pathname of a directory, or of a"
433 ! << " symbolic link, or of some other sort of special file.) It should be"
434 ! << " " << description << ".";
435 ! throw ICC_tool_exception(oss.str());
437 ! if (! is_readable_pathname(s))
439 ! ostringstream oss;
440 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
441 ! << " of a readable file (i.e. you do not have permission to read that"
442 ! << " file, or you do not have permission to read some directory"
443 ! << " containing that file.";
444 ! throw ICC_tool_exception(oss.str());
446 ! if (! is_pathname_of_empty_file(s))
448 ! ostringstream oss;
449 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
450 ! << " of an existing readable file, but that file is of zero length."
451 ! << " The argument should be " << description << ".";
452 ! throw ICC_tool_exception(oss.str());
456 ! void
457 ! vet_output_file_pathname(const char* const s, const string& name,
458 ! const string& description,
459 ! bool silent_overwrite_OK)
461 ! const char* const container = containing_directory(s);
462 ! if (! is_writable_pathname(container))
464 ! ostringstream oss;
465 ! oss << "The " << name << " argument given, `" << s << "', has a directory"
466 ! << " component which is not writable."
467 ! << " The argument should be " << description << ".";
468 ! throw ICC_tool_exception(oss.str());
470 ! if (is_existent_file_pathname(s))
472 ! if (is_plain_file_pathname(s))
473 ! if (is_writable_pathname(s))
475 ! if (! silent_overwrite_OK)
477 ! ostringstream oss;
478 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
479 ! << " file."
480 ! << " The argument should be " << description << ".";
481 ! throw ICC_tool_exception(oss.str());
483 ! } else {
484 ! ostringstream oss;
485 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
486 ! << " file which is not writable."
487 ! << " The argument should be " << description << ".";
488 ! throw ICC_tool_exception(oss.str());
492 --- 1,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:23:09 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/IccIO.h Mon Aug 20 22:05:00 2007
842 --- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.h Fri Jan 25 14:23:09 2008
843 ***************
844 *** 79,84 ****
845 --- 79,85 ----
846 #define _ICCIO_H
848 #include "IccDefs.h"
849 + #include "memory"
850 #include "stdio.h"
852 #ifdef USESAMPLEICCNAMESPACE
853 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Mon Aug 20 22:05:00 2007
854 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Fri Jan 25 14:23:09 2008
855 ***************
856 *** 136,152 ****
857 icChar sigBuf[30];
859 if (GetBAcsSig())
860 ! sDescription += "ELEM_bACS\r\n";
861 else
862 ! sDescription += "ELEM_eACS\r\n";
864 icGetSig(sigBuf, m_signature);
865 sDescription += " Signature = ";
866 sDescription += sigBuf;
867 ! sDescription += "\r\n";
869 if (m_pData) {
870 ! sDescription += "\r\nData Follows:\r\n";
872 icMemDump(sDescription, m_pData, m_nDataSize);
874 --- 136,152 ----
875 icChar sigBuf[30];
877 if (GetBAcsSig())
878 ! sDescription += "ELEM_bACS\n";
879 else
880 ! sDescription += "ELEM_eACS\n";
882 icGetSig(sigBuf, m_signature);
883 sDescription += " Signature = ";
884 sDescription += sigBuf;
885 ! sDescription += "\n";
887 if (m_pData) {
888 ! sDescription += "\nData Follows:\n";
890 icMemDump(sDescription, m_pData, m_nDataSize);
892 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Mon Aug 20 22:05:00 2007
893 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Fri Jan 25 14:23:09 2008
894 ***************
895 *** 218,249 ****
896 sprintf(buf, "%.8f", m_endPoint);
897 sDescription += buf;
899 ! sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
900 sDescription += buf;
902 switch(m_nFunctionType) {
903 case 0x0000:
904 if (m_params[1]==0.0 && m_params[2]==0.0)
905 ! sprintf(buf, "Y = %.8f\r\n\r\n", m_params[3]);
906 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
907 ! sprintf(buf, "Y = X\r\n\r\n");
908 else if (m_params[0]==1.0 && m_params[2]==0.0)
909 ! sprintf(buf, "Y = %.8f * X + %.8f\r\n\r\n",
910 m_params[1], m_params[3]);
911 else
912 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\r\n\r\n",
913 m_params[1], m_params[2], m_params[0], m_params[3]);
914 sDescription += buf;
915 return;
917 case 0x0001:
918 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\r\n\r\n",
919 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
920 sDescription += buf;
921 return;
923 case 0x0002:
924 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\r\n\r\n",
925 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
926 sDescription += buf;
927 return;
928 --- 218,249 ----
929 sprintf(buf, "%.8f", m_endPoint);
930 sDescription += buf;
932 ! sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
933 sDescription += buf;
935 switch(m_nFunctionType) {
936 case 0x0000:
937 if (m_params[1]==0.0 && m_params[2]==0.0)
938 ! sprintf(buf, "Y = %.8f\n\n", m_params[3]);
939 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
940 ! sprintf(buf, "Y = X\n\n");
941 else if (m_params[0]==1.0 && m_params[2]==0.0)
942 ! sprintf(buf, "Y = %.8f * X + %.8f\n\n",
943 m_params[1], m_params[3]);
944 else
945 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n",
946 m_params[1], m_params[2], m_params[0], m_params[3]);
947 sDescription += buf;
948 return;
950 case 0x0001:
951 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\n\n",
952 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
953 sDescription += buf;
954 return;
956 case 0x0002:
957 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
958 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
959 sDescription += buf;
960 return;
961 ***************
962 *** 250,260 ****
964 default:
965 int i;
966 ! sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
967 sDescription += buf;
969 for (i=0; i<m_nParameters; i++) {
970 ! sprintf(buf, "Param[%d] = %.8lf\r\n\r\n", i, m_params[i]);
971 sDescription += buf;
974 --- 250,260 ----
976 default:
977 int i;
978 ! sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
979 sDescription += buf;
981 for (i=0; i<m_nParameters; i++) {
982 ! sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
983 sDescription += buf;
986 ***************
987 *** 496,502 ****
988 if (m_nReserved || m_nReserved2) {
989 sReport += icValidateWarningMsg;
990 sReport += sSigName;
991 ! sReport += " formula curve has non zero reserved data.\r\n";
992 rv = icValidateWarning;
995 --- 496,502 ----
996 if (m_nReserved || m_nReserved2) {
997 sReport += icValidateWarningMsg;
998 sReport += sSigName;
999 ! sReport += " formula curve has non zero reserved data.\n";
1000 rv = icValidateWarning;
1003 ***************
1004 *** 505,517 ****
1005 if (!m_params || m_nParameters<4) {
1006 sReport += icValidateCriticalErrorMsg;
1007 sReport += sSigName;
1008 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1009 rv = icValidateCriticalError;
1011 else if (m_nParameters > 4) {
1012 sReport += icValidateWarningMsg;
1013 sReport += sSigName;
1014 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1015 rv = icValidateWarning;
1017 break;
1018 --- 505,517 ----
1019 if (!m_params || m_nParameters<4) {
1020 sReport += icValidateCriticalErrorMsg;
1021 sReport += sSigName;
1022 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1023 rv = icValidateCriticalError;
1025 else if (m_nParameters > 4) {
1026 sReport += icValidateWarningMsg;
1027 sReport += sSigName;
1028 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1029 rv = icValidateWarning;
1031 break;
1032 ***************
1033 *** 520,532 ****
1034 if (!m_params || m_nParameters<5) {
1035 sReport += icValidateCriticalErrorMsg;
1036 sReport += sSigName;
1037 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1038 rv = icValidateCriticalError;
1040 else if (m_nParameters > 5) {
1041 sReport += icValidateWarningMsg;
1042 sReport += sSigName;
1043 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1044 rv = icValidateWarning;
1046 break;
1047 --- 520,532 ----
1048 if (!m_params || m_nParameters<5) {
1049 sReport += icValidateCriticalErrorMsg;
1050 sReport += sSigName;
1051 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1052 rv = icValidateCriticalError;
1054 else if (m_nParameters > 5) {
1055 sReport += icValidateWarningMsg;
1056 sReport += sSigName;
1057 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1058 rv = icValidateWarning;
1060 break;
1061 ***************
1062 *** 535,547 ****
1063 if (!m_params || m_nParameters<5) {
1064 sReport += icValidateCriticalErrorMsg;
1065 sReport += sSigName;
1066 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1067 rv = icValidateCriticalError;
1069 else if (m_nParameters > 5) {
1070 sReport += icValidateWarningMsg;
1071 sReport += sSigName;
1072 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1073 rv = icValidateWarning;
1075 break;
1076 --- 535,547 ----
1077 if (!m_params || m_nParameters<5) {
1078 sReport += icValidateCriticalErrorMsg;
1079 sReport += sSigName;
1080 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1081 rv = icValidateCriticalError;
1083 else if (m_nParameters > 5) {
1084 sReport += icValidateWarningMsg;
1085 sReport += sSigName;
1086 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1087 rv = icValidateWarning;
1089 break;
1090 ***************
1091 *** 551,557 ****
1092 icChar buf[128];
1093 sReport += icValidateCriticalErrorMsg;
1094 sReport += sSigName;
1095 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\r\n", m_nFunctionType);
1096 sReport += buf;
1097 rv = icValidateCriticalError;
1099 --- 551,557 ----
1100 icChar buf[128];
1101 sReport += icValidateCriticalErrorMsg;
1102 sReport += sSigName;
1103 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
1104 sReport += buf;
1105 rv = icValidateCriticalError;
1107 ***************
1108 *** 727,733 ****
1109 sDescription += buf;
1112 ! sprintf(buf, "]\r\n");
1113 sDescription += buf;
1115 else {
1116 --- 727,733 ----
1117 sDescription += buf;
1120 ! sprintf(buf, "]\n");
1121 sDescription += buf;
1123 else {
1124 ***************
1125 *** 744,752 ****
1126 sprintf(buf, "%.8f", m_endPoint);
1127 sDescription += buf;
1129 ! sprintf(buf, "]\r\n");
1130 sDescription += buf;
1131 ! sDescription += "IN OUT\r\n";
1133 icUInt32Number i;
1135 --- 744,752 ----
1136 sprintf(buf, "%.8f", m_endPoint);
1137 sDescription += buf;
1139 ! sprintf(buf, "]\n");
1140 sDescription += buf;
1141 ! sDescription += "IN OUT\n";
1143 icUInt32Number i;
1145 ***************
1146 *** 754,764 ****
1147 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1149 for (i=0; i<m_nCount; i++) {
1150 ! sprintf(buf, "%.8f %.8f\r\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1151 sDescription += buf;
1154 ! sDescription += "\r\n";
1158 --- 754,764 ----
1159 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1161 for (i=0; i<m_nCount; i++) {
1162 ! sprintf(buf, "%.8f %.8f\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1163 sDescription += buf;
1166 ! sDescription += "\n";
1170 ***************
1171 *** 910,916 ****
1172 if (m_nReserved) {
1173 sReport += icValidateWarningMsg;
1174 sReport += sSigName;
1175 ! sReport += " sampled curve has non zero reserved data.\r\n";
1176 rv = icValidateWarning;
1179 --- 910,916 ----
1180 if (m_nReserved) {
1181 sReport += icValidateWarningMsg;
1182 sReport += sSigName;
1183 ! sReport += " sampled curve has non zero reserved data.\n";
1184 rv = icValidateWarning;
1187 ***************
1188 *** 917,929 ****
1189 if (m_nCount<2) {
1190 sReport += icValidateCriticalErrorMsg;
1191 sReport += sSigName;
1192 ! sReport += " sampled curve has too few sample points.\r\n";
1193 rv = icValidateCriticalError;
1195 else if (m_endPoint-m_startPoint == 0.0) {
1196 sReport += icValidateWarningMsg;
1197 sReport += sSigName;
1198 ! sReport += " sampled curve has a range of zero.\r\n";
1199 rv = icMaxStatus(rv, icValidateWarning);
1202 --- 917,929 ----
1203 if (m_nCount<2) {
1204 sReport += icValidateCriticalErrorMsg;
1205 sReport += sSigName;
1206 ! sReport += " sampled curve has too few sample points.\n";
1207 rv = icValidateCriticalError;
1209 else if (m_endPoint-m_startPoint == 0.0) {
1210 sReport += icValidateWarningMsg;
1211 sReport += sSigName;
1212 ! sReport += " sampled curve has a range of zero.\n";
1213 rv = icMaxStatus(rv, icValidateWarning);
1216 ***************
1217 *** 1054,1060 ****
1219 CIccCurveSegmentList::iterator i;
1221 ! sDescription += "BEGIN_CURVE\r\n";
1222 for (i=m_list->begin(); i!=m_list->end(); i++) {
1223 (*i)->Describe(sDescription);
1225 --- 1054,1060 ----
1227 CIccCurveSegmentList::iterator i;
1229 ! sDescription += "BEGIN_CURVE\n";
1230 for (i=m_list->begin(); i!=m_list->end(); i++) {
1231 (*i)->Describe(sDescription);
1233 ***************
1234 *** 1342,1348 ****
1235 if (m_nReserved1 || m_nReserved2) {
1236 sReport += icValidateWarningMsg;
1237 sReport += sSigName;
1238 ! sReport += " Segmented curve has non zero reserved data.\r\n";
1239 rv = icValidateWarning;
1242 --- 1342,1348 ----
1243 if (m_nReserved1 || m_nReserved2) {
1244 sReport += icValidateWarningMsg;
1245 sReport += sSigName;
1246 ! sReport += " Segmented curve has non zero reserved data.\n";
1247 rv = icValidateWarning;
1250 ***************
1251 *** 1349,1355 ****
1252 if (m_list->size()==0) {
1253 sReport += icValidateCriticalErrorMsg;
1254 sReport += sSigName;
1255 ! sReport += " Has Empty CurveSegment!\r\n";
1256 return icValidateCriticalError;
1259 --- 1349,1355 ----
1260 if (m_list->size()==0) {
1261 sReport += icValidateCriticalErrorMsg;
1262 sReport += sSigName;
1263 ! sReport += " Has Empty CurveSegment!\n";
1264 return icValidateCriticalError;
1267 ***************
1268 *** 1599,1609 ****
1269 icChar buf[81];
1270 int i;
1272 ! sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
1273 sDescription += buf;
1275 for (i=0; i<m_nInputChannels; i++) {
1276 ! sprintf(buf, "Curve %d of %d\r\n", i+1, m_nInputChannels);
1277 sDescription += buf;
1278 if (m_curve[i]) {
1279 m_curve[i]->Describe(sDescription);
1280 --- 1599,1609 ----
1281 icChar buf[81];
1282 int i;
1284 ! sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
1285 sDescription += buf;
1287 for (i=0; i<m_nInputChannels; i++) {
1288 ! sprintf(buf, "Curve %d of %d\n", i+1, m_nInputChannels);
1289 sDescription += buf;
1290 if (m_curve[i]) {
1291 m_curve[i]->Describe(sDescription);
1292 ***************
1293 *** 1877,1883 ****
1294 sReport += " - Element ";
1295 sSigName = Info.GetSigName(GetType());
1296 sReport += sSigName;
1297 ! sReport += " Has Empty Curve Element(s)!\r\n";
1298 return icValidateCriticalError;
1301 --- 1877,1883 ----
1302 sReport += " - Element ";
1303 sSigName = Info.GetSigName(GetType());
1304 sReport += sSigName;
1305 ! sReport += " Has Empty Curve Element(s)!\n";
1306 return icValidateCriticalError;
1309 ***************
1310 *** 2042,2048 ****
1311 int i, j;
1312 icFloatNumber *data = m_pMatrix;
1314 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
1315 sDescription += buf;
1317 for (j=0; j<m_nOutputChannels; j++) {
1318 --- 2042,2048 ----
1319 int i, j;
1320 icFloatNumber *data = m_pMatrix;
1322 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
1323 sDescription += buf;
1325 for (j=0; j<m_nOutputChannels; j++) {
1326 ***************
1327 *** 2052,2058 ****
1328 sprintf(buf, "%12.8lf", data[i]);
1329 sDescription += buf;
1331 ! sprintf(buf, " + %12.8lf\r\n", m_pConstants[j]);
1332 sDescription += buf;
1333 data += i;
1335 --- 2052,2058 ----
1336 sprintf(buf, "%12.8lf", data[i]);
1337 sDescription += buf;
1339 ! sprintf(buf, " + %12.8lf\n", m_pConstants[j]);
1340 sDescription += buf;
1341 data += i;
1343 ***************
1344 *** 2273,2279 ****
1345 sReport += " - Element ";
1346 sSigName = Info.GetSigName(GetType());
1347 sReport += sSigName;
1348 ! sReport += " Has Empty Matrix data!\r\n";
1349 return icValidateCriticalError;
1352 --- 2273,2279 ----
1353 sReport += " - Element ";
1354 sSigName = Info.GetSigName(GetType());
1355 sReport += sSigName;
1356 ! sReport += " Has Empty Matrix data!\n";
1357 return icValidateCriticalError;
1360 ***************
1361 *** 2620,2626 ****
1362 sReport += " - Element ";
1363 sSigName = Info.GetSigName(GetType());
1364 sReport += sSigName;
1365 ! sReport += " Has No CLUT!\r\n";
1366 return icValidateCriticalError;
1369 --- 2620,2626 ----
1370 sReport += " - Element ";
1371 sSigName = Info.GetSigName(GetType());
1372 sReport += sSigName;
1373 ! sReport += " Has No CLUT!\n";
1374 return icValidateCriticalError;
1377 *** misc/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h Mon Aug 20 22:05:00 2007
1378 --- misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h Fri Jan 25 14:23:09 2008
1379 ***************
1380 *** 112,126 ****
1381 #define ICUINT64TYPE unsigned long long
1382 #define ICINT64TYPE long long
1384 ! #if defined(__APPLE__)
1385 ! #if defined(__LITTLE_ENDIAN__)
1386 ! #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1387 ! #else
1388 #define ICC_BYTE_ORDER_BIG_ENDIAN
1389 ! #endif
1390 ! #else
1391 ! #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1392 ! #endif
1394 #define ICCPROFLIB_API
1395 #define ICCPROFLIB_EXTERN
1396 --- 112,126 ----
1397 #define ICUINT64TYPE unsigned long long
1398 #define ICINT64TYPE long long
1400 ! /* #if defined(__APPLE__) */
1401 ! /* #if defined(__LITTLE_ENDIAN__) */
1402 ! /* #define ICC_BYTE_ORDER_LITTLE_ENDIAN */
1403 ! /* #else */
1404 #define ICC_BYTE_ORDER_BIG_ENDIAN
1405 ! /* #endif */
1406 ! /* #else */
1407 ! /* #define ICC_BYTE_ORDER_LITTLE_ENDIAN */
1408 ! /* #endif */
1410 #define ICCPROFLIB_API
1411 #define ICCPROFLIB_EXTERN
1412 *** misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Mon Aug 20 22:05:00 2007
1413 --- misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Fri Jan 25 14:23:09 2008
1414 ***************
1415 *** 567,573 ****
1417 if (!ReadBasic(pIO)) {
1418 sReport += icValidateCriticalErrorMsg;
1419 ! sReport += " - Unable to read profile!**\r\n\tProfile has invalid structure!\r\n";
1420 Cleanup();
1422 return icValidateCriticalError;
1423 --- 567,573 ----
1425 if (!ReadBasic(pIO)) {
1426 sReport += icValidateCriticalErrorMsg;
1427 ! sReport += " - Unable to read profile!**\n\tProfile has invalid structure!\n";
1428 Cleanup();
1430 return icValidateCriticalError;
1431 ***************
1432 *** 576,582 ****
1433 // Check profile header
1434 if (!CheckFileSize(pIO)) {
1435 sReport += icValidateNonCompliantMsg;
1436 ! sReport += "Bad Header File Size\r\n";
1437 rv = icMaxStatus(rv, icValidateNonCompliant);
1440 --- 576,582 ----
1441 // Check profile header
1442 if (!CheckFileSize(pIO)) {
1443 sReport += icValidateNonCompliantMsg;
1444 ! sReport += "Bad Header File Size\n";
1445 rv = icMaxStatus(rv, icValidateNonCompliant);
1448 ***************
1449 *** 588,594 ****
1450 CalcProfileID(pIO, &profileID);
1451 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1452 sReport += icValidateNonCompliantMsg;
1453 ! sReport += "Bad Profile ID\r\n";
1455 rv = icMaxStatus(rv, icValidateNonCompliant);
1457 --- 588,594 ----
1458 CalcProfileID(pIO, &profileID);
1459 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1460 sReport += icValidateNonCompliantMsg;
1461 ! sReport += "Bad Profile ID\n";
1463 rv = icMaxStatus(rv, icValidateNonCompliant);
1465 ***************
1466 *** 601,607 ****
1467 sReport += icValidateCriticalErrorMsg;
1468 sReport += " - ";
1469 sReport += Info.GetTagSigName(i->TagInfo.sig);
1470 ! sReport += " - Tag has invalid structure!\r\n";
1472 rv = icMaxStatus(rv, icValidateCriticalError);
1474 --- 601,607 ----
1475 sReport += icValidateCriticalErrorMsg;
1476 sReport += " - ";
1477 sReport += Info.GetTagSigName(i->TagInfo.sig);
1478 ! sReport += " - Tag has invalid structure!\n";
1480 rv = icMaxStatus(rv, icValidateCriticalError);
1482 ***************
1483 *** 1026,1032 ****
1485 default:
1486 sReport += icValidateCriticalErrorMsg;
1487 ! sprintf(buf, " - %s: Unknown profile class!\r\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1488 sReport += buf;
1489 rv = icMaxStatus(rv, icValidateCriticalError);
1491 --- 1026,1032 ----
1493 default:
1494 sReport += icValidateCriticalErrorMsg;
1495 ! sprintf(buf, " - %s: Unknown profile class!\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1496 sReport += buf;
1497 rv = icMaxStatus(rv, icValidateCriticalError);
1499 ***************
1500 *** 1033,1039 ****
1502 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1503 sReport += icValidateCriticalErrorMsg;
1504 ! sprintf(buf, " - %s: Unknown color space!\r\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1505 sReport += buf;
1506 rv = icMaxStatus(rv, icValidateCriticalError);
1508 --- 1033,1039 ----
1510 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1511 sReport += icValidateCriticalErrorMsg;
1512 ! sprintf(buf, " - %s: Unknown color space!\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1513 sReport += buf;
1514 rv = icMaxStatus(rv, icValidateCriticalError);
1516 ***************
1517 *** 1041,1047 ****
1518 if (m_Header.deviceClass==icSigLinkClass) {
1519 if (!Info.IsValidSpace(m_Header.pcs)) {
1520 sReport += icValidateCriticalErrorMsg;
1521 ! sprintf(buf, " - %s: Unknown pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1522 sReport += buf;
1523 rv = icMaxStatus(rv, icValidateCriticalError);
1525 --- 1041,1047 ----
1526 if (m_Header.deviceClass==icSigLinkClass) {
1527 if (!Info.IsValidSpace(m_Header.pcs)) {
1528 sReport += icValidateCriticalErrorMsg;
1529 ! sprintf(buf, " - %s: Unknown pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1530 sReport += buf;
1531 rv = icMaxStatus(rv, icValidateCriticalError);
1533 ***************
1534 *** 1049,1055 ****
1535 else {
1536 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1537 sReport += icValidateCriticalErrorMsg;
1538 ! sprintf(buf, " - %s: Invalid pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1539 sReport += buf;
1540 rv = icMaxStatus(rv, icValidateCriticalError);
1542 --- 1049,1055 ----
1543 else {
1544 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1545 sReport += icValidateCriticalErrorMsg;
1546 ! sprintf(buf, " - %s: Invalid pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1547 sReport += buf;
1548 rv = icMaxStatus(rv, icValidateCriticalError);
1550 ***************
1551 *** 1068,1074 ****
1553 default:
1554 sReport += icValidateWarningMsg;
1555 ! sprintf(buf, " - %s: Unknown platform signature.\r\n", Info.GetPlatformSigName(m_Header.platform));
1556 sReport += buf;
1557 rv = icMaxStatus(rv, icValidateWarning);
1559 --- 1068,1074 ----
1561 default:
1562 sReport += icValidateWarningMsg;
1563 ! sprintf(buf, " - %s: Unknown platform signature.\n", Info.GetPlatformSigName(m_Header.platform));
1564 sReport += buf;
1565 rv = icMaxStatus(rv, icValidateWarning);
1567 ***************
1568 *** 1095,1101 ****
1570 default:
1571 sReport += icValidateWarningMsg;
1572 ! sprintf(buf, " - %s: Unregisterd CMM signature.\r\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1573 sReport += buf;
1574 rv = icMaxStatus(rv, icValidateWarning);
1576 --- 1095,1101 ----
1578 default:
1579 sReport += icValidateWarningMsg;
1580 ! sprintf(buf, " - %s: Unregisterd CMM signature.\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1581 sReport += buf;
1582 rv = icMaxStatus(rv, icValidateWarning);
1584 ***************
1585 *** 1109,1115 ****
1587 default:
1588 sReport += icValidateCriticalErrorMsg;
1589 ! sprintf(buf, " - %s: Unknown rendering intent!\r\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1590 sReport += buf;
1591 rv = icMaxStatus(rv, icValidateCriticalError);
1593 --- 1109,1115 ----
1595 default:
1596 sReport += icValidateCriticalErrorMsg;
1597 ! sprintf(buf, " - %s: Unknown rendering intent!\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1598 sReport += buf;
1599 rv = icMaxStatus(rv, icValidateCriticalError);
1601 ***************
1602 *** 1120,1126 ****
1603 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1604 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1605 sReport += icValidateNonCompliantMsg;
1606 ! sReport += " - Non D50 Illuminant XYZ values.\r\n";
1607 rv = icMaxStatus(rv, icValidateNonCompliant);
1610 --- 1120,1126 ----
1611 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1612 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1613 sReport += icValidateNonCompliantMsg;
1614 ! sReport += " - Non D50 Illuminant XYZ values.\n";
1615 rv = icMaxStatus(rv, icValidateNonCompliant);
1618 ***************
1619 *** 1130,1136 ****
1621 if (sum) {
1622 sReport += icValidateNonCompliantMsg;
1623 ! sReport += " - Reserved value must be zero.\r\n";
1624 rv = icMaxStatus(rv, icValidateNonCompliant);
1627 --- 1130,1136 ----
1629 if (sum) {
1630 sReport += icValidateNonCompliantMsg;
1631 ! sReport += " - Reserved value must be zero.\n";
1632 rv = icMaxStatus(rv, icValidateNonCompliant);
1635 ***************
1636 *** 1163,1169 ****
1638 sReport += icValidateWarningMsg;
1639 sReport += buf;
1640 ! sReport += " - Tag exclusion test failed.\r\n";
1641 rv = false;
1644 --- 1163,1169 ----
1646 sReport += icValidateWarningMsg;
1647 sReport += buf;
1648 ! sReport += " - Tag exclusion test failed.\n";
1649 rv = false;
1652 ***************
1653 *** 1177,1183 ****
1655 sReport += icValidateWarningMsg;
1656 sReport += buf;
1657 ! sReport += " - Tag exclusion test failed.\r\n";
1658 rv = false;
1660 break;
1661 --- 1177,1183 ----
1663 sReport += icValidateWarningMsg;
1664 sReport += buf;
1665 ! sReport += " - Tag exclusion test failed.\n";
1666 rv = false;
1668 break;
1669 ***************
1670 *** 1192,1198 ****
1672 sReport += icValidateWarningMsg;
1673 sReport += buf;
1674 ! sReport += " - Tag exclusion test failed.\r\n";
1675 rv = false;
1677 break;
1678 --- 1192,1198 ----
1680 sReport += icValidateWarningMsg;
1681 sReport += buf;
1682 ! sReport += " - Tag exclusion test failed.\n";
1683 rv = false;
1685 break;
1686 ***************
1687 *** 1234,1240 ****
1688 if (!IsTypeValid(tagsig, typesig)) {
1689 sReport += icValidateNonCompliantMsg;
1690 sReport += buf;
1691 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\r\n", Info.GetTagTypeSigName(typesig));
1692 sReport += buf;
1693 rv = icMaxStatus(rv, icValidateNonCompliant);
1695 --- 1234,1240 ----
1696 if (!IsTypeValid(tagsig, typesig)) {
1697 sReport += icValidateNonCompliantMsg;
1698 sReport += buf;
1699 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\n", Info.GetTagTypeSigName(typesig));
1700 sReport += buf;
1701 rv = icMaxStatus(rv, icValidateNonCompliant);
1703 ***************
1704 *** 1477,1483 ****
1706 if (m_Tags->size() <= 0) {
1707 sReport += icValidateCriticalErrorMsg;
1708 ! sReport += "No tags present.\r\n";
1709 return icValidateCriticalError;
1712 --- 1477,1483 ----
1714 if (m_Tags->size() <= 0) {
1715 sReport += icValidateCriticalErrorMsg;
1716 ! sReport += "No tags present.\n";
1717 return icValidateCriticalError;
1720 ***************
1721 *** 1486,1492 ****
1722 if (!GetTag(icSigProfileDescriptionTag) ||
1723 !GetTag(icSigCopyrightTag)) {
1724 sReport += icValidateNonCompliantMsg;
1725 ! sReport += "Required tags missing.\r\n";
1726 rv = icMaxStatus(rv, icValidateNonCompliant);
1729 --- 1486,1492 ----
1730 if (!GetTag(icSigProfileDescriptionTag) ||
1731 !GetTag(icSigCopyrightTag)) {
1732 sReport += icValidateNonCompliantMsg;
1733 ! sReport += "Required tags missing.\n";
1734 rv = icMaxStatus(rv, icValidateNonCompliant);
1737 ***************
1738 *** 1495,1501 ****
1739 if (sig != icSigLinkClass) {
1740 if (!GetTag(icSigMediaWhitePointTag)) {
1741 sReport += icValidateCriticalErrorMsg;
1742 ! sReport += "Media white point tag missing.\r\n";
1743 rv = icMaxStatus(rv, icValidateCriticalError);
1746 --- 1495,1501 ----
1747 if (sig != icSigLinkClass) {
1748 if (!GetTag(icSigMediaWhitePointTag)) {
1749 sReport += icValidateCriticalErrorMsg;
1750 ! sReport += "Media white point tag missing.\n";
1751 rv = icMaxStatus(rv, icValidateCriticalError);
1754 ***************
1755 *** 1505,1511 ****
1756 if (m_Header.colorSpace == icSigGrayData) {
1757 if (!GetTag(icSigGrayTRCTag)) {
1758 sReport += icValidateCriticalErrorMsg;
1759 ! sReport += "Gray TRC tag missing.\r\n";
1760 rv = icMaxStatus(rv, icValidateCriticalError);
1763 --- 1505,1511 ----
1764 if (m_Header.colorSpace == icSigGrayData) {
1765 if (!GetTag(icSigGrayTRCTag)) {
1766 sReport += icValidateCriticalErrorMsg;
1767 ! sReport += "Gray TRC tag missing.\n";
1768 rv = icMaxStatus(rv, icValidateCriticalError);
1771 ***************
1772 *** 1515,1521 ****
1773 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1774 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1775 sReport += icValidateCriticalErrorMsg;
1776 ! sReport += "Critical tag(s) missing.\r\n";
1777 rv = icMaxStatus(rv, icValidateCriticalError);
1780 --- 1515,1521 ----
1781 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1782 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1783 sReport += icValidateCriticalErrorMsg;
1784 ! sReport += "Critical tag(s) missing.\n";
1785 rv = icMaxStatus(rv, icValidateCriticalError);
1788 ***************
1789 *** 1526,1532 ****
1790 if (m_Header.colorSpace == icSigGrayData) {
1791 if (!GetTag(icSigGrayTRCTag)) {
1792 sReport += icValidateCriticalErrorMsg;
1793 ! sReport += "Gray TRC tag missing.\r\n";
1794 rv = icMaxStatus(rv, icValidateCriticalError);
1797 --- 1526,1532 ----
1798 if (m_Header.colorSpace == icSigGrayData) {
1799 if (!GetTag(icSigGrayTRCTag)) {
1800 sReport += icValidateCriticalErrorMsg;
1801 ! sReport += "Gray TRC tag missing.\n";
1802 rv = icMaxStatus(rv, icValidateCriticalError);
1805 ***************
1806 *** 1536,1542 ****
1807 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1808 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1809 sReport += icValidateCriticalErrorMsg;
1810 ! sReport += "Critical tag(s) missing.\r\n";
1811 rv = icMaxStatus(rv, icValidateCriticalError);
1814 --- 1536,1542 ----
1815 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1816 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1817 sReport += icValidateCriticalErrorMsg;
1818 ! sReport += "Critical tag(s) missing.\n";
1819 rv = icMaxStatus(rv, icValidateCriticalError);
1822 ***************
1823 *** 1547,1553 ****
1824 if (m_Header.colorSpace == icSigGrayData) {
1825 if (!GetTag(icSigGrayTRCTag)) {
1826 sReport += icValidateCriticalErrorMsg;
1827 ! sReport += "Gray TRC tag missing.\r\n";
1828 rv = icMaxStatus(rv, icValidateCriticalError);
1831 --- 1547,1553 ----
1832 if (m_Header.colorSpace == icSigGrayData) {
1833 if (!GetTag(icSigGrayTRCTag)) {
1834 sReport += icValidateCriticalErrorMsg;
1835 ! sReport += "Gray TRC tag missing.\n";
1836 rv = icMaxStatus(rv, icValidateCriticalError);
1839 ***************
1840 *** 1556,1568 ****
1841 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1842 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1843 sReport += icValidateCriticalErrorMsg;
1844 ! sReport += "Critical tag(s) missing.\r\n";
1845 rv = icMaxStatus(rv, icValidateCriticalError);
1848 if (!GetTag(icSigGamutTag)) {
1849 sReport += icValidateNonCompliantMsg;
1850 ! sReport += "Gamut tag missing.\r\n";
1851 rv = icMaxStatus(rv, icValidateNonCompliant);
1854 --- 1556,1568 ----
1855 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1856 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1857 sReport += icValidateCriticalErrorMsg;
1858 ! sReport += "Critical tag(s) missing.\n";
1859 rv = icMaxStatus(rv, icValidateCriticalError);
1862 if (!GetTag(icSigGamutTag)) {
1863 sReport += icValidateNonCompliantMsg;
1864 ! sReport += "Gamut tag missing.\n";
1865 rv = icMaxStatus(rv, icValidateNonCompliant);
1868 ***************
1869 *** 1585,1591 ****
1870 case icSig16colorData:
1871 if (!GetTag(icSigColorantTableTag)) {
1872 sReport += icValidateNonCompliantMsg;
1873 ! sReport += "xCLR output profile is missing colorantTableTag\r\n";
1874 rv = icMaxStatus(rv, icValidateNonCompliant);
1877 --- 1585,1591 ----
1878 case icSig16colorData:
1879 if (!GetTag(icSigColorantTableTag)) {
1880 sReport += icValidateNonCompliantMsg;
1881 ! sReport += "xCLR output profile is missing colorantTableTag\n";
1882 rv = icMaxStatus(rv, icValidateNonCompliant);
1885 ***************
1886 *** 1599,1605 ****
1887 case icSigLinkClass:
1888 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1889 sReport += icValidateCriticalErrorMsg;
1890 ! sReport += "Critical tag(s) missing.\r\n";
1891 rv = icMaxStatus(rv, icValidateCriticalError);
1894 --- 1599,1605 ----
1895 case icSigLinkClass:
1896 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1897 sReport += icValidateCriticalErrorMsg;
1898 ! sReport += "Critical tag(s) missing.\n";
1899 rv = icMaxStatus(rv, icValidateCriticalError);
1902 ***************
1903 *** 1606,1612 ****
1904 if (icIsSpaceCLR(m_Header.colorSpace)) {
1905 if (!GetTag(icSigColorantTableTag)) {
1906 sReport += icValidateNonCompliantMsg;
1907 ! sReport += "Required tag(s) missing.\r\n";
1908 rv = icMaxStatus(rv, icValidateNonCompliant);
1911 --- 1606,1612 ----
1912 if (icIsSpaceCLR(m_Header.colorSpace)) {
1913 if (!GetTag(icSigColorantTableTag)) {
1914 sReport += icValidateNonCompliantMsg;
1915 ! sReport += "Required tag(s) missing.\n";
1916 rv = icMaxStatus(rv, icValidateNonCompliant);
1919 ***************
1920 *** 1614,1620 ****
1921 if (icIsSpaceCLR(m_Header.pcs)) {
1922 if (!GetTag(icSigColorantTableOutTag)) {
1923 sReport += icValidateNonCompliantMsg;
1924 ! sReport += "Required tag(s) missing.\r\n";
1925 rv = icMaxStatus(rv, icValidateNonCompliant);
1928 --- 1614,1620 ----
1929 if (icIsSpaceCLR(m_Header.pcs)) {
1930 if (!GetTag(icSigColorantTableOutTag)) {
1931 sReport += icValidateNonCompliantMsg;
1932 ! sReport += "Required tag(s) missing.\n";
1933 rv = icMaxStatus(rv, icValidateNonCompliant);
1936 ***************
1937 *** 1623,1629 ****
1938 case icSigColorSpaceClass:
1939 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1940 sReport += icValidateCriticalErrorMsg;
1941 ! sReport += "Critical tag(s) missing.\r\n";
1942 rv = icMaxStatus(rv, icValidateCriticalError);
1944 break;
1945 --- 1623,1629 ----
1946 case icSigColorSpaceClass:
1947 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1948 sReport += icValidateCriticalErrorMsg;
1949 ! sReport += "Critical tag(s) missing.\n";
1950 rv = icMaxStatus(rv, icValidateCriticalError);
1952 break;
1953 ***************
1954 *** 1631,1637 ****
1955 case icSigAbstractClass:
1956 if (!GetTag(icSigAToB0Tag)) {
1957 sReport += icValidateCriticalErrorMsg;
1958 ! sReport += "Critical tag(s) missing.\r\n";
1959 rv = icMaxStatus(rv, icValidateCriticalError);
1961 break;
1962 --- 1631,1637 ----
1963 case icSigAbstractClass:
1964 if (!GetTag(icSigAToB0Tag)) {
1965 sReport += icValidateCriticalErrorMsg;
1966 ! sReport += "Critical tag(s) missing.\n";
1967 rv = icMaxStatus(rv, icValidateCriticalError);
1969 break;
1970 ***************
1971 *** 1639,1645 ****
1972 case icSigNamedColorClass:
1973 if (!GetTag(icSigNamedColor2Tag)) {
1974 sReport += icValidateCriticalErrorMsg;
1975 ! sReport += "Critical tag(s) missing.\r\n";
1976 rv = icMaxStatus(rv, icValidateCriticalError);
1979 --- 1639,1645 ----
1980 case icSigNamedColorClass:
1981 if (!GetTag(icSigNamedColor2Tag)) {
1982 sReport += icValidateCriticalErrorMsg;
1983 ! sReport += "Critical tag(s) missing.\n";
1984 rv = icMaxStatus(rv, icValidateCriticalError);
1987 ***************
1988 *** 1647,1653 ****
1990 default:
1991 sReport += icValidateCriticalErrorMsg;
1992 ! sReport += "Unknown Profile Class.\r\n";
1993 rv = icMaxStatus(rv, icValidateCriticalError);
1994 break;
1996 --- 1647,1653 ----
1998 default:
1999 sReport += icValidateCriticalErrorMsg;
2000 ! sReport += "Unknown Profile Class.\n";
2001 rv = icMaxStatus(rv, icValidateCriticalError);
2002 break;
2004 ***************
2005 *** 1724,1730 ****
2006 // Check for duplicate tags
2007 if (!AreTagsUnique()) {
2008 sReport += icValidateWarning;
2009 ! sReport += " - There are duplicate tags.\r\n";
2010 rv =icMaxStatus(rv, icValidateWarning);
2013 --- 1724,1730 ----
2014 // Check for duplicate tags
2015 if (!AreTagsUnique()) {
2016 sReport += icValidateWarning;
2017 ! sReport += " - There are duplicate tags.\n";
2018 rv =icMaxStatus(rv, icValidateWarning);
2021 ***************
2022 *** 1979,1985 ****
2023 sReport = icValidateCriticalErrorMsg;
2024 sReport += " - ";
2025 sReport += szFilename;
2026 ! sReport += "- Invalid Filename\r\n";
2027 delete pFileIO;
2028 return NULL;
2030 --- 1979,1985 ----
2031 sReport = icValidateCriticalErrorMsg;
2032 sReport += " - ";
2033 sReport += szFilename;
2034 ! sReport += "- Invalid Filename\n";
2035 delete pFileIO;
2036 return NULL;
2038 *** misc/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Mon Aug 20 22:05:00 2007
2039 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Fri Jan 25 14:23:09 2008
2040 ***************
2041 *** 166,172 ****
2042 CIccInfo Info;
2043 sReport += icValidateNonCompliantMsg;
2044 sReport += Info.GetSigName(sig);
2045 ! sReport += " - Reserved Value must be zero.\r\n";
2047 rv = icValidateNonCompliant;
2049 --- 166,172 ----
2050 CIccInfo Info;
2051 sReport += icValidateNonCompliantMsg;
2052 sReport += Info.GetSigName(sig);
2053 ! sReport += " - Reserved Value must be zero.\n";
2055 rv = icValidateNonCompliant;
2057 ***************
2058 *** 340,346 ****
2059 sprintf(buf, "%u Bytes.", m_nSize-4);
2060 sDescription += buf;
2062 ! sDescription += "\r\n\r\nData Follows:\r\n";
2064 icMemDump(sDescription, m_pData+4, m_nSize-4);
2066 --- 340,346 ----
2067 sprintf(buf, "%u Bytes.", m_nSize-4);
2068 sDescription += buf;
2070 ! sDescription += "\n\nData Follows:\n";
2072 icMemDump(sDescription, m_pData+4, m_nSize-4);
2074 ***************
2075 *** 511,517 ****
2076 if (m_szText && *m_szText)
2077 sDescription += m_szText;
2079 ! sDescription += "\"\r\n";
2083 --- 511,517 ----
2084 if (m_szText && *m_szText)
2085 sDescription += m_szText;
2087 ! sDescription += "\"\n";
2091 ***************
2092 *** 629,635 ****
2093 if (m_nBufSize<7) {
2094 sReport += icValidateNonCompliantMsg;
2095 sReport += sSigName;
2096 ! sReport += " - Tag must have at least seven text characters.\r\n";
2097 rv = icMaxStatus(rv, icValidateNonCompliant);
2099 break;
2100 --- 629,635 ----
2101 if (m_nBufSize<7) {
2102 sReport += icValidateNonCompliantMsg;
2103 sReport += sSigName;
2104 ! sReport += " - Tag must have at least seven text characters.\n";
2105 rv = icMaxStatus(rv, icValidateNonCompliant);
2107 break;
2108 ***************
2109 *** 636,642 ****
2110 default:
2111 sReport += icValidateWarningMsg;
2112 sReport += sSigName;
2113 ! sReport += " - Unknown Tag.\r\n";
2114 rv = icMaxStatus(rv, icValidateWarning);
2116 int i;
2117 --- 636,642 ----
2118 default:
2119 sReport += icValidateWarningMsg;
2120 sReport += sSigName;
2121 ! sReport += " - Unknown Tag.\n";
2122 rv = icMaxStatus(rv, icValidateWarning);
2124 int i;
2125 ***************
2126 *** 644,650 ****
2127 if (m_szText[i]&0x80) {
2128 sReport += icValidateWarning;
2129 sReport += sSigName;
2130 ! sReport += " - Text do not contain 7bit data.\r\n";
2134 --- 644,650 ----
2135 if (m_szText[i]&0x80) {
2136 sReport += icValidateWarning;
2137 sReport += sSigName;
2138 ! sReport += " - Text do not contain 7bit data.\n";
2142 ***************
2143 *** 651,657 ****
2144 else {
2145 sReport += icValidateWarningMsg;
2146 sReport += sSigName;
2147 ! sReport += " - Empty Tag.\r\n";
2148 rv = icMaxStatus(rv, icValidateWarning);
2151 --- 651,657 ----
2152 else {
2153 sReport += icValidateWarningMsg;
2154 sReport += sSigName;
2155 ! sReport += " - Empty Tag.\n";
2156 rv = icMaxStatus(rv, icValidateWarning);
2159 ***************
2160 *** 941,947 ****
2161 if (m_szText && *m_szText)
2162 sDescription += m_szText;
2164 ! sDescription += "\"\r\n";
2168 --- 941,947 ----
2169 if (m_szText && *m_szText)
2170 sDescription += m_szText;
2172 ! sDescription += "\"\n";
2176 ***************
2177 *** 1101,1107 ****
2178 if (m_nScriptSize>67) {
2179 sReport += icValidateNonCompliantMsg;
2180 sReport += sSigName;
2181 ! sReport += " - ScriptCode count must not be greater than 67.\r\n";
2183 rv =icMaxStatus(rv, icValidateNonCompliant);
2185 --- 1101,1107 ----
2186 if (m_nScriptSize>67) {
2187 sReport += icValidateNonCompliantMsg;
2188 sReport += sSigName;
2189 ! sReport += " - ScriptCode count must not be greater than 67.\n";
2191 rv =icMaxStatus(rv, icValidateNonCompliant);
2193 ***************
2194 *** 1260,1266 ****
2195 CIccInfo Fmt;
2197 sDescription += Fmt.GetSigName(m_nSig);
2198 ! sDescription += "\r\n";
2202 --- 1260,1266 ----
2203 CIccInfo Fmt;
2205 sDescription += Fmt.GetSigName(m_nSig);
2206 ! sDescription += "\n";
2210 ***************
2211 *** 1320,1326 ****
2213 sReport += icValidateNonCompliantMsg;
2214 sReport += sSigName;
2215 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(m_nSig));
2216 sReport += buf;
2217 rv = icMaxStatus(rv, icValidateNonCompliant);
2219 --- 1320,1326 ----
2221 sReport += icValidateNonCompliantMsg;
2222 sReport += sSigName;
2223 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(m_nSig));
2224 sReport += buf;
2225 rv = icMaxStatus(rv, icValidateNonCompliant);
2227 ***************
2228 *** 1336,1342 ****
2230 sReport += icValidateNonCompliantMsg;
2231 sReport += sSigName;
2232 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\r\n", Info.GetSigName(m_nSig));
2233 sReport += buf;
2234 rv = icMaxStatus(rv, icValidateNonCompliant);
2236 --- 1336,1342 ----
2238 sReport += icValidateNonCompliantMsg;
2239 sReport += sSigName;
2240 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\n", Info.GetSigName(m_nSig));
2241 sReport += buf;
2242 rv = icMaxStatus(rv, icValidateNonCompliant);
2244 ***************
2245 *** 1355,1361 ****
2247 sReport += icValidateNonCompliantMsg;
2248 sReport += sSigName;
2249 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\r\n", Info.GetSigName(m_nSig));
2250 sReport += buf;
2251 rv = icMaxStatus(rv, icValidateNonCompliant);
2253 --- 1355,1361 ----
2255 sReport += icValidateNonCompliantMsg;
2256 sReport += sSigName;
2257 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\n", Info.GetSigName(m_nSig));
2258 sReport += buf;
2259 rv = icMaxStatus(rv, icValidateNonCompliant);
2261 ***************
2262 *** 1686,1692 ****
2264 sDescription.reserve(sDescription.size() + m_nSize*79);
2266 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\r\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2267 sDescription += buf;
2269 for (i=0; i<m_nSize; i++) {
2270 --- 1686,1692 ----
2272 sDescription.reserve(sDescription.size() + m_nSize*79);
2274 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2275 sDescription += buf;
2277 for (i=0; i<m_nSize; i++) {
2278 ***************
2279 *** 1717,1723 ****
2280 sDescription += buf;
2283 ! sDescription += "\r\n";
2285 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2287 --- 1717,1723 ----
2288 sDescription += buf;
2291 ! sDescription += "\n";
2293 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2295 ***************
2296 *** 2082,2088 ****
2297 if (!m_nSize) {
2298 sReport += icValidateWarningMsg;
2299 sReport += sSigName;
2300 ! sReport += " - Empty tag!\r\n";
2301 rv = icMaxStatus(rv, icValidateWarning);
2304 --- 2082,2088 ----
2305 if (!m_nSize) {
2306 sReport += icValidateWarningMsg;
2307 sReport += sSigName;
2308 ! sReport += " - Empty tag!\n";
2309 rv = icMaxStatus(rv, icValidateWarning);
2312 ***************
2313 *** 2092,2098 ****
2314 if (m_nDeviceCoords != nCoords) {
2315 sReport += icValidateNonCompliantMsg;
2316 sReport += sSigName;
2317 ! sReport += " - Incorrect number of device co-ordinates.\r\n";
2318 rv = icMaxStatus(rv, icValidateNonCompliant);
2321 --- 2092,2098 ----
2322 if (m_nDeviceCoords != nCoords) {
2323 sReport += icValidateNonCompliantMsg;
2324 sReport += sSigName;
2325 ! sReport += " - Incorrect number of device co-ordinates.\n";
2326 rv = icMaxStatus(rv, icValidateNonCompliant);
2329 ***************
2330 *** 2099,2105 ****
2331 else {
2332 sReport += icValidateWarningMsg;
2333 sReport += sSigName;
2334 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2335 rv = icMaxStatus(rv, icValidateWarning);
2338 --- 2099,2105 ----
2339 else {
2340 sReport += icValidateWarningMsg;
2341 sReport += sSigName;
2342 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2343 rv = icMaxStatus(rv, icValidateWarning);
2346 ***************
2347 *** 2285,2291 ****
2348 icChar buf[128];
2350 if (m_nSize == 1 ) {
2351 ! 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));
2352 sDescription += buf;
2354 else {
2355 --- 2285,2291 ----
2356 icChar buf[128];
2358 if (m_nSize == 1 ) {
2359 ! sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
2360 sDescription += buf;
2362 else {
2363 ***************
2364 *** 2293,2299 ****
2365 sDescription.reserve(sDescription.size() + m_nSize*79);
2367 for (i=0; i<m_nSize; i++) {
2368 ! 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));
2369 sDescription += buf;
2372 --- 2293,2299 ----
2373 sDescription.reserve(sDescription.size() + m_nSize*79);
2375 for (i=0; i<m_nSize; i++) {
2376 ! 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));
2377 sDescription += buf;
2380 ***************
2381 *** 2347,2353 ****
2382 if (!m_nSize) {
2383 sReport += icValidateWarningMsg;
2384 sReport += sSigName;
2385 ! sReport += " - Empty tag.\r\n";
2387 rv = icMaxStatus(rv, icValidateWarning);
2388 return rv;
2389 --- 2347,2353 ----
2390 if (!m_nSize) {
2391 sReport += icValidateWarningMsg;
2392 sReport += sSigName;
2393 ! sReport += " - Empty tag.\n";
2395 rv = icMaxStatus(rv, icValidateWarning);
2396 return rv;
2397 ***************
2398 *** 2553,2566 ****
2400 icUInt32Number i;
2401 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2402 ! sprintf(buf, "Number of Channels : %u\r\n", m_nChannels);
2403 sDescription += buf;
2405 ! sprintf(buf, "Colorant Encoding : %s\r\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2406 sDescription += buf;
2408 for (i=0; i<m_nChannels; i++) {
2409 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\r\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2410 sDescription += buf;
2413 --- 2553,2566 ----
2415 icUInt32Number i;
2416 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2417 ! sprintf(buf, "Number of Channels : %u\n", m_nChannels);
2418 sDescription += buf;
2420 ! sprintf(buf, "Colorant Encoding : %s\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2421 sDescription += buf;
2423 for (i=0; i<m_nChannels; i++) {
2424 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2425 sDescription += buf;
2428 ***************
2429 *** 2617,2623 ****
2430 if (m_nChannels!=3) {
2431 sReport += icValidateCriticalErrorMsg;
2432 sReport += sSigName;
2433 ! sReport += " - Number of device channels must be three.\r\n";
2434 rv = icMaxStatus(rv, icValidateCriticalError);
2437 --- 2617,2623 ----
2438 if (m_nChannels!=3) {
2439 sReport += icValidateCriticalErrorMsg;
2440 sReport += sSigName;
2441 ! sReport += " - Number of device channels must be three.\n";
2442 rv = icMaxStatus(rv, icValidateCriticalError);
2445 ***************
2446 *** 2629,2635 ****
2447 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2448 sReport += icValidateNonCompliantMsg;
2449 sReport += sSigName;
2450 ! sReport += " - Chromaticity data does not match specification.\r\n";
2451 rv = icMaxStatus(rv, icValidateNonCompliant);
2453 break;
2454 --- 2629,2635 ----
2455 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2456 sReport += icValidateNonCompliantMsg;
2457 sReport += sSigName;
2458 ! sReport += " - Chromaticity data does not match specification.\n";
2459 rv = icMaxStatus(rv, icValidateNonCompliant);
2461 break;
2462 ***************
2463 *** 2642,2648 ****
2464 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2465 sReport += icValidateNonCompliantMsg;
2466 sReport += sSigName;
2467 ! sReport += " - Chromaticity data does not match specification.\r\n";
2468 rv = icMaxStatus(rv, icValidateNonCompliant);
2470 break;
2471 --- 2642,2648 ----
2472 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2473 sReport += icValidateNonCompliantMsg;
2474 sReport += sSigName;
2475 ! sReport += " - Chromaticity data does not match specification.\n";
2476 rv = icMaxStatus(rv, icValidateNonCompliant);
2478 break;
2479 ***************
2480 *** 2655,2661 ****
2481 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2482 sReport += icValidateNonCompliantMsg;
2483 sReport += sSigName;
2484 ! sReport += " - Chromaticity data does not match specification.\r\n";
2485 rv = icMaxStatus(rv, icValidateNonCompliant);
2487 break;
2488 --- 2655,2661 ----
2489 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2490 sReport += icValidateNonCompliantMsg;
2491 sReport += sSigName;
2492 ! sReport += " - Chromaticity data does not match specification.\n";
2493 rv = icMaxStatus(rv, icValidateNonCompliant);
2495 break;
2496 ***************
2497 *** 2668,2674 ****
2498 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2499 sReport += icValidateNonCompliantMsg;
2500 sReport += sSigName;
2501 ! sReport += " - Chromaticity data does not match specification.\r\n";
2502 rv = icMaxStatus(rv, icValidateNonCompliant);
2504 break;
2505 --- 2668,2674 ----
2506 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2507 sReport += icValidateNonCompliantMsg;
2508 sReport += sSigName;
2509 ! sReport += " - Chromaticity data does not match specification.\n";
2510 rv = icMaxStatus(rv, icValidateNonCompliant);
2512 break;
2513 ***************
2514 *** 2678,2684 ****
2516 sReport += icValidateNonCompliantMsg;
2517 sReport += sSigName;
2518 ! sReport += " - Invalid colorant type encoding.\r\n";
2519 rv = icMaxStatus(rv, icValidateNonCompliant);
2522 --- 2678,2684 ----
2524 sReport += icValidateNonCompliantMsg;
2525 sReport += sSigName;
2526 ! sReport += " - Invalid colorant type encoding.\n";
2527 rv = icMaxStatus(rv, icValidateNonCompliant);
2530 ***************
2531 *** 2884,2892 ****
2533 if (m_nSize == 1 ) {
2534 if (Tsig==icSigS15Fixed16ArrayType)
2535 ! sprintf(buf, "Value = %.4lf\r\n", icFtoD(m_Num[0]));
2536 else
2537 ! sprintf(buf, "Value = %.4lf\r\n", icUFtoD(m_Num[0]));
2538 sDescription += buf;
2540 else {
2541 --- 2884,2892 ----
2543 if (m_nSize == 1 ) {
2544 if (Tsig==icSigS15Fixed16ArrayType)
2545 ! sprintf(buf, "Value = %.4lf\n", icFtoD(m_Num[0]));
2546 else
2547 ! sprintf(buf, "Value = %.4lf\n", icUFtoD(m_Num[0]));
2548 sDescription += buf;
2550 else {
2551 ***************
2552 *** 2893,2910 ****
2553 icUInt32Number i;
2555 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2556 ! sDescription += "Matrix Form:\r\n";
2557 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2559 ! sDescription += "\r\nArrayForm:\r\n";
2561 sDescription.reserve(sDescription.size() + m_nSize*79);
2563 for (i=0; i<m_nSize; i++) {
2564 if (Tsig==icSigS15Fixed16ArrayType)
2565 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icFtoD(m_Num[i]));
2566 else
2567 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icUFtoD(m_Num[i]));
2568 sDescription += buf;
2571 --- 2893,2910 ----
2572 icUInt32Number i;
2574 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2575 ! sDescription += "Matrix Form:\n";
2576 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2578 ! sDescription += "\nArrayForm:\n";
2580 sDescription.reserve(sDescription.size() + m_nSize*79);
2582 for (i=0; i<m_nSize; i++) {
2583 if (Tsig==icSigS15Fixed16ArrayType)
2584 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icFtoD(m_Num[i]));
2585 else
2586 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icUFtoD(m_Num[i]));
2587 sDescription += buf;
2590 ***************
2591 *** 3172,3178 ****
2592 icChar buf[128];
2594 if (m_nSize == 1 ) {
2595 ! sprintf(buf, "Value = %u (0x%x)\r\n", m_Num[0], m_Num[0]);
2596 sDescription += buf;
2598 else {
2599 --- 3172,3178 ----
2600 icChar buf[128];
2602 if (m_nSize == 1 ) {
2603 ! sprintf(buf, "Value = %u (0x%x)\n", m_Num[0], m_Num[0]);
2604 sDescription += buf;
2606 else {
2607 ***************
2608 *** 3180,3186 ****
2609 sDescription.reserve(sDescription.size() + m_nSize*79);
2611 for (i=0; i<m_nSize; i++) {
2612 ! sprintf(buf, "Value[%u] = %u (0x%x)\r\n", i, m_Num[i], m_Num[i]);
2613 sDescription += buf;
2616 --- 3180,3186 ----
2617 sDescription.reserve(sDescription.size() + m_nSize*79);
2619 for (i=0; i<m_nSize; i++) {
2620 ! sprintf(buf, "Value[%u] = %u (0x%x)\n", i, m_Num[i], m_Num[i]);
2621 sDescription += buf;
2624 ***************
2625 *** 3374,3388 ****
2626 CIccInfo Fmt;
2627 icChar buf[128];
2629 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\r\n";
2630 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n",
2631 icFtoD(m_Data.backing.X),
2632 icFtoD(m_Data.backing.Y),
2633 icFtoD(m_Data.backing.Z));
2634 sDescription += buf;
2635 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\r\n";
2636 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\r\n";
2637 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\r\n";
2641 --- 3374,3388 ----
2642 CIccInfo Fmt;
2643 icChar buf[128];
2645 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\n";
2646 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
2647 icFtoD(m_Data.backing.X),
2648 icFtoD(m_Data.backing.Y),
2649 icFtoD(m_Data.backing.Z));
2650 sDescription += buf;
2651 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\n";
2652 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\n";
2653 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\n";
2657 ***************
2658 *** 3416,3422 ****
2659 default:
2660 sReport += icValidateNonCompliantMsg;
2661 sReport += sSigName;
2662 ! sReport += " - Invalid standard observer encoding.\r\n";
2663 rv = icMaxStatus(rv, icValidateNonCompliant);
2666 --- 3416,3422 ----
2667 default:
2668 sReport += icValidateNonCompliantMsg;
2669 sReport += sSigName;
2670 ! sReport += " - Invalid standard observer encoding.\n";
2671 rv = icMaxStatus(rv, icValidateNonCompliant);
2674 ***************
2675 *** 3429,3435 ****
2676 default:
2677 sReport += icValidateNonCompliantMsg;
2678 sReport += sSigName;
2679 ! sReport += " - Invalid measurement geometry encoding.\r\n";
2680 rv = icMaxStatus(rv, icValidateNonCompliant);
2683 --- 3429,3435 ----
2684 default:
2685 sReport += icValidateNonCompliantMsg;
2686 sReport += sSigName;
2687 ! sReport += " - Invalid measurement geometry encoding.\n";
2688 rv = icMaxStatus(rv, icValidateNonCompliant);
2691 ***************
2692 *** 3448,3454 ****
2693 default:
2694 sReport += icValidateNonCompliantMsg;
2695 sReport += sSigName;
2696 ! sReport += " - Invalid standard illuminant encoding.\r\n";
2697 rv = icMaxStatus(rv, icValidateNonCompliant);
2700 --- 3448,3454 ----
2701 default:
2702 sReport += icValidateNonCompliantMsg;
2703 sReport += sSigName;
2704 ! sReport += " - Invalid standard illuminant encoding.\n";
2705 rv = icMaxStatus(rv, icValidateNonCompliant);
2708 ***************
2709 *** 3902,3910 ****
2711 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2712 if (i!=m_Strings->begin())
2713 ! sDescription += "\r\n";
2715 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\r\n",
2716 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2717 i->m_nCountryCode>>8, i->m_nCountryCode);
2719 --- 3902,3910 ----
2721 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2722 if (i!=m_Strings->begin())
2723 ! sDescription += "\n";
2725 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\n",
2726 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2727 i->m_nCountryCode>>8, i->m_nCountryCode);
2729 ***************
2730 *** 3919,3925 ****
2731 i->GetAnsi(szBuf, nSize);
2732 sDescription += "\"";
2733 sDescription += szBuf;
2734 ! sDescription += "\"\r\n";
2738 --- 3919,3925 ----
2739 i->GetAnsi(szBuf, nSize);
2740 sDescription += "\"";
2741 sDescription += szBuf;
2742 ! sDescription += "\"\n";
2746 ***************
2747 *** 3948,3954 ****
2748 if (!m_Strings->size()) {
2749 sReport += icValidateWarningMsg;
2750 sReport += sSigName;
2751 ! sReport += " - Empty tag!\r\n";
2752 rv = icMaxStatus(rv, icValidateWarning);
2755 --- 3948,3954 ----
2756 if (!m_Strings->size()) {
2757 sReport += icValidateWarningMsg;
2758 sReport += sSigName;
2759 ! sReport += " - Empty tag!\n";
2760 rv = icMaxStatus(rv, icValidateWarning);
2763 ***************
2764 *** 4246,4260 ****
2766 icChar buf[128];
2768 ! sDescription = "\r\nData:\r\n";
2770 if (IsTypeAscii()) {
2771 ! sprintf(buf, "%s\r\n", (icChar*)m_pData);
2772 sDescription += buf;
2774 else
2775 for (int i = 0; i<(int)m_nSize; i++) {
2776 ! sprintf(buf, "%d\r\n", m_pData[i]);
2777 sDescription += buf;
2780 --- 4246,4260 ----
2782 icChar buf[128];
2784 ! sDescription = "\nData:\n";
2786 if (IsTypeAscii()) {
2787 ! sprintf(buf, "%s\n", (icChar*)m_pData);
2788 sDescription += buf;
2790 else
2791 for (int i = 0; i<(int)m_nSize; i++) {
2792 ! sprintf(buf, "%d\n", m_pData[i]);
2793 sDescription += buf;
2796 ***************
2797 *** 4312,4318 ****
2798 default:
2799 sReport += icValidateNonCompliantMsg;
2800 sReport += sSigName;
2801 ! sReport += " - Invalid data flag encoding.\r\n";
2802 rv = icMaxStatus(rv, icValidateNonCompliant);
2805 --- 4312,4318 ----
2806 default:
2807 sReport += icValidateNonCompliantMsg;
2808 sReport += sSigName;
2809 ! sReport += " - Invalid data flag encoding.\n";
2810 rv = icMaxStatus(rv, icValidateNonCompliant);
2813 ***************
2814 *** 4477,4487 ****
2815 icChar buf[128];
2817 sDescription = "Date = ";
2818 ! sprintf(buf, "%u-%u-%u\r\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2819 sDescription += buf;
2821 sDescription += "Time = ";
2822 ! sprintf(buf, "%u:%u:%u\r\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2823 sDescription += buf;
2826 --- 4477,4487 ----
2827 icChar buf[128];
2829 sDescription = "Date = ";
2830 ! sprintf(buf, "%u-%u-%u\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2831 sDescription += buf;
2833 sDescription += "Time = ";
2834 ! sprintf(buf, "%u:%u:%u\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2835 sDescription += buf;
2838 ***************
2839 *** 4697,4708 ****
2841 icChar buf[128];
2843 ! sprintf(buf, "Colorant Count : %u\r\n", m_nCount);
2844 sDescription += buf;
2845 ! sDescription += "Order of Colorants:\r\n";
2847 for (int i=0; i<(int)m_nCount; i++) {
2848 ! sprintf(buf, "%u\r\n", m_pData[i]);
2849 sDescription += buf;
2852 --- 4697,4708 ----
2854 icChar buf[128];
2856 ! sprintf(buf, "Colorant Count : %u\n", m_nCount);
2857 sDescription += buf;
2858 ! sDescription += "Order of Colorants:\n";
2860 for (int i=0; i<(int)m_nCount; i++) {
2861 ! sprintf(buf, "%u\n", m_pData[i]);
2862 sDescription += buf;
2865 ***************
2866 *** 4757,4763 ****
2867 if (!pProfile) {
2868 sReport += icValidateWarningMsg;
2869 sReport += sSigName;
2870 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2871 rv = icMaxStatus(rv, icValidateWarning);
2872 return rv;
2874 --- 4757,4763 ----
2875 if (!pProfile) {
2876 sReport += icValidateWarningMsg;
2877 sReport += sSigName;
2878 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2879 rv = icMaxStatus(rv, icValidateWarning);
2880 return rv;
2882 ***************
2883 *** 4765,4771 ****
2884 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2885 sReport += icValidateNonCompliantMsg;
2886 sReport += sSigName;
2887 ! sReport += " - Incorrect number of colorants.\r\n";
2888 rv = icMaxStatus(rv, icValidateNonCompliant);
2891 --- 4765,4771 ----
2892 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2893 sReport += icValidateNonCompliantMsg;
2894 sReport += sSigName;
2895 ! sReport += " - Incorrect number of colorants.\n";
2896 rv = icMaxStatus(rv, icValidateNonCompliant);
2899 ***************
2900 *** 4977,4983 ****
2901 icUInt32Number i, nLen, nMaxLen=0;
2902 icFloatNumber Lab[3];
2904 ! sprintf(buf, "BEGIN_COLORANTS %u\r\n", m_nCount);
2905 sDescription += buf;
2907 for (i=0; i<m_nCount; i++) {
2908 --- 4977,4983 ----
2909 icUInt32Number i, nLen, nMaxLen=0;
2910 icFloatNumber Lab[3];
2912 ! sprintf(buf, "BEGIN_COLORANTS %u\n", m_nCount);
2913 sDescription += buf;
2915 for (i=0; i<m_nCount; i++) {
2916 ***************
2917 *** 4988,4998 ****
2918 sDescription += "# NAME ";
2920 if (m_PCS == icSigXYZData) {
2921 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\r\n");
2922 sDescription += buf;
2924 else {
2925 ! sprintf(buf, "Lab_L Lab_a Lab_b\r\n");
2926 sDescription += buf;
2928 for (i=0; i<m_nCount; i++) {
2929 --- 4988,4998 ----
2930 sDescription += "# NAME ";
2932 if (m_PCS == icSigXYZData) {
2933 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\n");
2934 sDescription += buf;
2936 else {
2937 ! sprintf(buf, "Lab_L Lab_a Lab_b\n");
2938 sDescription += buf;
2940 for (i=0; i<m_nCount; i++) {
2941 ***************
2942 *** 5003,5009 ****
2943 sDescription += buf;
2945 if (m_PCS == icSigXYZData) {
2946 ! 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]));
2947 sDescription += buf;
2949 else {
2950 --- 5003,5009 ----
2951 sDescription += buf;
2953 if (m_PCS == icSigXYZData) {
2954 ! 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]));
2955 sDescription += buf;
2957 else {
2958 ***************
2959 *** 5011,5017 ****
2960 Lab[1] = icU16toF(m_pData[i].data[1]);
2961 Lab[2] = icU16toF(m_pData[i].data[2]);
2962 icLabFromPcs(Lab);
2963 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\r\n", Lab[0], Lab[1], Lab[2]);
2964 sDescription += buf;
2967 --- 5011,5017 ----
2968 Lab[1] = icU16toF(m_pData[i].data[1]);
2969 Lab[2] = icU16toF(m_pData[i].data[2]);
2970 icLabFromPcs(Lab);
2971 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\n", Lab[0], Lab[1], Lab[2]);
2972 sDescription += buf;
2975 ***************
2976 *** 5066,5072 ****
2977 if (!pProfile) {
2978 sReport += icValidateWarningMsg;
2979 sReport += sSigName;
2980 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2981 rv = icMaxStatus(rv, icValidateWarning);
2982 return rv;
2984 --- 5066,5072 ----
2985 if (!pProfile) {
2986 sReport += icValidateWarningMsg;
2987 sReport += sSigName;
2988 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2989 rv = icMaxStatus(rv, icValidateWarning);
2990 return rv;
2992 ***************
2993 *** 5076,5082 ****
2994 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
2995 sReport += icValidateNonCompliantMsg;
2996 sReport += sSigName;
2997 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\r\n";
2998 rv = icMaxStatus(rv, icValidateNonCompliant);
3001 --- 5076,5082 ----
3002 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
3003 sReport += icValidateNonCompliantMsg;
3004 sReport += sSigName;
3005 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\n";
3006 rv = icMaxStatus(rv, icValidateNonCompliant);
3009 ***************
3010 *** 5084,5090 ****
3011 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3012 sReport += icValidateNonCompliantMsg;
3013 sReport += sSigName;
3014 ! sReport += " - Incorrect number of colorants.\r\n";
3015 rv = icMaxStatus(rv, icValidateNonCompliant);
3018 --- 5084,5090 ----
3019 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3020 sReport += icValidateNonCompliantMsg;
3021 sReport += sSigName;
3022 ! sReport += " - Incorrect number of colorants.\n";
3023 rv = icMaxStatus(rv, icValidateNonCompliant);
3026 ***************
3027 *** 5261,5273 ****
3028 icChar buf[128];
3029 CIccInfo Fmt;
3031 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
3032 icFtoD(m_XYZIllum.X),
3033 icFtoD(m_XYZIllum.Y),
3034 icFtoD(m_XYZIllum.Z));
3035 sDescription += buf;
3037 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
3038 icFtoD(m_XYZSurround.X),
3039 icFtoD(m_XYZSurround.Y),
3040 icFtoD(m_XYZSurround.Z));
3041 --- 5261,5273 ----
3042 icChar buf[128];
3043 CIccInfo Fmt;
3045 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3046 icFtoD(m_XYZIllum.X),
3047 icFtoD(m_XYZIllum.Y),
3048 icFtoD(m_XYZIllum.Z));
3049 sDescription += buf;
3051 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3052 icFtoD(m_XYZSurround.X),
3053 icFtoD(m_XYZSurround.Y),
3054 icFtoD(m_XYZSurround.Z));
3055 ***************
3056 *** 5276,5282 ****
3057 sDescription += "Illuminant Type: ";
3059 sDescription += Fmt.GetIlluminantName(m_illumType);
3060 ! sDescription += "\r\n";
3064 --- 5276,5282 ----
3065 sDescription += "Illuminant Type: ";
3067 sDescription += Fmt.GetIlluminantName(m_illumType);
3068 ! sDescription += "\n";
3072 ***************
3073 *** 5800,5831 ****
3074 icChar buf[128], buf2[28];
3075 icUInt32Number count=0;
3077 ! sprintf(buf, "Number of Profile Description Structures: %u\r\n", m_Descriptions->size());
3078 sDescription += buf;
3080 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3081 ! sDescription += "\r\n";
3083 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\r\n", count+1);
3084 sDescription += buf;
3086 ! sprintf(buf, "Device Manufacturer Signature: %s\r\n", icGetSig(buf2, i->m_deviceMfg, false));
3087 sDescription += buf;
3089 ! sprintf(buf, "Device Model Signature: %s\r\n", icGetSig(buf2, i->m_deviceModel, false));
3090 sDescription += buf;
3092 ! sprintf(buf, "Device Attributes: %08x%08x\r\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3093 sDescription += buf;
3095 ! sprintf(buf, "Device Technology Signature: %s\r\n", icGetSig(buf2, i->m_technology, false));
3096 sDescription += buf;
3098 ! sprintf(buf, "Description of device manufacturer: \r\n");
3099 sDescription += buf;
3100 i->m_deviceMfgDesc.Describe(sDescription);
3102 ! sprintf(buf, "Description of device model: \r\n");
3103 sDescription += buf;
3104 i->m_deviceModelDesc.Describe(sDescription);
3106 --- 5800,5831 ----
3107 icChar buf[128], buf2[28];
3108 icUInt32Number count=0;
3110 ! sprintf(buf, "Number of Profile Description Structures: %u\n", m_Descriptions->size());
3111 sDescription += buf;
3113 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3114 ! sDescription += "\n";
3116 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\n", count+1);
3117 sDescription += buf;
3119 ! sprintf(buf, "Device Manufacturer Signature: %s\n", icGetSig(buf2, i->m_deviceMfg, false));
3120 sDescription += buf;
3122 ! sprintf(buf, "Device Model Signature: %s\n", icGetSig(buf2, i->m_deviceModel, false));
3123 sDescription += buf;
3125 ! sprintf(buf, "Device Attributes: %08x%08x\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3126 sDescription += buf;
3128 ! sprintf(buf, "Device Technology Signature: %s\n", icGetSig(buf2, i->m_technology, false));
3129 sDescription += buf;
3131 ! sprintf(buf, "Description of device manufacturer: \n");
3132 sDescription += buf;
3133 i->m_deviceMfgDesc.Describe(sDescription);
3135 ! sprintf(buf, "Description of device model: \n");
3136 sDescription += buf;
3137 i->m_deviceModelDesc.Describe(sDescription);
3139 ***************
3140 *** 5886,5892 ****
3142 sReport += icValidateNonCompliantMsg;
3143 sReport += sSigName;
3144 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(i->m_technology));
3145 sReport += buf;
3146 rv = icMaxStatus(rv, icValidateNonCompliant);
3148 --- 5886,5892 ----
3150 sReport += icValidateNonCompliantMsg;
3151 sReport += sSigName;
3152 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(i->m_technology));
3153 sReport += buf;
3154 rv = icMaxStatus(rv, icValidateNonCompliant);
3156 ***************
3157 *** 5896,5902 ****
3158 sReport += icValidateNonCompliantMsg;
3159 sReport += sSigName;
3161 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\r\n";
3163 rv = icMaxStatus(rv, icValidateNonCompliant);
3165 --- 5896,5902 ----
3166 sReport += icValidateNonCompliantMsg;
3167 sReport += sSigName;
3169 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\n";
3171 rv = icMaxStatus(rv, icValidateNonCompliant);
3173 ***************
3174 *** 5905,5911 ****
3175 sReport += icValidateNonCompliantMsg;
3176 sReport += sSigName;
3178 ! sReport += " Contains non-aligned deviceModelDesc text tag information\r\n";
3180 rv = icMaxStatus(rv, icValidateNonCompliant);
3182 --- 5905,5911 ----
3183 sReport += icValidateNonCompliantMsg;
3184 sReport += sSigName;
3186 ! sReport += " Contains non-aligned deviceModelDesc text tag information\n";
3188 rv = icMaxStatus(rv, icValidateNonCompliant);
3190 ***************
3191 *** 6174,6198 ****
3192 CIccResponse16List::iterator j;
3194 sDescription += "Measurement Unit: ";
3195 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\r\n";
3198 for (int i=0; i<m_nChannels; i++) {
3199 nResponseList = m_Response16ListArray[i];
3201 ! sDescription += "\r\n";
3202 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i+1,
3203 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3204 sDescription += buf;
3206 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\r\n", i+1, nResponseList.size());
3207 sDescription += buf;
3209 ! sprintf(buf, "Measurement Data for Channel-%u follows:\r\n", i+1);
3210 sDescription += buf;
3212 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3213 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\r\n", j->deviceCode, icFtoD(j->measurementValue));
3214 sDescription += buf;
3217 --- 6174,6198 ----
3218 CIccResponse16List::iterator j;
3220 sDescription += "Measurement Unit: ";
3221 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\n";
3224 for (int i=0; i<m_nChannels; i++) {
3225 nResponseList = m_Response16ListArray[i];
3227 ! sDescription += "\n";
3228 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\n", i+1,
3229 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3230 sDescription += buf;
3232 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\n", i+1, nResponseList.size());
3233 sDescription += buf;
3235 ! sprintf(buf, "Measurement Data for Channel-%u follows:\n", i+1);
3236 sDescription += buf;
3238 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3239 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\n", j->deviceCode, icFtoD(j->measurementValue));
3240 sDescription += buf;
3243 ***************
3244 *** 6234,6240 ****
3245 default:
3246 sReport += icValidateNonCompliantMsg;
3247 sReport += sSigName;
3248 ! sReport += " - Unknown measurement unit signature.\r\n";
3249 rv = icMaxStatus(rv, icValidateNonCompliant);
3252 --- 6234,6240 ----
3253 default:
3254 sReport += icValidateNonCompliantMsg;
3255 sReport += sSigName;
3256 ! sReport += " - Unknown measurement unit signature.\n";
3257 rv = icMaxStatus(rv, icValidateNonCompliant);
3260 ***************
3261 *** 6241,6247 ****
3262 if (!m_nChannels) {
3263 sReport += icValidateNonCompliantMsg;
3264 sReport += sSigName;
3265 ! sReport += " - Incorrect number of channels.\r\n";
3266 rv = icMaxStatus(rv, icValidateNonCompliant);
3267 return rv;
3269 --- 6241,6247 ----
3270 if (!m_nChannels) {
3271 sReport += icValidateNonCompliantMsg;
3272 sReport += sSigName;
3273 ! sReport += " - Incorrect number of channels.\n";
3274 rv = icMaxStatus(rv, icValidateNonCompliant);
3275 return rv;
3277 ***************
3278 *** 6479,6495 ****
3279 CIccResponseCurveSet::iterator i;
3280 icChar buf[128];
3282 ! sprintf(buf, "Number of Channels: %u\r\n", m_nChannels);
3283 sDescription += buf;
3285 ! sprintf(buf, "Number of Measurement Types used: %u\r\n", m_ResponseCurves->size());
3286 sDescription += buf;
3288 int count = 0;
3289 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3290 ! sDescription += "\r\n";
3292 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\r\n", count+1);
3293 sDescription += buf;
3295 i->Describe(sDescription);
3296 --- 6479,6495 ----
3297 CIccResponseCurveSet::iterator i;
3298 icChar buf[128];
3300 ! sprintf(buf, "Number of Channels: %u\n", m_nChannels);
3301 sDescription += buf;
3303 ! sprintf(buf, "Number of Measurement Types used: %u\n", m_ResponseCurves->size());
3304 sDescription += buf;
3306 int count = 0;
3307 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3308 ! sDescription += "\n";
3310 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\n", count+1);
3311 sDescription += buf;
3313 i->Describe(sDescription);
3314 ***************
3315 *** 6658,6664 ****
3316 if (!pProfile) {
3317 sReport += icValidateWarningMsg;
3318 sReport += sSigName;
3319 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3320 rv = icMaxStatus(rv, icValidateWarning);
3321 return rv;
3323 --- 6658,6664 ----
3324 if (!pProfile) {
3325 sReport += icValidateWarningMsg;
3326 sReport += sSigName;
3327 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3328 rv = icMaxStatus(rv, icValidateWarning);
3329 return rv;
3331 ***************
3332 *** 6666,6678 ****
3333 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3334 sReport += icValidateWarningMsg;
3335 sReport += sSigName;
3336 ! sReport += " - Incorrect number of channels.\r\n";
3339 if (!GetNumResponseCurveTypes()) {
3340 sReport += icValidateWarningMsg;
3341 sReport += sSigName;
3342 ! sReport += " - Empty Tag!.\r\n";
3343 rv = icMaxStatus(rv, icValidateWarning);
3345 else {
3346 --- 6666,6678 ----
3347 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3348 sReport += icValidateWarningMsg;
3349 sReport += sSigName;
3350 ! sReport += " - Incorrect number of channels.\n";
3353 if (!GetNumResponseCurveTypes()) {
3354 sReport += icValidateWarningMsg;
3355 sReport += sSigName;
3356 ! sReport += " - Empty Tag!.\n";
3357 rv = icMaxStatus(rv, icValidateWarning);
3359 else {
3360 *** misc/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Mon Aug 20 22:05:00 2007
3361 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Fri Jan 25 14:23:09 2008
3362 ***************
3363 *** 323,345 ****
3364 icChar buf[128], *ptr;
3366 if (!m_nSize) {
3367 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3368 sDescription += buf;
3369 ! sDescription += "Y = X\r\n";
3371 else if (m_nSize==1) {
3372 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3373 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3374 sDescription += buf;
3375 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3376 sDescription += buf;
3378 else {
3379 int i;
3381 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\r\n");
3382 sDescription += buf;
3383 ! sDescription += "IN OUT\r\n";
3385 for (i=0; i<(int)m_nSize; i++) {
3386 ptr = buf;
3387 --- 323,345 ----
3388 icChar buf[128], *ptr;
3390 if (!m_nSize) {
3391 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3392 sDescription += buf;
3393 ! sDescription += "Y = X\n";
3395 else if (m_nSize==1) {
3396 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3397 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3398 sDescription += buf;
3399 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3400 sDescription += buf;
3402 else {
3403 int i;
3405 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\n");
3406 sDescription += buf;
3407 ! sDescription += "IN OUT\n";
3409 for (i=0; i<(int)m_nSize; i++) {
3410 ptr = buf;
3411 ***************
3412 *** 354,365 ****
3414 ptr += strlen(ptr);
3416 ! strcpy(ptr, "\r\n");
3418 sDescription += buf;
3421 ! sDescription += "\r\n";
3425 --- 354,365 ----
3427 ptr += strlen(ptr);
3429 ! strcpy(ptr, "\n");
3431 sDescription += buf;
3434 ! sDescription += "\n";
3438 ***************
3439 *** 383,405 ****
3440 icChar buf[128], *ptr;
3442 if (!m_nSize) {
3443 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3444 sDescription += buf;
3445 ! sDescription += "Y = X\r\n";
3447 else if (m_nSize==1) {
3448 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3449 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3450 sDescription += buf;
3451 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3452 sDescription += buf;
3454 else {
3455 int i;
3457 ! sprintf(buf, "BEGIN_LUT %s 1 1\r\n", szName);
3458 sDescription += buf;
3459 ! sDescription += "IN OUT\r\n";
3461 sDescription.reserve(sDescription.size() + m_nSize * 20);
3463 --- 383,405 ----
3464 icChar buf[128], *ptr;
3466 if (!m_nSize) {
3467 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3468 sDescription += buf;
3469 ! sDescription += "Y = X\n";
3471 else if (m_nSize==1) {
3472 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3473 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3474 sDescription += buf;
3475 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3476 sDescription += buf;
3478 else {
3479 int i;
3481 ! sprintf(buf, "BEGIN_LUT %s 1 1\n", szName);
3482 sDescription += buf;
3483 ! sDescription += "IN OUT\n";
3485 sDescription.reserve(sDescription.size() + m_nSize * 20);
3487 ***************
3488 *** 416,427 ****
3490 ptr += strlen(ptr);
3492 ! strcpy(ptr, "\r\n");
3494 sDescription += buf;
3497 ! sDescription += "\r\n";
3501 --- 416,427 ----
3503 ptr += strlen(ptr);
3505 ! strcpy(ptr, "\n");
3507 sDescription += buf;
3510 ! sDescription += "\n";
3514 ***************
3515 *** 614,620 ****
3516 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3517 sReport += icValidateWarningMsg;
3518 sReport += sSigName;
3519 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3520 rv = icMaxStatus(rv, icValidateWarning);
3523 --- 614,620 ----
3524 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3525 sReport += icValidateWarningMsg;
3526 sReport += sSigName;
3527 ! sReport += " - Curve cannot be accurately inverted.\n";
3528 rv = icMaxStatus(rv, icValidateWarning);
3531 ***************
3532 *** 822,877 ****
3534 icChar buf[128];
3536 ! sprintf(buf, "FunctionType: %04Xh\r\n", m_nFunctionType);
3537 sDescription += buf;
3539 switch(m_nFunctionType) {
3540 case 0x0000:
3541 ! sprintf(buf, "Y = X ^ %.4lf\r\n", icFtoD(m_Param[0]));
3542 sDescription += buf;
3543 return;
3545 case 0x0001:
3546 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\r\n",
3547 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3548 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3549 sDescription += buf;
3551 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\r\n",
3552 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3553 sDescription += buf;
3554 return;
3556 case 0x0002:
3557 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\r\n",
3558 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3559 icFtoD(m_Param[3]),
3560 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3561 sDescription += buf;
3563 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\r\n", icFtoD(m_Param[3]),
3564 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3565 sDescription += buf;
3566 return;
3568 case 0x0003:
3569 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\r\n",
3570 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3571 icFtoD(m_Param[4]));
3572 sDescription += buf;
3574 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\r\n",
3575 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3576 sDescription += buf;
3577 return;
3579 case 0x0004:
3580 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\r\n",
3581 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3582 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3583 sDescription += buf;
3585 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\r\n",
3586 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3587 sDescription += buf;
3588 return;
3589 --- 822,877 ----
3591 icChar buf[128];
3593 ! sprintf(buf, "FunctionType: %04Xh\n", m_nFunctionType);
3594 sDescription += buf;
3596 switch(m_nFunctionType) {
3597 case 0x0000:
3598 ! sprintf(buf, "Y = X ^ %.4lf\n", icFtoD(m_Param[0]));
3599 sDescription += buf;
3600 return;
3602 case 0x0001:
3603 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\n",
3604 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3605 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3606 sDescription += buf;
3608 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\n",
3609 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3610 sDescription += buf;
3611 return;
3613 case 0x0002:
3614 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\n",
3615 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3616 icFtoD(m_Param[3]),
3617 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3618 sDescription += buf;
3620 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\n", icFtoD(m_Param[3]),
3621 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3622 sDescription += buf;
3623 return;
3625 case 0x0003:
3626 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\n",
3627 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3628 icFtoD(m_Param[4]));
3629 sDescription += buf;
3631 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\n",
3632 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3633 sDescription += buf;
3634 return;
3636 case 0x0004:
3637 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\n",
3638 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3639 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3640 sDescription += buf;
3642 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\n",
3643 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3644 sDescription += buf;
3645 return;
3646 ***************
3647 *** 878,888 ****
3649 default:
3650 int i;
3651 ! sprintf(buf, "Unknown Function with %d parameters:\r\n");
3652 sDescription += buf;
3654 for (i=0; i<m_nNumParam; i++) {
3655 ! sprintf(buf, "Param[%d] = %.4lf\r\n", i, icFtoD(m_Param[i]));
3656 sDescription += buf;
3659 --- 878,888 ----
3661 default:
3662 int i;
3663 ! sprintf(buf, "Unknown Function with %d parameters:\n", m_nNumParam);
3664 sDescription += buf;
3666 for (i=0; i<m_nNumParam; i++) {
3667 ! sprintf(buf, "Param[%d] = %.4lf\n", i, icFtoD(m_Param[i]));
3668 sDescription += buf;
3671 ***************
3672 *** 907,916 ****
3674 icChar buf[128];
3676 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3677 sDescription += buf;
3678 Describe(sDescription);
3679 ! sDescription += "\r\n";
3683 --- 907,916 ----
3685 icChar buf[128];
3687 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3688 sDescription += buf;
3689 Describe(sDescription);
3690 ! sDescription += "\n";
3694 ***************
3695 *** 1106,1112 ****
3696 if (m_nReserved2!=0) {
3697 sReport += icValidateNonCompliantMsg;
3698 sReport += sSigName;
3699 ! sReport += " - Reserved Value must be zero.\r\n";
3701 rv = icMaxStatus(rv, icValidateNonCompliant);
3703 --- 1106,1112 ----
3704 if (m_nReserved2!=0) {
3705 sReport += icValidateNonCompliantMsg;
3706 sReport += sSigName;
3707 ! sReport += " - Reserved Value must be zero.\n";
3709 rv = icMaxStatus(rv, icValidateNonCompliant);
3711 ***************
3712 *** 1116,1122 ****
3713 if (m_nNumParam!=1) {
3714 sReport += icValidateCriticalErrorMsg;
3715 sReport += sSigName;
3716 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3717 rv = icMaxStatus(rv, icValidateCriticalError);
3719 break;
3720 --- 1116,1122 ----
3721 if (m_nNumParam!=1) {
3722 sReport += icValidateCriticalErrorMsg;
3723 sReport += sSigName;
3724 ! sReport += " - Number of parameters inconsistent with function type.\n";
3725 rv = icMaxStatus(rv, icValidateCriticalError);
3727 break;
3728 ***************
3729 *** 1125,1131 ****
3730 if (m_nNumParam!=3) {
3731 sReport += icValidateCriticalErrorMsg;
3732 sReport += sSigName;
3733 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3734 rv = icMaxStatus(rv, icValidateCriticalError);
3736 break;
3737 --- 1125,1131 ----
3738 if (m_nNumParam!=3) {
3739 sReport += icValidateCriticalErrorMsg;
3740 sReport += sSigName;
3741 ! sReport += " - Number of parameters inconsistent with function type.\n";
3742 rv = icMaxStatus(rv, icValidateCriticalError);
3744 break;
3745 ***************
3746 *** 1134,1140 ****
3747 if (m_nNumParam!=4) {
3748 sReport += icValidateCriticalErrorMsg;
3749 sReport += sSigName;
3750 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3751 rv = icMaxStatus(rv, icValidateCriticalError);
3753 break;
3754 --- 1134,1140 ----
3755 if (m_nNumParam!=4) {
3756 sReport += icValidateCriticalErrorMsg;
3757 sReport += sSigName;
3758 ! sReport += " - Number of parameters inconsistent with function type.\n";
3759 rv = icMaxStatus(rv, icValidateCriticalError);
3761 break;
3762 ***************
3763 *** 1143,1149 ****
3764 if (m_nNumParam!=5) {
3765 sReport += icValidateCriticalErrorMsg;
3766 sReport += sSigName;
3767 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3768 rv = icMaxStatus(rv, icValidateCriticalError);
3770 break;
3771 --- 1143,1149 ----
3772 if (m_nNumParam!=5) {
3773 sReport += icValidateCriticalErrorMsg;
3774 sReport += sSigName;
3775 ! sReport += " - Number of parameters inconsistent with function type.\n";
3776 rv = icMaxStatus(rv, icValidateCriticalError);
3778 break;
3779 ***************
3780 *** 1152,1158 ****
3781 if (m_nNumParam!=7) {
3782 sReport += icValidateCriticalErrorMsg;
3783 sReport += sSigName;
3784 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3785 rv = icMaxStatus(rv, icValidateCriticalError);
3787 break;
3788 --- 1152,1158 ----
3789 if (m_nNumParam!=7) {
3790 sReport += icValidateCriticalErrorMsg;
3791 sReport += sSigName;
3792 ! sReport += " - Number of parameters inconsistent with function type.\n";
3793 rv = icMaxStatus(rv, icValidateCriticalError);
3795 break;
3796 ***************
3797 *** 1160,1166 ****
3798 default:
3799 sReport += icValidateCriticalErrorMsg;
3800 sReport += sSigName;
3801 ! sReport += " - Unknown function type.\r\n";
3802 rv = icMaxStatus(rv, icValidateCriticalError);
3805 --- 1160,1166 ----
3806 default:
3807 sReport += icValidateCriticalErrorMsg;
3808 sReport += sSigName;
3809 ! sReport += " - Unknown function type.\n";
3810 rv = icMaxStatus(rv, icValidateCriticalError);
3813 ***************
3814 *** 1170,1176 ****
3815 if (lval>0.0 || uval<1.0) {
3816 sReport += icValidateWarningMsg;
3817 sReport += sSigName;
3818 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3819 rv = icMaxStatus(rv, icValidateWarning);
3822 --- 1170,1176 ----
3823 if (lval>0.0 || uval<1.0) {
3824 sReport += icValidateWarningMsg;
3825 sReport += sSigName;
3826 ! sReport += " - Curve cannot be accurately inverted.\n";
3827 rv = icMaxStatus(rv, icValidateWarning);
3830 ***************
3831 *** 1255,1286 ****
3833 icChar buf[128];
3835 ! sprintf(buf, "BEGIN_MATRIX %s\r\n", szName);
3836 sDescription += buf;
3838 if (!m_bUseConstants) {
3839 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3840 m_e[0], m_e[1], m_e[2]);
3841 sDescription += buf;
3842 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3843 m_e[3], m_e[4], m_e[5]);
3844 sDescription += buf;
3845 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3846 m_e[6], m_e[7], m_e[8]);
3847 sDescription += buf;
3849 else {
3850 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3851 m_e[0], m_e[1], m_e[2], m_e[9]);
3852 sDescription += buf;
3853 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3854 m_e[3], m_e[4], m_e[5], m_e[10]);
3855 sDescription += buf;
3856 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3857 m_e[6], m_e[7], m_e[8], m_e[11]);
3858 sDescription += buf;
3860 ! sDescription += "\r\n";
3864 --- 1255,1286 ----
3866 icChar buf[128];
3868 ! sprintf(buf, "BEGIN_MATRIX %s\n", szName);
3869 sDescription += buf;
3871 if (!m_bUseConstants) {
3872 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3873 m_e[0], m_e[1], m_e[2]);
3874 sDescription += buf;
3875 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3876 m_e[3], m_e[4], m_e[5]);
3877 sDescription += buf;
3878 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3879 m_e[6], m_e[7], m_e[8]);
3880 sDescription += buf;
3882 else {
3883 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3884 m_e[0], m_e[1], m_e[2], m_e[9]);
3885 sDescription += buf;
3886 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3887 m_e[3], m_e[4], m_e[5], m_e[10]);
3888 sDescription += buf;
3889 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3890 m_e[6], m_e[7], m_e[8], m_e[11]);
3891 sDescription += buf;
3893 ! sDescription += "\n";
3897 ***************
3898 *** 1377,1383 ****
3899 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3900 sReport += icValidateNonCompliantMsg;
3901 sReport += sSigName;
3902 ! sReport += " - Matrix must be identity.\r\n";
3903 rv = icValidateNonCompliant;
3906 --- 1377,1383 ----
3907 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3908 sReport += icValidateNonCompliantMsg;
3909 sReport += sSigName;
3910 ! sReport += " - Matrix must be identity.\n";
3911 rv = icValidateNonCompliant;
3914 ***************
3915 *** 1754,1760 ****
3917 ptr += sprintf(ptr, " %s", m_pVal);
3919 ! strcpy(ptr, "\r\n");
3920 sDescription += (const icChar*)m_pOutText;
3923 --- 1754,1760 ----
3925 ptr += sprintf(ptr, " %s", m_pVal);
3927 ! strcpy(ptr, "\n");
3928 sDescription += (const icChar*)m_pOutText;
3931 ***************
3932 *** 1866,1872 ****
3933 icChar szOutText[2048], szColor[40];
3934 int i, len;
3936 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\r\n", szName, m_nInput, m_nOutput);
3937 sDescription += szOutText;
3939 for (i=0; i<m_nInput; i++) {
3940 --- 1866,1872 ----
3941 icChar szOutText[2048], szColor[40];
3942 int i, len;
3944 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\n", szName, m_nInput, m_nOutput);
3945 sDescription += szOutText;
3947 for (i=0; i<m_nInput; i++) {
3948 ***************
3949 *** 1883,1889 ****
3950 sDescription += szOutText;
3953 ! sDescription += "\r\n";
3955 len = 0;
3956 for (i=0; i<m_nInput; i++) {
3957 --- 1883,1889 ----
3958 sDescription += szOutText;
3961 ! sDescription += "\n";
3963 len = 0;
3964 for (i=0; i<m_nInput; i++) {
3965 ***************
3966 *** 1907,1913 ****
3968 Iterate(sDescription, 0, 0);
3970 ! sDescription += "\r\n";
3974 --- 1907,1913 ----
3976 Iterate(sDescription, 0, 0);
3978 ! sDescription += "\n";
3982 ***************
3983 *** 2693,2699 ****
3984 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
3985 sReport += icValidateNonCompliantMsg;
3986 sReport += sSigName;
3987 ! sReport += " - Reserved Value must be zero.\r\n";
3989 rv = icValidateNonCompliant;
3991 --- 2693,2699 ----
3992 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
3993 sReport += icValidateNonCompliantMsg;
3994 sReport += sSigName;
3995 ! sReport += " - Reserved Value must be zero.\n";
3997 rv = icValidateNonCompliant;
3999 ***************
4000 *** 2704,2710 ****
4001 if (m_GridPoints[i]<2) {
4002 sReport += icValidateCriticalErrorMsg;
4003 sReport += sSigName;
4004 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\r\n",i );
4005 sReport += temp;
4006 rv = icMaxStatus(rv, icValidateCriticalError);
4008 --- 2704,2710 ----
4009 if (m_GridPoints[i]<2) {
4010 sReport += icValidateCriticalErrorMsg;
4011 sReport += sSigName;
4012 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\n",i );
4013 sReport += temp;
4014 rv = icMaxStatus(rv, icValidateCriticalError);
4016 ***************
4017 *** 3122,3128 ****
4018 if (!pProfile) {
4019 sReport += icValidateWarningMsg;
4020 sReport += sSigName;
4021 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4022 rv = icMaxStatus(rv, icValidateWarning);
4023 return rv;
4025 --- 3122,3128 ----
4026 if (!pProfile) {
4027 sReport += icValidateWarningMsg;
4028 sReport += sSigName;
4029 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4030 rv = icMaxStatus(rv, icValidateWarning);
4031 return rv;
4033 ***************
4034 *** 3138,3144 ****
4035 if (m_nInput!=nInput) {
4036 sReport += icValidateCriticalErrorMsg;
4037 sReport += sSigName;
4038 ! sReport += " - Incorrect number of input channels.\r\n";
4039 rv = icMaxStatus(rv, icValidateCriticalError);
4042 --- 3138,3144 ----
4043 if (m_nInput!=nInput) {
4044 sReport += icValidateCriticalErrorMsg;
4045 sReport += sSigName;
4046 ! sReport += " - Incorrect number of input channels.\n";
4047 rv = icMaxStatus(rv, icValidateCriticalError);
4050 ***************
4051 *** 3146,3152 ****
4052 if (m_nOutput!=nOutput) {
4053 sReport += icValidateCriticalErrorMsg;
4054 sReport += sSigName;
4055 ! sReport += " - Incorrect number of output channels.\r\n";
4056 rv = icMaxStatus(rv, icValidateCriticalError);
4059 --- 3146,3152 ----
4060 if (m_nOutput!=nOutput) {
4061 sReport += icValidateCriticalErrorMsg;
4062 sReport += sSigName;
4063 ! sReport += " - Incorrect number of output channels.\n";
4064 rv = icMaxStatus(rv, icValidateCriticalError);
4067 ***************
4068 *** 3160,3166 ****
4069 if (m_nInput!=nInput) {
4070 sReport += icValidateCriticalErrorMsg;
4071 sReport += sSigName;
4072 ! sReport += " - Incorrect number of input channels.\r\n";
4073 rv = icMaxStatus(rv, icValidateCriticalError);
4076 --- 3160,3166 ----
4077 if (m_nInput!=nInput) {
4078 sReport += icValidateCriticalErrorMsg;
4079 sReport += sSigName;
4080 ! sReport += " - Incorrect number of input channels.\n";
4081 rv = icMaxStatus(rv, icValidateCriticalError);
4084 ***************
4085 *** 3168,3174 ****
4086 if (m_nOutput!=nOutput) {
4087 sReport += icValidateCriticalErrorMsg;
4088 sReport += sSigName;
4089 ! sReport += " - Incorrect number of output channels.\r\n";
4090 rv = icMaxStatus(rv, icValidateCriticalError);
4093 --- 3168,3174 ----
4094 if (m_nOutput!=nOutput) {
4095 sReport += icValidateCriticalErrorMsg;
4096 sReport += sSigName;
4097 ! sReport += " - Incorrect number of output channels.\n";
4098 rv = icMaxStatus(rv, icValidateCriticalError);
4101 ***************
4102 *** 3180,3186 ****
4103 if (m_nInput!=nInput) {
4104 sReport += icValidateCriticalErrorMsg;
4105 sReport += sSigName;
4106 ! sReport += " - Incorrect number of input channels.\r\n";
4107 rv = icMaxStatus(rv, icValidateCriticalError);
4110 --- 3180,3186 ----
4111 if (m_nInput!=nInput) {
4112 sReport += icValidateCriticalErrorMsg;
4113 sReport += sSigName;
4114 ! sReport += " - Incorrect number of input channels.\n";
4115 rv = icMaxStatus(rv, icValidateCriticalError);
4118 ***************
4119 *** 3188,3194 ****
4120 if (m_nOutput!=nOutput) {
4121 sReport += icValidateCriticalErrorMsg;
4122 sReport += sSigName;
4123 ! sReport += " - Incorrect number of output channels.\r\n";
4124 rv = icMaxStatus(rv, icValidateCriticalError);
4127 --- 3188,3194 ----
4128 if (m_nOutput!=nOutput) {
4129 sReport += icValidateCriticalErrorMsg;
4130 sReport += sSigName;
4131 ! sReport += " - Incorrect number of output channels.\n";
4132 rv = icMaxStatus(rv, icValidateCriticalError);
4135 ***************
4136 *** 3206,3212 ****
4137 if (!m_CLUT) {
4138 sReport += icValidateCriticalErrorMsg;
4139 sReport += sSigName;
4140 ! sReport += " - CLUT must be present.\r\n";
4141 rv = icMaxStatus(rv, icValidateCriticalError);
4144 --- 3206,3212 ----
4145 if (!m_CLUT) {
4146 sReport += icValidateCriticalErrorMsg;
4147 sReport += sSigName;
4148 ! sReport += " - CLUT must be present.\n";
4149 rv = icMaxStatus(rv, icValidateCriticalError);
4152 ***************
4153 *** 3748,3754 ****
4154 else {
4155 sReport += icValidateCriticalErrorMsg;
4156 sReport += sSigName;
4157 ! sReport += " - Incorrect number of B-curves.\r\n";
4158 rv = icMaxStatus(rv, icValidateCriticalError);
4161 --- 3748,3754 ----
4162 else {
4163 sReport += icValidateCriticalErrorMsg;
4164 sReport += sSigName;
4165 ! sReport += " - Incorrect number of B-curves.\n";
4166 rv = icMaxStatus(rv, icValidateCriticalError);
4169 ***************
4170 *** 3762,3768 ****
4171 else {
4172 sReport += icValidateCriticalErrorMsg;
4173 sReport += sSigName;
4174 ! sReport += " - Incorrect number of M-curves.\r\n";
4175 rv = icMaxStatus(rv, icValidateCriticalError);
4178 --- 3762,3768 ----
4179 else {
4180 sReport += icValidateCriticalErrorMsg;
4181 sReport += sSigName;
4182 ! sReport += " - Incorrect number of M-curves.\n";
4183 rv = icMaxStatus(rv, icValidateCriticalError);
4186 ***************
4187 *** 3772,3778 ****
4188 if (!m_CLUT) {
4189 sReport += icValidateNonCompliantMsg;
4190 sReport += sSigName;
4191 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4193 rv = icMaxStatus(rv, icValidateNonCompliant);
4195 --- 3772,3778 ----
4196 if (!m_CLUT) {
4197 sReport += icValidateNonCompliantMsg;
4198 sReport += sSigName;
4199 ! sReport += " - CLUT must be present if using A-curves.\n";
4201 rv = icMaxStatus(rv, icValidateNonCompliant);
4203 ***************
4204 *** 3784,3790 ****
4205 else {
4206 sReport += icValidateCriticalErrorMsg;
4207 sReport += sSigName;
4208 ! sReport += " - Incorrect number of A-curves.\r\n";
4209 rv = icMaxStatus(rv, icValidateCriticalError);
4212 --- 3784,3790 ----
4213 else {
4214 sReport += icValidateCriticalErrorMsg;
4215 sReport += sSigName;
4216 ! sReport += " - Incorrect number of A-curves.\n";
4217 rv = icMaxStatus(rv, icValidateCriticalError);
4220 ***************
4221 *** 3876,3882 ****
4222 if (!pProfile) {
4223 sReport += icValidateWarningMsg;
4224 sReport += sSigName;
4225 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4226 rv = icMaxStatus(rv, icValidateCriticalError);
4227 return rv;
4229 --- 3876,3882 ----
4230 if (!pProfile) {
4231 sReport += icValidateWarningMsg;
4232 sReport += sSigName;
4233 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4234 rv = icMaxStatus(rv, icValidateCriticalError);
4235 return rv;
4237 ***************
4238 *** 3900,3906 ****
4239 if (m_nOutput!=nOutput) {
4240 sReport += icValidateCriticalErrorMsg;
4241 sReport += sSigName;
4242 ! sReport += " - Incorrect number of output channels.\r\n";
4243 rv = icMaxStatus(rv, icValidateCriticalError);
4246 --- 3900,3906 ----
4247 if (m_nOutput!=nOutput) {
4248 sReport += icValidateCriticalErrorMsg;
4249 sReport += sSigName;
4250 ! sReport += " - Incorrect number of output channels.\n";
4251 rv = icMaxStatus(rv, icValidateCriticalError);
4254 ***************
4255 *** 3913,3919 ****
4256 else {
4257 sReport += icValidateCriticalErrorMsg;
4258 sReport += sSigName;
4259 ! sReport += " - Incorrect number of B-curves.\r\n";
4260 rv = icMaxStatus(rv, icValidateCriticalError);
4263 --- 3913,3919 ----
4264 else {
4265 sReport += icValidateCriticalErrorMsg;
4266 sReport += sSigName;
4267 ! sReport += " - Incorrect number of B-curves.\n";
4268 rv = icMaxStatus(rv, icValidateCriticalError);
4271 ***************
4272 *** 3927,3933 ****
4273 else {
4274 sReport += icValidateCriticalErrorMsg;
4275 sReport += sSigName;
4276 ! sReport += " - Incorrect number of M-curves.\r\n";
4277 rv = icMaxStatus(rv, icValidateCriticalError);
4280 --- 3927,3933 ----
4281 else {
4282 sReport += icValidateCriticalErrorMsg;
4283 sReport += sSigName;
4284 ! sReport += " - Incorrect number of M-curves.\n";
4285 rv = icMaxStatus(rv, icValidateCriticalError);
4288 ***************
4289 *** 3937,3943 ****
4290 if (!m_CLUT) {
4291 sReport += icValidateNonCompliantMsg;
4292 sReport += sSigName;
4293 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4295 rv = icMaxStatus(rv, icValidateNonCompliant);
4297 --- 3937,3943 ----
4298 if (!m_CLUT) {
4299 sReport += icValidateNonCompliantMsg;
4300 sReport += sSigName;
4301 ! sReport += " - CLUT must be present if using A-curves.\n";
4303 rv = icMaxStatus(rv, icValidateNonCompliant);
4305 ***************
4306 *** 3949,3955 ****
4307 else {
4308 sReport += icValidateCriticalErrorMsg;
4309 sReport += sSigName;
4310 ! sReport += " - Incorrect number of A-curves.\r\n";
4311 rv = icMaxStatus(rv, icValidateCriticalError);
4314 --- 3949,3955 ----
4315 else {
4316 sReport += icValidateCriticalErrorMsg;
4317 sReport += sSigName;
4318 ! sReport += " - Incorrect number of A-curves.\n";
4319 rv = icMaxStatus(rv, icValidateCriticalError);
4322 ***************
4323 *** 4311,4317 ****
4324 if (pTagCurve->GetSize()==1) {
4325 sReport += icValidateCriticalErrorMsg;
4326 sReport += sSigName;
4327 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4328 rv = icMaxStatus(rv, icValidateCriticalError);
4331 --- 4311,4317 ----
4332 if (pTagCurve->GetSize()==1) {
4333 sReport += icValidateCriticalErrorMsg;
4334 sReport += sSigName;
4335 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4336 rv = icMaxStatus(rv, icValidateCriticalError);
4339 ***************
4340 *** 4319,4325 ****
4341 else {
4342 sReport += icValidateCriticalErrorMsg;
4343 sReport += sSigName;
4344 ! sReport += " - Incorrect number of B-curves.\r\n";
4345 rv = icMaxStatus(rv, icValidateCriticalError);
4348 --- 4319,4325 ----
4349 else {
4350 sReport += icValidateCriticalErrorMsg;
4351 sReport += sSigName;
4352 ! sReport += " - Incorrect number of B-curves.\n";
4353 rv = icMaxStatus(rv, icValidateCriticalError);
4356 ***************
4357 *** 4336,4342 ****
4358 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4359 sReport += icValidateWarningMsg;
4360 sReport += sSigName;
4361 ! sReport += " - Matrix must be identity.\r\n";
4362 rv = icMaxStatus(rv, icValidateWarning);
4365 --- 4336,4342 ----
4366 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4367 sReport += icValidateWarningMsg;
4368 sReport += sSigName;
4369 ! sReport += " - Matrix must be identity.\n";
4370 rv = icMaxStatus(rv, icValidateWarning);
4373 ***************
4374 *** 4351,4357 ****
4375 if (pTagCurve->GetSize()==1) {
4376 sReport += icValidateCriticalErrorMsg;
4377 sReport += sSigName;
4378 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4379 rv = icMaxStatus(rv, icValidateCriticalError);
4382 --- 4351,4357 ----
4383 if (pTagCurve->GetSize()==1) {
4384 sReport += icValidateCriticalErrorMsg;
4385 sReport += sSigName;
4386 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4387 rv = icMaxStatus(rv, icValidateCriticalError);
4390 ***************
4391 *** 4359,4365 ****
4392 else {
4393 sReport += icValidateCriticalErrorMsg;
4394 sReport += sSigName;
4395 ! sReport += " - Incorrect number of A-curves.\r\n";
4396 rv = icMaxStatus(rv, icValidateCriticalError);
4399 --- 4359,4365 ----
4400 else {
4401 sReport += icValidateCriticalErrorMsg;
4402 sReport += sSigName;
4403 ! sReport += " - Incorrect number of A-curves.\n";
4404 rv = icMaxStatus(rv, icValidateCriticalError);
4407 ***************
4408 *** 4721,4727 ****
4409 if (pTagCurve->GetSize()==1) {
4410 sReport += icValidateCriticalErrorMsg;
4411 sReport += sSigName;
4412 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4413 rv = icMaxStatus(rv, icValidateCriticalError);
4416 --- 4721,4727 ----
4417 if (pTagCurve->GetSize()==1) {
4418 sReport += icValidateCriticalErrorMsg;
4419 sReport += sSigName;
4420 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4421 rv = icMaxStatus(rv, icValidateCriticalError);
4424 ***************
4425 *** 4729,4735 ****
4426 else {
4427 sReport += icValidateCriticalErrorMsg;
4428 sReport += sSigName;
4429 ! sReport += " - Incorrect number of B-curves.\r\n";
4430 rv = icMaxStatus(rv, icValidateCriticalError);
4433 --- 4729,4735 ----
4434 else {
4435 sReport += icValidateCriticalErrorMsg;
4436 sReport += sSigName;
4437 ! sReport += " - Incorrect number of B-curves.\n";
4438 rv = icMaxStatus(rv, icValidateCriticalError);
4441 ***************
4442 *** 4746,4752 ****
4443 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4444 sReport += icValidateWarningMsg;
4445 sReport += sSigName;
4446 ! sReport += " - Matrix must be identity.\r\n";
4447 rv = icMaxStatus(rv, icValidateWarning);
4450 --- 4746,4752 ----
4451 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4452 sReport += icValidateWarningMsg;
4453 sReport += sSigName;
4454 ! sReport += " - Matrix must be identity.\n";
4455 rv = icMaxStatus(rv, icValidateWarning);
4458 ***************
4459 *** 4761,4767 ****
4460 if (pTagCurve->GetSize()==1) {
4461 sReport += icValidateCriticalErrorMsg;
4462 sReport += sSigName;
4463 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4464 rv = icMaxStatus(rv, icValidateCriticalError);
4467 --- 4761,4767 ----
4468 if (pTagCurve->GetSize()==1) {
4469 sReport += icValidateCriticalErrorMsg;
4470 sReport += sSigName;
4471 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4472 rv = icMaxStatus(rv, icValidateCriticalError);
4475 ***************
4476 *** 4769,4775 ****
4477 else {
4478 sReport += icValidateCriticalErrorMsg;
4479 sReport += sSigName;
4480 ! sReport += " - Incorrect number of A-curves.\r\n";
4481 rv = icMaxStatus(rv, icValidateCriticalError);
4484 --- 4769,4775 ----
4485 else {
4486 sReport += icValidateCriticalErrorMsg;
4487 sReport += sSigName;
4488 ! sReport += " - Incorrect number of A-curves.\n";
4489 rv = icMaxStatus(rv, icValidateCriticalError);
4492 *** misc/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Mon Aug 20 22:05:00 2007
4493 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Fri Jan 25 14:23:09 2008
4494 ***************
4495 *** 218,224 ****
4496 icGetSig(sigbuf, m_sig), m_nSize);
4497 sDescription += buf;
4499 ! sDescription += "\r\n\r\nData Follows:\r\n";
4501 icMemDump(sDescription, m_pData, m_nSize);
4503 --- 218,224 ----
4504 icGetSig(sigbuf, m_sig), m_nSize);
4505 sDescription += buf;
4507 ! sDescription += "\n\nData Follows:\n";
4509 icMemDump(sDescription, m_pData, m_nSize);
4511 ***************
4512 *** 364,370 ****
4513 sReport += " - Contains unknown processing element type (";
4514 icGetSig(buf, m_sig, true);
4515 sReport += buf;
4516 ! sReport += ").\r\n";
4518 return icValidateCriticalError;
4520 --- 364,370 ----
4521 sReport += " - Contains unknown processing element type (";
4522 icGetSig(buf, m_sig, true);
4523 sReport += buf;
4524 ! sReport += ").\n";
4526 return icValidateCriticalError;
4528 ***************
4529 *** 392,398 ****
4530 sReport += " - Element ";
4531 sSigName = Info.GetSigName(GetType());
4532 sReport += sSigName;
4533 ! sReport += " - Reserved Value must be zero.\r\n";
4535 rv = icValidateNonCompliant;
4537 --- 392,398 ----
4538 sReport += " - Element ";
4539 sSigName = Info.GetSigName(GetType());
4540 sReport += sSigName;
4541 ! sReport += " - Reserved Value must be zero.\n";
4543 rv = icValidateNonCompliant;
4545 ***************
4546 *** 738,755 ****
4548 icChar buf[128];
4550 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\r\n", m_nInputChannels, m_nOutputChannels);
4551 sDescription += buf;
4552 ! sDescription += "\r\n";
4554 CIccMultiProcessElementList::iterator i;
4555 int j;
4557 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4558 ! sprintf(buf, "PROCESS_ELEMENT #%d\r\n", j+1);
4559 sDescription += buf;
4560 i->ptr->Describe(sDescription);
4561 ! sDescription += "\r\n";
4565 --- 738,755 ----
4567 icChar buf[128];
4569 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\n", m_nInputChannels, m_nOutputChannels);
4570 sDescription += buf;
4571 ! sDescription += "\n";
4573 CIccMultiProcessElementList::iterator i;
4574 int j;
4576 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4577 ! sprintf(buf, "PROCESS_ELEMENT #%d\n", j+1);
4578 sDescription += buf;
4579 i->ptr->Describe(sDescription);
4580 ! sDescription += "\n";
4584 ***************
4585 *** 1207,1219 ****
4586 if (m_nInputChannels != m_nOutputChannels) {
4587 sReport += icValidateCriticalErrorMsg;
4588 sReport += sSigName;
4589 ! sReport += " No processing elements and input and output channels do not match!\r\n";
4590 return icValidateCriticalError;
4592 else {
4593 sReport += icValidateWarningMsg;
4594 sReport += sSigName;
4595 ! sReport += " No processing elements.\r\n";
4596 return icValidateWarning;
4599 --- 1207,1219 ----
4600 if (m_nInputChannels != m_nOutputChannels) {
4601 sReport += icValidateCriticalErrorMsg;
4602 sReport += sSigName;
4603 ! sReport += " No processing elements and input and output channels do not match!\n";
4604 return icValidateCriticalError;
4606 else {
4607 sReport += icValidateWarningMsg;
4608 sReport += sSigName;
4609 ! sReport += " No processing elements.\n";
4610 return icValidateWarning;
4613 ***************
4614 *** 1224,1230 ****
4615 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4616 sReport += icValidateCriticalErrorMsg;
4617 sReport += sSigName;
4618 ! sReport += " Mis-matching number of input channels!\r\n";
4619 return icValidateCriticalError;
4622 --- 1224,1230 ----
4623 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4624 sReport += icValidateCriticalErrorMsg;
4625 sReport += sSigName;
4626 ! sReport += " Mis-matching number of input channels!\n";
4627 return icValidateCriticalError;
4630 ***************
4631 *** 1239,1245 ****
4632 sReport += "->";
4633 sReport += i->ptr->GetClassName();
4635 ! sReport += " Mis-matching number of channels!\r\n";
4636 return icValidateCriticalError;
4639 --- 1239,1245 ----
4640 sReport += "->";
4641 sReport += i->ptr->GetClassName();
4643 ! sReport += " Mis-matching number of channels!\n";
4644 return icValidateCriticalError;
4647 ***************
4648 *** 1251,1257 ****
4649 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4650 sReport += icValidateCriticalErrorMsg;
4651 sReport += sSigName;
4652 ! sReport += " Mis-matching number of output channels!\r\n";
4653 return icValidateCriticalError;
4656 --- 1251,1257 ----
4657 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4658 sReport += icValidateCriticalErrorMsg;
4659 sReport += sSigName;
4660 ! sReport += " Mis-matching number of output channels!\n";
4661 return icValidateCriticalError;
4664 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Mon Aug 20 22:05:00 2007
4665 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Fri Jan 25 14:23:09 2008
4666 ***************
4667 *** 234,240 ****
4669 std::string Dump;
4671 ! sDescription += "ProfileID:\r\n";
4673 int i;
4674 char buf[20];
4675 --- 234,240 ----
4677 std::string Dump;
4679 ! sDescription += "ProfileID:\n";
4681 int i;
4682 char buf[20];
4683 ***************
4684 *** 244,255 ****
4685 sprintf(buf, "%2x", m_profileID.ID8[i]);
4686 sDescription += buf;
4688 ! sDescription += "\r\n";
4690 ! sDescription += "Description:\r\n";
4691 m_desc.Describe(sDescription);
4693 ! sDescription += "\r\n";
4697 --- 244,255 ----
4698 sprintf(buf, "%2x", m_profileID.ID8[i]);
4699 sDescription += buf;
4701 ! sDescription += "\n";
4703 ! sDescription += "Description:\n";
4704 m_desc.Describe(sDescription);
4706 ! sDescription += "\n";
4710 ***************
4711 *** 434,454 ****
4713 icChar buf[128];
4715 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\r\n");
4716 sDescription += buf;
4717 ! sDescription += "\r\n";
4719 int i;
4720 CIccProfileIdDescList::iterator j;
4721 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4722 ! sprintf(buf, "ProfileDescription_%d:\r\n", i+1);
4723 sDescription += buf;
4724 j->Describe(sDescription);
4727 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\r\n");
4728 sDescription += buf;
4729 ! sDescription += "\r\n";
4733 --- 434,454 ----
4735 icChar buf[128];
4737 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\n");
4738 sDescription += buf;
4739 ! sDescription += "\n";
4741 int i;
4742 CIccProfileIdDescList::iterator j;
4743 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4744 ! sprintf(buf, "ProfileDescription_%d:\n", i+1);
4745 sDescription += buf;
4746 j->Describe(sDescription);
4749 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\n");
4750 sDescription += buf;
4751 ! sDescription += "\n";
4755 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Mon Aug 20 22:05:00 2007
4756 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Fri Jan 25 14:23:09 2008
4757 ***************
4758 *** 161,164 ****
4760 #endif
4762 ! #endif //_ICCTAGPROFSEQID_H
4763 --- 161,164 ----
4765 #endif
4767 ! #endif //_ICCTAGPROFSEQID_H
4768 *** misc/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Mon Aug 20 22:05:00 2007
4769 --- misc/build/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Fri Jan 25 14:23:09 2008
4770 ***************
4771 *** 79,85 ****
4772 #include "IccUtil.h"
4773 #include "IccTagFactory.h"
4774 #include <stdlib.h>
4775 ! #include <memory.h>
4776 #include <ctype.h>
4777 #include <math.h>
4778 #include <string.h>
4779 --- 79,85 ----
4780 #include "IccUtil.h"
4781 #include "IccTagFactory.h"
4782 #include <stdlib.h>
4783 ! #include <memory>
4784 #include <ctype.h>
4785 #include <math.h>
4786 #include <string.h>
4787 ***************
4788 *** 678,688 ****
4790 icChar buf[128];
4792 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4793 sDump += buf;
4794 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4795 sDump += buf;
4796 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4797 sDump += buf;
4800 --- 679,689 ----
4802 icChar buf[128];
4804 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4805 sDump += buf;
4806 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4807 sDump += buf;
4808 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4809 sDump += buf;
4812 ***************
4813 *** 1516,1534 ****
4815 if (XYZ.X < 0) {
4816 sReport += icValidateNonCompliantMsg;
4817 ! sReport += " - XYZNumber: Negative X value!\r\n";
4818 rv = icValidateNonCompliant;
4821 if (XYZ.Y < 0) {
4822 sReport += icValidateNonCompliantMsg;
4823 ! sReport += " - XYZNumber: Negative Y value!\r\n";
4824 rv = icMaxStatus(rv, icValidateNonCompliant);
4827 if (XYZ.Z < 0) {
4828 sReport += icValidateNonCompliantMsg;
4829 ! sReport += " - XYZNumber: Negative Z value!\r\n";
4830 rv = icMaxStatus(rv, icValidateNonCompliant);
4833 --- 1517,1535 ----
4835 if (XYZ.X < 0) {
4836 sReport += icValidateNonCompliantMsg;
4837 ! sReport += " - XYZNumber: Negative X value!\n";
4838 rv = icValidateNonCompliant;
4841 if (XYZ.Y < 0) {
4842 sReport += icValidateNonCompliantMsg;
4843 ! sReport += " - XYZNumber: Negative Y value!\n";
4844 rv = icMaxStatus(rv, icValidateNonCompliant);
4847 if (XYZ.Z < 0) {
4848 sReport += icValidateNonCompliantMsg;
4849 ! sReport += " - XYZNumber: Negative Z value!\n";
4850 rv = icMaxStatus(rv, icValidateNonCompliant);
4853 ***************
4854 *** 1548,1554 ****
4855 icChar buf[128];
4856 if (dateTime.year<1992) {
4857 sReport += icValidateWarningMsg;
4858 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4859 sReport += buf;
4860 rv = icValidateWarning;
4862 --- 1549,1555 ----
4863 icChar buf[128];
4864 if (dateTime.year<1992) {
4865 sReport += icValidateWarningMsg;
4866 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4867 sReport += buf;
4868 rv = icValidateWarning;
4870 ***************
4871 *** 1557,1563 ****
4872 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4873 if (dateTime.year>(year+1)) {
4874 sReport += icValidateWarningMsg;
4875 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4876 sReport += buf;
4877 rv = icMaxStatus(rv, icValidateWarning);
4879 --- 1558,1564 ----
4880 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4881 if (dateTime.year>(year+1)) {
4882 sReport += icValidateWarningMsg;
4883 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4884 sReport += buf;
4885 rv = icMaxStatus(rv, icValidateWarning);
4887 ***************
4888 *** 1565,1571 ****
4889 else {
4890 if (dateTime.year>year) {
4891 sReport += icValidateWarningMsg;
4892 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4893 sReport += buf;
4894 rv = icMaxStatus(rv, icValidateWarning);
4896 --- 1566,1572 ----
4897 else {
4898 if (dateTime.year>year) {
4899 sReport += icValidateWarningMsg;
4900 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4901 sReport += buf;
4902 rv = icMaxStatus(rv, icValidateWarning);
4904 ***************
4905 *** 1573,1579 ****
4907 if (dateTime.month<1 || dateTime.month>12) {
4908 sReport += icValidateWarningMsg;
4909 ! sprintf(buf," - %u: Invalid month!\r\n",dateTime.month);
4910 sReport += buf;
4911 rv = icMaxStatus(rv, icValidateWarning);
4913 --- 1574,1580 ----
4915 if (dateTime.month<1 || dateTime.month>12) {
4916 sReport += icValidateWarningMsg;
4917 ! sprintf(buf," - %u: Invalid month!\n",dateTime.month);
4918 sReport += buf;
4919 rv = icMaxStatus(rv, icValidateWarning);
4921 ***************
4922 *** 1580,1586 ****
4924 if (dateTime.day<1 || dateTime.day>31) {
4925 sReport += icValidateWarningMsg;
4926 ! sprintf(buf," - %u: Invalid day!\r\n",dateTime.day);
4927 sReport += buf;
4928 rv = icMaxStatus(rv, icValidateWarning);
4930 --- 1581,1587 ----
4932 if (dateTime.day<1 || dateTime.day>31) {
4933 sReport += icValidateWarningMsg;
4934 ! sprintf(buf," - %u: Invalid day!\n",dateTime.day);
4935 sReport += buf;
4936 rv = icMaxStatus(rv, icValidateWarning);
4938 ***************
4939 *** 1588,1594 ****
4940 if (dateTime.month==2) {
4941 if (dateTime.day>29) {
4942 sReport += icValidateWarningMsg;
4943 ! sprintf(buf," - %u: Invalid day for February!\r\n",dateTime.day);
4944 sReport += buf;
4945 rv = icMaxStatus(rv, icValidateWarning);
4947 --- 1589,1595 ----
4948 if (dateTime.month==2) {
4949 if (dateTime.day>29) {
4950 sReport += icValidateWarningMsg;
4951 ! sprintf(buf," - %u: Invalid day for February!\n",dateTime.day);
4952 sReport += buf;
4953 rv = icMaxStatus(rv, icValidateWarning);
4955 ***************
4956 *** 1596,1602 ****
4957 if (dateTime.day==29) {
4958 if ((dateTime.year%4)!=0) {
4959 sReport += icValidateWarningMsg;
4960 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\r\n",dateTime.day, dateTime.year);
4961 sReport += buf;
4962 rv = icMaxStatus(rv, icValidateWarning);
4964 --- 1597,1603 ----
4965 if (dateTime.day==29) {
4966 if ((dateTime.year%4)!=0) {
4967 sReport += icValidateWarningMsg;
4968 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\n",dateTime.day, dateTime.year);
4969 sReport += buf;
4970 rv = icMaxStatus(rv, icValidateWarning);
4972 ***************
4973 *** 1605,1611 ****
4975 if (dateTime.hours>23) {
4976 sReport += icValidateWarningMsg;
4977 ! sprintf(buf," - %u: Invalid hour!\r\n",dateTime.hours);
4978 sReport += buf;
4979 rv = icMaxStatus(rv, icValidateWarning);
4981 --- 1606,1612 ----
4983 if (dateTime.hours>23) {
4984 sReport += icValidateWarningMsg;
4985 ! sprintf(buf," - %u: Invalid hour!\n",dateTime.hours);
4986 sReport += buf;
4987 rv = icMaxStatus(rv, icValidateWarning);
4989 ***************
4990 *** 1612,1618 ****
4992 if (dateTime.minutes>59) {
4993 sReport += icValidateWarningMsg;
4994 ! sprintf(buf," - %u: Invalid minutes!\r\n",dateTime.minutes);
4995 sReport += buf;
4996 rv = icMaxStatus(rv, icValidateWarning);
4998 --- 1613,1619 ----
5000 if (dateTime.minutes>59) {
5001 sReport += icValidateWarningMsg;
5002 ! sprintf(buf," - %u: Invalid minutes!\n",dateTime.minutes);
5003 sReport += buf;
5004 rv = icMaxStatus(rv, icValidateWarning);
5006 ***************
5007 *** 1619,1625 ****
5009 if (dateTime.seconds>59) {
5010 sReport += icValidateWarningMsg;
5011 ! sprintf(buf," - %u: Invalid seconds!\r\n",dateTime.hours);
5012 sReport += buf;
5013 rv = icMaxStatus(rv, icValidateWarning);
5015 --- 1620,1626 ----
5017 if (dateTime.seconds>59) {
5018 sReport += icValidateWarningMsg;
5019 ! sprintf(buf," - %u: Invalid seconds!\n",dateTime.hours);
5020 sReport += buf;
5021 rv = icMaxStatus(rv, icValidateWarning);
5023 *** misc/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Mon Aug 20 22:05:00 2007
5024 --- misc/build/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Fri Jan 25 14:23:09 2008
5025 ***************
5026 *** 659,668 ****
5027 typedef enum {
5028 icFlare0 = 0x00000000, /* 0% flare */
5029 icFlare100 = 0x00000001, /* 100% flare */
5030 } icMeasurementFlare;
5032 /** Convenience Enum Definition - Not defined in ICC specification*/
5033 ! #define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)
5034 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5037 --- 659,669 ----
5038 typedef enum {
5039 icFlare0 = 0x00000000, /* 0% flare */
5040 icFlare100 = 0x00000001, /* 100% flare */
5041 + icMaxEnumFlare = 0xFFFFFFFF
5042 } icMeasurementFlare;
5044 /** Convenience Enum Definition - Not defined in ICC specification*/
5045 ! /*#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)*/
5046 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5049 *** misc/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Mon Aug 20 22:10:42 2007
5050 --- misc/build/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Fri Jan 25 14:23:09 2008
5051 ***************
5052 *** 101,117 ****
5053 am__quote = @am__quote@
5054 install_sh = @install_sh@
5056 ! SUBDIRS = IccApplyNamedCmm \
5057 ! @SICC_ICC_APPLY_PROFILES@ \
5058 ! IccDumpProfile \
5059 IccProfLibTest \
5060 IccStripUnknownTags \
5061 IccV4ToMPE
5064 ! DIST_SUBDIRS = IccApplyNamedCmm \
5065 ! IccApplyProfiles \
5066 ! IccDumpProfile \
5067 IccProfLibTest \
5068 IccStripUnknownTags \
5069 IccV4ToMPE
5070 --- 101,113 ----
5071 am__quote = @am__quote@
5072 install_sh = @install_sh@
5074 ! SUBDIRS = IccDumpProfile \
5075 IccProfLibTest \
5076 IccStripUnknownTags \
5077 IccV4ToMPE
5080 ! DIST_SUBDIRS = IccDumpProfile \
5081 IccProfLibTest \
5082 IccStripUnknownTags \
5083 IccV4ToMPE
5084 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2007-08-20 22:04:53.000000000 +0200
5085 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2008-01-31 13:53:16.000000000 +0100
5086 ***************
5087 *** 77,82 ****
5088 --- 77,84 ----
5090 //////////////////////////////////////////////////////////////////////
5092 + #include <stdlib.h>
5093 + #include <string.h>
5094 #include <iostream>
5095 #include <fstream>
5096 #include <sstream>
5097 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2007-08-20 22:04:54.000000000 +0200
5098 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2008-01-31 13:54:51.000000000 +0100
5099 ***************
5100 *** 83,88 ****
5101 --- 83,89 ----
5102 #ifndef __DEFINED_ICC_TOOL_EXCEPTION_H__
5103 #define __DEFINED_ICC_TOOL_EXCEPTION_H__
5105 + #include <string.h>
5106 #include <exception>
5107 #include <string>
5109 *** misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2007-08-20 22:05:00.000000000 +0200
5110 --- misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2008-01-31 13:49:54.000000000 +0100
5111 ***************
5112 *** 79,84 ****
5113 --- 79,86 ----
5114 #pragma warning( disable: 4786) //disable warning in <list.h>
5115 #endif
5117 + #include <stdlib.h>
5118 + #include <string.h>
5119 #include "IccCmm.h"
5120 #include "IccTag.h"
5121 #include "IccIO.h"
5122 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2007-08-20 22:04:53.000000000 +0200
5123 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2008-01-31 14:05:58.000000000 +0100
5124 ***************
5125 *** 83,88 ****
5126 --- 83,89 ----
5127 #include <string>
5128 #include <sys/types.h>
5129 #include <sys/stat.h>
5130 + #include <stdlib.h>
5132 #ifdef WIN32
5133 typedef unsigned short mode_t;