xref: /aoo41x/main/icc/SampleICC-1.3.2.patch (revision cdf0e10c)
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 ****
5
6
7
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 ----
13
14
15
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 ****
66
67  SUBDIRS = \
68  	ICC_utils \
69! 	CmdLine \
70! 	examples \
71! 	Mac_OS_X \
72! 	tests
73
74
75  DIST_SUBDIRS = \
76  	ICC_utils \
77! 	CmdLine \
78! 	examples \
79! 	Mac_OS_X \
80! 	tests
81
82  subdir = Contrib
83  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
84--- 103,114 ----
85
86  SUBDIRS = \
87  	ICC_utils \
88! 	CmdLine
89
90
91  DIST_SUBDIRS = \
92  	ICC_utils \
93! 	CmdLine
94
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@
102
103  SUBDIRS = \
104! 	create_CLUT_profile \
105! 	create_CLUT_profile_from_probe \
106! 	create_display_profile
107
108
109  DIST_SUBDIRS = \
110! 	create_CLUT_profile \
111! 	create_CLUT_profile_from_probe \
112! 	create_display_profile
113
114  subdir = Contrib/CmdLine
115  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
116--- 102,112 ----
117  install_sh = @install_sh@
118
119  SUBDIRS = \
120! 	create_sRGB_profile
121
122
123  DIST_SUBDIRS = \
124! 	create_sRGB_profile
125
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)
134
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)
142
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 ****
151
152    // use one of these to force desired sort order in assoc. containers of DPX
153    bool
154!   DPX::operator<(const DPX& p) const
155    {
156      return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
157    }
158--- 130,136 ----
159
160    // use one of these to force desired sort order in assoc. containers of DPX
161    bool
162!   operator<(const DPX& p) const
163    {
164      return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
165    }
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
172!
173!  Contains:   Utility functions to handle common argument-checking tasks, in a
174!              way that hides platform-specific details from higher-level code.
175!
176!  Version:    V1
177!
178!  Copyright:  © see below
179!  */
180!
181! /*
182!  * The ICC Software License, Version 0.1
183!  *
184!  *
185!  * Copyright (c) 2003-2006 The International Color Consortium. All rights
186!  * reserved.
187!  *
188!  * Redistribution and use in source and binary forms, with or without
189!  * modification, are permitted provided that the following conditions
190!  * are met:
191!  *
192!  * 1. Redistributions of source code must retain the above copyright
193!  *    notice, this list of conditions and the following disclaimer.
194!  *
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.
199!  *
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.
206!  *
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/>.
212!  *
213!  *
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!  * ====================================================================
227!  *
228!  * This software consists of voluntary contributions made by many
229!  * individuals on behalf of the The International Color Consortium.
230!  *
231!  *
232!  * Membership in the ICC is encouraged when this software is used for
233!  * commercial purposes.
234!  *
235!  *
236!  * For more information on The International Color Consortium, please
237!  * see <http://www.color.org/>.
238!  *
239!  *
240!  */
241!
242! //////////////////////////////////////////////////////////////////////
243! // HISTORY:
244! //
245! // -Initial implementation by Joseph Goldstone sumer 2007
246! //
247! //////////////////////////////////////////////////////////////////////
248!
249! #include "Vetters.h"
250!
251! #include <sstream>
252! using namespace std;
253!
254! #ifndef WIN32
255! #include <sys/errno.h>
256! #else
257! #include <string.h>
258! int strerror_r(int errnum, char *str, int strsize)
259! {
260!   const char *errstr = strerror(errnum);
261!
262!   if (errstr) {
263!     strncpy(str, errstr, strsize);
264!     return 0;
265!   }
266!
267!   return -1;
268! }
269! #define stat _stat
270! #endif
271!
272! #include "ICC_tool_exception.h"
273!
274! const char*
275! path_tail(const char* const s)
276! {
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;
282! }
283!
284! void
285! vet_as_int(const char* const s, const string& name,
286!            const string& description)
287! {
288!   istringstream ss(s);
289!   int i;
290!   ss >> i;
291!   if (ss.fail())
292!   {
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());
298!   }
299! }
300!
301! void
302! vet_as_float(const char* const s, const string& name,
303!              const string& description)
304! {
305!   istringstream ss(s);
306!   float i;
307!   ss >> i;
308!   if (ss.fail())
309!   {
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());
315!   }
316! }
317!
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)
325!   {
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());
333!   }
334!   return sb.st_size;
335! }
336!
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)
343!   {
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());
351!   }
352!   return (sb.st_mode & mode) != 0;
353! }
354!
355! bool
356! is_existent_file_pathname(const char* const s)
357! {
358!   struct stat sb;
359!   return stat(s, &sb) == 0;
360! }
361!
362! bool
363! is_plain_file_pathname(const char* const s)
364! {
365!   return check_mode(s, S_IFREG);
366! }
367!
368! bool
369! is_directory(const char* const s)
370! {
371!   return check_mode(s, S_IFDIR);
372! }
373!
374! const char* const
375! containing_directory(const char* const s)
376! {
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)
390!   {
391!     *idx = 0;
392!     return tmp;
393!   }
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);
400! }
401!
402! bool
403! is_readable_pathname(const char* const s)
404! {
405!   return check_mode(s, S_IRUSR)
406!   || check_mode(s, S_IRGRP)
407!   || check_mode(s, S_IROTH);
408! }
409!
410! bool
411! is_writable_pathname(const char* const s)
412! {
413!   return check_mode(s, S_IWUSR)
414!   || check_mode(s, S_IWGRP)
415!   || check_mode(s, S_IWOTH);
416! }
417!
418! bool
419! is_pathname_of_empty_file(const char* const s)
420! {
421!   return get_size(s) > 0;
422! }
423!
424! void
425! vet_input_file_pathname(const char* const s, const string& name,
426!                         const string& description)
427! {
428!   if (! is_plain_file_pathname(s))
429!   {
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());
436!   }
437!   if (! is_readable_pathname(s))
438!   {
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());
445!   }
446!   if (! is_pathname_of_empty_file(s))
447!   {
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());
453!   }
454! }
455!
456! void
457! vet_output_file_pathname(const char* const s, const string& name,
458!                          const string& description,
459!                          bool silent_overwrite_OK)
460! {
461!   const char* const container = containing_directory(s);
462!   if (! is_writable_pathname(container))
463!   {
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());
469!   }
470!   if (is_existent_file_pathname(s))
471!   {
472!     if (is_plain_file_pathname(s))
473!       if (is_writable_pathname(s))
474!       {
475!         if (! silent_overwrite_OK)
476!         {
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());
482!         }
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());
489!       }
490!   }
491! }
492--- 1,329 ----
493! /*
494!  File:       Vetters.cpp
495!
496!  Contains:   Utility functions to handle common argument-checking tasks, in a
497!              way that hides platform-specific details from higher-level code.
498!
499!  Version:    V1
500!
501!  Copyright:  © see below
502!  */
503!
504! /*
505!  * The ICC Software License, Version 0.1
506!  *
507!  *
508!  * Copyright (c) 2003-2006 The International Color Consortium. All rights
509!  * reserved.
510!  *
511!  * Redistribution and use in source and binary forms, with or without
512!  * modification, are permitted provided that the following conditions
513!  * are met:
514!  *
515!  * 1. Redistributions of source code must retain the above copyright
516!  *    notice, this list of conditions and the following disclaimer.
517!  *
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.
522!  *
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.
529!  *
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/>.
535!  *
536!  *
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!  * ====================================================================
550!  *
551!  * This software consists of voluntary contributions made by many
552!  * individuals on behalf of the The International Color Consortium.
553!  *
554!  *
555!  * Membership in the ICC is encouraged when this software is used for
556!  * commercial purposes.
557!  *
558!  *
559!  * For more information on The International Color Consortium, please
560!  * see <http://www.color.org/>.
561!  *
562!  *
563!  */
564!
565! //////////////////////////////////////////////////////////////////////
566! // HISTORY:
567! //
568! // -Initial implementation by Joseph Goldstone sumer 2007
569! //
570! //////////////////////////////////////////////////////////////////////
571!
572! #include "Vetters.h"
573!
574! #include <sstream>
575! using namespace std;
576!
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
587!
588! #if defined WIN32 || defined sun
589! int strerror_r(int errnum, char *str, int strsize)
590! {
591!   const char *errstr = strerror(errnum);
592!
593!   if (errstr) {
594!     strncpy(str, errstr, strsize);
595!     return 0;
596!   }
597!
598!   return -1;
599! }
600! #endif
601!
602! #include "ICC_tool_exception.h"
603!
604! const char*
605! path_tail(const char* const s)
606! {
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;
612! }
613!
614! void
615! vet_as_int(const char* const s, const string& name,
616!            const string& description)
617! {
618!   istringstream ss(s);
619!   int i;
620!   ss >> i;
621!   if (ss.fail())
622!   {
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());
628!   }
629! }
630!
631! void
632! vet_as_float(const char* const s, const string& name,
633!              const string& description)
634! {
635!   istringstream ss(s);
636!   float i;
637!   ss >> i;
638!   if (ss.fail())
639!   {
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());
645!   }
646! }
647!
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)
655!   {
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());
663!   }
664!   return sb.st_size;
665! }
666!
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)
673!   {
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());
681!   }
682!   return (sb.st_mode & mode) != 0;
683! }
684!
685! bool
686! is_existent_file_pathname(const char* const s)
687! {
688!   struct stat sb;
689!   return stat(s, &sb) == 0;
690! }
691!
692! bool
693! is_plain_file_pathname(const char* const s)
694! {
695!   return check_mode(s, S_IFREG);
696! }
697!
698! bool
699! is_directory(const char* const s)
700! {
701!   return check_mode(s, S_IFDIR);
702! }
703!
704! const char* const
705! containing_directory(const char* const s)
706! {
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)
720!   {
721!     *idx = 0;
722!     return tmp;
723!   }
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);
730! }
731!
732! bool
733! is_readable_pathname(const char* const s)
734! {
735!   return check_mode(s, S_IRUSR)
736!   || check_mode(s, S_IRGRP)
737!   || check_mode(s, S_IROTH);
738! }
739!
740! bool
741! is_writable_pathname(const char* const s)
742! {
743!   return check_mode(s, S_IWUSR)
744!   || check_mode(s, S_IWGRP)
745!   || check_mode(s, S_IWOTH);
746! }
747!
748! bool
749! is_pathname_of_empty_file(const char* const s)
750! {
751!   return get_size(s) > 0;
752! }
753!
754! void
755! vet_input_file_pathname(const char* const s, const string& name,
756!                         const string& description)
757! {
758!   if (! is_plain_file_pathname(s))
759!   {
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());
766!   }
767!   if (! is_readable_pathname(s))
768!   {
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());
775!   }
776!   if (! is_pathname_of_empty_file(s))
777!   {
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());
783!   }
784! }
785!
786! void
787! vet_output_file_pathname(const char* const s, const string& name,
788!                          const string& description,
789!                          bool silent_overwrite_OK)
790! {
791!   const char* const container = containing_directory(s);
792!   if (! is_writable_pathname(container))
793!   {
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());
799!   }
800!   if (is_existent_file_pathname(s))
801!   {
802!     if (is_plain_file_pathname(s))
803!       if (is_writable_pathname(s))
804!       {
805!         if (! silent_overwrite_OK)
806!         {
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());
812!         }
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());
819!       }
820!   }
821! }
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>
831
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>
839
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
847
848  #include "IccDefs.h"
849+ #include "memory"
850  #include "stdio.h"
851
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];
858
859    if (GetBAcsSig())
860!     sDescription += "ELEM_bACS\r\n";
861    else
862!     sDescription += "ELEM_eACS\r\n";
863
864    icGetSig(sigBuf, m_signature);
865    sDescription += "  Signature = ";
866    sDescription += sigBuf;
867!   sDescription += "\r\n";
868
869    if (m_pData) {
870!     sDescription += "\r\nData Follows:\r\n";
871
872      icMemDump(sDescription, m_pData, m_nDataSize);
873    }
874--- 136,152 ----
875    icChar sigBuf[30];
876
877    if (GetBAcsSig())
878!     sDescription += "ELEM_bACS\n";
879    else
880!     sDescription += "ELEM_eACS\n";
881
882    icGetSig(sigBuf, m_signature);
883    sDescription += "  Signature = ";
884    sDescription += sigBuf;
885!   sDescription += "\n";
886
887    if (m_pData) {
888!     sDescription += "\nData Follows:\n";
889
890      icMemDump(sDescription, m_pData, m_nDataSize);
891    }
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;
898    }
899!   sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
900    sDescription += buf;
901
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;
916
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;
922
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;
931    }
932!   sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
933    sDescription += buf;
934
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;
949
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;
955
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 ****
963
964    default:
965      int i;
966!     sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
967      sDescription += buf;
968
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;
972      }
973    }
974--- 250,260 ----
975
976    default:
977      int i;
978!     sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
979      sDescription += buf;
980
981      for (i=0; i<m_nParameters; i++) {
982!       sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
983        sDescription += buf;
984      }
985    }
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;
993    }
994
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;
1001    }
1002
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;
1010      }
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;
1016      }
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;
1024      }
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;
1030      }
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;
1039      }
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;
1045      }
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;
1053      }
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;
1059      }
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;
1068      }
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;
1074      }
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;
1082      }
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;
1088      }
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;
1098      }
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;
1106      }
1107***************
1108*** 727,733 ****
1109      sDescription += buf;
1110      }
1111
1112!     sprintf(buf, "]\r\n");
1113      sDescription += buf;
1114    }
1115    else {
1116--- 727,733 ----
1117      sDescription += buf;
1118      }
1119
1120!     sprintf(buf, "]\n");
1121      sDescription += buf;
1122    }
1123    else {
1124***************
1125*** 744,752 ****
1126      sprintf(buf, "%.8f", m_endPoint);
1127      sDescription += buf;
1128      }
1129!     sprintf(buf, "]\r\n");
1130      sDescription += buf;
1131!     sDescription += "IN  OUT\r\n";
1132
1133      icUInt32Number i;
1134
1135--- 744,752 ----
1136      sprintf(buf, "%.8f", m_endPoint);
1137      sDescription += buf;
1138      }
1139!     sprintf(buf, "]\n");
1140      sDescription += buf;
1141!     sDescription += "IN  OUT\n";
1142
1143      icUInt32Number i;
1144
1145***************
1146*** 754,764 ****
1147      icFloatNumber last = (icFloatNumber)(m_nCount-1);
1148
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;
1152      }
1153    }
1154!   sDescription += "\r\n";
1155  }
1156
1157  /**
1158--- 754,764 ----
1159      icFloatNumber last = (icFloatNumber)(m_nCount-1);
1160
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;
1164      }
1165    }
1166!   sDescription += "\n";
1167  }
1168
1169  /**
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;
1177    }
1178
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;
1185    }
1186
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;
1194    }
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);
1200    }
1201
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;
1208    }
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);
1214    }
1215
1216***************
1217*** 1054,1060 ****
1218  {
1219    CIccCurveSegmentList::iterator i;
1220
1221!   sDescription += "BEGIN_CURVE\r\n";
1222    for (i=m_list->begin(); i!=m_list->end(); i++) {
1223      (*i)->Describe(sDescription);
1224    }
1225--- 1054,1060 ----
1226  {
1227    CIccCurveSegmentList::iterator i;
1228
1229!   sDescription += "BEGIN_CURVE\n";
1230    for (i=m_list->begin(); i!=m_list->end(); i++) {
1231      (*i)->Describe(sDescription);
1232    }
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;
1240    }
1241
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;
1248    }
1249
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;
1257    }
1258
1259--- 1349,1355 ----
1260    if (m_list->size()==0) {
1261      sReport += icValidateCriticalErrorMsg;
1262      sReport += sSigName;
1263!     sReport += " Has Empty CurveSegment!\n";
1264      return icValidateCriticalError;
1265    }
1266
1267***************
1268*** 1599,1609 ****
1269      icChar buf[81];
1270      int i;
1271
1272!     sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
1273      sDescription += buf;
1274
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;
1283
1284!     sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
1285      sDescription += buf;
1286
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;
1299    }
1300
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;
1307    }
1308
1309***************
1310*** 2042,2048 ****
1311    int i, j;
1312    icFloatNumber *data = m_pMatrix;
1313
1314!   sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
1315    sDescription += buf;
1316
1317    for (j=0; j<m_nOutputChannels; j++) {
1318--- 2042,2048 ----
1319    int i, j;
1320    icFloatNumber *data = m_pMatrix;
1321
1322!   sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
1323    sDescription += buf;
1324
1325    for (j=0; j<m_nOutputChannels; j++) {
1326***************
1327*** 2052,2058 ****
1328        sprintf(buf, "%12.8lf", data[i]);
1329        sDescription += buf;
1330      }
1331!     sprintf(buf, "  +  %12.8lf\r\n", m_pConstants[j]);
1332      sDescription += buf;
1333      data += i;
1334    }
1335--- 2052,2058 ----
1336        sprintf(buf, "%12.8lf", data[i]);
1337        sDescription += buf;
1338      }
1339!     sprintf(buf, "  +  %12.8lf\n", m_pConstants[j]);
1340      sDescription += buf;
1341      data += i;
1342    }
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;
1350    }
1351
1352--- 2273,2279 ----
1353      sReport += " - Element ";
1354      sSigName = Info.GetSigName(GetType());
1355      sReport += sSigName;
1356!     sReport += " Has Empty Matrix data!\n";
1357      return icValidateCriticalError;
1358    }
1359
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;
1367    }
1368
1369--- 2620,2626 ----
1370      sReport += " - Element ";
1371      sSigName = Info.GetSigName(GetType());
1372      sReport += sSigName;
1373!     sReport += " Has No CLUT!\n";
1374      return icValidateCriticalError;
1375    }
1376
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*** 107,126 ****
1381
1382  #else // non-PC, perhaps Mac or Linux
1383
1384!   #define ICCUINT64 unsigned long long
1385!   #define ICCINT64  long long
1386!   #define ICUINT64TYPE unsigned long long
1387!   #define ICINT64TYPE long long
1388!
1389!   #if defined(__APPLE__)
1390!     #if  defined(__LITTLE_ENDIAN__)
1391!       #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1392!     #else
1393!       #define ICC_BYTE_ORDER_BIG_ENDIAN
1394!     #endif
1395!   #else
1396!     #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1397!   #endif
1398
1399    #define ICCPROFLIB_API
1400    #define ICCPROFLIB_EXTERN
1401--- 107,129 ----
1402
1403  #else // non-PC, perhaps Mac or Linux
1404
1405! #include <sal/types.h>
1406! #include <osl/endian.h>
1407!
1408!   #define ICCUINT64 sal_uInt64
1409!   #define ICCINT64 sal_Int64
1410!   #define ICUINT64TYPE sal_uInt64
1411!   #define ICINT64TYPE sal_Int64
1412!   #define ICINT32TYPE sal_Int32
1413!   #define ICUINT32TYPE sal_uInt32
1414!
1415! #if defined(_LITTLE_ENDIAN)
1416! #    define ICC_BYTE_ORDER_LITTLE_ENDIAN
1417! #elif defined(_BIG_ENDIAN)
1418! #    define ICC_BYTE_ORDER_BIG_ENDIAN
1419! #else
1420! #    error "ENDIAN unknown"
1421! #endif
1422
1423    #define ICCPROFLIB_API
1424    #define ICCPROFLIB_EXTERN
1425*** misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp	Mon Aug 20 22:05:00 2007
1426--- misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp	Fri Jan 25 14:23:09 2008
1427***************
1428*** 567,573 ****
1429
1430    if (!ReadBasic(pIO)) {
1431      sReport += icValidateCriticalErrorMsg;
1432!     sReport += " - Unable to read profile!**\r\n\tProfile has invalid structure!\r\n";
1433      Cleanup();
1434
1435      return icValidateCriticalError;
1436--- 567,573 ----
1437
1438    if (!ReadBasic(pIO)) {
1439      sReport += icValidateCriticalErrorMsg;
1440!     sReport += " - Unable to read profile!**\n\tProfile has invalid structure!\n";
1441      Cleanup();
1442
1443      return icValidateCriticalError;
1444***************
1445*** 576,582 ****
1446    // Check profile header
1447    if (!CheckFileSize(pIO)) {
1448      sReport += icValidateNonCompliantMsg;
1449!     sReport += "Bad Header File Size\r\n";
1450      rv = icMaxStatus(rv, icValidateNonCompliant);
1451    }
1452
1453--- 576,582 ----
1454    // Check profile header
1455    if (!CheckFileSize(pIO)) {
1456      sReport += icValidateNonCompliantMsg;
1457!     sReport += "Bad Header File Size\n";
1458      rv = icMaxStatus(rv, icValidateNonCompliant);
1459    }
1460
1461***************
1462*** 588,594 ****
1463      CalcProfileID(pIO, &profileID);
1464      if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1465        sReport += icValidateNonCompliantMsg;
1466!       sReport += "Bad Profile ID\r\n";
1467
1468        rv = icMaxStatus(rv, icValidateNonCompliant);
1469      }
1470--- 588,594 ----
1471      CalcProfileID(pIO, &profileID);
1472      if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1473        sReport += icValidateNonCompliantMsg;
1474!       sReport += "Bad Profile ID\n";
1475
1476        rv = icMaxStatus(rv, icValidateNonCompliant);
1477      }
1478***************
1479*** 601,607 ****
1480        sReport += icValidateCriticalErrorMsg;
1481        sReport += " - ";
1482        sReport += Info.GetTagSigName(i->TagInfo.sig);
1483!       sReport += " - Tag has invalid structure!\r\n";
1484
1485        rv = icMaxStatus(rv, icValidateCriticalError);
1486      }
1487--- 601,607 ----
1488        sReport += icValidateCriticalErrorMsg;
1489        sReport += " - ";
1490        sReport += Info.GetTagSigName(i->TagInfo.sig);
1491!       sReport += " - Tag has invalid structure!\n";
1492
1493        rv = icMaxStatus(rv, icValidateCriticalError);
1494      }
1495***************
1496*** 1026,1032 ****
1497
1498    default:
1499      sReport += icValidateCriticalErrorMsg;
1500!     sprintf(buf, " - %s: Unknown profile class!\r\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1501      sReport += buf;
1502      rv = icMaxStatus(rv, icValidateCriticalError);
1503    }
1504--- 1026,1032 ----
1505
1506    default:
1507      sReport += icValidateCriticalErrorMsg;
1508!     sprintf(buf, " - %s: Unknown profile class!\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1509      sReport += buf;
1510      rv = icMaxStatus(rv, icValidateCriticalError);
1511    }
1512***************
1513*** 1033,1039 ****
1514
1515    if (!Info.IsValidSpace(m_Header.colorSpace)) {
1516      sReport += icValidateCriticalErrorMsg;
1517!     sprintf(buf, " - %s: Unknown color space!\r\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1518      sReport += buf;
1519      rv = icMaxStatus(rv, icValidateCriticalError);
1520    }
1521--- 1033,1039 ----
1522
1523    if (!Info.IsValidSpace(m_Header.colorSpace)) {
1524      sReport += icValidateCriticalErrorMsg;
1525!     sprintf(buf, " - %s: Unknown color space!\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1526      sReport += buf;
1527      rv = icMaxStatus(rv, icValidateCriticalError);
1528    }
1529***************
1530*** 1041,1047 ****
1531    if (m_Header.deviceClass==icSigLinkClass) {
1532      if (!Info.IsValidSpace(m_Header.pcs)) {
1533        sReport += icValidateCriticalErrorMsg;
1534!       sprintf(buf, " - %s: Unknown pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1535        sReport += buf;
1536        rv = icMaxStatus(rv, icValidateCriticalError);
1537      }
1538--- 1041,1047 ----
1539    if (m_Header.deviceClass==icSigLinkClass) {
1540      if (!Info.IsValidSpace(m_Header.pcs)) {
1541        sReport += icValidateCriticalErrorMsg;
1542!       sprintf(buf, " - %s: Unknown pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1543        sReport += buf;
1544        rv = icMaxStatus(rv, icValidateCriticalError);
1545      }
1546***************
1547*** 1049,1055 ****
1548    else {
1549      if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1550        sReport += icValidateCriticalErrorMsg;
1551!       sprintf(buf, " - %s: Invalid pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1552        sReport += buf;
1553        rv = icMaxStatus(rv, icValidateCriticalError);
1554      }
1555--- 1049,1055 ----
1556    else {
1557      if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1558        sReport += icValidateCriticalErrorMsg;
1559!       sprintf(buf, " - %s: Invalid pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1560        sReport += buf;
1561        rv = icMaxStatus(rv, icValidateCriticalError);
1562      }
1563***************
1564*** 1068,1074 ****
1565
1566    default:
1567      sReport += icValidateWarningMsg;
1568!     sprintf(buf, " - %s: Unknown platform signature.\r\n", Info.GetPlatformSigName(m_Header.platform));
1569      sReport += buf;
1570      rv = icMaxStatus(rv, icValidateWarning);
1571    }
1572--- 1068,1074 ----
1573
1574    default:
1575      sReport += icValidateWarningMsg;
1576!     sprintf(buf, " - %s: Unknown platform signature.\n", Info.GetPlatformSigName(m_Header.platform));
1577      sReport += buf;
1578      rv = icMaxStatus(rv, icValidateWarning);
1579    }
1580***************
1581*** 1095,1101 ****
1582
1583    default:
1584      sReport += icValidateWarningMsg;
1585!     sprintf(buf, " - %s: Unregisterd CMM signature.\r\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1586      sReport += buf;
1587      rv = icMaxStatus(rv, icValidateWarning);
1588    }
1589--- 1095,1101 ----
1590
1591    default:
1592      sReport += icValidateWarningMsg;
1593!     sprintf(buf, " - %s: Unregisterd CMM signature.\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1594      sReport += buf;
1595      rv = icMaxStatus(rv, icValidateWarning);
1596    }
1597***************
1598*** 1109,1115 ****
1599
1600    default:
1601      sReport += icValidateCriticalErrorMsg;
1602!     sprintf(buf, " - %s: Unknown rendering intent!\r\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1603      sReport += buf;
1604      rv = icMaxStatus(rv, icValidateCriticalError);
1605    }
1606--- 1109,1115 ----
1607
1608    default:
1609      sReport += icValidateCriticalErrorMsg;
1610!     sprintf(buf, " - %s: Unknown rendering intent!\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1611      sReport += buf;
1612      rv = icMaxStatus(rv, icValidateCriticalError);
1613    }
1614***************
1615*** 1120,1126 ****
1616    icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1617    if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1618      sReport += icValidateNonCompliantMsg;
1619!     sReport += " - Non D50 Illuminant XYZ values.\r\n";
1620      rv = icMaxStatus(rv, icValidateNonCompliant);
1621    }
1622
1623--- 1120,1126 ----
1624    icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1625    if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1626      sReport += icValidateNonCompliantMsg;
1627!     sReport += " - Non D50 Illuminant XYZ values.\n";
1628      rv = icMaxStatus(rv, icValidateNonCompliant);
1629    }
1630
1631***************
1632*** 1130,1136 ****
1633    }
1634    if (sum) {
1635      sReport += icValidateNonCompliantMsg;
1636!     sReport += " - Reserved value must be zero.\r\n";
1637      rv = icMaxStatus(rv, icValidateNonCompliant);
1638    }
1639
1640--- 1130,1136 ----
1641    }
1642    if (sum) {
1643      sReport += icValidateNonCompliantMsg;
1644!     sReport += " - Reserved value must be zero.\n";
1645      rv = icMaxStatus(rv, icValidateNonCompliant);
1646    }
1647
1648***************
1649*** 1163,1169 ****
1650      {
1651        sReport += icValidateWarningMsg;
1652        sReport += buf;
1653!       sReport += " - Tag exclusion test failed.\r\n";
1654        rv = false;
1655      }
1656    }
1657--- 1163,1169 ----
1658      {
1659        sReport += icValidateWarningMsg;
1660        sReport += buf;
1661!       sReport += " - Tag exclusion test failed.\n";
1662        rv = false;
1663      }
1664    }
1665***************
1666*** 1177,1183 ****
1667        {
1668          sReport += icValidateWarningMsg;
1669          sReport += buf;
1670!         sReport += " - Tag exclusion test failed.\r\n";
1671          rv = false;
1672        }
1673        break;
1674--- 1177,1183 ----
1675        {
1676          sReport += icValidateWarningMsg;
1677          sReport += buf;
1678!         sReport += " - Tag exclusion test failed.\n";
1679          rv = false;
1680        }
1681        break;
1682***************
1683*** 1192,1198 ****
1684        {
1685          sReport += icValidateWarningMsg;
1686          sReport += buf;
1687!         sReport += " - Tag exclusion test failed.\r\n";
1688          rv = false;
1689        }
1690        break;
1691--- 1192,1198 ----
1692        {
1693          sReport += icValidateWarningMsg;
1694          sReport += buf;
1695!         sReport += " - Tag exclusion test failed.\n";
1696          rv = false;
1697        }
1698        break;
1699***************
1700*** 1234,1240 ****
1701      if (!IsTypeValid(tagsig, typesig)) {
1702        sReport += icValidateNonCompliantMsg;
1703        sReport += buf;
1704!       sprintf(buf," - %s: Invalid tag type (Might be critical!).\r\n", Info.GetTagTypeSigName(typesig));
1705        sReport += buf;
1706        rv = icMaxStatus(rv, icValidateNonCompliant);
1707      }
1708--- 1234,1240 ----
1709      if (!IsTypeValid(tagsig, typesig)) {
1710        sReport += icValidateNonCompliantMsg;
1711        sReport += buf;
1712!       sprintf(buf," - %s: Invalid tag type (Might be critical!).\n", Info.GetTagTypeSigName(typesig));
1713        sReport += buf;
1714        rv = icMaxStatus(rv, icValidateNonCompliant);
1715      }
1716***************
1717*** 1477,1483 ****
1718  {
1719    if (m_Tags->size() <= 0) {
1720      sReport += icValidateCriticalErrorMsg;
1721!     sReport += "No tags present.\r\n";
1722      return icValidateCriticalError;
1723    }
1724
1725--- 1477,1483 ----
1726  {
1727    if (m_Tags->size() <= 0) {
1728      sReport += icValidateCriticalErrorMsg;
1729!     sReport += "No tags present.\n";
1730      return icValidateCriticalError;
1731    }
1732
1733***************
1734*** 1486,1492 ****
1735    if (!GetTag(icSigProfileDescriptionTag) ||
1736       !GetTag(icSigCopyrightTag)) {
1737         sReport += icValidateNonCompliantMsg;
1738!        sReport += "Required tags missing.\r\n";
1739         rv = icMaxStatus(rv, icValidateNonCompliant);
1740    }
1741
1742--- 1486,1492 ----
1743    if (!GetTag(icSigProfileDescriptionTag) ||
1744       !GetTag(icSigCopyrightTag)) {
1745         sReport += icValidateNonCompliantMsg;
1746!        sReport += "Required tags missing.\n";
1747         rv = icMaxStatus(rv, icValidateNonCompliant);
1748    }
1749
1750***************
1751*** 1495,1501 ****
1752    if (sig != icSigLinkClass) {
1753      if (!GetTag(icSigMediaWhitePointTag)) {
1754        sReport += icValidateCriticalErrorMsg;
1755!       sReport += "Media white point tag missing.\r\n";
1756        rv = icMaxStatus(rv, icValidateCriticalError);
1757      }
1758    }
1759--- 1495,1501 ----
1760    if (sig != icSigLinkClass) {
1761      if (!GetTag(icSigMediaWhitePointTag)) {
1762        sReport += icValidateCriticalErrorMsg;
1763!       sReport += "Media white point tag missing.\n";
1764        rv = icMaxStatus(rv, icValidateCriticalError);
1765      }
1766    }
1767***************
1768*** 1505,1511 ****
1769        if (m_Header.colorSpace == icSigGrayData) {
1770          if (!GetTag(icSigGrayTRCTag)) {
1771            sReport += icValidateCriticalErrorMsg;
1772!           sReport += "Gray TRC tag missing.\r\n";
1773            rv = icMaxStatus(rv, icValidateCriticalError);
1774          }
1775        }
1776--- 1505,1511 ----
1777        if (m_Header.colorSpace == icSigGrayData) {
1778          if (!GetTag(icSigGrayTRCTag)) {
1779            sReport += icValidateCriticalErrorMsg;
1780!           sReport += "Gray TRC tag missing.\n";
1781            rv = icMaxStatus(rv, icValidateCriticalError);
1782          }
1783        }
1784***************
1785*** 1515,1521 ****
1786               !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1787               !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1788                 sReport += icValidateCriticalErrorMsg;
1789!                sReport += "Critical tag(s) missing.\r\n";
1790                 rv = icMaxStatus(rv, icValidateCriticalError);
1791               }
1792          }
1793--- 1515,1521 ----
1794               !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1795               !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1796                 sReport += icValidateCriticalErrorMsg;
1797!                sReport += "Critical tag(s) missing.\n";
1798                 rv = icMaxStatus(rv, icValidateCriticalError);
1799               }
1800          }
1801***************
1802*** 1526,1532 ****
1803        if (m_Header.colorSpace == icSigGrayData) {
1804          if (!GetTag(icSigGrayTRCTag)) {
1805            sReport += icValidateCriticalErrorMsg;
1806!           sReport += "Gray TRC tag missing.\r\n";
1807            rv = icMaxStatus(rv, icValidateCriticalError);
1808          }
1809        }
1810--- 1526,1532 ----
1811        if (m_Header.colorSpace == icSigGrayData) {
1812          if (!GetTag(icSigGrayTRCTag)) {
1813            sReport += icValidateCriticalErrorMsg;
1814!           sReport += "Gray TRC tag missing.\n";
1815            rv = icMaxStatus(rv, icValidateCriticalError);
1816          }
1817        }
1818***************
1819*** 1536,1542 ****
1820               !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1821               !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1822                 sReport += icValidateCriticalErrorMsg;
1823!                sReport += "Critical tag(s) missing.\r\n";
1824                 rv = icMaxStatus(rv, icValidateCriticalError);
1825               }
1826          }
1827--- 1536,1542 ----
1828               !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1829               !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1830                 sReport += icValidateCriticalErrorMsg;
1831!                sReport += "Critical tag(s) missing.\n";
1832                 rv = icMaxStatus(rv, icValidateCriticalError);
1833               }
1834          }
1835***************
1836*** 1547,1553 ****
1837        if (m_Header.colorSpace == icSigGrayData) {
1838          if (!GetTag(icSigGrayTRCTag)) {
1839            sReport += icValidateCriticalErrorMsg;
1840!           sReport += "Gray TRC tag missing.\r\n";
1841            rv = icMaxStatus(rv, icValidateCriticalError);
1842          }
1843        }
1844--- 1547,1553 ----
1845        if (m_Header.colorSpace == icSigGrayData) {
1846          if (!GetTag(icSigGrayTRCTag)) {
1847            sReport += icValidateCriticalErrorMsg;
1848!           sReport += "Gray TRC tag missing.\n";
1849            rv = icMaxStatus(rv, icValidateCriticalError);
1850          }
1851        }
1852***************
1853*** 1556,1568 ****
1854             !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1855             !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1856               sReport += icValidateCriticalErrorMsg;
1857!              sReport += "Critical tag(s) missing.\r\n";
1858               rv = icMaxStatus(rv, icValidateCriticalError);
1859             }
1860
1861          if (!GetTag(icSigGamutTag)) {
1862            sReport += icValidateNonCompliantMsg;
1863!           sReport += "Gamut tag missing.\r\n";
1864            rv = icMaxStatus(rv, icValidateNonCompliant);
1865          }
1866
1867--- 1556,1568 ----
1868             !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1869             !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1870               sReport += icValidateCriticalErrorMsg;
1871!              sReport += "Critical tag(s) missing.\n";
1872               rv = icMaxStatus(rv, icValidateCriticalError);
1873             }
1874
1875          if (!GetTag(icSigGamutTag)) {
1876            sReport += icValidateNonCompliantMsg;
1877!           sReport += "Gamut tag missing.\n";
1878            rv = icMaxStatus(rv, icValidateNonCompliant);
1879          }
1880
1881***************
1882*** 1585,1591 ****
1883              case icSig16colorData:
1884                if (!GetTag(icSigColorantTableTag)) {
1885                  sReport += icValidateNonCompliantMsg;
1886!                 sReport += "xCLR output profile is missing colorantTableTag\r\n";
1887                  rv = icMaxStatus(rv, icValidateNonCompliant);
1888                }
1889
1890--- 1585,1591 ----
1891              case icSig16colorData:
1892                if (!GetTag(icSigColorantTableTag)) {
1893                  sReport += icValidateNonCompliantMsg;
1894!                 sReport += "xCLR output profile is missing colorantTableTag\n";
1895                  rv = icMaxStatus(rv, icValidateNonCompliant);
1896                }
1897
1898***************
1899*** 1599,1605 ****
1900      case icSigLinkClass:
1901        if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1902          sReport += icValidateCriticalErrorMsg;
1903!         sReport += "Critical tag(s) missing.\r\n";
1904          rv = icMaxStatus(rv, icValidateCriticalError);
1905        }
1906
1907--- 1599,1605 ----
1908      case icSigLinkClass:
1909        if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1910          sReport += icValidateCriticalErrorMsg;
1911!         sReport += "Critical tag(s) missing.\n";
1912          rv = icMaxStatus(rv, icValidateCriticalError);
1913        }
1914
1915***************
1916*** 1606,1612 ****
1917        if (icIsSpaceCLR(m_Header.colorSpace)) {
1918          if (!GetTag(icSigColorantTableTag)) {
1919            sReport += icValidateNonCompliantMsg;
1920!           sReport += "Required tag(s) missing.\r\n";
1921            rv = icMaxStatus(rv, icValidateNonCompliant);
1922          }
1923        }
1924--- 1606,1612 ----
1925        if (icIsSpaceCLR(m_Header.colorSpace)) {
1926          if (!GetTag(icSigColorantTableTag)) {
1927            sReport += icValidateNonCompliantMsg;
1928!           sReport += "Required tag(s) missing.\n";
1929            rv = icMaxStatus(rv, icValidateNonCompliant);
1930          }
1931        }
1932***************
1933*** 1614,1620 ****
1934        if (icIsSpaceCLR(m_Header.pcs)) {
1935          if (!GetTag(icSigColorantTableOutTag)) {
1936            sReport += icValidateNonCompliantMsg;
1937!           sReport += "Required tag(s) missing.\r\n";
1938            rv = icMaxStatus(rv, icValidateNonCompliant);
1939          }
1940        }
1941--- 1614,1620 ----
1942        if (icIsSpaceCLR(m_Header.pcs)) {
1943          if (!GetTag(icSigColorantTableOutTag)) {
1944            sReport += icValidateNonCompliantMsg;
1945!           sReport += "Required tag(s) missing.\n";
1946            rv = icMaxStatus(rv, icValidateNonCompliant);
1947          }
1948        }
1949***************
1950*** 1623,1629 ****
1951      case icSigColorSpaceClass:
1952        if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1953          sReport += icValidateCriticalErrorMsg;
1954!         sReport += "Critical tag(s) missing.\r\n";
1955          rv = icMaxStatus(rv, icValidateCriticalError);
1956        }
1957        break;
1958--- 1623,1629 ----
1959      case icSigColorSpaceClass:
1960        if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1961          sReport += icValidateCriticalErrorMsg;
1962!         sReport += "Critical tag(s) missing.\n";
1963          rv = icMaxStatus(rv, icValidateCriticalError);
1964        }
1965        break;
1966***************
1967*** 1631,1637 ****
1968      case icSigAbstractClass:
1969        if (!GetTag(icSigAToB0Tag)) {
1970          sReport += icValidateCriticalErrorMsg;
1971!         sReport += "Critical tag(s) missing.\r\n";
1972          rv = icMaxStatus(rv, icValidateCriticalError);
1973        }
1974        break;
1975--- 1631,1637 ----
1976      case icSigAbstractClass:
1977        if (!GetTag(icSigAToB0Tag)) {
1978          sReport += icValidateCriticalErrorMsg;
1979!         sReport += "Critical tag(s) missing.\n";
1980          rv = icMaxStatus(rv, icValidateCriticalError);
1981        }
1982        break;
1983***************
1984*** 1639,1645 ****
1985      case icSigNamedColorClass:
1986        if (!GetTag(icSigNamedColor2Tag)) {
1987          sReport += icValidateCriticalErrorMsg;
1988!         sReport += "Critical tag(s) missing.\r\n";
1989          rv = icMaxStatus(rv, icValidateCriticalError);
1990        }
1991
1992--- 1639,1645 ----
1993      case icSigNamedColorClass:
1994        if (!GetTag(icSigNamedColor2Tag)) {
1995          sReport += icValidateCriticalErrorMsg;
1996!         sReport += "Critical tag(s) missing.\n";
1997          rv = icMaxStatus(rv, icValidateCriticalError);
1998        }
1999
2000***************
2001*** 1647,1653 ****
2002
2003      default:
2004        sReport += icValidateCriticalErrorMsg;
2005!       sReport += "Unknown Profile Class.\r\n";
2006        rv = icMaxStatus(rv, icValidateCriticalError);
2007        break;
2008    }
2009--- 1647,1653 ----
2010
2011      default:
2012        sReport += icValidateCriticalErrorMsg;
2013!       sReport += "Unknown Profile Class.\n";
2014        rv = icMaxStatus(rv, icValidateCriticalError);
2015        break;
2016    }
2017***************
2018*** 1724,1730 ****
2019    // Check for duplicate tags
2020    if (!AreTagsUnique()) {
2021      sReport += icValidateWarning;
2022!     sReport += " - There are duplicate tags.\r\n";
2023      rv =icMaxStatus(rv, icValidateWarning);
2024    }
2025
2026--- 1724,1730 ----
2027    // Check for duplicate tags
2028    if (!AreTagsUnique()) {
2029      sReport += icValidateWarning;
2030!     sReport += " - There are duplicate tags.\n";
2031      rv =icMaxStatus(rv, icValidateWarning);
2032    }
2033
2034***************
2035*** 1979,1985 ****
2036      sReport = icValidateCriticalErrorMsg;
2037      sReport += " - ";
2038      sReport += szFilename;
2039!     sReport += "- Invalid Filename\r\n";
2040      delete pFileIO;
2041      return NULL;
2042    }
2043--- 1979,1985 ----
2044      sReport = icValidateCriticalErrorMsg;
2045      sReport += " - ";
2046      sReport += szFilename;
2047!     sReport += "- Invalid Filename\n";
2048      delete pFileIO;
2049      return NULL;
2050    }
2051*** misc/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp	Mon Aug 20 22:05:00 2007
2052--- misc/build/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp	Fri Jan 25 14:23:09 2008
2053***************
2054*** 166,172 ****
2055      CIccInfo Info;
2056      sReport += icValidateNonCompliantMsg;
2057      sReport += Info.GetSigName(sig);
2058!     sReport += " - Reserved Value must be zero.\r\n";
2059
2060      rv = icValidateNonCompliant;
2061    }
2062--- 166,172 ----
2063      CIccInfo Info;
2064      sReport += icValidateNonCompliantMsg;
2065      sReport += Info.GetSigName(sig);
2066!     sReport += " - Reserved Value must be zero.\n";
2067
2068      rv = icValidateNonCompliant;
2069    }
2070***************
2071*** 340,346 ****
2072    sprintf(buf, "%u Bytes.", m_nSize-4);
2073    sDescription += buf;
2074
2075!   sDescription += "\r\n\r\nData Follows:\r\n";
2076
2077    icMemDump(sDescription, m_pData+4, m_nSize-4);
2078  }
2079--- 340,346 ----
2080    sprintf(buf, "%u Bytes.", m_nSize-4);
2081    sDescription += buf;
2082
2083!   sDescription += "\n\nData Follows:\n";
2084
2085    icMemDump(sDescription, m_pData+4, m_nSize-4);
2086  }
2087***************
2088*** 511,517 ****
2089    if (m_szText && *m_szText)
2090      sDescription += m_szText;
2091
2092!   sDescription += "\"\r\n";
2093  }
2094
2095
2096--- 511,517 ----
2097    if (m_szText && *m_szText)
2098      sDescription += m_szText;
2099
2100!   sDescription += "\"\n";
2101  }
2102
2103
2104***************
2105*** 629,635 ****
2106        if (m_nBufSize<7) {
2107          sReport += icValidateNonCompliantMsg;
2108          sReport += sSigName;
2109!         sReport += " - Tag must have at least seven text characters.\r\n";
2110          rv = icMaxStatus(rv, icValidateNonCompliant);
2111        }
2112        break;
2113--- 629,635 ----
2114        if (m_nBufSize<7) {
2115          sReport += icValidateNonCompliantMsg;
2116          sReport += sSigName;
2117!         sReport += " - Tag must have at least seven text characters.\n";
2118          rv = icMaxStatus(rv, icValidateNonCompliant);
2119        }
2120        break;
2121***************
2122*** 636,642 ****
2123      default:
2124        sReport += icValidateWarningMsg;
2125        sReport += sSigName;
2126!       sReport += " - Unknown Tag.\r\n";
2127        rv = icMaxStatus(rv, icValidateWarning);
2128      }
2129      int i;
2130--- 636,642 ----
2131      default:
2132        sReport += icValidateWarningMsg;
2133        sReport += sSigName;
2134!       sReport += " - Unknown Tag.\n";
2135        rv = icMaxStatus(rv, icValidateWarning);
2136      }
2137      int i;
2138***************
2139*** 644,650 ****
2140        if (m_szText[i]&0x80) {
2141          sReport += icValidateWarning;
2142          sReport += sSigName;
2143!         sReport += " - Text do not contain 7bit data.\r\n";
2144        }
2145      }
2146    }
2147--- 644,650 ----
2148        if (m_szText[i]&0x80) {
2149          sReport += icValidateWarning;
2150          sReport += sSigName;
2151!         sReport += " - Text do not contain 7bit data.\n";
2152        }
2153      }
2154    }
2155***************
2156*** 651,657 ****
2157    else {
2158      sReport += icValidateWarningMsg;
2159      sReport += sSigName;
2160!     sReport += " - Empty Tag.\r\n";
2161      rv = icMaxStatus(rv, icValidateWarning);
2162    }
2163
2164--- 651,657 ----
2165    else {
2166      sReport += icValidateWarningMsg;
2167      sReport += sSigName;
2168!     sReport += " - Empty Tag.\n";
2169      rv = icMaxStatus(rv, icValidateWarning);
2170    }
2171
2172***************
2173*** 941,947 ****
2174    if (m_szText && *m_szText)
2175      sDescription += m_szText;
2176
2177!   sDescription += "\"\r\n";
2178  }
2179
2180
2181--- 941,947 ----
2182    if (m_szText && *m_szText)
2183      sDescription += m_szText;
2184
2185!   sDescription += "\"\n";
2186  }
2187
2188
2189***************
2190*** 1101,1107 ****
2191    if (m_nScriptSize>67) {
2192      sReport += icValidateNonCompliantMsg;
2193      sReport += sSigName;
2194!     sReport += " - ScriptCode count must not be greater than 67.\r\n";
2195
2196      rv =icMaxStatus(rv, icValidateNonCompliant);
2197    }
2198--- 1101,1107 ----
2199    if (m_nScriptSize>67) {
2200      sReport += icValidateNonCompliantMsg;
2201      sReport += sSigName;
2202!     sReport += " - ScriptCode count must not be greater than 67.\n";
2203
2204      rv =icMaxStatus(rv, icValidateNonCompliant);
2205    }
2206***************
2207*** 1260,1266 ****
2208    CIccInfo Fmt;
2209
2210    sDescription += Fmt.GetSigName(m_nSig);
2211!   sDescription += "\r\n";
2212  }
2213
2214
2215--- 1260,1266 ----
2216    CIccInfo Fmt;
2217
2218    sDescription += Fmt.GetSigName(m_nSig);
2219!   sDescription += "\n";
2220  }
2221
2222
2223***************
2224*** 1320,1326 ****
2225        {
2226          sReport += icValidateNonCompliantMsg;
2227          sReport += sSigName;
2228!         sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(m_nSig));
2229          sReport += buf;
2230          rv = icMaxStatus(rv, icValidateNonCompliant);
2231        }
2232--- 1320,1326 ----
2233        {
2234          sReport += icValidateNonCompliantMsg;
2235          sReport += sSigName;
2236!         sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(m_nSig));
2237          sReport += buf;
2238          rv = icMaxStatus(rv, icValidateNonCompliant);
2239        }
2240***************
2241*** 1336,1342 ****
2242        {
2243          sReport += icValidateNonCompliantMsg;
2244          sReport += sSigName;
2245!         sprintf(buf, " - %s: Unknown Reference Medium Gamut.\r\n", Info.GetSigName(m_nSig));
2246          sReport += buf;
2247          rv = icMaxStatus(rv, icValidateNonCompliant);
2248        }
2249--- 1336,1342 ----
2250        {
2251          sReport += icValidateNonCompliantMsg;
2252          sReport += sSigName;
2253!         sprintf(buf, " - %s: Unknown Reference Medium Gamut.\n", Info.GetSigName(m_nSig));
2254          sReport += buf;
2255          rv = icMaxStatus(rv, icValidateNonCompliant);
2256        }
2257***************
2258*** 1355,1361 ****
2259        {
2260          sReport += icValidateNonCompliantMsg;
2261          sReport += sSigName;
2262!         sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\r\n", Info.GetSigName(m_nSig));
2263          sReport += buf;
2264          rv = icMaxStatus(rv, icValidateNonCompliant);
2265        }
2266--- 1355,1361 ----
2267        {
2268          sReport += icValidateNonCompliantMsg;
2269          sReport += sSigName;
2270!         sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\n", Info.GetSigName(m_nSig));
2271          sReport += buf;
2272          rv = icMaxStatus(rv, icValidateNonCompliant);
2273        }
2274***************
2275*** 1686,1692 ****
2276
2277    sDescription.reserve(sDescription.size() + m_nSize*79);
2278
2279!   sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\r\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2280    sDescription += buf;
2281
2282    for (i=0; i<m_nSize; i++) {
2283--- 1686,1692 ----
2284
2285    sDescription.reserve(sDescription.size() + m_nSize*79);
2286
2287!   sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2288    sDescription += buf;
2289
2290    for (i=0; i<m_nSize; i++) {
2291***************
2292*** 1717,1723 ****
2293          sDescription += buf;
2294        }
2295      }
2296!     sDescription += "\r\n";
2297
2298      pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2299    }
2300--- 1717,1723 ----
2301          sDescription += buf;
2302        }
2303      }
2304!     sDescription += "\n";
2305
2306      pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2307    }
2308***************
2309*** 2082,2088 ****
2310    if (!m_nSize) {
2311      sReport += icValidateWarningMsg;
2312      sReport += sSigName;
2313!     sReport += " - Empty tag!\r\n";
2314      rv = icMaxStatus(rv, icValidateWarning);
2315    }
2316
2317--- 2082,2088 ----
2318    if (!m_nSize) {
2319      sReport += icValidateWarningMsg;
2320      sReport += sSigName;
2321!     sReport += " - Empty tag!\n";
2322      rv = icMaxStatus(rv, icValidateWarning);
2323    }
2324
2325***************
2326*** 2092,2098 ****
2327        if (m_nDeviceCoords != nCoords) {
2328          sReport += icValidateNonCompliantMsg;
2329          sReport += sSigName;
2330!         sReport += " - Incorrect number of device co-ordinates.\r\n";
2331          rv = icMaxStatus(rv, icValidateNonCompliant);
2332        }
2333      }
2334--- 2092,2098 ----
2335        if (m_nDeviceCoords != nCoords) {
2336          sReport += icValidateNonCompliantMsg;
2337          sReport += sSigName;
2338!         sReport += " - Incorrect number of device co-ordinates.\n";
2339          rv = icMaxStatus(rv, icValidateNonCompliant);
2340        }
2341      }
2342***************
2343*** 2099,2105 ****
2344      else {
2345        sReport += icValidateWarningMsg;
2346        sReport += sSigName;
2347!       sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2348        rv = icMaxStatus(rv, icValidateWarning);
2349      }
2350    }
2351--- 2099,2105 ----
2352      else {
2353        sReport += icValidateWarningMsg;
2354        sReport += sSigName;
2355!       sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2356        rv = icMaxStatus(rv, icValidateWarning);
2357      }
2358    }
2359***************
2360*** 2285,2291 ****
2361    icChar buf[128];
2362
2363    if (m_nSize == 1 ) {
2364!     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));
2365      sDescription += buf;
2366    }
2367    else {
2368--- 2285,2291 ----
2369    icChar buf[128];
2370
2371    if (m_nSize == 1 ) {
2372!     sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
2373      sDescription += buf;
2374    }
2375    else {
2376***************
2377*** 2293,2299 ****
2378      sDescription.reserve(sDescription.size() + m_nSize*79);
2379
2380      for (i=0; i<m_nSize; i++) {
2381!       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));
2382        sDescription += buf;
2383      }
2384    }
2385--- 2293,2299 ----
2386      sDescription.reserve(sDescription.size() + m_nSize*79);
2387
2388      for (i=0; i<m_nSize; i++) {
2389!       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));
2390        sDescription += buf;
2391      }
2392    }
2393***************
2394*** 2347,2353 ****
2395    if (!m_nSize) {
2396      sReport += icValidateWarningMsg;
2397      sReport += sSigName;
2398!     sReport += " - Empty tag.\r\n";
2399
2400      rv = icMaxStatus(rv, icValidateWarning);
2401      return rv;
2402--- 2347,2353 ----
2403    if (!m_nSize) {
2404      sReport += icValidateWarningMsg;
2405      sReport += sSigName;
2406!     sReport += " - Empty tag.\n";
2407
2408      rv = icMaxStatus(rv, icValidateWarning);
2409      return rv;
2410***************
2411*** 2553,2566 ****
2412
2413    icUInt32Number i;
2414    //sDescription.reserve(sDescription.size() + m_nChannels*79);
2415!   sprintf(buf, "Number of Channels : %u\r\n", m_nChannels);
2416    sDescription += buf;
2417
2418!   sprintf(buf, "Colorant Encoding : %s\r\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2419    sDescription += buf;
2420
2421    for (i=0; i<m_nChannels; i++) {
2422!     sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\r\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2423      sDescription += buf;
2424    }
2425
2426--- 2553,2566 ----
2427
2428    icUInt32Number i;
2429    //sDescription.reserve(sDescription.size() + m_nChannels*79);
2430!   sprintf(buf, "Number of Channels : %u\n", m_nChannels);
2431    sDescription += buf;
2432
2433!   sprintf(buf, "Colorant Encoding : %s\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2434    sDescription += buf;
2435
2436    for (i=0; i<m_nChannels; i++) {
2437!     sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2438      sDescription += buf;
2439    }
2440
2441***************
2442*** 2617,2623 ****
2443      if (m_nChannels!=3) {
2444        sReport += icValidateCriticalErrorMsg;
2445        sReport += sSigName;
2446!       sReport += " - Number of device channels must be three.\r\n";
2447        rv = icMaxStatus(rv, icValidateCriticalError);
2448      }
2449
2450--- 2617,2623 ----
2451      if (m_nChannels!=3) {
2452        sReport += icValidateCriticalErrorMsg;
2453        sReport += sSigName;
2454!       sReport += " - Number of device channels must be three.\n";
2455        rv = icMaxStatus(rv, icValidateCriticalError);
2456      }
2457
2458***************
2459*** 2629,2635 ****
2460                 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2461                  sReport += icValidateNonCompliantMsg;
2462                  sReport += sSigName;
2463!                 sReport += " - Chromaticity data does not match specification.\r\n";
2464                  rv = icMaxStatus(rv, icValidateNonCompliant);
2465                }
2466            break;
2467--- 2629,2635 ----
2468                 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2469                  sReport += icValidateNonCompliantMsg;
2470                  sReport += sSigName;
2471!                 sReport += " - Chromaticity data does not match specification.\n";
2472                  rv = icMaxStatus(rv, icValidateNonCompliant);
2473                }
2474            break;
2475***************
2476*** 2642,2648 ****
2477                 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2478                sReport += icValidateNonCompliantMsg;
2479                sReport += sSigName;
2480!               sReport += " - Chromaticity data does not match specification.\r\n";
2481                rv = icMaxStatus(rv, icValidateNonCompliant);
2482              }
2483              break;
2484--- 2642,2648 ----
2485                 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2486                sReport += icValidateNonCompliantMsg;
2487                sReport += sSigName;
2488!               sReport += " - Chromaticity data does not match specification.\n";
2489                rv = icMaxStatus(rv, icValidateNonCompliant);
2490              }
2491              break;
2492***************
2493*** 2655,2661 ****
2494                 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2495                sReport += icValidateNonCompliantMsg;
2496                sReport += sSigName;
2497!               sReport += " - Chromaticity data does not match specification.\r\n";
2498                rv = icMaxStatus(rv, icValidateNonCompliant);
2499              }
2500              break;
2501--- 2655,2661 ----
2502                 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2503                sReport += icValidateNonCompliantMsg;
2504                sReport += sSigName;
2505!               sReport += " - Chromaticity data does not match specification.\n";
2506                rv = icMaxStatus(rv, icValidateNonCompliant);
2507              }
2508              break;
2509***************
2510*** 2668,2674 ****
2511                 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2512                sReport += icValidateNonCompliantMsg;
2513                sReport += sSigName;
2514!               sReport += " - Chromaticity data does not match specification.\r\n";
2515                rv = icMaxStatus(rv, icValidateNonCompliant);
2516              }
2517              break;
2518--- 2668,2674 ----
2519                 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2520                sReport += icValidateNonCompliantMsg;
2521                sReport += sSigName;
2522!               sReport += " - Chromaticity data does not match specification.\n";
2523                rv = icMaxStatus(rv, icValidateNonCompliant);
2524              }
2525              break;
2526***************
2527*** 2678,2684 ****
2528          {
2529            sReport += icValidateNonCompliantMsg;
2530            sReport += sSigName;
2531!           sReport += " - Invalid colorant type encoding.\r\n";
2532            rv = icMaxStatus(rv, icValidateNonCompliant);
2533          }
2534      }
2535--- 2678,2684 ----
2536          {
2537            sReport += icValidateNonCompliantMsg;
2538            sReport += sSigName;
2539!           sReport += " - Invalid colorant type encoding.\n";
2540            rv = icMaxStatus(rv, icValidateNonCompliant);
2541          }
2542      }
2543***************
2544*** 2884,2892 ****
2545
2546    if (m_nSize == 1 ) {
2547      if (Tsig==icSigS15Fixed16ArrayType)
2548!       sprintf(buf, "Value = %.4lf\r\n", icFtoD(m_Num[0]));
2549      else
2550!       sprintf(buf, "Value = %.4lf\r\n", icUFtoD(m_Num[0]));
2551      sDescription += buf;
2552    }
2553    else {
2554--- 2884,2892 ----
2555
2556    if (m_nSize == 1 ) {
2557      if (Tsig==icSigS15Fixed16ArrayType)
2558!       sprintf(buf, "Value = %.4lf\n", icFtoD(m_Num[0]));
2559      else
2560!       sprintf(buf, "Value = %.4lf\n", icUFtoD(m_Num[0]));
2561      sDescription += buf;
2562    }
2563    else {
2564***************
2565*** 2893,2910 ****
2566      icUInt32Number i;
2567
2568      if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2569!       sDescription += "Matrix Form:\r\n";
2570        icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2571
2572!       sDescription += "\r\nArrayForm:\r\n";
2573      }
2574      sDescription.reserve(sDescription.size() + m_nSize*79);
2575
2576      for (i=0; i<m_nSize; i++) {
2577        if (Tsig==icSigS15Fixed16ArrayType)
2578!         sprintf(buf, "Value[%u] = %.4lf\r\n", i, icFtoD(m_Num[i]));
2579        else
2580!         sprintf(buf, "Value[%u] = %.4lf\r\n", i, icUFtoD(m_Num[i]));
2581        sDescription += buf;
2582      }
2583    }
2584--- 2893,2910 ----
2585      icUInt32Number i;
2586
2587      if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2588!       sDescription += "Matrix Form:\n";
2589        icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2590
2591!       sDescription += "\nArrayForm:\n";
2592      }
2593      sDescription.reserve(sDescription.size() + m_nSize*79);
2594
2595      for (i=0; i<m_nSize; i++) {
2596        if (Tsig==icSigS15Fixed16ArrayType)
2597!         sprintf(buf, "Value[%u] = %.4lf\n", i, icFtoD(m_Num[i]));
2598        else
2599!         sprintf(buf, "Value[%u] = %.4lf\n", i, icUFtoD(m_Num[i]));
2600        sDescription += buf;
2601      }
2602    }
2603***************
2604*** 3172,3178 ****
2605    icChar buf[128];
2606
2607    if (m_nSize == 1 ) {
2608!     sprintf(buf, "Value = %u (0x%x)\r\n", m_Num[0], m_Num[0]);
2609      sDescription += buf;
2610    }
2611    else {
2612--- 3172,3178 ----
2613    icChar buf[128];
2614
2615    if (m_nSize == 1 ) {
2616!     sprintf(buf, "Value = %u (0x%x)\n", m_Num[0], m_Num[0]);
2617      sDescription += buf;
2618    }
2619    else {
2620***************
2621*** 3180,3186 ****
2622      sDescription.reserve(sDescription.size() + m_nSize*79);
2623
2624      for (i=0; i<m_nSize; i++) {
2625!       sprintf(buf, "Value[%u] = %u (0x%x)\r\n", i, m_Num[i], m_Num[i]);
2626        sDescription += buf;
2627      }
2628    }
2629--- 3180,3186 ----
2630      sDescription.reserve(sDescription.size() + m_nSize*79);
2631
2632      for (i=0; i<m_nSize; i++) {
2633!       sprintf(buf, "Value[%u] = %u (0x%x)\n", i, m_Num[i], m_Num[i]);
2634        sDescription += buf;
2635      }
2636    }
2637***************
2638*** 3374,3388 ****
2639    CIccInfo Fmt;
2640    icChar buf[128];
2641
2642!    sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\r\n";
2643!    sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n",
2644             icFtoD(m_Data.backing.X),
2645             icFtoD(m_Data.backing.Y),
2646             icFtoD(m_Data.backing.Z));
2647     sDescription += buf;
2648!    sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\r\n";
2649!    sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\r\n";
2650!    sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\r\n";
2651  }
2652
2653
2654--- 3374,3388 ----
2655    CIccInfo Fmt;
2656    icChar buf[128];
2657
2658!    sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\n";
2659!    sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
2660             icFtoD(m_Data.backing.X),
2661             icFtoD(m_Data.backing.Y),
2662             icFtoD(m_Data.backing.Z));
2663     sDescription += buf;
2664!    sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\n";
2665!    sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\n";
2666!    sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\n";
2667  }
2668
2669
2670***************
2671*** 3416,3422 ****
2672    default:
2673      sReport += icValidateNonCompliantMsg;
2674      sReport += sSigName;
2675!     sReport += " - Invalid standard observer encoding.\r\n";
2676      rv = icMaxStatus(rv, icValidateNonCompliant);
2677    }
2678
2679--- 3416,3422 ----
2680    default:
2681      sReport += icValidateNonCompliantMsg;
2682      sReport += sSigName;
2683!     sReport += " - Invalid standard observer encoding.\n";
2684      rv = icMaxStatus(rv, icValidateNonCompliant);
2685    }
2686
2687***************
2688*** 3429,3435 ****
2689    default:
2690      sReport += icValidateNonCompliantMsg;
2691      sReport += sSigName;
2692!     sReport += " - Invalid measurement geometry encoding.\r\n";
2693      rv = icMaxStatus(rv, icValidateNonCompliant);
2694    }
2695
2696--- 3429,3435 ----
2697    default:
2698      sReport += icValidateNonCompliantMsg;
2699      sReport += sSigName;
2700!     sReport += " - Invalid measurement geometry encoding.\n";
2701      rv = icMaxStatus(rv, icValidateNonCompliant);
2702    }
2703
2704***************
2705*** 3448,3454 ****
2706    default:
2707      sReport += icValidateNonCompliantMsg;
2708      sReport += sSigName;
2709!     sReport += " - Invalid standard illuminant encoding.\r\n";
2710      rv = icMaxStatus(rv, icValidateNonCompliant);
2711    }
2712
2713--- 3448,3454 ----
2714    default:
2715      sReport += icValidateNonCompliantMsg;
2716      sReport += sSigName;
2717!     sReport += " - Invalid standard illuminant encoding.\n";
2718      rv = icMaxStatus(rv, icValidateNonCompliant);
2719    }
2720
2721***************
2722*** 3902,3910 ****
2723
2724    for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2725      if (i!=m_Strings->begin())
2726!       sDescription += "\r\n";
2727
2728!     sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\r\n",
2729        i->m_nLanguageCode>>8, i->m_nLanguageCode,
2730        i->m_nCountryCode>>8, i->m_nCountryCode);
2731
2732--- 3902,3910 ----
2733
2734    for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2735      if (i!=m_Strings->begin())
2736!       sDescription += "\n";
2737
2738!     sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\n",
2739        i->m_nLanguageCode>>8, i->m_nLanguageCode,
2740        i->m_nCountryCode>>8, i->m_nCountryCode);
2741
2742***************
2743*** 3919,3925 ****
2744      i->GetAnsi(szBuf, nSize);
2745      sDescription += "\"";
2746      sDescription += szBuf;
2747!     sDescription += "\"\r\n";
2748    }
2749  }
2750
2751--- 3919,3925 ----
2752      i->GetAnsi(szBuf, nSize);
2753      sDescription += "\"";
2754      sDescription += szBuf;
2755!     sDescription += "\"\n";
2756    }
2757  }
2758
2759***************
2760*** 3948,3954 ****
2761    if (!m_Strings->size()) {
2762      sReport += icValidateWarningMsg;
2763      sReport += sSigName;
2764!     sReport += " - Empty tag!\r\n";
2765      rv = icMaxStatus(rv, icValidateWarning);
2766    }
2767
2768--- 3948,3954 ----
2769    if (!m_Strings->size()) {
2770      sReport += icValidateWarningMsg;
2771      sReport += sSigName;
2772!     sReport += " - Empty tag!\n";
2773      rv = icMaxStatus(rv, icValidateWarning);
2774    }
2775
2776***************
2777*** 4246,4260 ****
2778  {
2779    icChar buf[128];
2780
2781!   sDescription = "\r\nData:\r\n";
2782
2783    if (IsTypeAscii()) {
2784!       sprintf(buf, "%s\r\n", (icChar*)m_pData);
2785        sDescription += buf;
2786    }
2787    else
2788      for (int i = 0; i<(int)m_nSize; i++) {
2789!       sprintf(buf, "%d\r\n", m_pData[i]);
2790        sDescription += buf;
2791      }
2792
2793--- 4246,4260 ----
2794  {
2795    icChar buf[128];
2796
2797!   sDescription = "\nData:\n";
2798
2799    if (IsTypeAscii()) {
2800!       sprintf(buf, "%s\n", (icChar*)m_pData);
2801        sDescription += buf;
2802    }
2803    else
2804      for (int i = 0; i<(int)m_nSize; i++) {
2805!       sprintf(buf, "%d\n", m_pData[i]);
2806        sDescription += buf;
2807      }
2808
2809***************
2810*** 4312,4318 ****
2811    default:
2812      sReport += icValidateNonCompliantMsg;
2813      sReport += sSigName;
2814!     sReport += " - Invalid data flag encoding.\r\n";
2815      rv = icMaxStatus(rv, icValidateNonCompliant);
2816    }
2817
2818--- 4312,4318 ----
2819    default:
2820      sReport += icValidateNonCompliantMsg;
2821      sReport += sSigName;
2822!     sReport += " - Invalid data flag encoding.\n";
2823      rv = icMaxStatus(rv, icValidateNonCompliant);
2824    }
2825
2826***************
2827*** 4477,4487 ****
2828    icChar buf[128];
2829
2830    sDescription = "Date = ";
2831!   sprintf(buf, "%u-%u-%u\r\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2832    sDescription += buf;
2833
2834    sDescription += "Time = ";
2835!   sprintf(buf, "%u:%u:%u\r\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2836    sDescription += buf;
2837  }
2838
2839--- 4477,4487 ----
2840    icChar buf[128];
2841
2842    sDescription = "Date = ";
2843!   sprintf(buf, "%u-%u-%u\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2844    sDescription += buf;
2845
2846    sDescription += "Time = ";
2847!   sprintf(buf, "%u:%u:%u\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2848    sDescription += buf;
2849  }
2850
2851***************
2852*** 4697,4708 ****
2853  {
2854    icChar buf[128];
2855
2856!   sprintf(buf, "Colorant Count : %u\r\n", m_nCount);
2857    sDescription += buf;
2858!   sDescription += "Order of Colorants:\r\n";
2859
2860    for (int i=0; i<(int)m_nCount; i++) {
2861!     sprintf(buf, "%u\r\n", m_pData[i]);
2862      sDescription += buf;
2863    }
2864  }
2865--- 4697,4708 ----
2866  {
2867    icChar buf[128];
2868
2869!   sprintf(buf, "Colorant Count : %u\n", m_nCount);
2870    sDescription += buf;
2871!   sDescription += "Order of Colorants:\n";
2872
2873    for (int i=0; i<(int)m_nCount; i++) {
2874!     sprintf(buf, "%u\n", m_pData[i]);
2875      sDescription += buf;
2876    }
2877  }
2878***************
2879*** 4757,4763 ****
2880    if (!pProfile) {
2881      sReport += icValidateWarningMsg;
2882      sReport += sSigName;
2883!     sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2884      rv = icMaxStatus(rv, icValidateWarning);
2885      return rv;
2886    }
2887--- 4757,4763 ----
2888    if (!pProfile) {
2889      sReport += icValidateWarningMsg;
2890      sReport += sSigName;
2891!     sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2892      rv = icMaxStatus(rv, icValidateWarning);
2893      return rv;
2894    }
2895***************
2896*** 4765,4771 ****
2897    if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2898      sReport += icValidateNonCompliantMsg;
2899      sReport += sSigName;
2900!     sReport += " - Incorrect number of colorants.\r\n";
2901      rv = icMaxStatus(rv, icValidateNonCompliant);
2902    }
2903
2904--- 4765,4771 ----
2905    if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2906      sReport += icValidateNonCompliantMsg;
2907      sReport += sSigName;
2908!     sReport += " - Incorrect number of colorants.\n";
2909      rv = icMaxStatus(rv, icValidateNonCompliant);
2910    }
2911
2912***************
2913*** 4977,4983 ****
2914    icUInt32Number i, nLen, nMaxLen=0;
2915    icFloatNumber Lab[3];
2916
2917!   sprintf(buf, "BEGIN_COLORANTS %u\r\n", m_nCount);
2918    sDescription += buf;
2919
2920    for (i=0; i<m_nCount; i++) {
2921--- 4977,4983 ----
2922    icUInt32Number i, nLen, nMaxLen=0;
2923    icFloatNumber Lab[3];
2924
2925!   sprintf(buf, "BEGIN_COLORANTS %u\n", m_nCount);
2926    sDescription += buf;
2927
2928    for (i=0; i<m_nCount; i++) {
2929***************
2930*** 4988,4998 ****
2931    sDescription += "# NAME ";
2932
2933    if (m_PCS == icSigXYZData) {
2934!     sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\r\n");
2935      sDescription += buf;
2936    }
2937    else {
2938!     sprintf(buf, "Lab_L Lab_a Lab_b\r\n");
2939      sDescription += buf;
2940    }
2941    for (i=0; i<m_nCount; i++) {
2942--- 4988,4998 ----
2943    sDescription += "# NAME ";
2944
2945    if (m_PCS == icSigXYZData) {
2946!     sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\n");
2947      sDescription += buf;
2948    }
2949    else {
2950!     sprintf(buf, "Lab_L Lab_a Lab_b\n");
2951      sDescription += buf;
2952    }
2953    for (i=0; i<m_nCount; i++) {
2954***************
2955*** 5003,5009 ****
2956      sDescription += buf;
2957
2958      if (m_PCS == icSigXYZData) {
2959!       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]));
2960        sDescription += buf;
2961      }
2962      else {
2963--- 5003,5009 ----
2964      sDescription += buf;
2965
2966      if (m_PCS == icSigXYZData) {
2967!       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]));
2968        sDescription += buf;
2969      }
2970      else {
2971***************
2972*** 5011,5017 ****
2973        Lab[1] = icU16toF(m_pData[i].data[1]);
2974        Lab[2] = icU16toF(m_pData[i].data[2]);
2975        icLabFromPcs(Lab);
2976!       sprintf(buf, "%7.4lf %8.4lf %8.4lf\r\n", Lab[0], Lab[1], Lab[2]);
2977        sDescription += buf;
2978      }
2979    }
2980--- 5011,5017 ----
2981        Lab[1] = icU16toF(m_pData[i].data[1]);
2982        Lab[2] = icU16toF(m_pData[i].data[2]);
2983        icLabFromPcs(Lab);
2984!       sprintf(buf, "%7.4lf %8.4lf %8.4lf\n", Lab[0], Lab[1], Lab[2]);
2985        sDescription += buf;
2986      }
2987    }
2988***************
2989*** 5066,5072 ****
2990    if (!pProfile) {
2991      sReport += icValidateWarningMsg;
2992      sReport += sSigName;
2993!     sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2994      rv = icMaxStatus(rv, icValidateWarning);
2995      return rv;
2996    }
2997--- 5066,5072 ----
2998    if (!pProfile) {
2999      sReport += icValidateWarningMsg;
3000      sReport += sSigName;
3001!     sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3002      rv = icMaxStatus(rv, icValidateWarning);
3003      return rv;
3004    }
3005***************
3006*** 5076,5082 ****
3007      if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
3008        sReport += icValidateNonCompliantMsg;
3009        sReport += sSigName;
3010!       sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\r\n";
3011        rv = icMaxStatus(rv, icValidateNonCompliant);
3012      }
3013    }
3014--- 5076,5082 ----
3015      if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
3016        sReport += icValidateNonCompliantMsg;
3017        sReport += sSigName;
3018!       sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\n";
3019        rv = icMaxStatus(rv, icValidateNonCompliant);
3020      }
3021    }
3022***************
3023*** 5084,5090 ****
3024    if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3025      sReport += icValidateNonCompliantMsg;
3026      sReport += sSigName;
3027!     sReport += " - Incorrect number of colorants.\r\n";
3028      rv = icMaxStatus(rv, icValidateNonCompliant);
3029    }
3030
3031--- 5084,5090 ----
3032    if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3033      sReport += icValidateNonCompliantMsg;
3034      sReport += sSigName;
3035!     sReport += " - Incorrect number of colorants.\n";
3036      rv = icMaxStatus(rv, icValidateNonCompliant);
3037    }
3038
3039***************
3040*** 5261,5273 ****
3041    icChar buf[128];
3042    CIccInfo Fmt;
3043
3044!   sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
3045                 icFtoD(m_XYZIllum.X),
3046                 icFtoD(m_XYZIllum.Y),
3047                 icFtoD(m_XYZIllum.Z));
3048    sDescription += buf;
3049
3050!   sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
3051                 icFtoD(m_XYZSurround.X),
3052                 icFtoD(m_XYZSurround.Y),
3053                 icFtoD(m_XYZSurround.Z));
3054--- 5261,5273 ----
3055    icChar buf[128];
3056    CIccInfo Fmt;
3057
3058!   sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3059                 icFtoD(m_XYZIllum.X),
3060                 icFtoD(m_XYZIllum.Y),
3061                 icFtoD(m_XYZIllum.Z));
3062    sDescription += buf;
3063
3064!   sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3065                 icFtoD(m_XYZSurround.X),
3066                 icFtoD(m_XYZSurround.Y),
3067                 icFtoD(m_XYZSurround.Z));
3068***************
3069*** 5276,5282 ****
3070    sDescription += "Illuminant Type: ";
3071
3072    sDescription += Fmt.GetIlluminantName(m_illumType);
3073!   sDescription += "\r\n";
3074
3075  }
3076
3077--- 5276,5282 ----
3078    sDescription += "Illuminant Type: ";
3079
3080    sDescription += Fmt.GetIlluminantName(m_illumType);
3081!   sDescription += "\n";
3082
3083  }
3084
3085***************
3086*** 5800,5831 ****
3087    icChar buf[128], buf2[28];
3088    icUInt32Number count=0;
3089
3090!   sprintf(buf, "Number of Profile Description Structures: %u\r\n", m_Descriptions->size());
3091    sDescription += buf;
3092
3093    for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3094!     sDescription += "\r\n";
3095
3096!     sprintf(buf, "Profile Description Structure Number [%u] follows:\r\n", count+1);
3097      sDescription += buf;
3098
3099!     sprintf(buf, "Device Manufacturer Signature: %s\r\n", icGetSig(buf2, i->m_deviceMfg, false));
3100      sDescription += buf;
3101
3102!     sprintf(buf, "Device Model Signature: %s\r\n", icGetSig(buf2, i->m_deviceModel, false));
3103      sDescription += buf;
3104
3105!     sprintf(buf, "Device Attributes: %08x%08x\r\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3106      sDescription += buf;
3107
3108!     sprintf(buf, "Device Technology Signature: %s\r\n", icGetSig(buf2, i->m_technology, false));
3109      sDescription += buf;
3110
3111!     sprintf(buf, "Description of device manufacturer: \r\n");
3112      sDescription += buf;
3113      i->m_deviceMfgDesc.Describe(sDescription);
3114
3115!     sprintf(buf, "Description of device model: \r\n");
3116      sDescription += buf;
3117      i->m_deviceModelDesc.Describe(sDescription);
3118    }
3119--- 5800,5831 ----
3120    icChar buf[128], buf2[28];
3121    icUInt32Number count=0;
3122
3123!   sprintf(buf, "Number of Profile Description Structures: %u\n", m_Descriptions->size());
3124    sDescription += buf;
3125
3126    for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3127!     sDescription += "\n";
3128
3129!     sprintf(buf, "Profile Description Structure Number [%u] follows:\n", count+1);
3130      sDescription += buf;
3131
3132!     sprintf(buf, "Device Manufacturer Signature: %s\n", icGetSig(buf2, i->m_deviceMfg, false));
3133      sDescription += buf;
3134
3135!     sprintf(buf, "Device Model Signature: %s\n", icGetSig(buf2, i->m_deviceModel, false));
3136      sDescription += buf;
3137
3138!     sprintf(buf, "Device Attributes: %08x%08x\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3139      sDescription += buf;
3140
3141!     sprintf(buf, "Device Technology Signature: %s\n", icGetSig(buf2, i->m_technology, false));
3142      sDescription += buf;
3143
3144!     sprintf(buf, "Description of device manufacturer: \n");
3145      sDescription += buf;
3146      i->m_deviceMfgDesc.Describe(sDescription);
3147
3148!     sprintf(buf, "Description of device model: \n");
3149      sDescription += buf;
3150      i->m_deviceModelDesc.Describe(sDescription);
3151    }
3152***************
3153*** 5886,5892 ****
3154        {
3155          sReport += icValidateNonCompliantMsg;
3156          sReport += sSigName;
3157!         sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(i->m_technology));
3158          sReport += buf;
3159          rv = icMaxStatus(rv, icValidateNonCompliant);
3160        }
3161--- 5886,5892 ----
3162        {
3163          sReport += icValidateNonCompliantMsg;
3164          sReport += sSigName;
3165!         sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(i->m_technology));
3166          sReport += buf;
3167          rv = icMaxStatus(rv, icValidateNonCompliant);
3168        }
3169***************
3170*** 5896,5902 ****
3171        sReport += icValidateNonCompliantMsg;
3172        sReport += sSigName;
3173
3174!       sReport += " Contains non-aligned deviceMfgDesc text tag information\r\n";
3175
3176        rv = icMaxStatus(rv, icValidateNonCompliant);
3177      }
3178--- 5896,5902 ----
3179        sReport += icValidateNonCompliantMsg;
3180        sReport += sSigName;
3181
3182!       sReport += " Contains non-aligned deviceMfgDesc text tag information\n";
3183
3184        rv = icMaxStatus(rv, icValidateNonCompliant);
3185      }
3186***************
3187*** 5905,5911 ****
3188        sReport += icValidateNonCompliantMsg;
3189        sReport += sSigName;
3190
3191!       sReport += " Contains non-aligned deviceModelDesc text tag information\r\n";
3192
3193        rv = icMaxStatus(rv, icValidateNonCompliant);
3194      }
3195--- 5905,5911 ----
3196        sReport += icValidateNonCompliantMsg;
3197        sReport += sSigName;
3198
3199!       sReport += " Contains non-aligned deviceModelDesc text tag information\n";
3200
3201        rv = icMaxStatus(rv, icValidateNonCompliant);
3202      }
3203***************
3204*** 6174,6198 ****
3205    CIccResponse16List::iterator j;
3206
3207    sDescription += "Measurement Unit: ";
3208!   sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\r\n";
3209
3210
3211    for (int i=0; i<m_nChannels; i++) {
3212      nResponseList = m_Response16ListArray[i];
3213
3214!     sDescription += "\r\n";
3215!     sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i+1,
3216        icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3217      sDescription += buf;
3218
3219!     sprintf(buf, "Number of Measurements for Channel-%u : %u\r\n", i+1, nResponseList.size());
3220      sDescription += buf;
3221
3222!     sprintf(buf, "Measurement Data for Channel-%u follows:\r\n", i+1);
3223      sDescription += buf;
3224
3225      for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3226!       sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\r\n", j->deviceCode, icFtoD(j->measurementValue));
3227        sDescription += buf;
3228      }
3229    }
3230--- 6174,6198 ----
3231    CIccResponse16List::iterator j;
3232
3233    sDescription += "Measurement Unit: ";
3234!   sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\n";
3235
3236
3237    for (int i=0; i<m_nChannels; i++) {
3238      nResponseList = m_Response16ListArray[i];
3239
3240!     sDescription += "\n";
3241!     sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\n", i+1,
3242        icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3243      sDescription += buf;
3244
3245!     sprintf(buf, "Number of Measurements for Channel-%u : %u\n", i+1, nResponseList.size());
3246      sDescription += buf;
3247
3248!     sprintf(buf, "Measurement Data for Channel-%u follows:\n", i+1);
3249      sDescription += buf;
3250
3251      for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3252!       sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\n", j->deviceCode, icFtoD(j->measurementValue));
3253        sDescription += buf;
3254      }
3255    }
3256***************
3257*** 6234,6240 ****
3258    default:
3259      sReport += icValidateNonCompliantMsg;
3260      sReport += sSigName;
3261!     sReport += " - Unknown measurement unit signature.\r\n";
3262      rv = icMaxStatus(rv, icValidateNonCompliant);
3263    }
3264
3265--- 6234,6240 ----
3266    default:
3267      sReport += icValidateNonCompliantMsg;
3268      sReport += sSigName;
3269!     sReport += " - Unknown measurement unit signature.\n";
3270      rv = icMaxStatus(rv, icValidateNonCompliant);
3271    }
3272
3273***************
3274*** 6241,6247 ****
3275    if (!m_nChannels) {
3276      sReport += icValidateNonCompliantMsg;
3277      sReport += sSigName;
3278!     sReport += " - Incorrect number of channels.\r\n";
3279      rv = icMaxStatus(rv, icValidateNonCompliant);
3280      return rv;
3281    }
3282--- 6241,6247 ----
3283    if (!m_nChannels) {
3284      sReport += icValidateNonCompliantMsg;
3285      sReport += sSigName;
3286!     sReport += " - Incorrect number of channels.\n";
3287      rv = icMaxStatus(rv, icValidateNonCompliant);
3288      return rv;
3289    }
3290***************
3291*** 6479,6495 ****
3292    CIccResponseCurveSet::iterator i;
3293    icChar buf[128];
3294
3295!   sprintf(buf, "Number of Channels: %u\r\n", m_nChannels);
3296    sDescription += buf;
3297
3298!   sprintf(buf, "Number of Measurement Types used: %u\r\n", m_ResponseCurves->size());
3299    sDescription += buf;
3300
3301    int count = 0;
3302    for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3303!      sDescription += "\r\n";
3304
3305!     sprintf(buf, "Response Curve for measurement type [%u] follows:\r\n", count+1);
3306      sDescription += buf;
3307
3308      i->Describe(sDescription);
3309--- 6479,6495 ----
3310    CIccResponseCurveSet::iterator i;
3311    icChar buf[128];
3312
3313!   sprintf(buf, "Number of Channels: %u\n", m_nChannels);
3314    sDescription += buf;
3315
3316!   sprintf(buf, "Number of Measurement Types used: %u\n", m_ResponseCurves->size());
3317    sDescription += buf;
3318
3319    int count = 0;
3320    for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3321!      sDescription += "\n";
3322
3323!     sprintf(buf, "Response Curve for measurement type [%u] follows:\n", count+1);
3324      sDescription += buf;
3325
3326      i->Describe(sDescription);
3327***************
3328*** 6658,6664 ****
3329    if (!pProfile) {
3330      sReport += icValidateWarningMsg;
3331      sReport += sSigName;
3332!     sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3333      rv = icMaxStatus(rv, icValidateWarning);
3334      return rv;
3335    }
3336--- 6658,6664 ----
3337    if (!pProfile) {
3338      sReport += icValidateWarningMsg;
3339      sReport += sSigName;
3340!     sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3341      rv = icMaxStatus(rv, icValidateWarning);
3342      return rv;
3343    }
3344***************
3345*** 6666,6678 ****
3346    if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3347      sReport += icValidateWarningMsg;
3348      sReport += sSigName;
3349!     sReport += " - Incorrect number of channels.\r\n";
3350    }
3351
3352    if (!GetNumResponseCurveTypes()) {
3353      sReport += icValidateWarningMsg;
3354      sReport += sSigName;
3355!     sReport += " - Empty Tag!.\r\n";
3356      rv = icMaxStatus(rv, icValidateWarning);
3357    }
3358    else {
3359--- 6666,6678 ----
3360    if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3361      sReport += icValidateWarningMsg;
3362      sReport += sSigName;
3363!     sReport += " - Incorrect number of channels.\n";
3364    }
3365
3366    if (!GetNumResponseCurveTypes()) {
3367      sReport += icValidateWarningMsg;
3368      sReport += sSigName;
3369!     sReport += " - Empty Tag!.\n";
3370      rv = icMaxStatus(rv, icValidateWarning);
3371    }
3372    else {
3373*** misc/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp	Mon Aug 20 22:05:00 2007
3374--- misc/build/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp	Fri Jan 25 14:23:09 2008
3375***************
3376*** 323,345 ****
3377    icChar buf[128], *ptr;
3378
3379    if (!m_nSize) {
3380!     sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3381      sDescription += buf;
3382!     sDescription += "Y = X\r\n";
3383    }
3384    else if (m_nSize==1) {
3385      icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3386!     sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3387      sDescription += buf;
3388!     sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3389      sDescription += buf;
3390    }
3391    else {
3392      int i;
3393
3394!     sprintf(buf, "BEGIN_LUT In_Out 1 1\r\n");
3395      sDescription += buf;
3396!     sDescription += "IN OUT\r\n";
3397
3398      for (i=0; i<(int)m_nSize; i++) {
3399        ptr = buf;
3400--- 323,345 ----
3401    icChar buf[128], *ptr;
3402
3403    if (!m_nSize) {
3404!     sprintf(buf, "BEGIN_CURVE In_Out\n");
3405      sDescription += buf;
3406!     sDescription += "Y = X\n";
3407    }
3408    else if (m_nSize==1) {
3409      icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3410!     sprintf(buf, "BEGIN_CURVE In_Out\n");
3411      sDescription += buf;
3412!     sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3413      sDescription += buf;
3414    }
3415    else {
3416      int i;
3417
3418!     sprintf(buf, "BEGIN_LUT In_Out 1 1\n");
3419      sDescription += buf;
3420!     sDescription += "IN OUT\n";
3421
3422      for (i=0; i<(int)m_nSize; i++) {
3423        ptr = buf;
3424***************
3425*** 354,365 ****
3426
3427        ptr += strlen(ptr);
3428
3429!       strcpy(ptr, "\r\n");
3430
3431        sDescription += buf;
3432      }
3433    }
3434!   sDescription += "\r\n";
3435  }
3436
3437
3438--- 354,365 ----
3439
3440        ptr += strlen(ptr);
3441
3442!       strcpy(ptr, "\n");
3443
3444        sDescription += buf;
3445      }
3446    }
3447!   sDescription += "\n";
3448  }
3449
3450
3451***************
3452*** 383,405 ****
3453    icChar buf[128], *ptr;
3454
3455    if (!m_nSize) {
3456!     sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3457      sDescription += buf;
3458!     sDescription += "Y = X\r\n";
3459    }
3460    else if (m_nSize==1) {
3461      icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3462!     sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3463      sDescription += buf;
3464!     sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3465      sDescription += buf;
3466    }
3467    else {
3468      int i;
3469
3470!     sprintf(buf, "BEGIN_LUT %s 1 1\r\n", szName);
3471      sDescription += buf;
3472!     sDescription += "IN OUT\r\n";
3473
3474      sDescription.reserve(sDescription.size() + m_nSize * 20);
3475
3476--- 383,405 ----
3477    icChar buf[128], *ptr;
3478
3479    if (!m_nSize) {
3480!     sprintf(buf, "BEGIN_CURVE %s\n", szName);
3481      sDescription += buf;
3482!     sDescription += "Y = X\n";
3483    }
3484    else if (m_nSize==1) {
3485      icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3486!     sprintf(buf, "BEGIN_CURVE %s\n", szName);
3487      sDescription += buf;
3488!     sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3489      sDescription += buf;
3490    }
3491    else {
3492      int i;
3493
3494!     sprintf(buf, "BEGIN_LUT %s 1 1\n", szName);
3495      sDescription += buf;
3496!     sDescription += "IN OUT\n";
3497
3498      sDescription.reserve(sDescription.size() + m_nSize * 20);
3499
3500***************
3501*** 416,427 ****
3502
3503        ptr += strlen(ptr);
3504
3505!       strcpy(ptr, "\r\n");
3506
3507        sDescription += buf;
3508      }
3509    }
3510!   sDescription += "\r\n";
3511  }
3512
3513
3514--- 416,427 ----
3515
3516        ptr += strlen(ptr);
3517
3518!       strcpy(ptr, "\n");
3519
3520        sDescription += buf;
3521      }
3522    }
3523!   sDescription += "\n";
3524  }
3525
3526
3527***************
3528*** 614,620 ****
3529          if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3530            sReport += icValidateWarningMsg;
3531            sReport += sSigName;
3532!           sReport += " - Curve cannot be accurately inverted.\r\n";
3533            rv = icMaxStatus(rv, icValidateWarning);
3534          }
3535        }
3536--- 614,620 ----
3537          if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3538            sReport += icValidateWarningMsg;
3539            sReport += sSigName;
3540!           sReport += " - Curve cannot be accurately inverted.\n";
3541            rv = icMaxStatus(rv, icValidateWarning);
3542          }
3543        }
3544***************
3545*** 822,877 ****
3546  {
3547    icChar buf[128];
3548
3549!   sprintf(buf, "FunctionType: %04Xh\r\n", m_nFunctionType);
3550    sDescription += buf;
3551
3552    switch(m_nFunctionType) {
3553  case 0x0000:
3554!   sprintf(buf, "Y = X ^ %.4lf\r\n", icFtoD(m_Param[0]));
3555    sDescription += buf;
3556    return;
3557
3558  case 0x0001:
3559!   sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf   when (X >= %.4lf / %.4lf)\r\n",
3560      icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3561      -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3562    sDescription += buf;
3563
3564!   sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\r\n",
3565      -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3566    sDescription += buf;
3567    return;
3568
3569  case 0x0002:
3570!   sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf   when (X >= %.4lf / %.4lf)\r\n",
3571      icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3572      icFtoD(m_Param[3]),
3573      -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3574    sDescription += buf;
3575
3576!   sprintf(buf, "Y = %.4lf   when (X < %.4lf / %.4lf)\r\n", icFtoD(m_Param[3]),
3577      -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3578    sDescription += buf;
3579    return;
3580
3581  case 0x0003:
3582!   sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf   when (X >= %.4lf)\r\n",
3583      icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3584      icFtoD(m_Param[4]));
3585    sDescription += buf;
3586
3587!   sprintf(buf, "Y = %lf * X   when (X < %.4lf)\r\n",
3588      icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3589    sDescription += buf;
3590    return;
3591
3592  case 0x0004:
3593!   sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf  when (X >= %.4lf)\r\n",
3594      icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3595      icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3596    sDescription += buf;
3597
3598!   sprintf(buf, "Y = %lf * X + %.4lf  when (X < %.4lf)\r\n",
3599      icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3600    sDescription += buf;
3601    return;
3602--- 822,877 ----
3603  {
3604    icChar buf[128];
3605
3606!   sprintf(buf, "FunctionType: %04Xh\n", m_nFunctionType);
3607    sDescription += buf;
3608
3609    switch(m_nFunctionType) {
3610  case 0x0000:
3611!   sprintf(buf, "Y = X ^ %.4lf\n", icFtoD(m_Param[0]));
3612    sDescription += buf;
3613    return;
3614
3615  case 0x0001:
3616!   sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf   when (X >= %.4lf / %.4lf)\n",
3617      icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3618      -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3619    sDescription += buf;
3620
3621!   sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\n",
3622      -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3623    sDescription += buf;
3624    return;
3625
3626  case 0x0002:
3627!   sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf   when (X >= %.4lf / %.4lf)\n",
3628      icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3629      icFtoD(m_Param[3]),
3630      -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3631    sDescription += buf;
3632
3633!   sprintf(buf, "Y = %.4lf   when (X < %.4lf / %.4lf)\n", icFtoD(m_Param[3]),
3634      -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3635    sDescription += buf;
3636    return;
3637
3638  case 0x0003:
3639!   sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf   when (X >= %.4lf)\n",
3640      icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3641      icFtoD(m_Param[4]));
3642    sDescription += buf;
3643
3644!   sprintf(buf, "Y = %lf * X   when (X < %.4lf)\n",
3645      icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3646    sDescription += buf;
3647    return;
3648
3649  case 0x0004:
3650!   sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf  when (X >= %.4lf)\n",
3651      icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3652      icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3653    sDescription += buf;
3654
3655!   sprintf(buf, "Y = %lf * X + %.4lf  when (X < %.4lf)\n",
3656      icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3657    sDescription += buf;
3658    return;
3659***************
3660*** 878,888 ****
3661
3662  default:
3663    int i;
3664!   sprintf(buf, "Unknown Function with %d parameters:\r\n");
3665    sDescription += buf;
3666
3667    for (i=0; i<m_nNumParam; i++) {
3668!     sprintf(buf, "Param[%d] = %.4lf\r\n", i, icFtoD(m_Param[i]));
3669      sDescription += buf;
3670    }
3671    }
3672--- 878,888 ----
3673
3674  default:
3675    int i;
3676!   sprintf(buf, "Unknown Function with %d parameters:\n", m_nNumParam);
3677    sDescription += buf;
3678
3679    for (i=0; i<m_nNumParam; i++) {
3680!     sprintf(buf, "Param[%d] = %.4lf\n", i, icFtoD(m_Param[i]));
3681      sDescription += buf;
3682    }
3683    }
3684***************
3685*** 907,916 ****
3686  {
3687    icChar buf[128];
3688
3689!   sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3690    sDescription += buf;
3691    Describe(sDescription);
3692!   sDescription += "\r\n";
3693  }
3694
3695
3696--- 907,916 ----
3697  {
3698    icChar buf[128];
3699
3700!   sprintf(buf, "BEGIN_CURVE %s\n", szName);
3701    sDescription += buf;
3702    Describe(sDescription);
3703!   sDescription += "\n";
3704  }
3705
3706
3707***************
3708*** 1106,1112 ****
3709    if (m_nReserved2!=0) {
3710      sReport += icValidateNonCompliantMsg;
3711      sReport += sSigName;
3712!     sReport += " - Reserved Value must be zero.\r\n";
3713
3714      rv = icMaxStatus(rv, icValidateNonCompliant);
3715    }
3716--- 1106,1112 ----
3717    if (m_nReserved2!=0) {
3718      sReport += icValidateNonCompliantMsg;
3719      sReport += sSigName;
3720!     sReport += " - Reserved Value must be zero.\n";
3721
3722      rv = icMaxStatus(rv, icValidateNonCompliant);
3723    }
3724***************
3725*** 1116,1122 ****
3726    if (m_nNumParam!=1) {
3727      sReport += icValidateCriticalErrorMsg;
3728      sReport += sSigName;
3729!     sReport += " - Number of parameters inconsistent with function type.\r\n";
3730      rv = icMaxStatus(rv, icValidateCriticalError);
3731    }
3732    break;
3733--- 1116,1122 ----
3734    if (m_nNumParam!=1) {
3735      sReport += icValidateCriticalErrorMsg;
3736      sReport += sSigName;
3737!     sReport += " - Number of parameters inconsistent with function type.\n";
3738      rv = icMaxStatus(rv, icValidateCriticalError);
3739    }
3740    break;
3741***************
3742*** 1125,1131 ****
3743    if (m_nNumParam!=3) {
3744      sReport += icValidateCriticalErrorMsg;
3745      sReport += sSigName;
3746!     sReport += " - Number of parameters inconsistent with function type.\r\n";
3747      rv = icMaxStatus(rv, icValidateCriticalError);
3748    }
3749    break;
3750--- 1125,1131 ----
3751    if (m_nNumParam!=3) {
3752      sReport += icValidateCriticalErrorMsg;
3753      sReport += sSigName;
3754!     sReport += " - Number of parameters inconsistent with function type.\n";
3755      rv = icMaxStatus(rv, icValidateCriticalError);
3756    }
3757    break;
3758***************
3759*** 1134,1140 ****
3760    if (m_nNumParam!=4) {
3761      sReport += icValidateCriticalErrorMsg;
3762      sReport += sSigName;
3763!     sReport += " - Number of parameters inconsistent with function type.\r\n";
3764      rv = icMaxStatus(rv, icValidateCriticalError);
3765    }
3766    break;
3767--- 1134,1140 ----
3768    if (m_nNumParam!=4) {
3769      sReport += icValidateCriticalErrorMsg;
3770      sReport += sSigName;
3771!     sReport += " - Number of parameters inconsistent with function type.\n";
3772      rv = icMaxStatus(rv, icValidateCriticalError);
3773    }
3774    break;
3775***************
3776*** 1143,1149 ****
3777    if (m_nNumParam!=5) {
3778      sReport += icValidateCriticalErrorMsg;
3779      sReport += sSigName;
3780!     sReport += " - Number of parameters inconsistent with function type.\r\n";
3781      rv = icMaxStatus(rv, icValidateCriticalError);
3782    }
3783    break;
3784--- 1143,1149 ----
3785    if (m_nNumParam!=5) {
3786      sReport += icValidateCriticalErrorMsg;
3787      sReport += sSigName;
3788!     sReport += " - Number of parameters inconsistent with function type.\n";
3789      rv = icMaxStatus(rv, icValidateCriticalError);
3790    }
3791    break;
3792***************
3793*** 1152,1158 ****
3794    if (m_nNumParam!=7) {
3795      sReport += icValidateCriticalErrorMsg;
3796      sReport += sSigName;
3797!     sReport += " - Number of parameters inconsistent with function type.\r\n";
3798      rv = icMaxStatus(rv, icValidateCriticalError);
3799    }
3800    break;
3801--- 1152,1158 ----
3802    if (m_nNumParam!=7) {
3803      sReport += icValidateCriticalErrorMsg;
3804      sReport += sSigName;
3805!     sReport += " - Number of parameters inconsistent with function type.\n";
3806      rv = icMaxStatus(rv, icValidateCriticalError);
3807    }
3808    break;
3809***************
3810*** 1160,1166 ****
3811  default:
3812    sReport += icValidateCriticalErrorMsg;
3813    sReport += sSigName;
3814!   sReport += " - Unknown function type.\r\n";
3815    rv = icMaxStatus(rv, icValidateCriticalError);
3816    }
3817
3818--- 1160,1166 ----
3819  default:
3820    sReport += icValidateCriticalErrorMsg;
3821    sReport += sSigName;
3822!   sReport += " - Unknown function type.\n";
3823    rv = icMaxStatus(rv, icValidateCriticalError);
3824    }
3825
3826***************
3827*** 1170,1176 ****
3828      if (lval>0.0 || uval<1.0) {
3829        sReport += icValidateWarningMsg;
3830        sReport += sSigName;
3831!       sReport += " - Curve cannot be accurately inverted.\r\n";
3832        rv = icMaxStatus(rv, icValidateWarning);
3833      }
3834    }
3835--- 1170,1176 ----
3836      if (lval>0.0 || uval<1.0) {
3837        sReport += icValidateWarningMsg;
3838        sReport += sSigName;
3839!       sReport += " - Curve cannot be accurately inverted.\n";
3840        rv = icMaxStatus(rv, icValidateWarning);
3841      }
3842    }
3843***************
3844*** 1255,1286 ****
3845  {
3846    icChar buf[128];
3847
3848!   sprintf(buf, "BEGIN_MATRIX %s\r\n", szName);
3849    sDescription += buf;
3850
3851    if (!m_bUseConstants) {
3852!     sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3853        m_e[0], m_e[1], m_e[2]);
3854      sDescription += buf;
3855!     sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3856        m_e[3], m_e[4], m_e[5]);
3857      sDescription += buf;
3858!     sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3859        m_e[6], m_e[7], m_e[8]);
3860      sDescription += buf;
3861    }
3862    else {
3863!     sprintf(buf, "%8.4lf %8.4lf %8.4lf  +  %8.4lf\r\n",
3864        m_e[0], m_e[1], m_e[2], m_e[9]);
3865      sDescription += buf;
3866!     sprintf(buf, "%8.4lf %8.4lf %8.4lf  +  %8.4lf\r\n",
3867        m_e[3], m_e[4], m_e[5], m_e[10]);
3868      sDescription += buf;
3869!     sprintf(buf, "%8.4lf %8.4lf %8.4lf  +  %8.4lf\r\n",
3870        m_e[6], m_e[7], m_e[8], m_e[11]);
3871      sDescription += buf;
3872    }
3873!   sDescription += "\r\n";
3874  }
3875
3876  /**
3877--- 1255,1286 ----
3878  {
3879    icChar buf[128];
3880
3881!   sprintf(buf, "BEGIN_MATRIX %s\n", szName);
3882    sDescription += buf;
3883
3884    if (!m_bUseConstants) {
3885!     sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3886        m_e[0], m_e[1], m_e[2]);
3887      sDescription += buf;
3888!     sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3889        m_e[3], m_e[4], m_e[5]);
3890      sDescription += buf;
3891!     sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3892        m_e[6], m_e[7], m_e[8]);
3893      sDescription += buf;
3894    }
3895    else {
3896!     sprintf(buf, "%8.4lf %8.4lf %8.4lf  +  %8.4lf\n",
3897        m_e[0], m_e[1], m_e[2], m_e[9]);
3898      sDescription += buf;
3899!     sprintf(buf, "%8.4lf %8.4lf %8.4lf  +  %8.4lf\n",
3900        m_e[3], m_e[4], m_e[5], m_e[10]);
3901      sDescription += buf;
3902!     sprintf(buf, "%8.4lf %8.4lf %8.4lf  +  %8.4lf\n",
3903        m_e[6], m_e[7], m_e[8], m_e[11]);
3904      sDescription += buf;
3905    }
3906!   sDescription += "\n";
3907  }
3908
3909  /**
3910***************
3911*** 1377,1383 ****
3912        if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3913          sReport += icValidateNonCompliantMsg;
3914          sReport += sSigName;
3915!         sReport += " - Matrix must be identity.\r\n";
3916          rv = icValidateNonCompliant;
3917        }
3918      }
3919--- 1377,1383 ----
3920        if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3921          sReport += icValidateNonCompliantMsg;
3922          sReport += sSigName;
3923!         sReport += " - Matrix must be identity.\n";
3924          rv = icValidateNonCompliant;
3925        }
3926      }
3927***************
3928*** 1754,1760 ****
3929
3930        ptr += sprintf(ptr, " %s", m_pVal);
3931      }
3932!     strcpy(ptr, "\r\n");
3933      sDescription += (const icChar*)m_pOutText;
3934
3935    }
3936--- 1754,1760 ----
3937
3938        ptr += sprintf(ptr, " %s", m_pVal);
3939      }
3940!     strcpy(ptr, "\n");
3941      sDescription += (const icChar*)m_pOutText;
3942
3943    }
3944***************
3945*** 1866,1872 ****
3946    icChar szOutText[2048], szColor[40];
3947    int i, len;
3948
3949!   sprintf(szOutText, "BEGIN_LUT %s %d %d\r\n", szName, m_nInput, m_nOutput);
3950    sDescription += szOutText;
3951
3952    for (i=0; i<m_nInput; i++) {
3953--- 1866,1872 ----
3954    icChar szOutText[2048], szColor[40];
3955    int i, len;
3956
3957!   sprintf(szOutText, "BEGIN_LUT %s %d %d\n", szName, m_nInput, m_nOutput);
3958    sDescription += szOutText;
3959
3960    for (i=0; i<m_nInput; i++) {
3961***************
3962*** 1883,1889 ****
3963      sDescription += szOutText;
3964    }
3965
3966!   sDescription += "\r\n";
3967
3968    len = 0;
3969    for (i=0; i<m_nInput; i++) {
3970--- 1883,1889 ----
3971      sDescription += szOutText;
3972    }
3973
3974!   sDescription += "\n";
3975
3976    len = 0;
3977    for (i=0; i<m_nInput; i++) {
3978***************
3979*** 1907,1913 ****
3980
3981    Iterate(sDescription, 0, 0);
3982
3983!   sDescription += "\r\n";
3984  }
3985
3986
3987--- 1907,1913 ----
3988
3989    Iterate(sDescription, 0, 0);
3990
3991!   sDescription += "\n";
3992  }
3993
3994
3995***************
3996*** 2693,2699 ****
3997    if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
3998      sReport += icValidateNonCompliantMsg;
3999      sReport += sSigName;
4000!     sReport += " - Reserved Value must be zero.\r\n";
4001
4002      rv = icValidateNonCompliant;
4003    }
4004--- 2693,2699 ----
4005    if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
4006      sReport += icValidateNonCompliantMsg;
4007      sReport += sSigName;
4008!     sReport += " - Reserved Value must be zero.\n";
4009
4010      rv = icValidateNonCompliant;
4011    }
4012***************
4013*** 2704,2710 ****
4014        if (m_GridPoints[i]<2) {
4015          sReport += icValidateCriticalErrorMsg;
4016          sReport += sSigName;
4017!         sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\r\n",i );
4018          sReport += temp;
4019          rv = icMaxStatus(rv, icValidateCriticalError);
4020        }
4021--- 2704,2710 ----
4022        if (m_GridPoints[i]<2) {
4023          sReport += icValidateCriticalErrorMsg;
4024          sReport += sSigName;
4025!         sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\n",i );
4026          sReport += temp;
4027          rv = icMaxStatus(rv, icValidateCriticalError);
4028        }
4029***************
4030*** 3122,3128 ****
4031    if (!pProfile) {
4032      sReport += icValidateWarningMsg;
4033      sReport += sSigName;
4034!     sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4035      rv = icMaxStatus(rv, icValidateWarning);
4036      return rv;
4037    }
4038--- 3122,3128 ----
4039    if (!pProfile) {
4040      sReport += icValidateWarningMsg;
4041      sReport += sSigName;
4042!     sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4043      rv = icMaxStatus(rv, icValidateWarning);
4044      return rv;
4045    }
4046***************
4047*** 3138,3144 ****
4048        if (m_nInput!=nInput) {
4049          sReport += icValidateCriticalErrorMsg;
4050          sReport += sSigName;
4051!         sReport += " - Incorrect number of input channels.\r\n";
4052          rv = icMaxStatus(rv, icValidateCriticalError);
4053        }
4054
4055--- 3138,3144 ----
4056        if (m_nInput!=nInput) {
4057          sReport += icValidateCriticalErrorMsg;
4058          sReport += sSigName;
4059!         sReport += " - Incorrect number of input channels.\n";
4060          rv = icMaxStatus(rv, icValidateCriticalError);
4061        }
4062
4063***************
4064*** 3146,3152 ****
4065        if (m_nOutput!=nOutput) {
4066          sReport += icValidateCriticalErrorMsg;
4067          sReport += sSigName;
4068!         sReport += " - Incorrect number of output channels.\r\n";
4069          rv = icMaxStatus(rv, icValidateCriticalError);
4070        }
4071
4072--- 3146,3152 ----
4073        if (m_nOutput!=nOutput) {
4074          sReport += icValidateCriticalErrorMsg;
4075          sReport += sSigName;
4076!         sReport += " - Incorrect number of output channels.\n";
4077          rv = icMaxStatus(rv, icValidateCriticalError);
4078        }
4079
4080***************
4081*** 3160,3166 ****
4082        if (m_nInput!=nInput) {
4083          sReport += icValidateCriticalErrorMsg;
4084          sReport += sSigName;
4085!         sReport += " - Incorrect number of input channels.\r\n";
4086          rv = icMaxStatus(rv, icValidateCriticalError);
4087        }
4088
4089--- 3160,3166 ----
4090        if (m_nInput!=nInput) {
4091          sReport += icValidateCriticalErrorMsg;
4092          sReport += sSigName;
4093!         sReport += " - Incorrect number of input channels.\n";
4094          rv = icMaxStatus(rv, icValidateCriticalError);
4095        }
4096
4097***************
4098*** 3168,3174 ****
4099        if (m_nOutput!=nOutput) {
4100          sReport += icValidateCriticalErrorMsg;
4101          sReport += sSigName;
4102!         sReport += " - Incorrect number of output channels.\r\n";
4103          rv = icMaxStatus(rv, icValidateCriticalError);
4104        }
4105
4106--- 3168,3174 ----
4107        if (m_nOutput!=nOutput) {
4108          sReport += icValidateCriticalErrorMsg;
4109          sReport += sSigName;
4110!         sReport += " - Incorrect number of output channels.\n";
4111          rv = icMaxStatus(rv, icValidateCriticalError);
4112        }
4113
4114***************
4115*** 3180,3186 ****
4116        if (m_nInput!=nInput) {
4117          sReport += icValidateCriticalErrorMsg;
4118          sReport += sSigName;
4119!         sReport += " - Incorrect number of input channels.\r\n";
4120          rv = icMaxStatus(rv, icValidateCriticalError);
4121        }
4122
4123--- 3180,3186 ----
4124        if (m_nInput!=nInput) {
4125          sReport += icValidateCriticalErrorMsg;
4126          sReport += sSigName;
4127!         sReport += " - Incorrect number of input channels.\n";
4128          rv = icMaxStatus(rv, icValidateCriticalError);
4129        }
4130
4131***************
4132*** 3188,3194 ****
4133        if (m_nOutput!=nOutput) {
4134          sReport += icValidateCriticalErrorMsg;
4135          sReport += sSigName;
4136!         sReport += " - Incorrect number of output channels.\r\n";
4137          rv = icMaxStatus(rv, icValidateCriticalError);
4138        }
4139
4140--- 3188,3194 ----
4141        if (m_nOutput!=nOutput) {
4142          sReport += icValidateCriticalErrorMsg;
4143          sReport += sSigName;
4144!         sReport += " - Incorrect number of output channels.\n";
4145          rv = icMaxStatus(rv, icValidateCriticalError);
4146        }
4147
4148***************
4149*** 3206,3212 ****
4150      if (!m_CLUT) {
4151        sReport += icValidateCriticalErrorMsg;
4152        sReport += sSigName;
4153!       sReport += " - CLUT must be present.\r\n";
4154        rv = icMaxStatus(rv, icValidateCriticalError);
4155      }
4156    }
4157--- 3206,3212 ----
4158      if (!m_CLUT) {
4159        sReport += icValidateCriticalErrorMsg;
4160        sReport += sSigName;
4161!       sReport += " - CLUT must be present.\n";
4162        rv = icMaxStatus(rv, icValidateCriticalError);
4163      }
4164    }
4165***************
4166*** 3748,3754 ****
4167            else {
4168              sReport += icValidateCriticalErrorMsg;
4169              sReport += sSigName;
4170!             sReport += " - Incorrect number of B-curves.\r\n";
4171              rv = icMaxStatus(rv, icValidateCriticalError);
4172            }
4173          }
4174--- 3748,3754 ----
4175            else {
4176              sReport += icValidateCriticalErrorMsg;
4177              sReport += sSigName;
4178!             sReport += " - Incorrect number of B-curves.\n";
4179              rv = icMaxStatus(rv, icValidateCriticalError);
4180            }
4181          }
4182***************
4183*** 3762,3768 ****
4184            else {
4185              sReport += icValidateCriticalErrorMsg;
4186              sReport += sSigName;
4187!             sReport += " - Incorrect number of M-curves.\r\n";
4188              rv = icMaxStatus(rv, icValidateCriticalError);
4189            }
4190          }
4191--- 3762,3768 ----
4192            else {
4193              sReport += icValidateCriticalErrorMsg;
4194              sReport += sSigName;
4195!             sReport += " - Incorrect number of M-curves.\n";
4196              rv = icMaxStatus(rv, icValidateCriticalError);
4197            }
4198          }
4199***************
4200*** 3772,3778 ****
4201          if (!m_CLUT) {
4202            sReport += icValidateNonCompliantMsg;
4203            sReport += sSigName;
4204!           sReport += " - CLUT must be present if using A-curves.\r\n";
4205
4206            rv = icMaxStatus(rv, icValidateNonCompliant);
4207          }
4208--- 3772,3778 ----
4209          if (!m_CLUT) {
4210            sReport += icValidateNonCompliantMsg;
4211            sReport += sSigName;
4212!           sReport += " - CLUT must be present if using A-curves.\n";
4213
4214            rv = icMaxStatus(rv, icValidateNonCompliant);
4215          }
4216***************
4217*** 3784,3790 ****
4218            else {
4219              sReport += icValidateCriticalErrorMsg;
4220              sReport += sSigName;
4221!             sReport += " - Incorrect number of A-curves.\r\n";
4222              rv = icMaxStatus(rv, icValidateCriticalError);
4223            }
4224          }
4225--- 3784,3790 ----
4226            else {
4227              sReport += icValidateCriticalErrorMsg;
4228              sReport += sSigName;
4229!             sReport += " - Incorrect number of A-curves.\n";
4230              rv = icMaxStatus(rv, icValidateCriticalError);
4231            }
4232          }
4233***************
4234*** 3876,3882 ****
4235    if (!pProfile) {
4236      sReport += icValidateWarningMsg;
4237      sReport += sSigName;
4238!     sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4239      rv = icMaxStatus(rv, icValidateCriticalError);
4240      return rv;
4241    }
4242--- 3876,3882 ----
4243    if (!pProfile) {
4244      sReport += icValidateWarningMsg;
4245      sReport += sSigName;
4246!     sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4247      rv = icMaxStatus(rv, icValidateCriticalError);
4248      return rv;
4249    }
4250***************
4251*** 3900,3906 ****
4252        if (m_nOutput!=nOutput) {
4253          sReport += icValidateCriticalErrorMsg;
4254          sReport += sSigName;
4255!         sReport += " - Incorrect number of output channels.\r\n";
4256          rv = icMaxStatus(rv, icValidateCriticalError);
4257        }
4258
4259--- 3900,3906 ----
4260        if (m_nOutput!=nOutput) {
4261          sReport += icValidateCriticalErrorMsg;
4262          sReport += sSigName;
4263!         sReport += " - Incorrect number of output channels.\n";
4264          rv = icMaxStatus(rv, icValidateCriticalError);
4265        }
4266
4267***************
4268*** 3913,3919 ****
4269            else {
4270              sReport += icValidateCriticalErrorMsg;
4271              sReport += sSigName;
4272!             sReport += " - Incorrect number of B-curves.\r\n";
4273              rv = icMaxStatus(rv, icValidateCriticalError);
4274            }
4275          }
4276--- 3913,3919 ----
4277            else {
4278              sReport += icValidateCriticalErrorMsg;
4279              sReport += sSigName;
4280!             sReport += " - Incorrect number of B-curves.\n";
4281              rv = icMaxStatus(rv, icValidateCriticalError);
4282            }
4283          }
4284***************
4285*** 3927,3933 ****
4286            else {
4287              sReport += icValidateCriticalErrorMsg;
4288              sReport += sSigName;
4289!             sReport += " - Incorrect number of M-curves.\r\n";
4290              rv = icMaxStatus(rv, icValidateCriticalError);
4291            }
4292          }
4293--- 3927,3933 ----
4294            else {
4295              sReport += icValidateCriticalErrorMsg;
4296              sReport += sSigName;
4297!             sReport += " - Incorrect number of M-curves.\n";
4298              rv = icMaxStatus(rv, icValidateCriticalError);
4299            }
4300          }
4301***************
4302*** 3937,3943 ****
4303          if (!m_CLUT) {
4304            sReport += icValidateNonCompliantMsg;
4305            sReport += sSigName;
4306!           sReport += " - CLUT must be present if using A-curves.\r\n";
4307
4308            rv = icMaxStatus(rv, icValidateNonCompliant);
4309          }
4310--- 3937,3943 ----
4311          if (!m_CLUT) {
4312            sReport += icValidateNonCompliantMsg;
4313            sReport += sSigName;
4314!           sReport += " - CLUT must be present if using A-curves.\n";
4315
4316            rv = icMaxStatus(rv, icValidateNonCompliant);
4317          }
4318***************
4319*** 3949,3955 ****
4320            else {
4321              sReport += icValidateCriticalErrorMsg;
4322              sReport += sSigName;
4323!             sReport += " - Incorrect number of A-curves.\r\n";
4324              rv = icMaxStatus(rv, icValidateCriticalError);
4325            }
4326          }
4327--- 3949,3955 ----
4328            else {
4329              sReport += icValidateCriticalErrorMsg;
4330              sReport += sSigName;
4331!             sReport += " - Incorrect number of A-curves.\n";
4332              rv = icMaxStatus(rv, icValidateCriticalError);
4333            }
4334          }
4335***************
4336*** 4311,4317 ****
4337                if (pTagCurve->GetSize()==1) {
4338                  sReport += icValidateCriticalErrorMsg;
4339                  sReport += sSigName;
4340!                 sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4341                  rv = icMaxStatus(rv, icValidateCriticalError);
4342                }
4343              }
4344--- 4311,4317 ----
4345                if (pTagCurve->GetSize()==1) {
4346                  sReport += icValidateCriticalErrorMsg;
4347                  sReport += sSigName;
4348!                 sReport += " - lut8Tags do not support single entry gamma curves.\n";
4349                  rv = icMaxStatus(rv, icValidateCriticalError);
4350                }
4351              }
4352***************
4353*** 4319,4325 ****
4354            else {
4355              sReport += icValidateCriticalErrorMsg;
4356              sReport += sSigName;
4357!             sReport += " - Incorrect number of B-curves.\r\n";
4358              rv = icMaxStatus(rv, icValidateCriticalError);
4359            }
4360          }
4361--- 4319,4325 ----
4362            else {
4363              sReport += icValidateCriticalErrorMsg;
4364              sReport += sSigName;
4365!             sReport += " - Incorrect number of B-curves.\n";
4366              rv = icMaxStatus(rv, icValidateCriticalError);
4367            }
4368          }
4369***************
4370*** 4336,4342 ****
4371          if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4372            sReport += icValidateWarningMsg;
4373            sReport += sSigName;
4374!           sReport += " - Matrix must be identity.\r\n";
4375            rv = icMaxStatus(rv, icValidateWarning);
4376          }
4377        }
4378--- 4336,4342 ----
4379          if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4380            sReport += icValidateWarningMsg;
4381            sReport += sSigName;
4382!           sReport += " - Matrix must be identity.\n";
4383            rv = icMaxStatus(rv, icValidateWarning);
4384          }
4385        }
4386***************
4387*** 4351,4357 ****
4388                if (pTagCurve->GetSize()==1) {
4389                  sReport += icValidateCriticalErrorMsg;
4390                  sReport += sSigName;
4391!                 sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4392                  rv = icMaxStatus(rv, icValidateCriticalError);
4393                }
4394              }
4395--- 4351,4357 ----
4396                if (pTagCurve->GetSize()==1) {
4397                  sReport += icValidateCriticalErrorMsg;
4398                  sReport += sSigName;
4399!                 sReport += " - lut8Tags do not support single entry gamma curves.\n";
4400                  rv = icMaxStatus(rv, icValidateCriticalError);
4401                }
4402              }
4403***************
4404*** 4359,4365 ****
4405            else {
4406              sReport += icValidateCriticalErrorMsg;
4407              sReport += sSigName;
4408!             sReport += " - Incorrect number of A-curves.\r\n";
4409              rv = icMaxStatus(rv, icValidateCriticalError);
4410            }
4411          }
4412--- 4359,4365 ----
4413            else {
4414              sReport += icValidateCriticalErrorMsg;
4415              sReport += sSigName;
4416!             sReport += " - Incorrect number of A-curves.\n";
4417              rv = icMaxStatus(rv, icValidateCriticalError);
4418            }
4419          }
4420***************
4421*** 4721,4727 ****
4422                if (pTagCurve->GetSize()==1) {
4423                  sReport += icValidateCriticalErrorMsg;
4424                  sReport += sSigName;
4425!                 sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4426                  rv = icMaxStatus(rv, icValidateCriticalError);
4427                }
4428              }
4429--- 4721,4727 ----
4430                if (pTagCurve->GetSize()==1) {
4431                  sReport += icValidateCriticalErrorMsg;
4432                  sReport += sSigName;
4433!                 sReport += " - lut16Tags do not support single entry gamma curves.\n";
4434                  rv = icMaxStatus(rv, icValidateCriticalError);
4435                }
4436              }
4437***************
4438*** 4729,4735 ****
4439            else {
4440              sReport += icValidateCriticalErrorMsg;
4441              sReport += sSigName;
4442!             sReport += " - Incorrect number of B-curves.\r\n";
4443              rv = icMaxStatus(rv, icValidateCriticalError);
4444            }
4445          }
4446--- 4729,4735 ----
4447            else {
4448              sReport += icValidateCriticalErrorMsg;
4449              sReport += sSigName;
4450!             sReport += " - Incorrect number of B-curves.\n";
4451              rv = icMaxStatus(rv, icValidateCriticalError);
4452            }
4453          }
4454***************
4455*** 4746,4752 ****
4456          if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4457            sReport += icValidateWarningMsg;
4458            sReport += sSigName;
4459!           sReport += " - Matrix must be identity.\r\n";
4460            rv = icMaxStatus(rv, icValidateWarning);
4461          }
4462        }
4463--- 4746,4752 ----
4464          if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4465            sReport += icValidateWarningMsg;
4466            sReport += sSigName;
4467!           sReport += " - Matrix must be identity.\n";
4468            rv = icMaxStatus(rv, icValidateWarning);
4469          }
4470        }
4471***************
4472*** 4761,4767 ****
4473                if (pTagCurve->GetSize()==1) {
4474                  sReport += icValidateCriticalErrorMsg;
4475                  sReport += sSigName;
4476!                 sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4477                  rv = icMaxStatus(rv, icValidateCriticalError);
4478                }
4479              }
4480--- 4761,4767 ----
4481                if (pTagCurve->GetSize()==1) {
4482                  sReport += icValidateCriticalErrorMsg;
4483                  sReport += sSigName;
4484!                 sReport += " - lut16Tags do not support single entry gamma curves.\n";
4485                  rv = icMaxStatus(rv, icValidateCriticalError);
4486                }
4487              }
4488***************
4489*** 4769,4775 ****
4490            else {
4491              sReport += icValidateCriticalErrorMsg;
4492              sReport += sSigName;
4493!             sReport += " - Incorrect number of A-curves.\r\n";
4494              rv = icMaxStatus(rv, icValidateCriticalError);
4495            }
4496          }
4497--- 4769,4775 ----
4498            else {
4499              sReport += icValidateCriticalErrorMsg;
4500              sReport += sSigName;
4501!             sReport += " - Incorrect number of A-curves.\n";
4502              rv = icMaxStatus(rv, icValidateCriticalError);
4503            }
4504          }
4505*** misc/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp	Mon Aug 20 22:05:00 2007
4506--- misc/build/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp	Fri Jan 25 14:23:09 2008
4507***************
4508*** 218,224 ****
4509            icGetSig(sigbuf, m_sig), m_nSize);
4510    sDescription += buf;
4511
4512!   sDescription += "\r\n\r\nData Follows:\r\n";
4513
4514    icMemDump(sDescription, m_pData, m_nSize);
4515
4516--- 218,224 ----
4517            icGetSig(sigbuf, m_sig), m_nSize);
4518    sDescription += buf;
4519
4520!   sDescription += "\n\nData Follows:\n";
4521
4522    icMemDump(sDescription, m_pData, m_nSize);
4523
4524***************
4525*** 364,370 ****
4526    sReport += " - Contains unknown processing element type (";
4527    icGetSig(buf, m_sig, true);
4528    sReport += buf;
4529!   sReport += ").\r\n";
4530
4531    return icValidateCriticalError;
4532  }
4533--- 364,370 ----
4534    sReport += " - Contains unknown processing element type (";
4535    icGetSig(buf, m_sig, true);
4536    sReport += buf;
4537!   sReport += ").\n";
4538
4539    return icValidateCriticalError;
4540  }
4541***************
4542*** 392,398 ****
4543      sReport += " - Element ";
4544      sSigName = Info.GetSigName(GetType());
4545      sReport += sSigName;
4546!     sReport += " - Reserved Value must be zero.\r\n";
4547
4548      rv = icValidateNonCompliant;
4549    }
4550--- 392,398 ----
4551      sReport += " - Element ";
4552      sSigName = Info.GetSigName(GetType());
4553      sReport += sSigName;
4554!     sReport += " - Reserved Value must be zero.\n";
4555
4556      rv = icValidateNonCompliant;
4557    }
4558***************
4559*** 738,755 ****
4560  {
4561    icChar buf[128];
4562
4563!   sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\r\n", m_nInputChannels, m_nOutputChannels);
4564    sDescription += buf;
4565!   sDescription += "\r\n";
4566
4567    CIccMultiProcessElementList::iterator i;
4568    int j;
4569
4570    for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4571!     sprintf(buf, "PROCESS_ELEMENT #%d\r\n", j+1);
4572      sDescription += buf;
4573      i->ptr->Describe(sDescription);
4574!     sDescription += "\r\n";
4575    }
4576  }
4577
4578--- 738,755 ----
4579  {
4580    icChar buf[128];
4581
4582!   sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\n", m_nInputChannels, m_nOutputChannels);
4583    sDescription += buf;
4584!   sDescription += "\n";
4585
4586    CIccMultiProcessElementList::iterator i;
4587    int j;
4588
4589    for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4590!     sprintf(buf, "PROCESS_ELEMENT #%d\n", j+1);
4591      sDescription += buf;
4592      i->ptr->Describe(sDescription);
4593!     sDescription += "\n";
4594    }
4595  }
4596
4597***************
4598*** 1207,1219 ****
4599      if (m_nInputChannels != m_nOutputChannels) {
4600        sReport += icValidateCriticalErrorMsg;
4601        sReport += sSigName;
4602!       sReport += " No processing elements and input and output channels do not match!\r\n";
4603        return icValidateCriticalError;
4604      }
4605      else {
4606        sReport += icValidateWarningMsg;
4607        sReport += sSigName;
4608!       sReport += " No processing elements.\r\n";
4609        return icValidateWarning;
4610      }
4611    }
4612--- 1207,1219 ----
4613      if (m_nInputChannels != m_nOutputChannels) {
4614        sReport += icValidateCriticalErrorMsg;
4615        sReport += sSigName;
4616!       sReport += " No processing elements and input and output channels do not match!\n";
4617        return icValidateCriticalError;
4618      }
4619      else {
4620        sReport += icValidateWarningMsg;
4621        sReport += sSigName;
4622!       sReport += " No processing elements.\n";
4623        return icValidateWarning;
4624      }
4625    }
4626***************
4627*** 1224,1230 ****
4628    if (i->ptr->NumInputChannels() != m_nInputChannels) {
4629      sReport += icValidateCriticalErrorMsg;
4630      sReport += sSigName;
4631!     sReport += " Mis-matching number of input channels!\r\n";
4632      return icValidateCriticalError;
4633    }
4634
4635--- 1224,1230 ----
4636    if (i->ptr->NumInputChannels() != m_nInputChannels) {
4637      sReport += icValidateCriticalErrorMsg;
4638      sReport += sSigName;
4639!     sReport += " Mis-matching number of input channels!\n";
4640      return icValidateCriticalError;
4641    }
4642
4643***************
4644*** 1239,1245 ****
4645          sReport += "->";
4646          sReport += i->ptr->GetClassName();
4647
4648!         sReport += " Mis-matching number of channels!\r\n";
4649          return icValidateCriticalError;
4650        }
4651      }
4652--- 1239,1245 ----
4653          sReport += "->";
4654          sReport += i->ptr->GetClassName();
4655
4656!         sReport += " Mis-matching number of channels!\n";
4657          return icValidateCriticalError;
4658        }
4659      }
4660***************
4661*** 1251,1257 ****
4662    if (last && last->NumOutputChannels() != m_nOutputChannels) {
4663      sReport += icValidateCriticalErrorMsg;
4664      sReport += sSigName;
4665!     sReport += " Mis-matching number of output channels!\r\n";
4666      return icValidateCriticalError;
4667    }
4668
4669--- 1251,1257 ----
4670    if (last && last->NumOutputChannels() != m_nOutputChannels) {
4671      sReport += icValidateCriticalErrorMsg;
4672      sReport += sSigName;
4673!     sReport += " Mis-matching number of output channels!\n";
4674      return icValidateCriticalError;
4675    }
4676
4677*** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp	Mon Aug 20 22:05:00 2007
4678--- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp	Fri Jan 25 14:23:09 2008
4679***************
4680*** 234,240 ****
4681  {
4682    std::string Dump;
4683
4684!   sDescription += "ProfileID:\r\n";
4685
4686    int i;
4687    char buf[20];
4688--- 234,240 ----
4689  {
4690    std::string Dump;
4691
4692!   sDescription += "ProfileID:\n";
4693
4694    int i;
4695    char buf[20];
4696***************
4697*** 244,255 ****
4698      sprintf(buf, "%2x", m_profileID.ID8[i]);
4699      sDescription += buf;
4700    }
4701!   sDescription += "\r\n";
4702
4703!   sDescription += "Description:\r\n";
4704    m_desc.Describe(sDescription);
4705
4706!   sDescription += "\r\n";
4707  }
4708
4709
4710--- 244,255 ----
4711      sprintf(buf, "%2x", m_profileID.ID8[i]);
4712      sDescription += buf;
4713    }
4714!   sDescription += "\n";
4715
4716!   sDescription += "Description:\n";
4717    m_desc.Describe(sDescription);
4718
4719!   sDescription += "\n";
4720  }
4721
4722
4723***************
4724*** 434,454 ****
4725  {
4726    icChar buf[128];
4727
4728!   sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\r\n");
4729    sDescription += buf;
4730!   sDescription += "\r\n";
4731
4732    int i;
4733    CIccProfileIdDescList::iterator j;
4734    for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4735!     sprintf(buf, "ProfileDescription_%d:\r\n", i+1);
4736      sDescription += buf;
4737      j->Describe(sDescription);
4738    }
4739
4740!   sprintf(buf, "END ProfileSequenceIdentification_TAG\r\n");
4741    sDescription += buf;
4742!   sDescription += "\r\n";
4743  }
4744
4745
4746--- 434,454 ----
4747  {
4748    icChar buf[128];
4749
4750!   sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\n");
4751    sDescription += buf;
4752!   sDescription += "\n";
4753
4754    int i;
4755    CIccProfileIdDescList::iterator j;
4756    for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4757!     sprintf(buf, "ProfileDescription_%d:\n", i+1);
4758      sDescription += buf;
4759      j->Describe(sDescription);
4760    }
4761
4762!   sprintf(buf, "END ProfileSequenceIdentification_TAG\n");
4763    sDescription += buf;
4764!   sDescription += "\n";
4765  }
4766
4767
4768*** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h	Mon Aug 20 22:05:00 2007
4769--- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h	Fri Jan 25 14:23:09 2008
4770***************
4771*** 161,164 ****
4772  }
4773  #endif
4774
4775! #endif //_ICCTAGPROFSEQID_H
4776--- 161,164 ----
4777  }
4778  #endif
4779
4780! #endif //_ICCTAGPROFSEQID_H
4781*** misc/SampleICC-1.3.2/IccProfLib/IccUtil.cpp	Mon Aug 20 22:05:00 2007
4782--- misc/build/SampleICC-1.3.2/IccProfLib/IccUtil.cpp	Fri Jan 25 14:23:09 2008
4783***************
4784*** 79,85 ****
4785  #include "IccUtil.h"
4786  #include "IccTagFactory.h"
4787  #include <stdlib.h>
4788! #include <memory.h>
4789  #include <ctype.h>
4790  #include <math.h>
4791  #include <string.h>
4792--- 79,85 ----
4793  #include "IccUtil.h"
4794  #include "IccTagFactory.h"
4795  #include <stdlib.h>
4796! #include <memory>
4797  #include <ctype.h>
4798  #include <math.h>
4799  #include <string.h>
4800***************
4801*** 678,688 ****
4802  {
4803    icChar buf[128];
4804
4805!   sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4806    sDump += buf;
4807!   sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4808    sDump += buf;
4809!   sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4810    sDump += buf;
4811  }
4812
4813--- 679,689 ----
4814  {
4815    icChar buf[128];
4816
4817!   sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4818    sDump += buf;
4819!   sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4820    sDump += buf;
4821!   sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4822    sDump += buf;
4823  }
4824
4825***************
4826*** 1516,1534 ****
4827
4828    if (XYZ.X < 0) {
4829      sReport += icValidateNonCompliantMsg;
4830!     sReport += " - XYZNumber: Negative X value!\r\n";
4831      rv = icValidateNonCompliant;
4832    }
4833
4834    if (XYZ.Y < 0) {
4835      sReport += icValidateNonCompliantMsg;
4836!     sReport += " - XYZNumber: Negative Y value!\r\n";
4837      rv = icMaxStatus(rv, icValidateNonCompliant);
4838    }
4839
4840    if (XYZ.Z < 0) {
4841      sReport += icValidateNonCompliantMsg;
4842!     sReport += " - XYZNumber: Negative Z value!\r\n";
4843      rv = icMaxStatus(rv, icValidateNonCompliant);
4844    }
4845
4846--- 1517,1535 ----
4847
4848    if (XYZ.X < 0) {
4849      sReport += icValidateNonCompliantMsg;
4850!     sReport += " - XYZNumber: Negative X value!\n";
4851      rv = icValidateNonCompliant;
4852    }
4853
4854    if (XYZ.Y < 0) {
4855      sReport += icValidateNonCompliantMsg;
4856!     sReport += " - XYZNumber: Negative Y value!\n";
4857      rv = icMaxStatus(rv, icValidateNonCompliant);
4858    }
4859
4860    if (XYZ.Z < 0) {
4861      sReport += icValidateNonCompliantMsg;
4862!     sReport += " - XYZNumber: Negative Z value!\n";
4863      rv = icMaxStatus(rv, icValidateNonCompliant);
4864    }
4865
4866***************
4867*** 1548,1554 ****
4868    icChar buf[128];
4869    if (dateTime.year<1992) {
4870      sReport += icValidateWarningMsg;
4871!     sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4872      sReport += buf;
4873      rv = icValidateWarning;
4874    }
4875--- 1549,1555 ----
4876    icChar buf[128];
4877    if (dateTime.year<1992) {
4878      sReport += icValidateWarningMsg;
4879!     sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4880      sReport += buf;
4881      rv = icValidateWarning;
4882    }
4883***************
4884*** 1557,1563 ****
4885    if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4886      if (dateTime.year>(year+1)) {
4887        sReport += icValidateWarningMsg;
4888!       sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4889        sReport += buf;
4890        rv = icMaxStatus(rv, icValidateWarning);
4891      }
4892--- 1558,1564 ----
4893    if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4894      if (dateTime.year>(year+1)) {
4895        sReport += icValidateWarningMsg;
4896!       sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4897        sReport += buf;
4898        rv = icMaxStatus(rv, icValidateWarning);
4899      }
4900***************
4901*** 1565,1571 ****
4902    else {
4903      if (dateTime.year>year) {
4904        sReport += icValidateWarningMsg;
4905!       sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4906        sReport += buf;
4907        rv = icMaxStatus(rv, icValidateWarning);
4908      }
4909--- 1566,1572 ----
4910    else {
4911      if (dateTime.year>year) {
4912        sReport += icValidateWarningMsg;
4913!       sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4914        sReport += buf;
4915        rv = icMaxStatus(rv, icValidateWarning);
4916      }
4917***************
4918*** 1573,1579 ****
4919
4920    if (dateTime.month<1 || dateTime.month>12) {
4921      sReport += icValidateWarningMsg;
4922!     sprintf(buf," - %u: Invalid month!\r\n",dateTime.month);
4923      sReport += buf;
4924      rv = icMaxStatus(rv, icValidateWarning);
4925    }
4926--- 1574,1580 ----
4927
4928    if (dateTime.month<1 || dateTime.month>12) {
4929      sReport += icValidateWarningMsg;
4930!     sprintf(buf," - %u: Invalid month!\n",dateTime.month);
4931      sReport += buf;
4932      rv = icMaxStatus(rv, icValidateWarning);
4933    }
4934***************
4935*** 1580,1586 ****
4936
4937    if (dateTime.day<1 || dateTime.day>31) {
4938      sReport += icValidateWarningMsg;
4939!     sprintf(buf," - %u: Invalid day!\r\n",dateTime.day);
4940      sReport += buf;
4941      rv = icMaxStatus(rv, icValidateWarning);
4942    }
4943--- 1581,1587 ----
4944
4945    if (dateTime.day<1 || dateTime.day>31) {
4946      sReport += icValidateWarningMsg;
4947!     sprintf(buf," - %u: Invalid day!\n",dateTime.day);
4948      sReport += buf;
4949      rv = icMaxStatus(rv, icValidateWarning);
4950    }
4951***************
4952*** 1588,1594 ****
4953    if (dateTime.month==2) {
4954      if (dateTime.day>29) {
4955        sReport += icValidateWarningMsg;
4956!       sprintf(buf," - %u: Invalid day for February!\r\n",dateTime.day);
4957        sReport += buf;
4958        rv = icMaxStatus(rv, icValidateWarning);
4959      }
4960--- 1589,1595 ----
4961    if (dateTime.month==2) {
4962      if (dateTime.day>29) {
4963        sReport += icValidateWarningMsg;
4964!       sprintf(buf," - %u: Invalid day for February!\n",dateTime.day);
4965        sReport += buf;
4966        rv = icMaxStatus(rv, icValidateWarning);
4967      }
4968***************
4969*** 1596,1602 ****
4970      if (dateTime.day==29) {
4971        if ((dateTime.year%4)!=0) {
4972          sReport += icValidateWarningMsg;
4973!         sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\r\n",dateTime.day, dateTime.year);
4974          sReport += buf;
4975          rv = icMaxStatus(rv, icValidateWarning);
4976        }
4977--- 1597,1603 ----
4978      if (dateTime.day==29) {
4979        if ((dateTime.year%4)!=0) {
4980          sReport += icValidateWarningMsg;
4981!         sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\n",dateTime.day, dateTime.year);
4982          sReport += buf;
4983          rv = icMaxStatus(rv, icValidateWarning);
4984        }
4985***************
4986*** 1605,1611 ****
4987
4988    if (dateTime.hours>23) {
4989      sReport += icValidateWarningMsg;
4990!     sprintf(buf," - %u: Invalid hour!\r\n",dateTime.hours);
4991      sReport += buf;
4992      rv = icMaxStatus(rv, icValidateWarning);
4993    }
4994--- 1606,1612 ----
4995
4996    if (dateTime.hours>23) {
4997      sReport += icValidateWarningMsg;
4998!     sprintf(buf," - %u: Invalid hour!\n",dateTime.hours);
4999      sReport += buf;
5000      rv = icMaxStatus(rv, icValidateWarning);
5001    }
5002***************
5003*** 1612,1618 ****
5004
5005    if (dateTime.minutes>59) {
5006      sReport += icValidateWarningMsg;
5007!     sprintf(buf," - %u: Invalid minutes!\r\n",dateTime.minutes);
5008      sReport += buf;
5009      rv = icMaxStatus(rv, icValidateWarning);
5010    }
5011--- 1613,1619 ----
5012
5013    if (dateTime.minutes>59) {
5014      sReport += icValidateWarningMsg;
5015!     sprintf(buf," - %u: Invalid minutes!\n",dateTime.minutes);
5016      sReport += buf;
5017      rv = icMaxStatus(rv, icValidateWarning);
5018    }
5019***************
5020*** 1619,1625 ****
5021
5022    if (dateTime.seconds>59) {
5023      sReport += icValidateWarningMsg;
5024!     sprintf(buf," - %u: Invalid seconds!\r\n",dateTime.hours);
5025      sReport += buf;
5026      rv = icMaxStatus(rv, icValidateWarning);
5027    }
5028--- 1620,1626 ----
5029
5030    if (dateTime.seconds>59) {
5031      sReport += icValidateWarningMsg;
5032!     sprintf(buf," - %u: Invalid seconds!\n",dateTime.hours);
5033      sReport += buf;
5034      rv = icMaxStatus(rv, icValidateWarning);
5035    }
5036*** misc/SampleICC-1.3.2/IccProfLib/icProfileHeader.h	Mon Aug 20 22:05:00 2007
5037--- misc/build/SampleICC-1.3.2/IccProfLib/icProfileHeader.h	Fri Jan 25 14:23:09 2008
5038***************
5039*** 659,668 ****
5040  typedef enum {
5041      icFlare0                            = 0x00000000,  /* 0% flare */
5042      icFlare100                          = 0x00000001,  /* 100% flare */
5043  } icMeasurementFlare;
5044
5045  /** Convenience Enum Definition - Not defined in ICC specification*/
5046! #define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)
5047  #define icMaxFlare     ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5048
5049
5050--- 659,669 ----
5051  typedef enum {
5052      icFlare0                            = 0x00000000,  /* 0% flare */
5053      icFlare100                          = 0x00000001,  /* 100% flare */
5054+     icMaxEnumFlare                      = 0xFFFFFFFF
5055  } icMeasurementFlare;
5056
5057  /** Convenience Enum Definition - Not defined in ICC specification*/
5058! /*#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)*/
5059  #define icMaxFlare     ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5060
5061
5062*** misc/SampleICC-1.3.2/Tools/CmdLine/Makefile.in	Mon Aug 20 22:10:42 2007
5063--- misc/build/SampleICC-1.3.2/Tools/CmdLine/Makefile.in	Fri Jan 25 14:23:09 2008
5064***************
5065*** 101,117 ****
5066  am__quote = @am__quote@
5067  install_sh = @install_sh@
5068
5069! SUBDIRS = IccApplyNamedCmm \
5070! 	@SICC_ICC_APPLY_PROFILES@ \
5071! 	IccDumpProfile \
5072  	IccProfLibTest \
5073  	IccStripUnknownTags \
5074  	IccV4ToMPE
5075
5076
5077! DIST_SUBDIRS = IccApplyNamedCmm \
5078! 	IccApplyProfiles \
5079! 	IccDumpProfile \
5080  	IccProfLibTest \
5081  	IccStripUnknownTags \
5082  	IccV4ToMPE
5083--- 101,113 ----
5084  am__quote = @am__quote@
5085  install_sh = @install_sh@
5086
5087! SUBDIRS = IccDumpProfile \
5088  	IccProfLibTest \
5089  	IccStripUnknownTags \
5090  	IccV4ToMPE
5091
5092
5093! DIST_SUBDIRS = IccDumpProfile \
5094  	IccProfLibTest \
5095  	IccStripUnknownTags \
5096  	IccV4ToMPE
5097*** misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp	2007-08-20 22:04:53.000000000 +0200
5098--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp	2008-01-31 13:53:16.000000000 +0100
5099***************
5100*** 77,82 ****
5101--- 77,84 ----
5102  //
5103  //////////////////////////////////////////////////////////////////////
5104
5105+ #include <stdlib.h>
5106+ #include <string.h>
5107  #include <iostream>
5108  #include <fstream>
5109  #include <sstream>
5110*** misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h	2007-08-20 22:04:54.000000000 +0200
5111--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h	2008-01-31 13:54:51.000000000 +0100
5112***************
5113*** 83,88 ****
5114--- 83,89 ----
5115  #ifndef __DEFINED_ICC_TOOL_EXCEPTION_H__
5116  #define __DEFINED_ICC_TOOL_EXCEPTION_H__
5117
5118+ #include <string.h>
5119  #include <exception>
5120  #include <string>
5121
5122*** misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp	2007-08-20 22:05:00.000000000 +0200
5123--- misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp	2008-01-31 13:49:54.000000000 +0100
5124***************
5125*** 79,84 ****
5126--- 79,86 ----
5127  #pragma warning( disable: 4786) //disable warning in <list.h>
5128  #endif
5129
5130+ #include <stdlib.h>
5131+ #include <string.h>
5132  #include "IccCmm.h"
5133  #include "IccTag.h"
5134  #include "IccIO.h"
5135*** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h	2007-08-20 22:04:53.000000000 +0200
5136--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h	2008-01-31 14:05:58.000000000 +0100
5137***************
5138*** 83,88 ****
5139--- 83,89 ----
5140  #include <string>
5141  #include <sys/types.h>
5142  #include <sys/stat.h>
5143+ #include <stdlib.h>
5144
5145  #ifdef WIN32
5146  typedef unsigned short mode_t;
5147