SampleICC-1.3.2.patch (cdf0e10c) SampleICC-1.3.2.patch (4d823f68)
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) {
1diff -ru misc/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in misc/build/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in
2--- misc/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in 2007-08-20 15:10:34.000000000 -0500
3+++ misc/build/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in 2012-01-24 10:39:23.000000000 -0500
4@@ -102,15 +102,11 @@
5 install_sh = @install_sh@
6
7 SUBDIRS = \
8- create_CLUT_profile \
9- create_CLUT_profile_from_probe \
10- create_display_profile
11+ create_sRGB_profile
12
13
14 DIST_SUBDIRS = \
15- create_CLUT_profile \
16- create_CLUT_profile_from_probe \
17- create_display_profile
18+ create_sRGB_profile
19
20 subdir = Contrib/CmdLine
21 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
22Only in misc/build/SampleICC-1.3.2/Contrib/CmdLine: create_sRGB_profile
23diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp
24--- misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2007-08-20 15:04:53.000000000 -0500
25+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2012-01-24 10:39:23.000000000 -0500
26@@ -77,6 +77,8 @@
27 //
28 //////////////////////////////////////////////////////////////////////
29
30+#include <stdlib.h>
31+#include <string.h>
32 #include <iostream>
33 #include <fstream>
34 #include <sstream>
35diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h
36--- misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2007-08-20 15:04:54.000000000 -0500
37+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2012-01-24 10:39:23.000000000 -0500
38@@ -83,6 +83,7 @@
39 #ifndef __DEFINED_ICC_TOOL_EXCEPTION_H__
40 #define __DEFINED_ICC_TOOL_EXCEPTION_H__
41
42+#include <string.h>
43 #include <exception>
44 #include <string>
45
46diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in
47--- misc/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in 2007-08-20 15:10:35.000000000 -0500
48+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in 2012-01-24 10:39:23.000000000 -0500
49@@ -133,7 +133,7 @@
50 CONFIG_CLEAN_FILES =
51 LTLIBRARIES = $(lib_LTLIBRARIES)
52
53-libICC_utils_la_LIBADD =
54+libICC_utils_la_LIBADD = $(LDADD)
55 am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
56 ICC_tool_exception.lo Vetters.lo
57 libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
58diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h
59--- misc/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h 2007-08-20 15:04:53.000000000 -0500
60+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h 2012-01-24 10:39:23.000000000 -0500
61@@ -130,7 +130,7 @@
62
63 // use one of these to force desired sort order in assoc. containers of DPX
64 bool
65- DPX::operator<(const DPX& p) const
66+ operator<(const DPX& p) const
67 {
68 return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
69 }
70diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp
71--- misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp 2007-08-20 15:04:54.000000000 -0500
72+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp 2012-01-24 10:39:23.000000000 -0500
73@@ -1,322 +1,329 @@
74-/*
75- File: Vetters.cpp
76-
77- Contains: Utility functions to handle common argument-checking tasks, in a
78- way that hides platform-specific details from higher-level code.
79-
80- Version: V1
81-
82- Copyright: ?? see below
83- */
84-
85-/*
86- * The ICC Software License, Version 0.1
87- *
88- *
89- * Copyright (c) 2003-2006 The International Color Consortium. All rights
90- * reserved.
91- *
92- * Redistribution and use in source and binary forms, with or without
93- * modification, are permitted provided that the following conditions
94- * are met:
95- *
96- * 1. Redistributions of source code must retain the above copyright
97- * notice, this list of conditions and the following disclaimer.
98- *
99- * 2. Redistributions in binary form must reproduce the above copyright
100- * notice, this list of conditions and the following disclaimer in
101- * the documentation and/or other materials provided with the
102- * distribution.
103- *
104- * 3. The end-user documentation included with the redistribution,
105- * if any, must include the following acknowledgment:
106- * "This product includes software developed by the
107- * The International Color Consortium (www.color.org)"
108- * Alternately, this acknowledgment may appear in the software itself,
109- * if and wherever such third-party acknowledgments normally appear.
110- *
111- * 4. The names "ICC" and "The International Color Consortium" must
112- * not be used to imply that the ICC organization endorses or
113- * promotes products derived from this software without prior
114- * written permission. For written permission, please see
115- * <http://www.color.org/>.
116- *
117- *
118- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
119- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
120- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
121- * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
122- * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
123- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
124- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
125- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
126- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
127- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
128- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
129- * SUCH DAMAGE.
130- * ====================================================================
131- *
132- * This software consists of voluntary contributions made by many
133- * individuals on behalf of the The International Color Consortium.
134- *
135- *
136- * Membership in the ICC is encouraged when this software is used for
137- * commercial purposes.
138- *
139- *
140- * For more information on The International Color Consortium, please
141- * see <http://www.color.org/>.
142- *
143- *
144- */
145-
146-//////////////////////////////////////////////////////////////////////
147-// HISTORY:
148-//
149-// -Initial implementation by Joseph Goldstone sumer 2007
150-//
151-//////////////////////////////////////////////////////////////////////
152-
153-#include "Vetters.h"
154-
155-#include <sstream>
156-using namespace std;
157-
158-#ifndef WIN32
159-#include <sys/errno.h>
160-#else
161-#include <string.h>
162-int strerror_r(int errnum, char *str, int strsize)
163-{
164- const char *errstr = strerror(errnum);
165-
166- if (errstr) {
167- strncpy(str, errstr, strsize);
168- return 0;
169- }
170-
171- return -1;
172-}
173-#define stat _stat
174-#endif
175-
176-#include "ICC_tool_exception.h"
177-
178-const char*
179-path_tail(const char* const s)
180-{
181- const char* tail = strdup(s);
182- const char* last_slash = strrchr(tail, '/');
183- if (last_slash != NULL)
184- tail = last_slash + 1;
185- return tail;
186-}
187-
188-void
189-vet_as_int(const char* const s, const string& name,
190- const string& description)
191-{
192- istringstream ss(s);
193- int i;
194- ss >> i;
195- if (ss.fail())
196- {
197- ostringstream oss;
198- oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
199- << " an integer. It should be an integer representing "
200- << description << ".";
201- throw ICC_tool_exception(oss.str());
202- }
203-}
204-
205-void
206-vet_as_float(const char* const s, const string& name,
207- const string& description)
208-{
209- istringstream ss(s);
210- float i;
211- ss >> i;
212- if (ss.fail())
213- {
214- ostringstream oss;
215- oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
216- << " a floating-point number. It should be a floating-point number"
217- << " representing " << description << ".";
218- throw ICC_tool_exception(oss.str());
219- }
220-}
221-
222-#define STRERROR_BUF_SIZE 256
223-off_t
224-get_size(const char* const s)
225-{
226- struct stat sb;
227- int stat_returned = stat(s, &sb);
228- if (stat_returned < 0)
229- {
230- int stat_errno = errno;
231- char strerror_buf[STRERROR_BUF_SIZE];
232- strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
233- ostringstream oss;
234- oss << "Could not access information for file `" << s << "': "
235- << strerror_buf;
236- throw ICC_tool_exception(oss.str());
237- }
238- return sb.st_size;
239-}
240-
241-bool
242-check_mode(const char* const s, mode_t mode)
243-{
244- struct stat sb;
245- int stat_returned = stat(s, &sb);
246- if (stat_returned < 0)
247- {
248- int stat_errno = errno;
249- char strerror_buf[STRERROR_BUF_SIZE];
250- strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
251- ostringstream oss;
252- oss << "Could not access information for file `" << s << "': "
253- << strerror_buf;
254- throw ICC_tool_exception(oss.str());
255- }
256- return (sb.st_mode & mode) != 0;
257-}
258-
259-bool
260-is_existent_file_pathname(const char* const s)
261-{
262- struct stat sb;
263- return stat(s, &sb) == 0;
264-}
265-
266-bool
267-is_plain_file_pathname(const char* const s)
268-{
269- return check_mode(s, S_IFREG);
270-}
271-
272-bool
273-is_directory(const char* const s)
274-{
275- return check_mode(s, S_IFDIR);
276-}
277-
278-const char* const
279-containing_directory(const char* const s)
280-{
281- if (strlen(s) == 0)
282- throw ICC_tool_exception("name of directory passed to containing_directory"
283- " function was zero-length.");
284- char* tmp = strdup(s);
285- // lop off any trailing seperator
286- if (tmp[strlen(tmp) - 1] == '/')
287- tmp[strlen(tmp) - 1] = 0;
288- if (strlen(tmp) == 0)
289- throw ICC_tool_exception("root directory (which has no containing"
290- " directory) passed to containing_directory"
291- " function");
292- char* idx = strrchr(tmp, '/');
293- if (idx != NULL)
294- {
295- *idx = 0;
296- return tmp;
297- }
298- char* current_directory = getenv("PWD");
299- if (current_directory == NULL)
300- throw ICC_tool_exception("pathname passed to containing_directory has no"
301- " embedded seperator, and there is no value for"
302- " PWD defined in the environment");
303- return strdup(current_directory);
304-}
305-
306-bool
307-is_readable_pathname(const char* const s)
308-{
309- return check_mode(s, S_IRUSR)
310- || check_mode(s, S_IRGRP)
311- || check_mode(s, S_IROTH);
312-}
313-
314-bool
315-is_writable_pathname(const char* const s)
316-{
317- return check_mode(s, S_IWUSR)
318- || check_mode(s, S_IWGRP)
319- || check_mode(s, S_IWOTH);
320-}
321-
322-bool
323-is_pathname_of_empty_file(const char* const s)
324-{
325- return get_size(s) > 0;
326-}
327-
328-void
329-vet_input_file_pathname(const char* const s, const string& name,
330- const string& description)
331-{
332- if (! is_plain_file_pathname(s))
333- {
334- ostringstream oss;
335- oss << "The " << name << " argument given, `" << s << "', is not the pathname"
336- << " of a plain file (i.e. it is the pathname of a directory, or of a"
337- << " symbolic link, or of some other sort of special file.) It should be"
338- << " " << description << ".";
339- throw ICC_tool_exception(oss.str());
340- }
341- if (! is_readable_pathname(s))
342- {
343- ostringstream oss;
344- oss << "The " << name << " argument given, `" << s << "', is not the pathname"
345- << " of a readable file (i.e. you do not have permission to read that"
346- << " file, or you do not have permission to read some directory"
347- << " containing that file.";
348- throw ICC_tool_exception(oss.str());
349- }
350- if (! is_pathname_of_empty_file(s))
351- {
352- ostringstream oss;
353- oss << "The " << name << " argument given, `" << s << "', is not the pathname"
354- << " of an existing readable file, but that file is of zero length."
355- << " The argument should be " << description << ".";
356- throw ICC_tool_exception(oss.str());
357- }
358-}
359-
360-void
361-vet_output_file_pathname(const char* const s, const string& name,
362- const string& description,
363- bool silent_overwrite_OK)
364-{
365- const char* const container = containing_directory(s);
366- if (! is_writable_pathname(container))
367- {
368- ostringstream oss;
369- oss << "The " << name << " argument given, `" << s << "', has a directory"
370- << " component which is not writable."
371- << " The argument should be " << description << ".";
372- throw ICC_tool_exception(oss.str());
373- }
374- if (is_existent_file_pathname(s))
375- {
376- if (is_plain_file_pathname(s))
377- if (is_writable_pathname(s))
378- {
379- if (! silent_overwrite_OK)
380- {
381- ostringstream oss;
382- oss << "The " << name << " argument given, `" << s << "' is of an existing"
383- << " file."
384- << " The argument should be " << description << ".";
385- throw ICC_tool_exception(oss.str());
386- }
387- } else {
388- ostringstream oss;
389- oss << "The " << name << " argument given, `" << s << "' is of an existing"
390- << " file which is not writable."
391- << " The argument should be " << description << ".";
392- throw ICC_tool_exception(oss.str());
393- }
394- }
395-}
396\ No newline at end of file
397+/*
398+ File: Vetters.cpp
399+
400+ Contains: Utility functions to handle common argument-checking tasks, in a
401+ way that hides platform-specific details from higher-level code.
402+
403+ Version: V1
404+
405+ Copyright: ?? see below
406+ */
407+
408+/*
409+ * The ICC Software License, Version 0.1
410+ *
411+ *
412+ * Copyright (c) 2003-2006 The International Color Consortium. All rights
413+ * reserved.
414+ *
415+ * Redistribution and use in source and binary forms, with or without
416+ * modification, are permitted provided that the following conditions
417+ * are met:
418+ *
419+ * 1. Redistributions of source code must retain the above copyright
420+ * notice, this list of conditions and the following disclaimer.
421+ *
422+ * 2. Redistributions in binary form must reproduce the above copyright
423+ * notice, this list of conditions and the following disclaimer in
424+ * the documentation and/or other materials provided with the
425+ * distribution.
426+ *
427+ * 3. The end-user documentation included with the redistribution,
428+ * if any, must include the following acknowledgment:
429+ * "This product includes software developed by the
430+ * The International Color Consortium (www.color.org)"
431+ * Alternately, this acknowledgment may appear in the software itself,
432+ * if and wherever such third-party acknowledgments normally appear.
433+ *
434+ * 4. The names "ICC" and "The International Color Consortium" must
435+ * not be used to imply that the ICC organization endorses or
436+ * promotes products derived from this software without prior
437+ * written permission. For written permission, please see
438+ * <http://www.color.org/>.
439+ *
440+ *
441+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
442+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
443+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
444+ * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
445+ * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
446+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
447+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
448+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
449+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
450+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
451+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
452+ * SUCH DAMAGE.
453+ * ====================================================================
454+ *
455+ * This software consists of voluntary contributions made by many
456+ * individuals on behalf of the The International Color Consortium.
457+ *
458+ *
459+ * Membership in the ICC is encouraged when this software is used for
460+ * commercial purposes.
461+ *
462+ *
463+ * For more information on The International Color Consortium, please
464+ * see <http://www.color.org/>.
465+ *
466+ *
467+ */
468+
469+//////////////////////////////////////////////////////////////////////
470+// HISTORY:
471+//
472+// -Initial implementation by Joseph Goldstone sumer 2007
473+//
474+//////////////////////////////////////////////////////////////////////
475+
476+#include "Vetters.h"
477+
478+#include <sstream>
479+using namespace std;
480+
481+#ifndef WIN32
482+#ifdef sun
483+#include <errno.h>
484+#else
485+#include <sys/errno.h>
486+#endif
487+#else
488+#include <string.h>
489+#define stat _stat
490+#endif
491+
492+#if defined WIN32 || defined sun
493+int strerror_r(int errnum, char *str, int strsize)
494+{
495+ const char *errstr = strerror(errnum);
496+
497+ if (errstr) {
498+ strncpy(str, errstr, strsize);
499+ return 0;
500+ }
501+
502+ return -1;
503+}
504+#endif
505+
506+#include "ICC_tool_exception.h"
507+
508+const char*
509+path_tail(const char* const s)
510+{
511+ const char* tail = strdup(s);
512+ const char* last_slash = strrchr(tail, '/');
513+ if (last_slash != NULL)
514+ tail = last_slash + 1;
515+ return tail;
516+}
517+
518+void
519+vet_as_int(const char* const s, const string& name,
520+ const string& description)
521+{
522+ istringstream ss(s);
523+ int i;
524+ ss >> i;
525+ if (ss.fail())
526+ {
527+ ostringstream oss;
528+ oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
529+ << " an integer. It should be an integer representing "
530+ << description << ".";
531+ throw ICC_tool_exception(oss.str());
532+ }
533+}
534+
535+void
536+vet_as_float(const char* const s, const string& name,
537+ const string& description)
538+{
539+ istringstream ss(s);
540+ float i;
541+ ss >> i;
542+ if (ss.fail())
543+ {
544+ ostringstream oss;
545+ oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
546+ << " a floating-point number. It should be a floating-point number"
547+ << " representing " << description << ".";
548+ throw ICC_tool_exception(oss.str());
549+ }
550+}
551+
552+#define STRERROR_BUF_SIZE 256
553+off_t
554+get_size(const char* const s)
555+{
556+ struct stat sb;
557+ int stat_returned = stat(s, &sb);
558+ if (stat_returned < 0)
559+ {
560+ int stat_errno = errno;
561+ char strerror_buf[STRERROR_BUF_SIZE];
562+ strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
563+ ostringstream oss;
564+ oss << "Could not access information for file `" << s << "': "
565+ << strerror_buf;
566+ throw ICC_tool_exception(oss.str());
567+ }
568+ return sb.st_size;
569+}
570+
571+bool
572+check_mode(const char* const s, mode_t mode)
573+{
574+ struct stat sb;
575+ int stat_returned = stat(s, &sb);
576+ if (stat_returned < 0)
577+ {
578+ int stat_errno = errno;
579+ char strerror_buf[STRERROR_BUF_SIZE];
580+ strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
581+ ostringstream oss;
582+ oss << "Could not access information for file `" << s << "': "
583+ << strerror_buf;
584+ throw ICC_tool_exception(oss.str());
585+ }
586+ return (sb.st_mode & mode) != 0;
587+}
588+
589+bool
590+is_existent_file_pathname(const char* const s)
591+{
592+ struct stat sb;
593+ return stat(s, &sb) == 0;
594+}
595+
596+bool
597+is_plain_file_pathname(const char* const s)
598+{
599+ return check_mode(s, S_IFREG);
600+}
601+
602+bool
603+is_directory(const char* const s)
604+{
605+ return check_mode(s, S_IFDIR);
606+}
607+
608+const char* const
609+containing_directory(const char* const s)
610+{
611+ if (strlen(s) == 0)
612+ throw ICC_tool_exception("name of directory passed to containing_directory"
613+ " function was zero-length.");
614+ char* tmp = strdup(s);
615+ // lop off any trailing seperator
616+ if (tmp[strlen(tmp) - 1] == '/')
617+ tmp[strlen(tmp) - 1] = 0;
618+ if (strlen(tmp) == 0)
619+ throw ICC_tool_exception("root directory (which has no containing"
620+ " directory) passed to containing_directory"
621+ " function");
622+ char* idx = strrchr(tmp, '/');
623+ if (idx != NULL)
624+ {
625+ *idx = 0;
626+ return tmp;
627+ }
628+ char* current_directory = getenv("PWD");
629+ if (current_directory == NULL)
630+ throw ICC_tool_exception("pathname passed to containing_directory has no"
631+ " embedded seperator, and there is no value for"
632+ " PWD defined in the environment");
633+ return strdup(current_directory);
634+}
635+
636+bool
637+is_readable_pathname(const char* const s)
638+{
639+ return check_mode(s, S_IRUSR)
640+ || check_mode(s, S_IRGRP)
641+ || check_mode(s, S_IROTH);
642+}
643+
644+bool
645+is_writable_pathname(const char* const s)
646+{
647+ return check_mode(s, S_IWUSR)
648+ || check_mode(s, S_IWGRP)
649+ || check_mode(s, S_IWOTH);
650+}
651+
652+bool
653+is_pathname_of_empty_file(const char* const s)
654+{
655+ return get_size(s) > 0;
656+}
657+
658+void
659+vet_input_file_pathname(const char* const s, const string& name,
660+ const string& description)
661+{
662+ if (! is_plain_file_pathname(s))
663+ {
664+ ostringstream oss;
665+ oss << "The " << name << " argument given, `" << s << "', is not the pathname"
666+ << " of a plain file (i.e. it is the pathname of a directory, or of a"
667+ << " symbolic link, or of some other sort of special file.) It should be"
668+ << " " << description << ".";
669+ throw ICC_tool_exception(oss.str());
670+ }
671+ if (! is_readable_pathname(s))
672+ {
673+ ostringstream oss;
674+ oss << "The " << name << " argument given, `" << s << "', is not the pathname"
675+ << " of a readable file (i.e. you do not have permission to read that"
676+ << " file, or you do not have permission to read some directory"
677+ << " containing that file.";
678+ throw ICC_tool_exception(oss.str());
679+ }
680+ if (! is_pathname_of_empty_file(s))
681+ {
682+ ostringstream oss;
683+ oss << "The " << name << " argument given, `" << s << "', is not the pathname"
684+ << " of an existing readable file, but that file is of zero length."
685+ << " The argument should be " << description << ".";
686+ throw ICC_tool_exception(oss.str());
687+ }
688+}
689+
690+void
691+vet_output_file_pathname(const char* const s, const string& name,
692+ const string& description,
693+ bool silent_overwrite_OK)
694+{
695+ const char* const container = containing_directory(s);
696+ if (! is_writable_pathname(container))
697+ {
698+ ostringstream oss;
699+ oss << "The " << name << " argument given, `" << s << "', has a directory"
700+ << " component which is not writable."
701+ << " The argument should be " << description << ".";
702+ throw ICC_tool_exception(oss.str());
703+ }
704+ if (is_existent_file_pathname(s))
705+ {
706+ if (is_plain_file_pathname(s))
707+ if (is_writable_pathname(s))
708+ {
709+ if (! silent_overwrite_OK)
710+ {
711+ ostringstream oss;
712+ oss << "The " << name << " argument given, `" << s << "' is of an existing"
713+ << " file."
714+ << " The argument should be " << description << ".";
715+ throw ICC_tool_exception(oss.str());
716+ }
717+ } else {
718+ ostringstream oss;
719+ oss << "The " << name << " argument given, `" << s << "' is of an existing"
720+ << " file which is not writable."
721+ << " The argument should be " << description << ".";
722+ throw ICC_tool_exception(oss.str());
723+ }
724+ }
725+}
726diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h
727--- misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2007-08-20 15:04:53.000000000 -0500
728+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2012-01-24 10:39:23.000000000 -0500
729@@ -83,6 +83,7 @@
730 #include <string>
731 #include <sys/types.h>
732 #include <sys/stat.h>
733+#include <stdlib.h>
734
735 #ifdef WIN32
736 typedef unsigned short mode_t;
737Only in misc/build/SampleICC-1.3.2/Contrib/ICC_utils: makefile.mk
738diff -ru misc/SampleICC-1.3.2/Contrib/Makefile.in misc/build/SampleICC-1.3.2/Contrib/Makefile.in
739--- misc/SampleICC-1.3.2/Contrib/Makefile.in 2007-08-20 15:10:37.000000000 -0500
740+++ misc/build/SampleICC-1.3.2/Contrib/Makefile.in 2012-01-24 10:39:23.000000000 -0500
741@@ -103,18 +103,12 @@
742
743 SUBDIRS = \
744 ICC_utils \
745- CmdLine \
746- examples \
747- Mac_OS_X \
748- tests
749+ CmdLine
750
751
752 DIST_SUBDIRS = \
753 ICC_utils \
754- CmdLine \
755- examples \
756- Mac_OS_X \
757- tests
758+ CmdLine
759
760 subdir = Contrib
761 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
762diff -ru misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp
763--- misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2007-08-20 15:05:00.000000000 -0500
764+++ misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2012-01-24 10:39:23.000000000 -0500
765@@ -79,6 +79,8 @@
766 #pragma warning( disable: 4786) //disable warning in <list.h>
767 #endif
768
769+#include <stdlib.h>
770+#include <string.h>
771 #include "IccCmm.h"
772 #include "IccTag.h"
773 #include "IccIO.h"
774diff -ru misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp
775--- misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp 2007-08-20 15:05:00.000000000 -0500
776+++ misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp 2012-01-24 10:39:23.000000000 -0500
777@@ -78,7 +78,7 @@
778 #include "IccIO.h"
779 #include "IccUtil.h"
780 #include <stdlib.h>
781-#include <memory.h>
782+#include <memory>
783 #include <string.h>
784
785 #ifndef __max
786diff -ru misc/SampleICC-1.3.2/IccProfLib/IccIO.h misc/build/SampleICC-1.3.2/IccProfLib/IccIO.h
787--- misc/SampleICC-1.3.2/IccProfLib/IccIO.h 2007-08-20 15:05:00.000000000 -0500
788+++ misc/build/SampleICC-1.3.2/IccProfLib/IccIO.h 2012-01-24 10:39:23.000000000 -0500
789@@ -79,6 +79,7 @@
790 #define _ICCIO_H
791
792 #include "IccDefs.h"
793+#include "memory"
794 #include "stdio.h"
795
796 #ifdef USESAMPLEICCNAMESPACE
797diff -ru misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp
798--- misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp 2007-08-20 15:05:00.000000000 -0500
799+++ misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp 2012-01-24 10:39:23.000000000 -0500
800@@ -136,17 +136,17 @@
801 icChar sigBuf[30];
802
803 if (GetBAcsSig())
804- sDescription += "ELEM_bACS\r\n";
805+ sDescription += "ELEM_bACS\n";
806 else
807- sDescription += "ELEM_eACS\r\n";
808+ sDescription += "ELEM_eACS\n";
809
810 icGetSig(sigBuf, m_signature);
811 sDescription += " Signature = ";
812 sDescription += sigBuf;
813- sDescription += "\r\n";
814+ sDescription += "\n";
815
816 if (m_pData) {
817- sDescription += "\r\nData Follows:\r\n";
818+ sDescription += "\nData Follows:\n";
819
820 icMemDump(sDescription, m_pData, m_nDataSize);
821 }
822diff -ru misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp
823--- misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp 2007-08-20 15:05:00.000000000 -0500
824+++ misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp 2012-01-24 10:39:23.000000000 -0500
825@@ -218,43 +218,43 @@
826 sprintf(buf, "%.8f", m_endPoint);
827 sDescription += buf;
828 }
829- sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
830+ sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
831 sDescription += buf;
832
833 switch(m_nFunctionType) {
834 case 0x0000:
835 if (m_params[1]==0.0 && m_params[2]==0.0)
836- sprintf(buf, "Y = %.8f\r\n\r\n", m_params[3]);
837+ sprintf(buf, "Y = %.8f\n\n", m_params[3]);
838 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
839- sprintf(buf, "Y = X\r\n\r\n");
840+ sprintf(buf, "Y = X\n\n");
841 else if (m_params[0]==1.0 && m_params[2]==0.0)
842- sprintf(buf, "Y = %.8f * X + %.8f\r\n\r\n",
843+ sprintf(buf, "Y = %.8f * X + %.8f\n\n",
844 m_params[1], m_params[3]);
845 else
846- sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\r\n\r\n",
847+ sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n",
848 m_params[1], m_params[2], m_params[0], m_params[3]);
849 sDescription += buf;
850 return;
851
852 case 0x0001:
853- sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\r\n\r\n",
854+ sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\n\n",
855 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
856 sDescription += buf;
857 return;
858
859 case 0x0002:
860- sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\r\n\r\n",
861+ sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
862 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
863 sDescription += buf;
864 return;
865
866 default:
867 int i;
868- sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
869+ sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
870 sDescription += buf;
871
872 for (i=0; i<m_nParameters; i++) {
873- sprintf(buf, "Param[%d] = %.8lf\r\n\r\n", i, m_params[i]);
874+ sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
875 sDescription += buf;
876 }
877 }
878@@ -496,7 +496,7 @@
879 if (m_nReserved || m_nReserved2) {
880 sReport += icValidateWarningMsg;
881 sReport += sSigName;
882- sReport += " formula curve has non zero reserved data.\r\n";
883+ sReport += " formula curve has non zero reserved data.\n";
884 rv = icValidateWarning;
885 }
886
887@@ -505,13 +505,13 @@
888 if (!m_params || m_nParameters<4) {
889 sReport += icValidateCriticalErrorMsg;
890 sReport += sSigName;
891- sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
892+ sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
893 rv = icValidateCriticalError;
894 }
895 else if (m_nParameters > 4) {
896 sReport += icValidateWarningMsg;
897 sReport += sSigName;
898- sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
899+ sReport += " formula curve has too many formulaCurveSegment parameters.\n";
900 rv = icValidateWarning;
901 }
902 break;
903@@ -520,13 +520,13 @@
904 if (!m_params || m_nParameters<5) {
905 sReport += icValidateCriticalErrorMsg;
906 sReport += sSigName;
907- sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
908+ sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
909 rv = icValidateCriticalError;
910 }
911 else if (m_nParameters > 5) {
912 sReport += icValidateWarningMsg;
913 sReport += sSigName;
914- sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
915+ sReport += " formula curve has too many formulaCurveSegment parameters.\n";
916 rv = icValidateWarning;
917 }
918 break;
919@@ -535,13 +535,13 @@
920 if (!m_params || m_nParameters<5) {
921 sReport += icValidateCriticalErrorMsg;
922 sReport += sSigName;
923- sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
924+ sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
925 rv = icValidateCriticalError;
926 }
927 else if (m_nParameters > 5) {
928 sReport += icValidateWarningMsg;
929 sReport += sSigName;
930- sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
931+ sReport += " formula curve has too many formulaCurveSegment parameters.\n";
932 rv = icValidateWarning;
933 }
934 break;
935@@ -551,7 +551,7 @@
936 icChar buf[128];
937 sReport += icValidateCriticalErrorMsg;
938 sReport += sSigName;
939- sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\r\n", m_nFunctionType);
940+ sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
941 sReport += buf;
942 rv = icValidateCriticalError;
943 }
944@@ -727,7 +727,7 @@
945 sDescription += buf;
946 }
947
948- sprintf(buf, "]\r\n");
949+ sprintf(buf, "]\n");
950 sDescription += buf;
951 }
952 else {
953@@ -744,9 +744,9 @@
954 sprintf(buf, "%.8f", m_endPoint);
955 sDescription += buf;
956 }
957- sprintf(buf, "]\r\n");
958+ sprintf(buf, "]\n");
959 sDescription += buf;
960- sDescription += "IN OUT\r\n";
961+ sDescription += "IN OUT\n";
962
963 icUInt32Number i;
964
965@@ -754,11 +754,11 @@
966 icFloatNumber last = (icFloatNumber)(m_nCount-1);
967
968 for (i=0; i<m_nCount; i++) {
969- sprintf(buf, "%.8f %.8f\r\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
970+ sprintf(buf, "%.8f %.8f\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
971 sDescription += buf;
972 }
973 }
974- sDescription += "\r\n";
975+ sDescription += "\n";
976 }
977
978 /**
979@@ -910,20 +910,20 @@
980 if (m_nReserved) {
981 sReport += icValidateWarningMsg;
982 sReport += sSigName;
983- sReport += " sampled curve has non zero reserved data.\r\n";
984+ sReport += " sampled curve has non zero reserved data.\n";
985 rv = icValidateWarning;
986 }
987
988 if (m_nCount<2) {
989 sReport += icValidateCriticalErrorMsg;
990 sReport += sSigName;
991- sReport += " sampled curve has too few sample points.\r\n";
992+ sReport += " sampled curve has too few sample points.\n";
993 rv = icValidateCriticalError;
994 }
995 else if (m_endPoint-m_startPoint == 0.0) {
996 sReport += icValidateWarningMsg;
997 sReport += sSigName;
998- sReport += " sampled curve has a range of zero.\r\n";
999+ sReport += " sampled curve has a range of zero.\n";
1000 rv = icMaxStatus(rv, icValidateWarning);
1001 }
1002
1003@@ -1054,7 +1054,7 @@
1004 {
1005 CIccCurveSegmentList::iterator i;
1006
1007- sDescription += "BEGIN_CURVE\r\n";
1008+ sDescription += "BEGIN_CURVE\n";
1009 for (i=m_list->begin(); i!=m_list->end(); i++) {
1010 (*i)->Describe(sDescription);
1011 }
1012@@ -1342,14 +1342,14 @@
1013 if (m_nReserved1 || m_nReserved2) {
1014 sReport += icValidateWarningMsg;
1015 sReport += sSigName;
1016- sReport += " Segmented curve has non zero reserved data.\r\n";
1017+ sReport += " Segmented curve has non zero reserved data.\n";
1018 rv = icValidateWarning;
1019 }
1020
1021 if (m_list->size()==0) {
1022 sReport += icValidateCriticalErrorMsg;
1023 sReport += sSigName;
1024- sReport += " Has Empty CurveSegment!\r\n";
1025+ sReport += " Has Empty CurveSegment!\n";
1026 return icValidateCriticalError;
1027 }
1028
1029@@ -1599,11 +1599,11 @@
1030 icChar buf[81];
1031 int i;
1032
1033- sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
1034+ sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
1035 sDescription += buf;
1036
1037 for (i=0; i<m_nInputChannels; i++) {
1038- sprintf(buf, "Curve %d of %d\r\n", i+1, m_nInputChannels);
1039+ sprintf(buf, "Curve %d of %d\n", i+1, m_nInputChannels);
1040 sDescription += buf;
1041 if (m_curve[i]) {
1042 m_curve[i]->Describe(sDescription);
1043@@ -1877,7 +1877,7 @@
1044 sReport += " - Element ";
1045 sSigName = Info.GetSigName(GetType());
1046 sReport += sSigName;
1047- sReport += " Has Empty Curve Element(s)!\r\n";
1048+ sReport += " Has Empty Curve Element(s)!\n";
1049 return icValidateCriticalError;
1050 }
1051
1052@@ -2042,7 +2042,7 @@
1053 int i, j;
1054 icFloatNumber *data = m_pMatrix;
1055
1056- sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
1057+ sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
1058 sDescription += buf;
1059
1060 for (j=0; j<m_nOutputChannels; j++) {
1061@@ -2052,7 +2052,7 @@
1062 sprintf(buf, "%12.8lf", data[i]);
1063 sDescription += buf;
1064 }
1065- sprintf(buf, " + %12.8lf\r\n", m_pConstants[j]);
1066+ sprintf(buf, " + %12.8lf\n", m_pConstants[j]);
1067 sDescription += buf;
1068 data += i;
1069 }
1070@@ -2273,7 +2273,7 @@
1071 sReport += " - Element ";
1072 sSigName = Info.GetSigName(GetType());
1073 sReport += sSigName;
1074- sReport += " Has Empty Matrix data!\r\n";
1075+ sReport += " Has Empty Matrix data!\n";
1076 return icValidateCriticalError;
1077 }
1078
1079@@ -2620,7 +2620,7 @@
1080 sReport += " - Element ";
1081 sSigName = Info.GetSigName(GetType());
1082 sReport += sSigName;
1083- sReport += " Has No CLUT!\r\n";
1084+ sReport += " Has No CLUT!\n";
1085 return icValidateCriticalError;
1086 }
1087
1088diff -ru misc/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h
1089--- misc/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h 2007-08-20 15:05:00.000000000 -0500
1090+++ misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h 2012-01-24 10:39:23.000000000 -0500
1091@@ -107,20 +107,23 @@
1092
1093 #else // non-PC, perhaps Mac or Linux
1094
1095- #define ICCUINT64 unsigned long long
1096- #define ICCINT64 long long
1097- #define ICUINT64TYPE unsigned long long
1098- #define ICINT64TYPE long long
1099-
1100- #if defined(__APPLE__)
1101- #if defined(__LITTLE_ENDIAN__)
1102- #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1103- #else
1104- #define ICC_BYTE_ORDER_BIG_ENDIAN
1105- #endif
1106- #else
1107- #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1108- #endif
1109+#include <sal/types.h>
1110+#include <osl/endian.h>
1111+
1112+ #define ICCUINT64 sal_uInt64
1113+ #define ICCINT64 sal_Int64
1114+ #define ICUINT64TYPE sal_uInt64
1115+ #define ICINT64TYPE sal_Int64
1116+ #define ICINT32TYPE sal_Int32
1117+ #define ICUINT32TYPE sal_uInt32
1118+
1119+#if defined(_LITTLE_ENDIAN)
1120+# define ICC_BYTE_ORDER_LITTLE_ENDIAN
1121+#elif defined(_BIG_ENDIAN)
1122+# define ICC_BYTE_ORDER_BIG_ENDIAN
1123+#else
1124+# error "ENDIAN unknown"
1125+#endif
1126
1127 #define ICCPROFLIB_API
1128 #define ICCPROFLIB_EXTERN
1129diff -ru misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp
1130--- misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp 2007-08-20 15:05:00.000000000 -0500
1131+++ misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp 2012-01-24 10:39:23.000000000 -0500
1132@@ -567,7 +567,7 @@
1133
1134 if (!ReadBasic(pIO)) {
1135 sReport += icValidateCriticalErrorMsg;
1136- sReport += " - Unable to read profile!**\r\n\tProfile has invalid structure!\r\n";
1137+ sReport += " - Unable to read profile!**\n\tProfile has invalid structure!\n";
1138 Cleanup();
1139
1140 return icValidateCriticalError;
1141@@ -576,7 +576,7 @@
1142 // Check profile header
1143 if (!CheckFileSize(pIO)) {
1144 sReport += icValidateNonCompliantMsg;
1145- sReport += "Bad Header File Size\r\n";
1146+ sReport += "Bad Header File Size\n";
1147 rv = icMaxStatus(rv, icValidateNonCompliant);
1148 }
1149
1150@@ -588,7 +588,7 @@
1151 CalcProfileID(pIO, &profileID);
1152 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1153 sReport += icValidateNonCompliantMsg;
1154- sReport += "Bad Profile ID\r\n";
1155+ sReport += "Bad Profile ID\n";
1156
1157 rv = icMaxStatus(rv, icValidateNonCompliant);
1158 }
1159@@ -601,7 +601,7 @@
1160 sReport += icValidateCriticalErrorMsg;
1161 sReport += " - ";
1162 sReport += Info.GetTagSigName(i->TagInfo.sig);
1163- sReport += " - Tag has invalid structure!\r\n";
1164+ sReport += " - Tag has invalid structure!\n";
1165
1166 rv = icMaxStatus(rv, icValidateCriticalError);
1167 }
1168@@ -1026,14 +1026,14 @@
1169
1170 default:
1171 sReport += icValidateCriticalErrorMsg;
1172- sprintf(buf, " - %s: Unknown profile class!\r\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1173+ sprintf(buf, " - %s: Unknown profile class!\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1174 sReport += buf;
1175 rv = icMaxStatus(rv, icValidateCriticalError);
1176 }
1177
1178 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1179 sReport += icValidateCriticalErrorMsg;
1180- sprintf(buf, " - %s: Unknown color space!\r\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1181+ sprintf(buf, " - %s: Unknown color space!\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1182 sReport += buf;
1183 rv = icMaxStatus(rv, icValidateCriticalError);
1184 }
1185@@ -1041,7 +1041,7 @@
1186 if (m_Header.deviceClass==icSigLinkClass) {
1187 if (!Info.IsValidSpace(m_Header.pcs)) {
1188 sReport += icValidateCriticalErrorMsg;
1189- sprintf(buf, " - %s: Unknown pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1190+ sprintf(buf, " - %s: Unknown pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1191 sReport += buf;
1192 rv = icMaxStatus(rv, icValidateCriticalError);
1193 }
1194@@ -1049,7 +1049,7 @@
1195 else {
1196 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1197 sReport += icValidateCriticalErrorMsg;
1198- sprintf(buf, " - %s: Invalid pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1199+ sprintf(buf, " - %s: Invalid pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1200 sReport += buf;
1201 rv = icMaxStatus(rv, icValidateCriticalError);
1202 }
1203@@ -1068,7 +1068,7 @@
1204
1205 default:
1206 sReport += icValidateWarningMsg;
1207- sprintf(buf, " - %s: Unknown platform signature.\r\n", Info.GetPlatformSigName(m_Header.platform));
1208+ sprintf(buf, " - %s: Unknown platform signature.\n", Info.GetPlatformSigName(m_Header.platform));
1209 sReport += buf;
1210 rv = icMaxStatus(rv, icValidateWarning);
1211 }
1212@@ -1095,7 +1095,7 @@
1213
1214 default:
1215 sReport += icValidateWarningMsg;
1216- sprintf(buf, " - %s: Unregisterd CMM signature.\r\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1217+ sprintf(buf, " - %s: Unregisterd CMM signature.\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1218 sReport += buf;
1219 rv = icMaxStatus(rv, icValidateWarning);
1220 }
1221@@ -1109,7 +1109,7 @@
1222
1223 default:
1224 sReport += icValidateCriticalErrorMsg;
1225- sprintf(buf, " - %s: Unknown rendering intent!\r\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1226+ sprintf(buf, " - %s: Unknown rendering intent!\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1227 sReport += buf;
1228 rv = icMaxStatus(rv, icValidateCriticalError);
1229 }
1230@@ -1120,7 +1120,7 @@
1231 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1232 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1233 sReport += icValidateNonCompliantMsg;
1234- sReport += " - Non D50 Illuminant XYZ values.\r\n";
1235+ sReport += " - Non D50 Illuminant XYZ values.\n";
1236 rv = icMaxStatus(rv, icValidateNonCompliant);
1237 }
1238
1239@@ -1130,7 +1130,7 @@
1240 }
1241 if (sum) {
1242 sReport += icValidateNonCompliantMsg;
1243- sReport += " - Reserved value must be zero.\r\n";
1244+ sReport += " - Reserved value must be zero.\n";
1245 rv = icMaxStatus(rv, icValidateNonCompliant);
1246 }
1247
1248@@ -1163,7 +1163,7 @@
1249 {
1250 sReport += icValidateWarningMsg;
1251 sReport += buf;
1252- sReport += " - Tag exclusion test failed.\r\n";
1253+ sReport += " - Tag exclusion test failed.\n";
1254 rv = false;
1255 }
1256 }
1257@@ -1177,7 +1177,7 @@
1258 {
1259 sReport += icValidateWarningMsg;
1260 sReport += buf;
1261- sReport += " - Tag exclusion test failed.\r\n";
1262+ sReport += " - Tag exclusion test failed.\n";
1263 rv = false;
1264 }
1265 break;
1266@@ -1192,7 +1192,7 @@
1267 {
1268 sReport += icValidateWarningMsg;
1269 sReport += buf;
1270- sReport += " - Tag exclusion test failed.\r\n";
1271+ sReport += " - Tag exclusion test failed.\n";
1272 rv = false;
1273 }
1274 break;
1275@@ -1234,7 +1234,7 @@
1276 if (!IsTypeValid(tagsig, typesig)) {
1277 sReport += icValidateNonCompliantMsg;
1278 sReport += buf;
1279- sprintf(buf," - %s: Invalid tag type (Might be critical!).\r\n", Info.GetTagTypeSigName(typesig));
1280+ sprintf(buf," - %s: Invalid tag type (Might be critical!).\n", Info.GetTagTypeSigName(typesig));
1281 sReport += buf;
1282 rv = icMaxStatus(rv, icValidateNonCompliant);
1283 }
1284@@ -1477,7 +1477,7 @@
1285 {
1286 if (m_Tags->size() <= 0) {
1287 sReport += icValidateCriticalErrorMsg;
1288- sReport += "No tags present.\r\n";
1289+ sReport += "No tags present.\n";
1290 return icValidateCriticalError;
1291 }
1292
1293@@ -1486,7 +1486,7 @@
1294 if (!GetTag(icSigProfileDescriptionTag) ||
1295 !GetTag(icSigCopyrightTag)) {
1465 sReport += icValidateNonCompliantMsg;
1296 sReport += icValidateNonCompliantMsg;
1466! sReport += "Bad Profile ID\r\n";
1467
1297- sReport += "Required tags missing.\r\n";
1298+ sReport += "Required tags missing.\n";
1468 rv = icMaxStatus(rv, icValidateNonCompliant);
1299 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)) {
1300 }
1301
1302@@ -1495,7 +1495,7 @@
1303 if (sig != icSigLinkClass) {
1304 if (!GetTag(icSigMediaWhitePointTag)) {
1305 sReport += icValidateCriticalErrorMsg;
1306- sReport += "Media white point tag missing.\r\n";
1307+ sReport += "Media white point tag missing.\n";
1308 rv = icMaxStatus(rv, icValidateCriticalError);
1309 }
1310 }
1311@@ -1505,7 +1505,7 @@
1312 if (m_Header.colorSpace == icSigGrayData) {
1313 if (!GetTag(icSigGrayTRCTag)) {
1314 sReport += icValidateCriticalErrorMsg;
1315- sReport += "Gray TRC tag missing.\r\n";
1316+ sReport += "Gray TRC tag missing.\n";
1317 rv = icMaxStatus(rv, icValidateCriticalError);
1318 }
1319 }
1320@@ -1515,7 +1515,7 @@
1321 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1322 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1323 sReport += icValidateCriticalErrorMsg;
1324- sReport += "Critical tag(s) missing.\r\n";
1325+ sReport += "Critical tag(s) missing.\n";
1326 rv = icMaxStatus(rv, icValidateCriticalError);
1327 }
1328 }
1329@@ -1526,7 +1526,7 @@
1330 if (m_Header.colorSpace == icSigGrayData) {
1331 if (!GetTag(icSigGrayTRCTag)) {
1332 sReport += icValidateCriticalErrorMsg;
1333- sReport += "Gray TRC tag missing.\r\n";
1334+ sReport += "Gray TRC tag missing.\n";
1335 rv = icMaxStatus(rv, icValidateCriticalError);
1336 }
1337 }
1338@@ -1536,7 +1536,7 @@
1339 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1340 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1341 sReport += icValidateCriticalErrorMsg;
1342- sReport += "Critical tag(s) missing.\r\n";
1343+ sReport += "Critical tag(s) missing.\n";
1344 rv = icMaxStatus(rv, icValidateCriticalError);
1345 }
1346 }
1347@@ -1547,7 +1547,7 @@
1348 if (m_Header.colorSpace == icSigGrayData) {
1349 if (!GetTag(icSigGrayTRCTag)) {
1350 sReport += icValidateCriticalErrorMsg;
1351- sReport += "Gray TRC tag missing.\r\n";
1352+ sReport += "Gray TRC tag missing.\n";
1353 rv = icMaxStatus(rv, icValidateCriticalError);
1354 }
1355 }
1356@@ -1556,13 +1556,13 @@
1357 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1358 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1359 sReport += icValidateCriticalErrorMsg;
1360- sReport += "Critical tag(s) missing.\r\n";
1361+ sReport += "Critical tag(s) missing.\n";
1362 rv = icMaxStatus(rv, icValidateCriticalError);
1363 }
1364
1365 if (!GetTag(icSigGamutTag)) {
1366 sReport += icValidateNonCompliantMsg;
1367- sReport += "Gamut tag missing.\r\n";
1368+ sReport += "Gamut tag missing.\n";
1369 rv = icMaxStatus(rv, icValidateNonCompliant);
1370 }
1371
1372@@ -1585,7 +1585,7 @@
1373 case icSig16colorData:
1374 if (!GetTag(icSigColorantTableTag)) {
1375 sReport += icValidateNonCompliantMsg;
1376- sReport += "xCLR output profile is missing colorantTableTag\r\n";
1377+ sReport += "xCLR output profile is missing colorantTableTag\n";
1378 rv = icMaxStatus(rv, icValidateNonCompliant);
1379 }
1380
1381@@ -1599,14 +1599,14 @@
1382 case icSigLinkClass:
1383 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1384 sReport += icValidateCriticalErrorMsg;
1385- sReport += "Critical tag(s) missing.\r\n";
1386+ sReport += "Critical tag(s) missing.\n";
1387 rv = icMaxStatus(rv, icValidateCriticalError);
1388 }
1389
1390 if (icIsSpaceCLR(m_Header.colorSpace)) {
1391 if (!GetTag(icSigColorantTableTag)) {
1392 sReport += icValidateNonCompliantMsg;
1393- sReport += "Required tag(s) missing.\r\n";
1394+ sReport += "Required tag(s) missing.\n";
1395 rv = icMaxStatus(rv, icValidateNonCompliant);
1396 }
1397 }
1398@@ -1614,7 +1614,7 @@
1399 if (icIsSpaceCLR(m_Header.pcs)) {
1400 if (!GetTag(icSigColorantTableOutTag)) {
1401 sReport += icValidateNonCompliantMsg;
1402- sReport += "Required tag(s) missing.\r\n";
1403+ sReport += "Required tag(s) missing.\n";
1404 rv = icMaxStatus(rv, icValidateNonCompliant);
1405 }
1406 }
1407@@ -1623,7 +1623,7 @@
1408 case icSigColorSpaceClass:
1409 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1410 sReport += icValidateCriticalErrorMsg;
1411- sReport += "Critical tag(s) missing.\r\n";
1412+ sReport += "Critical tag(s) missing.\n";
1413 rv = icMaxStatus(rv, icValidateCriticalError);
1414 }
1415 break;
1416@@ -1631,7 +1631,7 @@
1417 case icSigAbstractClass:
1418 if (!GetTag(icSigAToB0Tag)) {
1419 sReport += icValidateCriticalErrorMsg;
1420- sReport += "Critical tag(s) missing.\r\n";
1421+ sReport += "Critical tag(s) missing.\n";
1422 rv = icMaxStatus(rv, icValidateCriticalError);
1423 }
1424 break;
1425@@ -1639,7 +1639,7 @@
1426 case icSigNamedColorClass:
1427 if (!GetTag(icSigNamedColor2Tag)) {
1428 sReport += icValidateCriticalErrorMsg;
1429- sReport += "Critical tag(s) missing.\r\n";
1430+ sReport += "Critical tag(s) missing.\n";
1431 rv = icMaxStatus(rv, icValidateCriticalError);
1432 }
1433
1434@@ -1647,7 +1647,7 @@
1435
1436 default:
1437 sReport += icValidateCriticalErrorMsg;
1438- sReport += "Unknown Profile Class.\r\n";
1439+ sReport += "Unknown Profile Class.\n";
1440 rv = icMaxStatus(rv, icValidateCriticalError);
1441 break;
1442 }
1443@@ -1724,7 +1724,7 @@
1444 // Check for duplicate tags
1445 if (!AreTagsUnique()) {
1446 sReport += icValidateWarning;
1447- sReport += " - There are duplicate tags.\r\n";
1448+ sReport += " - There are duplicate tags.\n";
1449 rv =icMaxStatus(rv, icValidateWarning);
1450 }
1451
1452@@ -1979,7 +1979,7 @@
1453 sReport = icValidateCriticalErrorMsg;
1454 sReport += " - ";
1455 sReport += szFilename;
1456- sReport += "- Invalid Filename\r\n";
1457+ sReport += "- Invalid Filename\n";
1458 delete pFileIO;
1459 return NULL;
1460 }
1461diff -ru misc/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp
1462--- misc/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp 2007-08-20 15:05:00.000000000 -0500
1463+++ misc/build/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp 2012-01-24 10:39:23.000000000 -0500
1464@@ -166,7 +166,7 @@
1465 CIccInfo Info;
1466 sReport += icValidateNonCompliantMsg;
1467 sReport += Info.GetSigName(sig);
1468- sReport += " - Reserved Value must be zero.\r\n";
1469+ sReport += " - Reserved Value must be zero.\n";
1470
1471 rv = icValidateNonCompliant;
1472 }
1473@@ -340,7 +340,7 @@
1474 sprintf(buf, "%u Bytes.", m_nSize-4);
1475 sDescription += buf;
1476
1477- sDescription += "\r\n\r\nData Follows:\r\n";
1478+ sDescription += "\n\nData Follows:\n";
1479
1480 icMemDump(sDescription, m_pData+4, m_nSize-4);
1481 }
1482@@ -511,7 +511,7 @@
1483 if (m_szText && *m_szText)
1484 sDescription += m_szText;
1485
1486- sDescription += "\"\r\n";
1487+ sDescription += "\"\n";
1488 }
1489
1490
1491@@ -629,14 +629,14 @@
1492 if (m_nBufSize<7) {
1737 sReport += icValidateNonCompliantMsg;
1493 sReport += icValidateNonCompliantMsg;
1738! sReport += "Required tags missing.\r\n";
1494 sReport += sSigName;
1495- sReport += " - Tag must have at least seven text characters.\r\n";
1496+ sReport += " - Tag must have at least seven text characters.\n";
1739 rv = icMaxStatus(rv, icValidateNonCompliant);
1497 rv = icMaxStatus(rv, icValidateNonCompliant);
1740 }
1741
1742--- 1486,1492 ----
1743 if (!GetTag(icSigProfileDescriptionTag) ||
1744 !GetTag(icSigCopyrightTag)) {
1498 }
1499 break;
1500 default:
1501 sReport += icValidateWarningMsg;
1502 sReport += sSigName;
1503- sReport += " - Unknown Tag.\r\n";
1504+ sReport += " - Unknown Tag.\n";
1505 rv = icMaxStatus(rv, icValidateWarning);
1506 }
1507 int i;
1508@@ -644,14 +644,14 @@
1509 if (m_szText[i]&0x80) {
1510 sReport += icValidateWarning;
1511 sReport += sSigName;
1512- sReport += " - Text do not contain 7bit data.\r\n";
1513+ sReport += " - Text do not contain 7bit data.\n";
1514 }
1515 }
1516 }
1517 else {
1518 sReport += icValidateWarningMsg;
1519 sReport += sSigName;
1520- sReport += " - Empty Tag.\r\n";
1521+ sReport += " - Empty Tag.\n";
1522 rv = icMaxStatus(rv, icValidateWarning);
1523 }
1524
1525@@ -941,7 +941,7 @@
1526 if (m_szText && *m_szText)
1527 sDescription += m_szText;
1528
1529- sDescription += "\"\r\n";
1530+ sDescription += "\"\n";
1531 }
1532
1533
1534@@ -1101,7 +1101,7 @@
1535 if (m_nScriptSize>67) {
1536 sReport += icValidateNonCompliantMsg;
1537 sReport += sSigName;
1538- sReport += " - ScriptCode count must not be greater than 67.\r\n";
1539+ sReport += " - ScriptCode count must not be greater than 67.\n";
1540
1541 rv =icMaxStatus(rv, icValidateNonCompliant);
1542 }
1543@@ -1260,7 +1260,7 @@
1544 CIccInfo Fmt;
1545
1546 sDescription += Fmt.GetSigName(m_nSig);
1547- sDescription += "\r\n";
1548+ sDescription += "\n";
1549 }
1550
1551
1552@@ -1320,7 +1320,7 @@
1553 {
1745 sReport += icValidateNonCompliantMsg;
1554 sReport += icValidateNonCompliantMsg;
1746! sReport += "Required tags missing.\n";
1555 sReport += sSigName;
1556- sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(m_nSig));
1557+ sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(m_nSig));
1558 sReport += buf;
1747 rv = icMaxStatus(rv, icValidateNonCompliant);
1559 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)) {
1560 }
1561@@ -1336,7 +1336,7 @@
1562 {
1563 sReport += icValidateNonCompliantMsg;
1564 sReport += sSigName;
1565- sprintf(buf, " - %s: Unknown Reference Medium Gamut.\r\n", Info.GetSigName(m_nSig));
1566+ sprintf(buf, " - %s: Unknown Reference Medium Gamut.\n", Info.GetSigName(m_nSig));
1567 sReport += buf;
1568 rv = icMaxStatus(rv, icValidateNonCompliant);
1569 }
1570@@ -1355,7 +1355,7 @@
1571 {
1572 sReport += icValidateNonCompliantMsg;
1573 sReport += sSigName;
1574- sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\r\n", Info.GetSigName(m_nSig));
1575+ sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\n", Info.GetSigName(m_nSig));
1576 sReport += buf;
1577 rv = icMaxStatus(rv, icValidateNonCompliant);
1578 }
1579@@ -1686,7 +1686,7 @@
1580
1581 sDescription.reserve(sDescription.size() + m_nSize*79);
1582
1583- sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\r\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
1584+ sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
1585 sDescription += buf;
1586
1587 for (i=0; i<m_nSize; i++) {
1588@@ -1717,7 +1717,7 @@
1589 sDescription += buf;
1590 }
1591 }
1592- sDescription += "\r\n";
1593+ sDescription += "\n";
1594
1595 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
1596 }
1597@@ -2082,7 +2082,7 @@
1598 if (!m_nSize) {
1599 sReport += icValidateWarningMsg;
1600 sReport += sSigName;
1601- sReport += " - Empty tag!\r\n";
1602+ sReport += " - Empty tag!\n";
1603 rv = icMaxStatus(rv, icValidateWarning);
1604 }
1605
1606@@ -2092,14 +2092,14 @@
1607 if (m_nDeviceCoords != nCoords) {
1608 sReport += icValidateNonCompliantMsg;
1609 sReport += sSigName;
1610- sReport += " - Incorrect number of device co-ordinates.\r\n";
1611+ sReport += " - Incorrect number of device co-ordinates.\n";
1612 rv = icMaxStatus(rv, icValidateNonCompliant);
1613 }
1614 }
1615 else {
1616 sReport += icValidateWarningMsg;
1617 sReport += sSigName;
1618- sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
1619+ sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
1620 rv = icMaxStatus(rv, icValidateWarning);
1621 }
1622 }
1623@@ -2285,7 +2285,7 @@
1624 icChar buf[128];
1625
1626 if (m_nSize == 1 ) {
1627- 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));
1628+ sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
1629 sDescription += buf;
1630 }
1631 else {
1632@@ -2293,7 +2293,7 @@
1633 sDescription.reserve(sDescription.size() + m_nSize*79);
1634
1635 for (i=0; i<m_nSize; i++) {
1636- 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));
1637+ 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));
1638 sDescription += buf;
1639 }
1640 }
1641@@ -2347,7 +2347,7 @@
1642 if (!m_nSize) {
1643 sReport += icValidateWarningMsg;
1644 sReport += sSigName;
1645- sReport += " - Empty tag.\r\n";
1646+ sReport += " - Empty tag.\n";
1647
1648 rv = icMaxStatus(rv, icValidateWarning);
1649 return rv;
1650@@ -2553,14 +2553,14 @@
1651
1652 icUInt32Number i;
1653 //sDescription.reserve(sDescription.size() + m_nChannels*79);
1654- sprintf(buf, "Number of Channels : %u\r\n", m_nChannels);
1655+ sprintf(buf, "Number of Channels : %u\n", m_nChannels);
1656 sDescription += buf;
1657
1658- sprintf(buf, "Colorant Encoding : %s\r\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
1659+ sprintf(buf, "Colorant Encoding : %s\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
1660 sDescription += buf;
1661
1662 for (i=0; i<m_nChannels; i++) {
1663- sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\r\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
1664+ sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
1665 sDescription += buf;
1666 }
1667
1668@@ -2617,7 +2617,7 @@
1669 if (m_nChannels!=3) {
1670 sReport += icValidateCriticalErrorMsg;
1671 sReport += sSigName;
1672- sReport += " - Number of device channels must be three.\r\n";
1673+ sReport += " - Number of device channels must be three.\n";
1674 rv = icMaxStatus(rv, icValidateCriticalError);
1675 }
1676
1677@@ -2629,7 +2629,7 @@
1678 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
1679 sReport += icValidateNonCompliantMsg;
1680 sReport += sSigName;
1681- sReport += " - Chromaticity data does not match specification.\r\n";
1682+ sReport += " - Chromaticity data does not match specification.\n";
1683 rv = icMaxStatus(rv, icValidateNonCompliant);
1684 }
1685 break;
1686@@ -2642,7 +2642,7 @@
1687 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
1688 sReport += icValidateNonCompliantMsg;
1689 sReport += sSigName;
1690- sReport += " - Chromaticity data does not match specification.\r\n";
1691+ sReport += " - Chromaticity data does not match specification.\n";
1692 rv = icMaxStatus(rv, icValidateNonCompliant);
1693 }
1694 break;
1695@@ -2655,7 +2655,7 @@
1696 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
1697 sReport += icValidateNonCompliantMsg;
1698 sReport += sSigName;
1699- sReport += " - Chromaticity data does not match specification.\r\n";
1700+ sReport += " - Chromaticity data does not match specification.\n";
1701 rv = icMaxStatus(rv, icValidateNonCompliant);
1702 }
1703 break;
1704@@ -2668,7 +2668,7 @@
1705 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
1706 sReport += icValidateNonCompliantMsg;
1707 sReport += sSigName;
1708- sReport += " - Chromaticity data does not match specification.\r\n";
1709+ sReport += " - Chromaticity data does not match specification.\n";
1710 rv = icMaxStatus(rv, icValidateNonCompliant);
1711 }
1712 break;
1713@@ -2678,7 +2678,7 @@
1714 {
1715 sReport += icValidateNonCompliantMsg;
1716 sReport += sSigName;
1717- sReport += " - Invalid colorant type encoding.\r\n";
1718+ sReport += " - Invalid colorant type encoding.\n";
1719 rv = icMaxStatus(rv, icValidateNonCompliant);
1720 }
1721 }
1722@@ -2884,27 +2884,27 @@
1723
1724 if (m_nSize == 1 ) {
1725 if (Tsig==icSigS15Fixed16ArrayType)
1726- sprintf(buf, "Value = %.4lf\r\n", icFtoD(m_Num[0]));
1727+ sprintf(buf, "Value = %.4lf\n", icFtoD(m_Num[0]));
1728 else
1729- sprintf(buf, "Value = %.4lf\r\n", icUFtoD(m_Num[0]));
1730+ sprintf(buf, "Value = %.4lf\n", icUFtoD(m_Num[0]));
1731 sDescription += buf;
1732 }
1733 else {
1734 icUInt32Number i;
1735
1736 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
1737- sDescription += "Matrix Form:\r\n";
1738+ sDescription += "Matrix Form:\n";
1739 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
1740
1741- sDescription += "\r\nArrayForm:\r\n";
1742+ sDescription += "\nArrayForm:\n";
1743 }
1744 sDescription.reserve(sDescription.size() + m_nSize*79);
1745
1746 for (i=0; i<m_nSize; i++) {
1747 if (Tsig==icSigS15Fixed16ArrayType)
1748- sprintf(buf, "Value[%u] = %.4lf\r\n", i, icFtoD(m_Num[i]));
1749+ sprintf(buf, "Value[%u] = %.4lf\n", i, icFtoD(m_Num[i]));
1750 else
1751- sprintf(buf, "Value[%u] = %.4lf\r\n", i, icUFtoD(m_Num[i]));
1752+ sprintf(buf, "Value[%u] = %.4lf\n", i, icUFtoD(m_Num[i]));
1753 sDescription += buf;
1754 }
1755 }
1756@@ -3172,7 +3172,7 @@
1757 icChar buf[128];
1758
1759 if (m_nSize == 1 ) {
1760- sprintf(buf, "Value = %u (0x%x)\r\n", m_Num[0], m_Num[0]);
1761+ sprintf(buf, "Value = %u (0x%x)\n", m_Num[0], m_Num[0]);
1762 sDescription += buf;
1763 }
1764 else {
1765@@ -3180,7 +3180,7 @@
1766 sDescription.reserve(sDescription.size() + m_nSize*79);
1767
1768 for (i=0; i<m_nSize; i++) {
1769- sprintf(buf, "Value[%u] = %u (0x%x)\r\n", i, m_Num[i], m_Num[i]);
1770+ sprintf(buf, "Value[%u] = %u (0x%x)\n", i, m_Num[i], m_Num[i]);
1771 sDescription += buf;
1772 }
1773 }
1774@@ -3374,15 +3374,15 @@
1775 CIccInfo Fmt;
1776 icChar buf[128];
1777
1778- sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\r\n";
1779- sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n",
1780+ sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\n";
1781+ sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
1782 icFtoD(m_Data.backing.X),
1783 icFtoD(m_Data.backing.Y),
1784 icFtoD(m_Data.backing.Z));
1785 sDescription += buf;
1786- sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\r\n";
1787- sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\r\n";
1788- sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\r\n";
1789+ sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\n";
1790+ sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\n";
1791+ sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\n";
1792 }
1793
1794
1795@@ -3416,7 +3416,7 @@
1796 default:
1797 sReport += icValidateNonCompliantMsg;
1798 sReport += sSigName;
1799- sReport += " - Invalid standard observer encoding.\r\n";
1800+ sReport += " - Invalid standard observer encoding.\n";
1801 rv = icMaxStatus(rv, icValidateNonCompliant);
1802 }
1803
1804@@ -3429,7 +3429,7 @@
1805 default:
1806 sReport += icValidateNonCompliantMsg;
1807 sReport += sSigName;
1808- sReport += " - Invalid measurement geometry encoding.\r\n";
1809+ sReport += " - Invalid measurement geometry encoding.\n";
1810 rv = icMaxStatus(rv, icValidateNonCompliant);
1811 }
1812
1813@@ -3448,7 +3448,7 @@
1814 default:
1815 sReport += icValidateNonCompliantMsg;
1816 sReport += sSigName;
1817- sReport += " - Invalid standard illuminant encoding.\r\n";
1818+ sReport += " - Invalid standard illuminant encoding.\n";
1819 rv = icMaxStatus(rv, icValidateNonCompliant);
1820 }
1821
1822@@ -3902,9 +3902,9 @@
1823
1824 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
1825 if (i!=m_Strings->begin())
1826- sDescription += "\r\n";
1827+ sDescription += "\n";
1828
1829- sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\r\n",
1830+ sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\n",
1831 i->m_nLanguageCode>>8, i->m_nLanguageCode,
1832 i->m_nCountryCode>>8, i->m_nCountryCode);
1833
1834@@ -3919,7 +3919,7 @@
1835 i->GetAnsi(szBuf, nSize);
1836 sDescription += "\"";
1837 sDescription += szBuf;
1838- sDescription += "\"\r\n";
1839+ sDescription += "\"\n";
1840 }
1841 }
1842
1843@@ -3948,7 +3948,7 @@
1844 if (!m_Strings->size()) {
1845 sReport += icValidateWarningMsg;
1846 sReport += sSigName;
1847- sReport += " - Empty tag!\r\n";
1848+ sReport += " - Empty tag!\n";
1849 rv = icMaxStatus(rv, icValidateWarning);
1850 }
1851
1852@@ -4246,15 +4246,15 @@
1853 {
1854 icChar buf[128];
1855
1856- sDescription = "\r\nData:\r\n";
1857+ sDescription = "\nData:\n";
1858
1859 if (IsTypeAscii()) {
1860- sprintf(buf, "%s\r\n", (icChar*)m_pData);
1861+ sprintf(buf, "%s\n", (icChar*)m_pData);
1862 sDescription += buf;
1863 }
1864 else
1865 for (int i = 0; i<(int)m_nSize; i++) {
1866- sprintf(buf, "%d\r\n", m_pData[i]);
1867+ sprintf(buf, "%d\n", m_pData[i]);
1868 sDescription += buf;
1869 }
1870
1871@@ -4312,7 +4312,7 @@
1872 default:
1873 sReport += icValidateNonCompliantMsg;
1874 sReport += sSigName;
1875- sReport += " - Invalid data flag encoding.\r\n";
1876+ sReport += " - Invalid data flag encoding.\n";
1877 rv = icMaxStatus(rv, icValidateNonCompliant);
1878 }
1879
1880@@ -4477,11 +4477,11 @@
1881 icChar buf[128];
1882
1883 sDescription = "Date = ";
1884- sprintf(buf, "%u-%u-%u\r\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
1885+ sprintf(buf, "%u-%u-%u\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
1886 sDescription += buf;
1887
1888 sDescription += "Time = ";
1889- sprintf(buf, "%u:%u:%u\r\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
1890+ sprintf(buf, "%u:%u:%u\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
1891 sDescription += buf;
1892 }
1893
1894@@ -4697,12 +4697,12 @@
1895 {
1896 icChar buf[128];
1897
1898- sprintf(buf, "Colorant Count : %u\r\n", m_nCount);
1899+ sprintf(buf, "Colorant Count : %u\n", m_nCount);
1900 sDescription += buf;
1901- sDescription += "Order of Colorants:\r\n";
1902+ sDescription += "Order of Colorants:\n";
1903
1904 for (int i=0; i<(int)m_nCount; i++) {
1905- sprintf(buf, "%u\r\n", m_pData[i]);
1906+ sprintf(buf, "%u\n", m_pData[i]);
1907 sDescription += buf;
1908 }
1909 }
1910@@ -4757,7 +4757,7 @@
1911 if (!pProfile) {
1912 sReport += icValidateWarningMsg;
1913 sReport += sSigName;
1914- sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
1915+ sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
1916 rv = icMaxStatus(rv, icValidateWarning);
1917 return rv;
1918 }
1919@@ -4765,7 +4765,7 @@
1920 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
1921 sReport += icValidateNonCompliantMsg;
1922 sReport += sSigName;
1923- sReport += " - Incorrect number of colorants.\r\n";
1924+ sReport += " - Incorrect number of colorants.\n";
1925 rv = icMaxStatus(rv, icValidateNonCompliant);
1926 }
1927
1928@@ -4977,7 +4977,7 @@
1929 icUInt32Number i, nLen, nMaxLen=0;
1930 icFloatNumber Lab[3];
1931
1932- sprintf(buf, "BEGIN_COLORANTS %u\r\n", m_nCount);
1933+ sprintf(buf, "BEGIN_COLORANTS %u\n", m_nCount);
1934 sDescription += buf;
1935
1936 for (i=0; i<m_nCount; i++) {
1937@@ -4988,11 +4988,11 @@
1938 sDescription += "# NAME ";
1939
1940 if (m_PCS == icSigXYZData) {
1941- sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\r\n");
1942+ sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\n");
1943 sDescription += buf;
1944 }
1945 else {
1946- sprintf(buf, "Lab_L Lab_a Lab_b\r\n");
1947+ sprintf(buf, "Lab_L Lab_a Lab_b\n");
1948 sDescription += buf;
1949 }
1950 for (i=0; i<m_nCount; i++) {
1951@@ -5003,7 +5003,7 @@
1952 sDescription += buf;
1953
1954 if (m_PCS == icSigXYZData) {
1955- 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]));
1956+ 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]));
1957 sDescription += buf;
1958 }
1959 else {
1960@@ -5011,7 +5011,7 @@
1961 Lab[1] = icU16toF(m_pData[i].data[1]);
1962 Lab[2] = icU16toF(m_pData[i].data[2]);
1963 icLabFromPcs(Lab);
1964- sprintf(buf, "%7.4lf %8.4lf %8.4lf\r\n", Lab[0], Lab[1], Lab[2]);
1965+ sprintf(buf, "%7.4lf %8.4lf %8.4lf\n", Lab[0], Lab[1], Lab[2]);
1966 sDescription += buf;
1967 }
1968 }
1969@@ -5066,7 +5066,7 @@
1970 if (!pProfile) {
1971 sReport += icValidateWarningMsg;
1972 sReport += sSigName;
1973- sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
1974+ sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
1975 rv = icMaxStatus(rv, icValidateWarning);
1976 return rv;
1977 }
1978@@ -5076,7 +5076,7 @@
1979 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
1980 sReport += icValidateNonCompliantMsg;
1981 sReport += sSigName;
1982- sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\r\n";
1983+ sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\n";
1984 rv = icMaxStatus(rv, icValidateNonCompliant);
1985 }
1986 }
1987@@ -5084,7 +5084,7 @@
1988 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
1989 sReport += icValidateNonCompliantMsg;
1990 sReport += sSigName;
1991- sReport += " - Incorrect number of colorants.\r\n";
1992+ sReport += " - Incorrect number of colorants.\n";
1993 rv = icMaxStatus(rv, icValidateNonCompliant);
1994 }
1995
1996@@ -5261,13 +5261,13 @@
1997 icChar buf[128];
1998 CIccInfo Fmt;
1999
2000- sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
2001+ sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
2002 icFtoD(m_XYZIllum.X),
2003 icFtoD(m_XYZIllum.Y),
2004 icFtoD(m_XYZIllum.Z));
2005 sDescription += buf;
2006
2007- sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
2008+ sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
2009 icFtoD(m_XYZSurround.X),
2010 icFtoD(m_XYZSurround.Y),
2011 icFtoD(m_XYZSurround.Z));
2012@@ -5276,7 +5276,7 @@
2013 sDescription += "Illuminant Type: ";
2014
2015 sDescription += Fmt.GetIlluminantName(m_illumType);
2016- sDescription += "\r\n";
2017+ sDescription += "\n";
2018
2019 }
2020
2021@@ -5800,32 +5800,32 @@
2022 icChar buf[128], buf2[28];
2023 icUInt32Number count=0;
2024
2025- sprintf(buf, "Number of Profile Description Structures: %u\r\n", m_Descriptions->size());
2026+ sprintf(buf, "Number of Profile Description Structures: %u\n", m_Descriptions->size());
2027 sDescription += buf;
2028
2029 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
2030- sDescription += "\r\n";
2031+ sDescription += "\n";
2032
2033- sprintf(buf, "Profile Description Structure Number [%u] follows:\r\n", count+1);
2034+ sprintf(buf, "Profile Description Structure Number [%u] follows:\n", count+1);
2035 sDescription += buf;
2036
2037- sprintf(buf, "Device Manufacturer Signature: %s\r\n", icGetSig(buf2, i->m_deviceMfg, false));
2038+ sprintf(buf, "Device Manufacturer Signature: %s\n", icGetSig(buf2, i->m_deviceMfg, false));
2039 sDescription += buf;
2040
2041- sprintf(buf, "Device Model Signature: %s\r\n", icGetSig(buf2, i->m_deviceModel, false));
2042+ sprintf(buf, "Device Model Signature: %s\n", icGetSig(buf2, i->m_deviceModel, false));
2043 sDescription += buf;
2044
2045- sprintf(buf, "Device Attributes: %08x%08x\r\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
2046+ sprintf(buf, "Device Attributes: %08x%08x\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
2047 sDescription += buf;
2048
2049- sprintf(buf, "Device Technology Signature: %s\r\n", icGetSig(buf2, i->m_technology, false));
2050+ sprintf(buf, "Device Technology Signature: %s\n", icGetSig(buf2, i->m_technology, false));
2051 sDescription += buf;
2052
2053- sprintf(buf, "Description of device manufacturer: \r\n");
2054+ sprintf(buf, "Description of device manufacturer: \n");
2055 sDescription += buf;
2056 i->m_deviceMfgDesc.Describe(sDescription);
2057
2058- sprintf(buf, "Description of device model: \r\n");
2059+ sprintf(buf, "Description of device model: \n");
2060 sDescription += buf;
2061 i->m_deviceModelDesc.Describe(sDescription);
2062 }
2063@@ -5886,7 +5886,7 @@
2064 {
2065 sReport += icValidateNonCompliantMsg;
2066 sReport += sSigName;
2067- sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(i->m_technology));
2068+ sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(i->m_technology));
2069 sReport += buf;
2070 rv = icMaxStatus(rv, icValidateNonCompliant);
2071 }
2072@@ -5896,7 +5896,7 @@
2073 sReport += icValidateNonCompliantMsg;
2074 sReport += sSigName;
2075
2076- sReport += " Contains non-aligned deviceMfgDesc text tag information\r\n";
2077+ sReport += " Contains non-aligned deviceMfgDesc text tag information\n";
2078
2079 rv = icMaxStatus(rv, icValidateNonCompliant);
2080 }
2081@@ -5905,7 +5905,7 @@
2082 sReport += icValidateNonCompliantMsg;
2083 sReport += sSigName;
2084
2085- sReport += " Contains non-aligned deviceModelDesc text tag information\r\n";
2086+ sReport += " Contains non-aligned deviceModelDesc text tag information\n";
2087
2088 rv = icMaxStatus(rv, icValidateNonCompliant);
2089 }
2090@@ -6174,25 +6174,25 @@
2091 CIccResponse16List::iterator j;
2092
2093 sDescription += "Measurement Unit: ";
2094- sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\r\n";
2095+ sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\n";
2096
2097
2098 for (int i=0; i<m_nChannels; i++) {
2099 nResponseList = m_Response16ListArray[i];
2100
2101- sDescription += "\r\n";
2102- sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i+1,
2103+ sDescription += "\n";
2104+ sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\n", i+1,
2105 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
2106 sDescription += buf;
2107
2108- sprintf(buf, "Number of Measurements for Channel-%u : %u\r\n", i+1, nResponseList.size());
2109+ sprintf(buf, "Number of Measurements for Channel-%u : %u\n", i+1, nResponseList.size());
2110 sDescription += buf;
2111
2112- sprintf(buf, "Measurement Data for Channel-%u follows:\r\n", i+1);
2113+ sprintf(buf, "Measurement Data for Channel-%u follows:\n", i+1);
2114 sDescription += buf;
2115
2116 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
2117- sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\r\n", j->deviceCode, icFtoD(j->measurementValue));
2118+ sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\n", j->deviceCode, icFtoD(j->measurementValue));
2119 sDescription += buf;
2120 }
2121 }
2122@@ -6234,14 +6234,14 @@
2123 default:
2124 sReport += icValidateNonCompliantMsg;
2125 sReport += sSigName;
2126- sReport += " - Unknown measurement unit signature.\r\n";
2127+ sReport += " - Unknown measurement unit signature.\n";
2128 rv = icMaxStatus(rv, icValidateNonCompliant);
2129 }
2130
2131 if (!m_nChannels) {
2132 sReport += icValidateNonCompliantMsg;
2133 sReport += sSigName;
2134- sReport += " - Incorrect number of channels.\r\n";
2135+ sReport += " - Incorrect number of channels.\n";
2136 rv = icMaxStatus(rv, icValidateNonCompliant);
2137 return rv;
2138 }
2139@@ -6479,17 +6479,17 @@
2140 CIccResponseCurveSet::iterator i;
2141 icChar buf[128];
2142
2143- sprintf(buf, "Number of Channels: %u\r\n", m_nChannels);
2144+ sprintf(buf, "Number of Channels: %u\n", m_nChannels);
2145 sDescription += buf;
2146
2147- sprintf(buf, "Number of Measurement Types used: %u\r\n", m_ResponseCurves->size());
2148+ sprintf(buf, "Number of Measurement Types used: %u\n", m_ResponseCurves->size());
2149 sDescription += buf;
2150
2151 int count = 0;
2152 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
2153- sDescription += "\r\n";
2154+ sDescription += "\n";
2155
2156- sprintf(buf, "Response Curve for measurement type [%u] follows:\r\n", count+1);
2157+ sprintf(buf, "Response Curve for measurement type [%u] follows:\n", count+1);
2158 sDescription += buf;
2159
2160 i->Describe(sDescription);
2161@@ -6658,7 +6658,7 @@
2162 if (!pProfile) {
2163 sReport += icValidateWarningMsg;
2164 sReport += sSigName;
2165- sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2166+ sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2167 rv = icMaxStatus(rv, icValidateWarning);
2168 return rv;
2169 }
2170@@ -6666,13 +6666,13 @@
2171 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2172 sReport += icValidateWarningMsg;
2173 sReport += sSigName;
2174- sReport += " - Incorrect number of channels.\r\n";
2175+ sReport += " - Incorrect number of channels.\n";
2176 }
2177
2178 if (!GetNumResponseCurveTypes()) {
2179 sReport += icValidateWarningMsg;
2180 sReport += sSigName;
2181- sReport += " - Empty Tag!.\r\n";
2182+ sReport += " - Empty Tag!.\n";
2183 rv = icMaxStatus(rv, icValidateWarning);
2184 }
2185 else {
2186diff -ru misc/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp
2187--- misc/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp 2007-08-20 15:05:00.000000000 -0500
2188+++ misc/build/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp 2012-01-24 10:39:23.000000000 -0500
2189@@ -323,23 +323,23 @@
2190 icChar buf[128], *ptr;
2191
2192 if (!m_nSize) {
2193- sprintf(buf, "BEGIN_CURVE In_Out\r\n");
2194+ sprintf(buf, "BEGIN_CURVE In_Out\n");
2195 sDescription += buf;
2196- sDescription += "Y = X\r\n";
2197+ sDescription += "Y = X\n";
2198 }
2199 else if (m_nSize==1) {
2200 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
2201- sprintf(buf, "BEGIN_CURVE In_Out\r\n");
2202+ sprintf(buf, "BEGIN_CURVE In_Out\n");
2203 sDescription += buf;
2204- sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
2205+ sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
2206 sDescription += buf;
2207 }
2208 else {
2209 int i;
2210
2211- sprintf(buf, "BEGIN_LUT In_Out 1 1\r\n");
2212+ sprintf(buf, "BEGIN_LUT In_Out 1 1\n");
2213 sDescription += buf;
2214- sDescription += "IN OUT\r\n";
2215+ sDescription += "IN OUT\n";
2216
2217 for (i=0; i<(int)m_nSize; i++) {
2218 ptr = buf;
2219@@ -354,12 +354,12 @@
2220
2221 ptr += strlen(ptr);
2222
2223- strcpy(ptr, "\r\n");
2224+ strcpy(ptr, "\n");
2225
2226 sDescription += buf;
2227 }
2228 }
2229- sDescription += "\r\n";
2230+ sDescription += "\n";
2231 }
2232
2233
2234@@ -383,23 +383,23 @@
2235 icChar buf[128], *ptr;
2236
2237 if (!m_nSize) {
2238- sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
2239+ sprintf(buf, "BEGIN_CURVE %s\n", szName);
2240 sDescription += buf;
2241- sDescription += "Y = X\r\n";
2242+ sDescription += "Y = X\n";
2243 }
2244 else if (m_nSize==1) {
2245 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
2246- sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
2247+ sprintf(buf, "BEGIN_CURVE %s\n", szName);
2248 sDescription += buf;
2249- sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
2250+ sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
2251 sDescription += buf;
2252 }
2253 else {
2254 int i;
2255
2256- sprintf(buf, "BEGIN_LUT %s 1 1\r\n", szName);
2257+ sprintf(buf, "BEGIN_LUT %s 1 1\n", szName);
2258 sDescription += buf;
2259- sDescription += "IN OUT\r\n";
2260+ sDescription += "IN OUT\n";
2261
2262 sDescription.reserve(sDescription.size() + m_nSize * 20);
2263
2264@@ -416,12 +416,12 @@
2265
2266 ptr += strlen(ptr);
2267
2268- strcpy(ptr, "\r\n");
2269+ strcpy(ptr, "\n");
2270
2271 sDescription += buf;
2272 }
2273 }
2274- sDescription += "\r\n";
2275+ sDescription += "\n";
2276 }
2277
2278
2279@@ -614,7 +614,7 @@
2280 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
2281 sReport += icValidateWarningMsg;
2282 sReport += sSigName;
2283- sReport += " - Curve cannot be accurately inverted.\r\n";
2284+ sReport += " - Curve cannot be accurately inverted.\n";
2285 rv = icMaxStatus(rv, icValidateWarning);
2286 }
2287 }
2288@@ -822,67 +822,67 @@
2289 {
2290 icChar buf[128];
2291
2292- sprintf(buf, "FunctionType: %04Xh\r\n", m_nFunctionType);
2293+ sprintf(buf, "FunctionType: %04Xh\n", m_nFunctionType);
2294 sDescription += buf;
2295
2296 switch(m_nFunctionType) {
2297 case 0x0000:
2298- sprintf(buf, "Y = X ^ %.4lf\r\n", icFtoD(m_Param[0]));
2299+ sprintf(buf, "Y = X ^ %.4lf\n", icFtoD(m_Param[0]));
2300 sDescription += buf;
2301 return;
2302
2303 case 0x0001:
2304- sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\r\n",
2305+ sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\n",
2306 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
2307 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
2308 sDescription += buf;
2309
2310- sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\r\n",
2311+ sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\n",
2312 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
2313 sDescription += buf;
2314 return;
2315
2316 case 0x0002:
2317- sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\r\n",
2318+ sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\n",
2319 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
2320 icFtoD(m_Param[3]),
2321 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
2322 sDescription += buf;
2323
2324- sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\r\n", icFtoD(m_Param[3]),
2325+ sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\n", icFtoD(m_Param[3]),
2326 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
2327 sDescription += buf;
2328 return;
2329
2330 case 0x0003:
2331- sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\r\n",
2332+ sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\n",
2333 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
2334 icFtoD(m_Param[4]));
2335 sDescription += buf;
2336
2337- sprintf(buf, "Y = %lf * X when (X < %.4lf)\r\n",
2338+ sprintf(buf, "Y = %lf * X when (X < %.4lf)\n",
2339 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
2340 sDescription += buf;
2341 return;
2342
2343 case 0x0004:
2344- sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\r\n",
2345+ sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\n",
2346 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
2347 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
2348 sDescription += buf;
2349
2350- sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\r\n",
2351+ sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\n",
2352 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
2353 sDescription += buf;
2354 return;
2355
2356 default:
2357 int i;
2358- sprintf(buf, "Unknown Function with %d parameters:\r\n");
2359+ sprintf(buf, "Unknown Function with %d parameters:\n", m_nNumParam);
2360 sDescription += buf;
2361
2362 for (i=0; i<m_nNumParam; i++) {
2363- sprintf(buf, "Param[%d] = %.4lf\r\n", i, icFtoD(m_Param[i]));
2364+ sprintf(buf, "Param[%d] = %.4lf\n", i, icFtoD(m_Param[i]));
2365 sDescription += buf;
2366 }
2367 }
2368@@ -907,10 +907,10 @@
2369 {
2370 icChar buf[128];
2371
2372- sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
2373+ sprintf(buf, "BEGIN_CURVE %s\n", szName);
2374 sDescription += buf;
2375 Describe(sDescription);
2376- sDescription += "\r\n";
2377+ sDescription += "\n";
2378 }
2379
2380
2381@@ -1106,7 +1106,7 @@
2382 if (m_nReserved2!=0) {
2383 sReport += icValidateNonCompliantMsg;
2384 sReport += sSigName;
2385- sReport += " - Reserved Value must be zero.\r\n";
2386+ sReport += " - Reserved Value must be zero.\n";
2387
2388 rv = icMaxStatus(rv, icValidateNonCompliant);
2389 }
2390@@ -1116,7 +1116,7 @@
2391 if (m_nNumParam!=1) {
2392 sReport += icValidateCriticalErrorMsg;
2393 sReport += sSigName;
2394- sReport += " - Number of parameters inconsistent with function type.\r\n";
2395+ sReport += " - Number of parameters inconsistent with function type.\n";
2396 rv = icMaxStatus(rv, icValidateCriticalError);
2397 }
2398 break;
2399@@ -1125,7 +1125,7 @@
2400 if (m_nNumParam!=3) {
2401 sReport += icValidateCriticalErrorMsg;
2402 sReport += sSigName;
2403- sReport += " - Number of parameters inconsistent with function type.\r\n";
2404+ sReport += " - Number of parameters inconsistent with function type.\n";
2405 rv = icMaxStatus(rv, icValidateCriticalError);
2406 }
2407 break;
2408@@ -1134,7 +1134,7 @@
2409 if (m_nNumParam!=4) {
2410 sReport += icValidateCriticalErrorMsg;
2411 sReport += sSigName;
2412- sReport += " - Number of parameters inconsistent with function type.\r\n";
2413+ sReport += " - Number of parameters inconsistent with function type.\n";
2414 rv = icMaxStatus(rv, icValidateCriticalError);
2415 }
2416 break;
2417@@ -1143,7 +1143,7 @@
2418 if (m_nNumParam!=5) {
2419 sReport += icValidateCriticalErrorMsg;
2420 sReport += sSigName;
2421- sReport += " - Number of parameters inconsistent with function type.\r\n";
2422+ sReport += " - Number of parameters inconsistent with function type.\n";
2423 rv = icMaxStatus(rv, icValidateCriticalError);
2424 }
2425 break;
2426@@ -1152,7 +1152,7 @@
2427 if (m_nNumParam!=7) {
2428 sReport += icValidateCriticalErrorMsg;
2429 sReport += sSigName;
2430- sReport += " - Number of parameters inconsistent with function type.\r\n";
2431+ sReport += " - Number of parameters inconsistent with function type.\n";
2432 rv = icMaxStatus(rv, icValidateCriticalError);
2433 }
2434 break;
2435@@ -1160,7 +1160,7 @@
2436 default:
2437 sReport += icValidateCriticalErrorMsg;
2438 sReport += sSigName;
2439- sReport += " - Unknown function type.\r\n";
2440+ sReport += " - Unknown function type.\n";
2441 rv = icMaxStatus(rv, icValidateCriticalError);
2442 }
2443
2444@@ -1170,7 +1170,7 @@
2445 if (lval>0.0 || uval<1.0) {
2446 sReport += icValidateWarningMsg;
2447 sReport += sSigName;
2448- sReport += " - Curve cannot be accurately inverted.\r\n";
2449+ sReport += " - Curve cannot be accurately inverted.\n";
2450 rv = icMaxStatus(rv, icValidateWarning);
2451 }
2452 }
2453@@ -1255,32 +1255,32 @@
2454 {
2455 icChar buf[128];
2456
2457- sprintf(buf, "BEGIN_MATRIX %s\r\n", szName);
2458+ sprintf(buf, "BEGIN_MATRIX %s\n", szName);
2459 sDescription += buf;
2460
2461 if (!m_bUseConstants) {
2462- sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
2463+ sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
2464 m_e[0], m_e[1], m_e[2]);
2465 sDescription += buf;
2466- sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
2467+ sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
2468 m_e[3], m_e[4], m_e[5]);
2469 sDescription += buf;
2470- sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
2471+ sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
2472 m_e[6], m_e[7], m_e[8]);
2473 sDescription += buf;
2474 }
2475 else {
2476- sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
2477+ sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
2478 m_e[0], m_e[1], m_e[2], m_e[9]);
2479 sDescription += buf;
2480- sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
2481+ sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
2482 m_e[3], m_e[4], m_e[5], m_e[10]);
2483 sDescription += buf;
2484- sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
2485+ sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
2486 m_e[6], m_e[7], m_e[8], m_e[11]);
2487 sDescription += buf;
2488 }
2489- sDescription += "\r\n";
2490+ sDescription += "\n";
2491 }
2492
2493 /**
2494@@ -1377,7 +1377,7 @@
2495 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
2496 sReport += icValidateNonCompliantMsg;
2497 sReport += sSigName;
2498- sReport += " - Matrix must be identity.\r\n";
2499+ sReport += " - Matrix must be identity.\n";
2500 rv = icValidateNonCompliant;
2501 }
2502 }
2503@@ -1754,7 +1754,7 @@
2504
2505 ptr += sprintf(ptr, " %s", m_pVal);
2506 }
2507- strcpy(ptr, "\r\n");
2508+ strcpy(ptr, "\n");
2509 sDescription += (const icChar*)m_pOutText;
2510
2511 }
2512@@ -1866,7 +1866,7 @@
2513 icChar szOutText[2048], szColor[40];
2514 int i, len;
2515
2516- sprintf(szOutText, "BEGIN_LUT %s %d %d\r\n", szName, m_nInput, m_nOutput);
2517+ sprintf(szOutText, "BEGIN_LUT %s %d %d\n", szName, m_nInput, m_nOutput);
2518 sDescription += szOutText;
2519
2520 for (i=0; i<m_nInput; i++) {
2521@@ -1883,7 +1883,7 @@
2522 sDescription += szOutText;
2523 }
2524
2525- sDescription += "\r\n";
2526+ sDescription += "\n";
2527
2528 len = 0;
2529 for (i=0; i<m_nInput; i++) {
2530@@ -1907,7 +1907,7 @@
2531
2532 Iterate(sDescription, 0, 0);
2533
2534- sDescription += "\r\n";
2535+ sDescription += "\n";
2536 }
2537
2538
2539@@ -2693,7 +2693,7 @@
2540 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
2541 sReport += icValidateNonCompliantMsg;
2542 sReport += sSigName;
2543- sReport += " - Reserved Value must be zero.\r\n";
2544+ sReport += " - Reserved Value must be zero.\n";
2545
2546 rv = icValidateNonCompliant;
2547 }
2548@@ -2704,7 +2704,7 @@
2549 if (m_GridPoints[i]<2) {
2550 sReport += icValidateCriticalErrorMsg;
2551 sReport += sSigName;
2552- sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\r\n",i );
2553+ sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\n",i );
2554 sReport += temp;
2555 rv = icMaxStatus(rv, icValidateCriticalError);
2556 }
2557@@ -3122,7 +3122,7 @@
2558 if (!pProfile) {
2559 sReport += icValidateWarningMsg;
2560 sReport += sSigName;
2561- sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2562+ sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2563 rv = icMaxStatus(rv, icValidateWarning);
2564 return rv;
2565 }
2566@@ -3138,7 +3138,7 @@
2567 if (m_nInput!=nInput) {
2568 sReport += icValidateCriticalErrorMsg;
2569 sReport += sSigName;
2570- sReport += " - Incorrect number of input channels.\r\n";
2571+ sReport += " - Incorrect number of input channels.\n";
2572 rv = icMaxStatus(rv, icValidateCriticalError);
2573 }
2574
2575@@ -3146,7 +3146,7 @@
2576 if (m_nOutput!=nOutput) {
2577 sReport += icValidateCriticalErrorMsg;
2578 sReport += sSigName;
2579- sReport += " - Incorrect number of output channels.\r\n";
2580+ sReport += " - Incorrect number of output channels.\n";
2581 rv = icMaxStatus(rv, icValidateCriticalError);
2582 }
2583
2584@@ -3160,7 +3160,7 @@
2585 if (m_nInput!=nInput) {
2586 sReport += icValidateCriticalErrorMsg;
2587 sReport += sSigName;
2588- sReport += " - Incorrect number of input channels.\r\n";
2589+ sReport += " - Incorrect number of input channels.\n";
2590 rv = icMaxStatus(rv, icValidateCriticalError);
2591 }
2592
2593@@ -3168,7 +3168,7 @@
2594 if (m_nOutput!=nOutput) {
2595 sReport += icValidateCriticalErrorMsg;
2596 sReport += sSigName;
2597- sReport += " - Incorrect number of output channels.\r\n";
2598+ sReport += " - Incorrect number of output channels.\n";
2599 rv = icMaxStatus(rv, icValidateCriticalError);
2600 }
2601
2602@@ -3180,7 +3180,7 @@
2603 if (m_nInput!=nInput) {
2604 sReport += icValidateCriticalErrorMsg;
2605 sReport += sSigName;
2606- sReport += " - Incorrect number of input channels.\r\n";
2607+ sReport += " - Incorrect number of input channels.\n";
2608 rv = icMaxStatus(rv, icValidateCriticalError);
2609 }
2610
2611@@ -3188,7 +3188,7 @@
2612 if (m_nOutput!=nOutput) {
2613 sReport += icValidateCriticalErrorMsg;
2614 sReport += sSigName;
2615- sReport += " - Incorrect number of output channels.\r\n";
2616+ sReport += " - Incorrect number of output channels.\n";
2617 rv = icMaxStatus(rv, icValidateCriticalError);
2618 }
2619
2620@@ -3206,7 +3206,7 @@
2621 if (!m_CLUT) {
2622 sReport += icValidateCriticalErrorMsg;
2623 sReport += sSigName;
2624- sReport += " - CLUT must be present.\r\n";
2625+ sReport += " - CLUT must be present.\n";
2626 rv = icMaxStatus(rv, icValidateCriticalError);
2627 }
2628 }
2629@@ -3748,7 +3748,7 @@
2630 else {
2631 sReport += icValidateCriticalErrorMsg;
2632 sReport += sSigName;
2633- sReport += " - Incorrect number of B-curves.\r\n";
2634+ sReport += " - Incorrect number of B-curves.\n";
2635 rv = icMaxStatus(rv, icValidateCriticalError);
2636 }
2637 }
2638@@ -3762,7 +3762,7 @@
2639 else {
2640 sReport += icValidateCriticalErrorMsg;
2641 sReport += sSigName;
2642- sReport += " - Incorrect number of M-curves.\r\n";
2643+ sReport += " - Incorrect number of M-curves.\n";
2644 rv = icMaxStatus(rv, icValidateCriticalError);
2645 }
2646 }
2647@@ -3772,7 +3772,7 @@
2648 if (!m_CLUT) {
2649 sReport += icValidateNonCompliantMsg;
2650 sReport += sSigName;
2651- sReport += " - CLUT must be present if using A-curves.\r\n";
2652+ sReport += " - CLUT must be present if using A-curves.\n";
2653
2654 rv = icMaxStatus(rv, icValidateNonCompliant);
2655 }
2656@@ -3784,7 +3784,7 @@
2657 else {
2658 sReport += icValidateCriticalErrorMsg;
2659 sReport += sSigName;
2660- sReport += " - Incorrect number of A-curves.\r\n";
2661+ sReport += " - Incorrect number of A-curves.\n";
2662 rv = icMaxStatus(rv, icValidateCriticalError);
2663 }
2664 }
2665@@ -3876,7 +3876,7 @@
2666 if (!pProfile) {
2667 sReport += icValidateWarningMsg;
2668 sReport += sSigName;
2669- sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2670+ sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2671 rv = icMaxStatus(rv, icValidateCriticalError);
2672 return rv;
2673 }
2674@@ -3900,7 +3900,7 @@
2675 if (m_nOutput!=nOutput) {
2676 sReport += icValidateCriticalErrorMsg;
2677 sReport += sSigName;
2678- sReport += " - Incorrect number of output channels.\r\n";
2679+ sReport += " - Incorrect number of output channels.\n";
2680 rv = icMaxStatus(rv, icValidateCriticalError);
2681 }
2682
2683@@ -3913,7 +3913,7 @@
2684 else {
2685 sReport += icValidateCriticalErrorMsg;
2686 sReport += sSigName;
2687- sReport += " - Incorrect number of B-curves.\r\n";
2688+ sReport += " - Incorrect number of B-curves.\n";
2689 rv = icMaxStatus(rv, icValidateCriticalError);
2690 }
2691 }
2692@@ -3927,7 +3927,7 @@
2693 else {
2694 sReport += icValidateCriticalErrorMsg;
2695 sReport += sSigName;
2696- sReport += " - Incorrect number of M-curves.\r\n";
2697+ sReport += " - Incorrect number of M-curves.\n";
2698 rv = icMaxStatus(rv, icValidateCriticalError);
2699 }
2700 }
2701@@ -3937,7 +3937,7 @@
2702 if (!m_CLUT) {
2703 sReport += icValidateNonCompliantMsg;
2704 sReport += sSigName;
2705- sReport += " - CLUT must be present if using A-curves.\r\n";
2706+ sReport += " - CLUT must be present if using A-curves.\n";
2707
2708 rv = icMaxStatus(rv, icValidateNonCompliant);
2709 }
2710@@ -3949,7 +3949,7 @@
2711 else {
2712 sReport += icValidateCriticalErrorMsg;
2713 sReport += sSigName;
2714- sReport += " - Incorrect number of A-curves.\r\n";
2715+ sReport += " - Incorrect number of A-curves.\n";
2716 rv = icMaxStatus(rv, icValidateCriticalError);
2717 }
2718 }
2719@@ -4311,7 +4311,7 @@
2720 if (pTagCurve->GetSize()==1) {
1788 sReport += icValidateCriticalErrorMsg;
2721 sReport += icValidateCriticalErrorMsg;
1789! sReport += "Critical tag(s) missing.\r\n";
2722 sReport += sSigName;
2723- sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
2724+ sReport += " - lut8Tags do not support single entry gamma curves.\n";
1790 rv = icMaxStatus(rv, icValidateCriticalError);
1791 }
2725 rv = icMaxStatus(rv, icValidateCriticalError);
2726 }
1792 }
1793--- 1515,1521 ----
1794 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1795 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
2727 }
2728@@ -4319,7 +4319,7 @@
2729 else {
2730 sReport += icValidateCriticalErrorMsg;
2731 sReport += sSigName;
2732- sReport += " - Incorrect number of B-curves.\r\n";
2733+ sReport += " - Incorrect number of B-curves.\n";
2734 rv = icMaxStatus(rv, icValidateCriticalError);
2735 }
2736 }
2737@@ -4336,7 +4336,7 @@
2738 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
2739 sReport += icValidateWarningMsg;
2740 sReport += sSigName;
2741- sReport += " - Matrix must be identity.\r\n";
2742+ sReport += " - Matrix must be identity.\n";
2743 rv = icMaxStatus(rv, icValidateWarning);
2744 }
2745 }
2746@@ -4351,7 +4351,7 @@
2747 if (pTagCurve->GetSize()==1) {
1796 sReport += icValidateCriticalErrorMsg;
2748 sReport += icValidateCriticalErrorMsg;
1797! sReport += "Critical tag(s) missing.\n";
2749 sReport += sSigName;
2750- sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
2751+ sReport += " - lut8Tags do not support single entry gamma curves.\n";
1798 rv = icMaxStatus(rv, icValidateCriticalError);
1799 }
2752 rv = icMaxStatus(rv, icValidateCriticalError);
2753 }
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)) {
2754 }
2755@@ -4359,7 +4359,7 @@
2756 else {
2757 sReport += icValidateCriticalErrorMsg;
2758 sReport += sSigName;
2759- sReport += " - Incorrect number of A-curves.\r\n";
2760+ sReport += " - Incorrect number of A-curves.\n";
2761 rv = icMaxStatus(rv, icValidateCriticalError);
2762 }
2763 }
2764@@ -4721,7 +4721,7 @@
2765 if (pTagCurve->GetSize()==1) {
1822 sReport += icValidateCriticalErrorMsg;
2766 sReport += icValidateCriticalErrorMsg;
1823! sReport += "Critical tag(s) missing.\r\n";
2767 sReport += sSigName;
2768- sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
2769+ sReport += " - lut16Tags do not support single entry gamma curves.\n";
1824 rv = icMaxStatus(rv, icValidateCriticalError);
1825 }
2770 rv = icMaxStatus(rv, icValidateCriticalError);
2771 }
1826 }
1827--- 1536,1542 ----
1828 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1829 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
2772 }
2773@@ -4729,7 +4729,7 @@
2774 else {
2775 sReport += icValidateCriticalErrorMsg;
2776 sReport += sSigName;
2777- sReport += " - Incorrect number of B-curves.\r\n";
2778+ sReport += " - Incorrect number of B-curves.\n";
2779 rv = icMaxStatus(rv, icValidateCriticalError);
2780 }
2781 }
2782@@ -4746,7 +4746,7 @@
2783 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
2784 sReport += icValidateWarningMsg;
2785 sReport += sSigName;
2786- sReport += " - Matrix must be identity.\r\n";
2787+ sReport += " - Matrix must be identity.\n";
2788 rv = icMaxStatus(rv, icValidateWarning);
2789 }
2790 }
2791@@ -4761,7 +4761,7 @@
2792 if (pTagCurve->GetSize()==1) {
1830 sReport += icValidateCriticalErrorMsg;
2793 sReport += icValidateCriticalErrorMsg;
1831! sReport += "Critical tag(s) missing.\n";
2794 sReport += sSigName;
2795- sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
2796+ sReport += " - lut16Tags do not support single entry gamma curves.\n";
1832 rv = icMaxStatus(rv, icValidateCriticalError);
1833 }
2797 rv = icMaxStatus(rv, icValidateCriticalError);
2798 }
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 }
2799 }
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));
2800@@ -4769,7 +4769,7 @@
2801 else {
2802 sReport += icValidateCriticalErrorMsg;
2803 sReport += sSigName;
2804- sReport += " - Incorrect number of A-curves.\r\n";
2805+ sReport += " - Incorrect number of A-curves.\n";
2806 rv = icMaxStatus(rv, icValidateCriticalError);
2807 }
2808 }
2809diff -ru misc/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp
2810--- misc/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp 2007-08-20 15:05:00.000000000 -0500
2811+++ misc/build/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp 2012-01-24 10:39:23.000000000 -0500
2812@@ -218,7 +218,7 @@
2813 icGetSig(sigbuf, m_sig), m_nSize);
2814 sDescription += buf;
2815
2816- sDescription += "\r\n\r\nData Follows:\r\n";
2817+ sDescription += "\n\nData Follows:\n";
2818
2819 icMemDump(sDescription, m_pData, m_nSize);
2820
2821@@ -364,7 +364,7 @@
2822 sReport += " - Contains unknown processing element type (";
2823 icGetSig(buf, m_sig, true);
2824 sReport += buf;
2825- sReport += ").\r\n";
2826+ sReport += ").\n";
2827
2828 return icValidateCriticalError;
2829 }
2830@@ -392,7 +392,7 @@
2831 sReport += " - Element ";
2832 sSigName = Info.GetSigName(GetType());
2833 sReport += sSigName;
2834- sReport += " - Reserved Value must be zero.\r\n";
2835+ sReport += " - Reserved Value must be zero.\n";
2836
2837 rv = icValidateNonCompliant;
2838 }
2839@@ -738,18 +738,18 @@
2840 {
2841 icChar buf[128];
2842
2843- sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\r\n", m_nInputChannels, m_nOutputChannels);
2844+ sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\n", m_nInputChannels, m_nOutputChannels);
2845 sDescription += buf;
2846- sDescription += "\r\n";
2847+ sDescription += "\n";
2848
2849 CIccMultiProcessElementList::iterator i;
2850 int j;
2851
2852 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
2853- sprintf(buf, "PROCESS_ELEMENT #%d\r\n", j+1);
2854+ sprintf(buf, "PROCESS_ELEMENT #%d\n", j+1);
2647 sDescription += buf;
2855 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));
2856 i->ptr->Describe(sDescription);
2857- sDescription += "\r\n";
2858+ sDescription += "\n";
2859 }
2860 }
2861
2862@@ -1207,13 +1207,13 @@
2863 if (m_nInputChannels != m_nOutputChannels) {
2864 sReport += icValidateCriticalErrorMsg;
2865 sReport += sSigName;
2866- sReport += " No processing elements and input and output channels do not match!\r\n";
2867+ sReport += " No processing elements and input and output channels do not match!\n";
2868 return icValidateCriticalError;
2869 }
2870 else {
2871 sReport += icValidateWarningMsg;
2872 sReport += sSigName;
2873- sReport += " No processing elements.\r\n";
2874+ sReport += " No processing elements.\n";
2875 return icValidateWarning;
2876 }
2877 }
2878@@ -1224,7 +1224,7 @@
2879 if (i->ptr->NumInputChannels() != m_nInputChannels) {
2880 sReport += icValidateCriticalErrorMsg;
2881 sReport += sSigName;
2882- sReport += " Mis-matching number of input channels!\r\n";
2883+ sReport += " Mis-matching number of input channels!\n";
2884 return icValidateCriticalError;
2885 }
2886
2887@@ -1239,7 +1239,7 @@
2888 sReport += "->";
2889 sReport += i->ptr->GetClassName();
2890
2891- sReport += " Mis-matching number of channels!\r\n";
2892+ sReport += " Mis-matching number of channels!\n";
2893 return icValidateCriticalError;
2894 }
2895 }
2896@@ -1251,7 +1251,7 @@
2897 if (last && last->NumOutputChannels() != m_nOutputChannels) {
2898 sReport += icValidateCriticalErrorMsg;
2899 sReport += sSigName;
2900- sReport += " Mis-matching number of output channels!\r\n";
2901+ sReport += " Mis-matching number of output channels!\n";
2902 return icValidateCriticalError;
2903 }
2904
2905diff -ru misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp
2906--- misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp 2007-08-20 15:05:00.000000000 -0500
2907+++ misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp 2012-01-24 10:39:23.000000000 -0500
2908@@ -234,7 +234,7 @@
2909 {
2910 std::string Dump;
2911
2912- sDescription += "ProfileID:\r\n";
2913+ sDescription += "ProfileID:\n";
2914
2915 int i;
2916 char buf[20];
2917@@ -244,12 +244,12 @@
2918 sprintf(buf, "%2x", m_profileID.ID8[i]);
2663 sDescription += buf;
2919 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;
2920 }
2921- sDescription += "\r\n";
2922+ sDescription += "\n";
2923
2924- sDescription += "Description:\r\n";
2925+ sDescription += "Description:\n";
2926 m_desc.Describe(sDescription);
2927
2928- sDescription += "\r\n";
2929+ sDescription += "\n";
2930 }
2931
2932
2933@@ -434,21 +434,21 @@
2934 {
2935 icChar buf[128];
2936
2937- sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\r\n");
2938+ sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\n");
2939 sDescription += buf;
2940- sDescription += "\r\n";
2941+ sDescription += "\n";
2942
2943 int i;
2944 CIccProfileIdDescList::iterator j;
2945 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
2946- sprintf(buf, "ProfileDescription_%d:\r\n", i+1);
2947+ sprintf(buf, "ProfileDescription_%d:\n", i+1);
2948 sDescription += buf;
2949 j->Describe(sDescription);
2950 }
2951
2952- sprintf(buf, "END ProfileSequenceIdentification_TAG\r\n");
2953+ sprintf(buf, "END ProfileSequenceIdentification_TAG\n");
2954 sDescription += buf;
2955- sDescription += "\r\n";
2956+ sDescription += "\n";
2957 }
2958
2959
2960diff -ru misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h
2961--- misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h 2007-08-20 15:05:00.000000000 -0500
2962+++ misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h 2012-01-24 10:39:23.000000000 -0500
2963@@ -161,4 +161,4 @@
2964 }
2965 #endif
2966
2967-#endif //_ICCTAGPROFSEQID_H
2968\ No newline at end of file
2969+#endif //_ICCTAGPROFSEQID_H
2970diff -ru misc/SampleICC-1.3.2/IccProfLib/IccUtil.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccUtil.cpp
2971--- misc/SampleICC-1.3.2/IccProfLib/IccUtil.cpp 2007-08-20 15:05:00.000000000 -0500
2972+++ misc/build/SampleICC-1.3.2/IccProfLib/IccUtil.cpp 2012-01-24 10:39:23.000000000 -0500
2973@@ -79,7 +79,7 @@
2974 #include "IccUtil.h"
2975 #include "IccTagFactory.h"
2976 #include <stdlib.h>
2977-#include <memory.h>
2978+#include <memory>
2979 #include <ctype.h>
2980 #include <math.h>
2981 #include <string.h>
2982@@ -678,11 +678,11 @@
2983 {
2984 icChar buf[128];
2985
2986- sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
2987+ sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
2988 sDump += buf;
2989- sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
2990+ sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
2991 sDump += buf;
2992- sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
2993+ sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
2994 sDump += buf;
2995 }
2996
2997@@ -1516,19 +1516,19 @@
2998
2999 if (XYZ.X < 0) {
3000 sReport += icValidateNonCompliantMsg;
3001- sReport += " - XYZNumber: Negative X value!\r\n";
3002+ sReport += " - XYZNumber: Negative X value!\n";
3003 rv = icValidateNonCompliant;
3004 }
3005
3006 if (XYZ.Y < 0) {
3007 sReport += icValidateNonCompliantMsg;
3008- sReport += " - XYZNumber: Negative Y value!\r\n";
3009+ sReport += " - XYZNumber: Negative Y value!\n";
3010 rv = icMaxStatus(rv, icValidateNonCompliant);
3011 }
3012
3013 if (XYZ.Z < 0) {
3014 sReport += icValidateNonCompliantMsg;
3015- sReport += " - XYZNumber: Negative Z value!\r\n";
3016+ sReport += " - XYZNumber: Negative Z value!\n";
3017 rv = icMaxStatus(rv, icValidateNonCompliant);
3018 }
3019
3020@@ -1548,7 +1548,7 @@
3021 icChar buf[128];
3022 if (dateTime.year<1992) {
3023 sReport += icValidateWarningMsg;
3024- sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
3025+ sprintf(buf," - %u: Invalid year!\n",dateTime.year);
3026 sReport += buf;
3027 rv = icValidateWarning;
3028 }
3029@@ -1557,7 +1557,7 @@
3030 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
3031 if (dateTime.year>(year+1)) {
3032 sReport += icValidateWarningMsg;
3033- sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
3034+ sprintf(buf," - %u: Invalid year!\n",dateTime.year);
3035 sReport += buf;
3036 rv = icMaxStatus(rv, icValidateWarning);
3037 }
3038@@ -1565,7 +1565,7 @@
3039 else {
3040 if (dateTime.year>year) {
3041 sReport += icValidateWarningMsg;
3042- sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
3043+ sprintf(buf," - %u: Invalid year!\n",dateTime.year);
3044 sReport += buf;
3045 rv = icMaxStatus(rv, icValidateWarning);
3046 }
3047@@ -1573,14 +1573,14 @@
3048
3049 if (dateTime.month<1 || dateTime.month>12) {
3050 sReport += icValidateWarningMsg;
3051- sprintf(buf," - %u: Invalid month!\r\n",dateTime.month);
3052+ sprintf(buf," - %u: Invalid month!\n",dateTime.month);
3053 sReport += buf;
3054 rv = icMaxStatus(rv, icValidateWarning);
3055 }
3056
3057 if (dateTime.day<1 || dateTime.day>31) {
3058 sReport += icValidateWarningMsg;
3059- sprintf(buf," - %u: Invalid day!\r\n",dateTime.day);
3060+ sprintf(buf," - %u: Invalid day!\n",dateTime.day);
3061 sReport += buf;
3062 rv = icMaxStatus(rv, icValidateWarning);
3063 }
3064@@ -1588,7 +1588,7 @@
3065 if (dateTime.month==2) {
3066 if (dateTime.day>29) {
3067 sReport += icValidateWarningMsg;
3068- sprintf(buf," - %u: Invalid day for February!\r\n",dateTime.day);
3069+ sprintf(buf," - %u: Invalid day for February!\n",dateTime.day);
3070 sReport += buf;
3071 rv = icMaxStatus(rv, icValidateWarning);
3072 }
3073@@ -1596,7 +1596,7 @@
3074 if (dateTime.day==29) {
3075 if ((dateTime.year%4)!=0) {
3076 sReport += icValidateWarningMsg;
3077- sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\r\n",dateTime.day, dateTime.year);
3078+ sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\n",dateTime.day, dateTime.year);
3079 sReport += buf;
3080 rv = icMaxStatus(rv, icValidateWarning);
3081 }
3082@@ -1605,21 +1605,21 @@
3083
3084 if (dateTime.hours>23) {
3085 sReport += icValidateWarningMsg;
3086- sprintf(buf," - %u: Invalid hour!\r\n",dateTime.hours);
3087+ sprintf(buf," - %u: Invalid hour!\n",dateTime.hours);
3088 sReport += buf;
3089 rv = icMaxStatus(rv, icValidateWarning);
3090 }
3091
3092 if (dateTime.minutes>59) {
3093 sReport += icValidateWarningMsg;
3094- sprintf(buf," - %u: Invalid minutes!\r\n",dateTime.minutes);
3095+ sprintf(buf," - %u: Invalid minutes!\n",dateTime.minutes);
3096 sReport += buf;
3097 rv = icMaxStatus(rv, icValidateWarning);
3098 }
3099
3100 if (dateTime.seconds>59) {
3101 sReport += icValidateWarningMsg;
3102- sprintf(buf," - %u: Invalid seconds!\r\n",dateTime.hours);
3103+ sprintf(buf," - %u: Invalid seconds!\n",dateTime.hours);
3104 sReport += buf;
3105 rv = icMaxStatus(rv, icValidateWarning);
3106 }
3107diff -ru misc/SampleICC-1.3.2/IccProfLib/icProfileHeader.h misc/build/SampleICC-1.3.2/IccProfLib/icProfileHeader.h
3108--- misc/SampleICC-1.3.2/IccProfLib/icProfileHeader.h 2007-08-20 15:05:00.000000000 -0500
3109+++ misc/build/SampleICC-1.3.2/IccProfLib/icProfileHeader.h 2012-01-24 10:39:23.000000000 -0500
3110@@ -659,10 +659,11 @@
3111 typedef enum {
3112 icFlare0 = 0x00000000, /* 0% flare */
3113 icFlare100 = 0x00000001, /* 100% flare */
3114+ icMaxEnumFlare = 0xFFFFFFFF
3115 } icMeasurementFlare;
3116
3117 /** Convenience Enum Definition - Not defined in ICC specification*/
3118-#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)
3119+/*#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)*/
3120 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
3121
3122
3123diff -ru misc/SampleICC-1.3.2/Tools/CmdLine/Makefile.in misc/build/SampleICC-1.3.2/Tools/CmdLine/Makefile.in
3124--- misc/SampleICC-1.3.2/Tools/CmdLine/Makefile.in 2007-08-20 15:10:42.000000000 -0500
3125+++ misc/build/SampleICC-1.3.2/Tools/CmdLine/Makefile.in 2012-01-24 10:39:23.000000000 -0500
3126@@ -101,17 +101,13 @@
3127 am__quote = @am__quote@
3128 install_sh = @install_sh@
3129
3130-SUBDIRS = IccApplyNamedCmm \
3131- @SICC_ICC_APPLY_PROFILES@ \
3132- IccDumpProfile \
3133+SUBDIRS = IccDumpProfile \
3134 IccProfLibTest \
3135 IccStripUnknownTags \
3136 IccV4ToMPE
3137
3138
3139-DIST_SUBDIRS = IccApplyNamedCmm \
3140- IccApplyProfiles \
3141- IccDumpProfile \
3142+DIST_SUBDIRS = IccDumpProfile \
3143 IccProfLibTest \
3144 IccStripUnknownTags \
3145 IccV4ToMPE
3146diff -ru misc/SampleICC-1.3.2/configure misc/build/SampleICC-1.3.2/configure
3147--- misc/SampleICC-1.3.2/configure 2007-08-20 15:10:59.000000000 -0500
3148+++ misc/build/SampleICC-1.3.2/configure 2012-01-24 10:39:23.000000000 -0500
3149@@ -19991,7 +19991,7 @@
3150
3151
3152
3153- 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"
3154+ 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"
3155 cat >confcache <<\_ACEOF
3156 # This file is a shell script that caches the results of configure
3157 # tests run on this system so they can be shared between configure
3158@@ -20571,28 +20571,14 @@
3159 "IccProfLib/Makefile" ) CONFIG_FILES="$CONFIG_FILES IccProfLib/Makefile" ;;
3160 "Tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/Makefile" ;;
3161 "Tools/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/Makefile" ;;
3162- "Tools/CmdLine/IccApplyNamedCmm/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyNamedCmm/Makefile" ;;
3163- "Tools/CmdLine/IccApplyProfiles/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyProfiles/Makefile" ;;
3164 "Tools/CmdLine/IccDumpProfile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccDumpProfile/Makefile" ;;
3165 "Tools/CmdLine/IccProfLibTest/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccProfLibTest/Makefile" ;;
3166 "Tools/CmdLine/IccStripUnknownTags/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccStripUnknownTags/Makefile" ;;
3167 "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
3168 "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
3169 "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
3170- "Contrib/CmdLine/create_CLUT_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile/Makefile" ;;
3171- "Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ;;
3172- "Contrib/CmdLine/create_display_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_display_profile/Makefile" ;;
3173+ "Contrib/CmdLine/create_sRGB_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_sRGB_profile/Makefile" ;;
3174 "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
3175- "Contrib/Mac_OS_X/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/Makefile" ;;
3176- "Contrib/Mac_OS_X/create_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/create_probe/Makefile" ;;
3177- "Contrib/Mac_OS_X/extract_probe_data/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/extract_probe_data/Makefile" ;;
3178- "Contrib/examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/Makefile" ;;
3179- "Contrib/examples/RSR/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/RSR/Makefile" ;;
3180- "Contrib/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/Makefile" ;;
3181- "Contrib/tests/flatten_AToB_tag/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/flatten_AToB_tag/Makefile" ;;
3182- "Contrib/tests/generate_device_codes/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/generate_device_codes/Makefile" ;;
3183- "Contrib/tests/reconstruct_measurements/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/reconstruct_measurements/Makefile" ;;
3184- "Contrib/tests/round_trip_PCS_LAB/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/round_trip_PCS_LAB/Makefile" ;;
3185 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
3186 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
3187 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}