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