incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r1236920 [2/2] - /incubator/ooo/trunk/main/icc/SampleICC-1.3.2.patch
Date Fri, 27 Jan 2012 23:14:29 GMT

Modified: incubator/ooo/trunk/main/icc/SampleICC-1.3.2.patch
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/icc/SampleICC-1.3.2.patch?rev=1236920&r1=1236919&r2=1236920&view=diff
==============================================================================
--- incubator/ooo/trunk/main/icc/SampleICC-1.3.2.patch (original)
+++ incubator/ooo/trunk/main/icc/SampleICC-1.3.2.patch Fri Jan 27 23:14:28 2012
@@ -1,3187 +1,5146 @@
-diff -ru misc/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in misc/build/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in
---- misc/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in	2007-08-20 15:10:34.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in	2012-01-24 10:39:23.000000000 -0500
-@@ -102,15 +102,11 @@
- install_sh = @install_sh@
- 
- SUBDIRS = \
--	create_CLUT_profile \
--	create_CLUT_profile_from_probe \
--	create_display_profile
-+	create_sRGB_profile
- 
- 
- DIST_SUBDIRS = \
--	create_CLUT_profile \
--	create_CLUT_profile_from_probe \
--	create_display_profile
-+	create_sRGB_profile
- 
- subdir = Contrib/CmdLine
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-Only in misc/build/SampleICC-1.3.2/Contrib/CmdLine: create_sRGB_profile
-diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp
---- misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp	2007-08-20 15:04:53.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp	2012-01-24 10:39:23.000000000 -0500
-@@ -77,6 +77,8 @@
- //
- //////////////////////////////////////////////////////////////////////
- 
-+#include <stdlib.h>
-+#include <string.h>
- #include <iostream>
- #include <fstream>
- #include <sstream>
-diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h
---- misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h	2007-08-20 15:04:54.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h	2012-01-24 10:39:23.000000000 -0500
-@@ -83,6 +83,7 @@
- #ifndef __DEFINED_ICC_TOOL_EXCEPTION_H__
- #define __DEFINED_ICC_TOOL_EXCEPTION_H__
- 
-+#include <string.h>
- #include <exception>
- #include <string>
- 
-diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in
---- misc/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in	2007-08-20 15:10:35.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in	2012-01-24 10:39:23.000000000 -0500
-@@ -133,7 +133,7 @@
- CONFIG_CLEAN_FILES =
- LTLIBRARIES = $(lib_LTLIBRARIES)
- 
--libICC_utils_la_LIBADD =
-+libICC_utils_la_LIBADD = $(LDADD)
- am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
- 	ICC_tool_exception.lo Vetters.lo
- libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
-diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h
---- misc/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h	2007-08-20 15:04:53.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h	2012-01-24 10:39:23.000000000 -0500
-@@ -130,7 +130,7 @@
- 
-   // use one of these to force desired sort order in assoc. containers of DPX
-   bool
--  DPX::operator<(const DPX& p) const
-+  operator<(const DPX& p) const
-   {
-     return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
-   }
-diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp
---- misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp	2007-08-20 15:04:54.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp	2012-01-24 10:39:23.000000000 -0500
-@@ -1,322 +1,329 @@
--/*
-- File:       Vetters.cpp
-- 
-- Contains:   Utility functions to handle common argument-checking tasks, in a 
--             way that hides platform-specific details from higher-level code.
-- 
-- Version:    V1
-- 
-- Copyright:  ?? see below
-- */
--
--/*
-- * The ICC Software License, Version 0.1
-- *
-- *
-- * Copyright (c) 2003-2006 The International Color Consortium. All rights 
-- * reserved.
-- *
-- * Redistribution and use in source and binary forms, with or without
-- * modification, are permitted provided that the following conditions
-- * are met:
-- *
-- * 1. Redistributions of source code must retain the above copyright
-- *    notice, this list of conditions and the following disclaimer. 
-- *
-- * 2. Redistributions in binary form must reproduce the above copyright
-- *    notice, this list of conditions and the following disclaimer in
-- *    the documentation and/or other materials provided with the
-- *    distribution.
-- *
-- * 3. The end-user documentation included with the redistribution,
-- *    if any, must include the following acknowledgment:  
-- *       "This product includes software developed by the
-- *        The International Color Consortium (www.color.org)"
-- *    Alternately, this acknowledgment may appear in the software itself,
-- *    if and wherever such third-party acknowledgments normally appear.
-- *
-- * 4. The names "ICC" and "The International Color Consortium" must
-- *    not be used to imply that the ICC organization endorses or
-- *    promotes products derived from this software without prior
-- *    written permission. For written permission, please see
-- *    <http://www.color.org/>.
-- *
-- *
-- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-- * DISCLAIMED.  IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
-- * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- * SUCH DAMAGE.
-- * ====================================================================
-- *
-- * This software consists of voluntary contributions made by many
-- * individuals on behalf of the The International Color Consortium. 
-- *
-- *
-- * Membership in the ICC is encouraged when this software is used for
-- * commercial purposes. 
-- *
-- *  
-- * For more information on The International Color Consortium, please
-- * see <http://www.color.org/>.
-- *  
-- * 
-- */
--
--////////////////////////////////////////////////////////////////////// 
--// HISTORY:
--//
--// -Initial implementation by Joseph Goldstone sumer 2007
--//
--//////////////////////////////////////////////////////////////////////
--
--#include "Vetters.h"
--
--#include <sstream>
--using namespace std;
--
--#ifndef WIN32
--#include <sys/errno.h>
--#else
--#include <string.h>
--int strerror_r(int errnum, char *str, int strsize)
--{
--  const char *errstr = strerror(errnum);
--
--  if (errstr) {
--    strncpy(str, errstr, strsize);
--    return 0;
--  }
--
--  return -1;
--}
--#define stat _stat
--#endif
--
--#include "ICC_tool_exception.h"
--
--const char*
--path_tail(const char* const s)
--{
--  const char* tail = strdup(s);
--  const char* last_slash = strrchr(tail, '/');
--  if (last_slash != NULL)
--    tail = last_slash + 1;
--  return tail;
--}
--    
--void
--vet_as_int(const char* const s, const string& name,
--           const string& description)
--{
--  istringstream ss(s);
--  int i;
--  ss >> i;
--  if (ss.fail())
--  {
--    ostringstream oss;
--    oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
--      << " an integer.  It should be an integer representing "
--      << description << ".";
--    throw ICC_tool_exception(oss.str());
--  }
--}
--
--void
--vet_as_float(const char* const s, const string& name,
--             const string& description)
--{
--  istringstream ss(s);
--  float i;
--  ss >> i;
--  if (ss.fail())
--  {
--    ostringstream oss;
--    oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
--      << " a floating-point number.  It should be a floating-point number"
--      << " representing " << description << ".";
--    throw ICC_tool_exception(oss.str());
--  }
--}
--
--#define STRERROR_BUF_SIZE 256
--off_t
--get_size(const char* const s)
--{ 
--  struct stat sb;
--  int stat_returned = stat(s, &sb);
--  if (stat_returned < 0)
--  {
--    int stat_errno = errno;
--    char strerror_buf[STRERROR_BUF_SIZE];
--    strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
--    ostringstream oss;
--    oss << "Could not access information for file `" << s << "': "
--      << strerror_buf;
--    throw ICC_tool_exception(oss.str());
--  }
--  return sb.st_size;
--}
--
--bool
--check_mode(const char* const s, mode_t mode)
--{ 
--  struct stat sb;
--  int stat_returned = stat(s, &sb);
--  if (stat_returned < 0)
--  {
--    int stat_errno = errno;
--    char strerror_buf[STRERROR_BUF_SIZE];
--    strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
--    ostringstream oss;
--    oss << "Could not access information for file `" << s << "': "
--      << strerror_buf;
--    throw ICC_tool_exception(oss.str());
--  }
--  return (sb.st_mode & mode) != 0;
--}
--
--bool
--is_existent_file_pathname(const char* const s)
--{
--  struct stat sb;
--  return stat(s, &sb) == 0;
--}
--
--bool
--is_plain_file_pathname(const char* const s)
--{
--  return check_mode(s, S_IFREG);
--}
--
--bool
--is_directory(const char* const s)
--{
--  return check_mode(s, S_IFDIR);
--}
--
--const char* const
--containing_directory(const char* const s)
--{
--  if (strlen(s) == 0)
--    throw ICC_tool_exception("name of directory passed to containing_directory"
--                             " function was zero-length.");
--  char* tmp = strdup(s);
--  // lop off any trailing seperator
--  if (tmp[strlen(tmp) - 1] == '/')
--    tmp[strlen(tmp) - 1] = 0;
--  if (strlen(tmp) == 0)
--    throw ICC_tool_exception("root directory (which has no containing"
--                             " directory) passed to containing_directory"
--                             " function");
--  char* idx = strrchr(tmp, '/');
--  if (idx != NULL)
--  {
--    *idx = 0;
--    return tmp;
--  }
--  char* current_directory = getenv("PWD");
--  if (current_directory == NULL)
--    throw ICC_tool_exception("pathname passed to containing_directory has no"
--                             " embedded seperator, and there is no value for"
--                             " PWD defined in the environment");
--  return strdup(current_directory);
--}
--
--bool
--is_readable_pathname(const char* const s)
--{
--  return check_mode(s, S_IRUSR)
--  || check_mode(s, S_IRGRP)
--  || check_mode(s, S_IROTH);
--}
--
--bool
--is_writable_pathname(const char* const s)
--{
--  return check_mode(s, S_IWUSR)
--  || check_mode(s, S_IWGRP)
--  || check_mode(s, S_IWOTH);
--}
--
--bool
--is_pathname_of_empty_file(const char* const s)
--{
--  return get_size(s) > 0;
--}
--
--void
--vet_input_file_pathname(const char* const s, const string& name,
--                        const string& description)
--{
--  if (! is_plain_file_pathname(s))
--  {
--    ostringstream oss;
--    oss << "The " << name << " argument given, `" << s << "', is not the pathname"
--      << " of a plain file (i.e. it is the pathname of a directory, or of a"
--      << " symbolic link, or of some other sort of special file.)  It should be"
--      << " " << description << ".";
--    throw ICC_tool_exception(oss.str());
--  }
--  if (! is_readable_pathname(s))
--  {
--    ostringstream oss;
--    oss << "The " << name << " argument given, `" << s << "', is not the pathname"
--      << " of a readable file (i.e. you do not have permission to read that"
--      << " file, or you do not have permission to read some directory"
--      << " containing that file.";
--      throw ICC_tool_exception(oss.str());
--  }
--  if (! is_pathname_of_empty_file(s))
--  {
--    ostringstream oss;
--    oss << "The " << name << " argument given, `" << s << "', is not the pathname"
--      << " of an existing readable file, but that file is of zero length."
--      << " The argument should be " << description << ".";
--    throw ICC_tool_exception(oss.str());
--  }
--}
--
--void
--vet_output_file_pathname(const char* const s, const string& name,
--                         const string& description,
--                         bool silent_overwrite_OK)
--{
--  const char* const container = containing_directory(s);
--  if (! is_writable_pathname(container))
--  {
--    ostringstream oss;
--    oss << "The " << name << " argument given, `" << s << "', has a directory"
--      << " component which is not writable."
--      << " The argument should be " << description << ".";
--    throw ICC_tool_exception(oss.str());
--  }
--  if (is_existent_file_pathname(s))
--  {
--    if (is_plain_file_pathname(s))
--      if (is_writable_pathname(s))
--      {
--        if (! silent_overwrite_OK)
--        {
--          ostringstream oss;
--          oss << "The " << name << " argument given, `" << s << "' is of an existing"
--            << " file."
--            << " The argument should be " << description << ".";
--          throw ICC_tool_exception(oss.str());
--        }
--      } else {
--        ostringstream oss;
--        oss << "The " << name << " argument given, `" << s << "' is of an existing"
--          << " file which is not writable."
--          << " The argument should be " << description << ".";
--        throw ICC_tool_exception(oss.str());
--      }
--  }
--}
-\ No newline at end of file
-+/*
-+ File:       Vetters.cpp
-+ 
-+ Contains:   Utility functions to handle common argument-checking tasks, in a 
-+             way that hides platform-specific details from higher-level code.
-+ 
-+ Version:    V1
-+ 
-+ Copyright:  ?? see below
-+ */
-+
-+/*
-+ * The ICC Software License, Version 0.1
-+ *
-+ *
-+ * Copyright (c) 2003-2006 The International Color Consortium. All rights 
-+ * reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ *
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions and the following disclaimer. 
-+ *
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ *    notice, this list of conditions and the following disclaimer in
-+ *    the documentation and/or other materials provided with the
-+ *    distribution.
-+ *
-+ * 3. The end-user documentation included with the redistribution,
-+ *    if any, must include the following acknowledgment:  
-+ *       "This product includes software developed by the
-+ *        The International Color Consortium (www.color.org)"
-+ *    Alternately, this acknowledgment may appear in the software itself,
-+ *    if and wherever such third-party acknowledgments normally appear.
-+ *
-+ * 4. The names "ICC" and "The International Color Consortium" must
-+ *    not be used to imply that the ICC organization endorses or
-+ *    promotes products derived from this software without prior
-+ *    written permission. For written permission, please see
-+ *    <http://www.color.org/>.
-+ *
-+ *
-+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-+ * DISCLAIMED.  IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
-+ * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-+ * SUCH DAMAGE.
-+ * ====================================================================
-+ *
-+ * This software consists of voluntary contributions made by many
-+ * individuals on behalf of the The International Color Consortium. 
-+ *
-+ *
-+ * Membership in the ICC is encouraged when this software is used for
-+ * commercial purposes. 
-+ *
-+ *  
-+ * For more information on The International Color Consortium, please
-+ * see <http://www.color.org/>.
-+ *  
-+ * 
-+ */
-+
-+////////////////////////////////////////////////////////////////////// 
-+// HISTORY:
-+//
-+// -Initial implementation by Joseph Goldstone sumer 2007
-+//
-+//////////////////////////////////////////////////////////////////////
-+
-+#include "Vetters.h"
-+
-+#include <sstream>
-+using namespace std;
-+
-+#ifndef WIN32
-+#ifdef sun
-+#include <errno.h>
-+#else
-+#include <sys/errno.h>
-+#endif
-+#else
-+#include <string.h>
-+#define stat _stat
-+#endif
-+
-+#if defined WIN32 || defined sun
-+int strerror_r(int errnum, char *str, int strsize)
-+{
-+  const char *errstr = strerror(errnum);
-+
-+  if (errstr) {
-+    strncpy(str, errstr, strsize);
-+    return 0;
-+  }
-+
-+  return -1;
-+}
-+#endif
-+
-+#include "ICC_tool_exception.h"
-+
-+const char*
-+path_tail(const char* const s)
-+{
-+  const char* tail = strdup(s);
-+  const char* last_slash = strrchr(tail, '/');
-+  if (last_slash != NULL)
-+    tail = last_slash + 1;
-+  return tail;
-+}
-+    
-+void
-+vet_as_int(const char* const s, const string& name,
-+           const string& description)
-+{
-+  istringstream ss(s);
-+  int i;
-+  ss >> i;
-+  if (ss.fail())
-+  {
-+    ostringstream oss;
-+    oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
-+      << " an integer.  It should be an integer representing "
-+      << description << ".";
-+    throw ICC_tool_exception(oss.str());
-+  }
-+}
-+
-+void
-+vet_as_float(const char* const s, const string& name,
-+             const string& description)
-+{
-+  istringstream ss(s);
-+  float i;
-+  ss >> i;
-+  if (ss.fail())
-+  {
-+    ostringstream oss;
-+    oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
-+      << " a floating-point number.  It should be a floating-point number"
-+      << " representing " << description << ".";
-+    throw ICC_tool_exception(oss.str());
-+  }
-+}
-+
-+#define STRERROR_BUF_SIZE 256
-+off_t
-+get_size(const char* const s)
-+{ 
-+  struct stat sb;
-+  int stat_returned = stat(s, &sb);
-+  if (stat_returned < 0)
-+  {
-+    int stat_errno = errno;
-+    char strerror_buf[STRERROR_BUF_SIZE];
-+    strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
-+    ostringstream oss;
-+    oss << "Could not access information for file `" << s << "': "
-+      << strerror_buf;
-+    throw ICC_tool_exception(oss.str());
-+  }
-+  return sb.st_size;
-+}
-+
-+bool
-+check_mode(const char* const s, mode_t mode)
-+{ 
-+  struct stat sb;
-+  int stat_returned = stat(s, &sb);
-+  if (stat_returned < 0)
-+  {
-+    int stat_errno = errno;
-+    char strerror_buf[STRERROR_BUF_SIZE];
-+    strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
-+    ostringstream oss;
-+    oss << "Could not access information for file `" << s << "': "
-+      << strerror_buf;
-+    throw ICC_tool_exception(oss.str());
-+  }
-+  return (sb.st_mode & mode) != 0;
-+}
-+
-+bool
-+is_existent_file_pathname(const char* const s)
-+{
-+  struct stat sb;
-+  return stat(s, &sb) == 0;
-+}
-+
-+bool
-+is_plain_file_pathname(const char* const s)
-+{
-+  return check_mode(s, S_IFREG);
-+}
-+
-+bool
-+is_directory(const char* const s)
-+{
-+  return check_mode(s, S_IFDIR);
-+}
-+
-+const char* const
-+containing_directory(const char* const s)
-+{
-+  if (strlen(s) == 0)
-+    throw ICC_tool_exception("name of directory passed to containing_directory"
-+                             " function was zero-length.");
-+  char* tmp = strdup(s);
-+  // lop off any trailing seperator
-+  if (tmp[strlen(tmp) - 1] == '/')
-+    tmp[strlen(tmp) - 1] = 0;
-+  if (strlen(tmp) == 0)
-+    throw ICC_tool_exception("root directory (which has no containing"
-+                             " directory) passed to containing_directory"
-+                             " function");
-+  char* idx = strrchr(tmp, '/');
-+  if (idx != NULL)
-+  {
-+    *idx = 0;
-+    return tmp;
-+  }
-+  char* current_directory = getenv("PWD");
-+  if (current_directory == NULL)
-+    throw ICC_tool_exception("pathname passed to containing_directory has no"
-+                             " embedded seperator, and there is no value for"
-+                             " PWD defined in the environment");
-+  return strdup(current_directory);
-+}
-+
-+bool
-+is_readable_pathname(const char* const s)
-+{
-+  return check_mode(s, S_IRUSR)
-+  || check_mode(s, S_IRGRP)
-+  || check_mode(s, S_IROTH);
-+}
-+
-+bool
-+is_writable_pathname(const char* const s)
-+{
-+  return check_mode(s, S_IWUSR)
-+  || check_mode(s, S_IWGRP)
-+  || check_mode(s, S_IWOTH);
-+}
-+
-+bool
-+is_pathname_of_empty_file(const char* const s)
-+{
-+  return get_size(s) > 0;
-+}
-+
-+void
-+vet_input_file_pathname(const char* const s, const string& name,
-+                        const string& description)
-+{
-+  if (! is_plain_file_pathname(s))
-+  {
-+    ostringstream oss;
-+    oss << "The " << name << " argument given, `" << s << "', is not the pathname"
-+      << " of a plain file (i.e. it is the pathname of a directory, or of a"
-+      << " symbolic link, or of some other sort of special file.)  It should be"
-+      << " " << description << ".";
-+    throw ICC_tool_exception(oss.str());
-+  }
-+  if (! is_readable_pathname(s))
-+  {
-+    ostringstream oss;
-+    oss << "The " << name << " argument given, `" << s << "', is not the pathname"
-+      << " of a readable file (i.e. you do not have permission to read that"
-+      << " file, or you do not have permission to read some directory"
-+      << " containing that file.";
-+      throw ICC_tool_exception(oss.str());
-+  }
-+  if (! is_pathname_of_empty_file(s))
-+  {
-+    ostringstream oss;
-+    oss << "The " << name << " argument given, `" << s << "', is not the pathname"
-+      << " of an existing readable file, but that file is of zero length."
-+      << " The argument should be " << description << ".";
-+    throw ICC_tool_exception(oss.str());
-+  }
-+}
-+
-+void
-+vet_output_file_pathname(const char* const s, const string& name,
-+                         const string& description,
-+                         bool silent_overwrite_OK)
-+{
-+  const char* const container = containing_directory(s);
-+  if (! is_writable_pathname(container))
-+  {
-+    ostringstream oss;
-+    oss << "The " << name << " argument given, `" << s << "', has a directory"
-+      << " component which is not writable."
-+      << " The argument should be " << description << ".";
-+    throw ICC_tool_exception(oss.str());
-+  }
-+  if (is_existent_file_pathname(s))
-+  {
-+    if (is_plain_file_pathname(s))
-+      if (is_writable_pathname(s))
-+      {
-+        if (! silent_overwrite_OK)
-+        {
-+          ostringstream oss;
-+          oss << "The " << name << " argument given, `" << s << "' is of an existing"
-+            << " file."
-+            << " The argument should be " << description << ".";
-+          throw ICC_tool_exception(oss.str());
-+        }
-+      } else {
-+        ostringstream oss;
-+        oss << "The " << name << " argument given, `" << s << "' is of an existing"
-+          << " file which is not writable."
-+          << " The argument should be " << description << ".";
-+        throw ICC_tool_exception(oss.str());
-+      }
-+  }
-+}
-diff -ru misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h
---- misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h	2007-08-20 15:04:53.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h	2012-01-24 10:39:23.000000000 -0500
-@@ -83,6 +83,7 @@
- #include <string>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <stdlib.h>
- 
- #ifdef WIN32
- typedef unsigned short mode_t;
-Only in misc/build/SampleICC-1.3.2/Contrib/ICC_utils: makefile.mk
-diff -ru misc/SampleICC-1.3.2/Contrib/Makefile.in misc/build/SampleICC-1.3.2/Contrib/Makefile.in
---- misc/SampleICC-1.3.2/Contrib/Makefile.in	2007-08-20 15:10:37.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/Contrib/Makefile.in	2012-01-24 10:39:23.000000000 -0500
-@@ -103,18 +103,12 @@
- 
- SUBDIRS = \
- 	ICC_utils \
--	CmdLine \
--	examples \
--	Mac_OS_X \
--	tests
-+	CmdLine
- 
- 
- DIST_SUBDIRS = \
- 	ICC_utils \
--	CmdLine \
--	examples \
--	Mac_OS_X \
--	tests
-+	CmdLine
- 
- subdir = Contrib
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-diff -ru misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp
---- misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp	2007-08-20 15:05:00.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp	2012-01-24 10:39:23.000000000 -0500
-@@ -79,6 +79,8 @@
- #pragma warning( disable: 4786) //disable warning in <list.h>
- #endif
- 
-+#include <stdlib.h>
-+#include <string.h>
- #include "IccCmm.h"
- #include "IccTag.h"
- #include "IccIO.h"
-diff -ru misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp
---- misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp	2007-08-20 15:05:00.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp	2012-01-24 10:39:23.000000000 -0500
-@@ -78,7 +78,7 @@
- #include "IccIO.h"
- #include "IccUtil.h"
- #include <stdlib.h>
--#include <memory.h>
-+#include <memory>
- #include <string.h>
- 
- #ifndef __max
-diff -ru misc/SampleICC-1.3.2/IccProfLib/IccIO.h misc/build/SampleICC-1.3.2/IccProfLib/IccIO.h
---- misc/SampleICC-1.3.2/IccProfLib/IccIO.h	2007-08-20 15:05:00.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/IccProfLib/IccIO.h	2012-01-24 10:39:23.000000000 -0500
-@@ -79,6 +79,7 @@
- #define _ICCIO_H
- 
- #include "IccDefs.h"
-+#include "memory"
- #include "stdio.h"
- 
- #ifdef USESAMPLEICCNAMESPACE
-diff -ru misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp
---- misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp	2007-08-20 15:05:00.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp	2012-01-24 10:39:23.000000000 -0500
-@@ -136,17 +136,17 @@
-   icChar sigBuf[30];
- 
-   if (GetBAcsSig())
--    sDescription += "ELEM_bACS\r\n";
-+    sDescription += "ELEM_bACS\n";
-   else
--    sDescription += "ELEM_eACS\r\n";
-+    sDescription += "ELEM_eACS\n";
- 
-   icGetSig(sigBuf, m_signature);
-   sDescription += "  Signature = ";
-   sDescription += sigBuf;
--  sDescription += "\r\n";
-+  sDescription += "\n";
- 
-   if (m_pData) {
--    sDescription += "\r\nData Follows:\r\n";
-+    sDescription += "\nData Follows:\n";
- 
-     icMemDump(sDescription, m_pData, m_nDataSize);
-   }
-diff -ru misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp
---- misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp	2007-08-20 15:05:00.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp	2012-01-24 10:39:23.000000000 -0500
-@@ -218,43 +218,43 @@
-   sprintf(buf, "%.8f", m_endPoint);
-   sDescription += buf;
-   }
--  sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
-+  sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
-   sDescription += buf;
- 
-   switch(m_nFunctionType) {
-   case 0x0000:
-     if (m_params[1]==0.0 && m_params[2]==0.0)
--      sprintf(buf, "Y = %.8f\r\n\r\n", m_params[3]);
-+      sprintf(buf, "Y = %.8f\n\n", m_params[3]);
-     else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
--      sprintf(buf, "Y = X\r\n\r\n");
-+      sprintf(buf, "Y = X\n\n");
-     else if (m_params[0]==1.0 && m_params[2]==0.0)
--      sprintf(buf, "Y = %.8f * X + %.8f\r\n\r\n", 
-+      sprintf(buf, "Y = %.8f * X + %.8f\n\n", 
-               m_params[1], m_params[3]);
-     else
--      sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\r\n\r\n", 
-+      sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n", 
-               m_params[1], m_params[2], m_params[0], m_params[3]);
-     sDescription += buf;
-     return;
- 
-   case 0x0001:
--    sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f)  + %.8f) + %.8f\r\n\r\n",
-+    sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f)  + %.8f) + %.8f\n\n",
-             m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
-     sDescription += buf;
-     return;
- 
-   case 0x0002:
--    sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\r\n\r\n",
-+    sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
-             m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
-     sDescription += buf;
-     return;
- 
-   default:
-     int i;
--    sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
-+    sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
-     sDescription += buf;
- 
-     for (i=0; i<m_nParameters; i++) {
--      sprintf(buf, "Param[%d] = %.8lf\r\n\r\n", i, m_params[i]);
-+      sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
-       sDescription += buf;
-     }
-   }
-@@ -496,7 +496,7 @@
-   if (m_nReserved || m_nReserved2) {
-     sReport += icValidateWarningMsg;
-     sReport += sSigName;
--    sReport += " formula curve has non zero reserved data.\r\n";
-+    sReport += " formula curve has non zero reserved data.\n";
-     rv = icValidateWarning;
-   }
- 
-@@ -505,13 +505,13 @@
-     if (!m_params || m_nParameters<4) {
-       sReport += icValidateCriticalErrorMsg;
-       sReport += sSigName;
--      sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
-+      sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
-       rv = icValidateCriticalError;
-     }
-     else if (m_nParameters > 4) {
-       sReport += icValidateWarningMsg;
-       sReport += sSigName;
--      sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
-+      sReport += " formula curve has too many formulaCurveSegment parameters.\n";
-       rv = icValidateWarning;
-     }
-     break;
-@@ -520,13 +520,13 @@
-     if (!m_params || m_nParameters<5) {
-       sReport += icValidateCriticalErrorMsg;
-       sReport += sSigName;
--      sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
-+      sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
-       rv = icValidateCriticalError;
-     }
-     else if (m_nParameters > 5) {
-       sReport += icValidateWarningMsg;
-       sReport += sSigName;
--      sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
-+      sReport += " formula curve has too many formulaCurveSegment parameters.\n";
-       rv = icValidateWarning;
-     }
-     break;
-@@ -535,13 +535,13 @@
-     if (!m_params || m_nParameters<5) {
-       sReport += icValidateCriticalErrorMsg;
-       sReport += sSigName;
--      sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
-+      sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
-       rv = icValidateCriticalError;
-     }
-     else if (m_nParameters > 5) {
-       sReport += icValidateWarningMsg;
-       sReport += sSigName;
--      sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
-+      sReport += " formula curve has too many formulaCurveSegment parameters.\n";
-       rv = icValidateWarning;
-     }
-     break;
-@@ -551,7 +551,7 @@
-       icChar buf[128];
-       sReport += icValidateCriticalErrorMsg;
-       sReport += sSigName;
--      sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\r\n", m_nFunctionType);
-+      sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
-       sReport += buf;
-       rv = icValidateCriticalError;
-     }
-@@ -727,7 +727,7 @@
-     sDescription += buf;
-     }
- 
--    sprintf(buf, "]\r\n");
-+    sprintf(buf, "]\n");
-     sDescription += buf;
-   }
-   else {
-@@ -744,9 +744,9 @@
-     sprintf(buf, "%.8f", m_endPoint);
-     sDescription += buf;
-     }
--    sprintf(buf, "]\r\n");
-+    sprintf(buf, "]\n");
-     sDescription += buf;
--    sDescription += "IN  OUT\r\n";
-+    sDescription += "IN  OUT\n";
- 
-     icUInt32Number i;
- 
-@@ -754,11 +754,11 @@
-     icFloatNumber last = (icFloatNumber)(m_nCount-1);
- 
-     for (i=0; i<m_nCount; i++) {
--      sprintf(buf, "%.8f %.8f\r\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
-+      sprintf(buf, "%.8f %.8f\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
-       sDescription += buf;
-     }
-   }
--  sDescription += "\r\n";
-+  sDescription += "\n";
- }
- 
- /**
-@@ -910,20 +910,20 @@
-   if (m_nReserved) {
-     sReport += icValidateWarningMsg;
-     sReport += sSigName;
--    sReport += " sampled curve has non zero reserved data.\r\n";
-+    sReport += " sampled curve has non zero reserved data.\n";
-     rv = icValidateWarning;
-   }
- 
-   if (m_nCount<2) {
-     sReport += icValidateCriticalErrorMsg;
-     sReport += sSigName;
--    sReport += " sampled curve has too few sample points.\r\n";
-+    sReport += " sampled curve has too few sample points.\n";
-     rv = icValidateCriticalError;
-   }
-   else if (m_endPoint-m_startPoint == 0.0) {
-     sReport += icValidateWarningMsg;
-     sReport += sSigName;
--    sReport += " sampled curve has a range of zero.\r\n";
-+    sReport += " sampled curve has a range of zero.\n";
-     rv = icMaxStatus(rv, icValidateWarning);
-   }
- 
-@@ -1054,7 +1054,7 @@
- {
-   CIccCurveSegmentList::iterator i;
- 
--  sDescription += "BEGIN_CURVE\r\n";
-+  sDescription += "BEGIN_CURVE\n";
-   for (i=m_list->begin(); i!=m_list->end(); i++) {
-     (*i)->Describe(sDescription);
-   }
-@@ -1342,14 +1342,14 @@
-   if (m_nReserved1 || m_nReserved2) {
-     sReport += icValidateWarningMsg;
-     sReport += sSigName;
--    sReport += " Segmented curve has non zero reserved data.\r\n";
-+    sReport += " Segmented curve has non zero reserved data.\n";
-     rv = icValidateWarning;
-   }
- 
-   if (m_list->size()==0) {
-     sReport += icValidateCriticalErrorMsg;
-     sReport += sSigName;
--    sReport += " Has Empty CurveSegment!\r\n";
-+    sReport += " Has Empty CurveSegment!\n";
-     return icValidateCriticalError;
-   }
- 
-@@ -1599,11 +1599,11 @@
-     icChar buf[81];
-     int i;
- 
--    sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
-+    sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
-     sDescription += buf;
- 
-     for (i=0; i<m_nInputChannels; i++) {
--      sprintf(buf, "Curve %d of %d\r\n", i+1, m_nInputChannels);
-+      sprintf(buf, "Curve %d of %d\n", i+1, m_nInputChannels);
-       sDescription += buf;
-       if (m_curve[i]) {
-         m_curve[i]->Describe(sDescription);
-@@ -1877,7 +1877,7 @@
-     sReport += " - Element ";
-     sSigName = Info.GetSigName(GetType());
-     sReport += sSigName;
--    sReport += " Has Empty Curve Element(s)!\r\n";
-+    sReport += " Has Empty Curve Element(s)!\n";
-     return icValidateCriticalError;
-   }
- 
-@@ -2042,7 +2042,7 @@
-   int i, j;
-   icFloatNumber *data = m_pMatrix;
- 
--  sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
-+  sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
-   sDescription += buf;
- 
-   for (j=0; j<m_nOutputChannels; j++) {
-@@ -2052,7 +2052,7 @@
-       sprintf(buf, "%12.8lf", data[i]);
-       sDescription += buf;
-     }
--    sprintf(buf, "  +  %12.8lf\r\n", m_pConstants[j]);
-+    sprintf(buf, "  +  %12.8lf\n", m_pConstants[j]);
-     sDescription += buf;
-     data += i;
-   }
-@@ -2273,7 +2273,7 @@
-     sReport += " - Element ";
-     sSigName = Info.GetSigName(GetType());
-     sReport += sSigName;
--    sReport += " Has Empty Matrix data!\r\n";
-+    sReport += " Has Empty Matrix data!\n";
-     return icValidateCriticalError;
-   }
- 
-@@ -2620,7 +2620,7 @@
-     sReport += " - Element ";
-     sSigName = Info.GetSigName(GetType());
-     sReport += sSigName;
--    sReport += " Has No CLUT!\r\n";
-+    sReport += " Has No CLUT!\n";
-     return icValidateCriticalError;
-   }
- 
-diff -ru misc/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h
---- misc/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h	2007-08-20 15:05:00.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h	2012-01-24 10:39:23.000000000 -0500
-@@ -107,20 +107,23 @@
- 
- #else // non-PC, perhaps Mac or Linux
- 
--  #define ICCUINT64 unsigned long long
--  #define ICCINT64  long long
--  #define ICUINT64TYPE unsigned long long
--  #define ICINT64TYPE long long
--
--  #if defined(__APPLE__)
--    #if  defined(__LITTLE_ENDIAN__)
--      #define ICC_BYTE_ORDER_LITTLE_ENDIAN
--    #else
--      #define ICC_BYTE_ORDER_BIG_ENDIAN
--    #endif
--  #else
--    #define ICC_BYTE_ORDER_LITTLE_ENDIAN
--  #endif
-+#include <sal/types.h>
-+#include <osl/endian.h>
-+
-+  #define ICCUINT64 sal_uInt64
-+  #define ICCINT64 sal_Int64
-+  #define ICUINT64TYPE sal_uInt64
-+  #define ICINT64TYPE sal_Int64
-+  #define ICINT32TYPE sal_Int32
-+  #define ICUINT32TYPE sal_uInt32
-+
-+#if defined(_LITTLE_ENDIAN)
-+#    define ICC_BYTE_ORDER_LITTLE_ENDIAN
-+#elif defined(_BIG_ENDIAN)
-+#    define ICC_BYTE_ORDER_BIG_ENDIAN
-+#else
-+#    error "ENDIAN unknown"
-+#endif
- 
-   #define ICCPROFLIB_API
-   #define ICCPROFLIB_EXTERN
-diff -ru misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp
---- misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp	2007-08-20 15:05:00.000000000 -0500
-+++ misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp	2012-01-24 10:39:23.000000000 -0500
-@@ -567,7 +567,7 @@
- 
-   if (!ReadBasic(pIO)) {
-     sReport += icValidateCriticalErrorMsg;
--    sReport += " - Unable to read profile!**\r\n\tProfile has invalid structure!\r\n";
-+    sReport += " - Unable to read profile!**\n\tProfile has invalid structure!\n";
-     Cleanup();
- 
-     return icValidateCriticalError;
-@@ -576,7 +576,7 @@
-   // Check profile header
-   if (!CheckFileSize(pIO)) {
-     sReport += icValidateNonCompliantMsg;
--    sReport += "Bad Header File Size\r\n";
-+    sReport += "Bad Header File Size\n";
-     rv = icMaxStatus(rv, icValidateNonCompliant);
-   }
- 
-@@ -588,7 +588,7 @@
-     CalcProfileID(pIO, &profileID);
-     if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
-       sReport += icValidateNonCompliantMsg;
--      sReport += "Bad Profile ID\r\n";
-+      sReport += "Bad Profile ID\n";
- 
-       rv = icMaxStatus(rv, icValidateNonCompliant);
-     }
-@@ -601,7 +601,7 @@
-       sReport += icValidateCriticalErrorMsg;
-       sReport += " - ";
-       sReport += Info.GetTagSigName(i->TagInfo.sig);
--      sReport += " - Tag has invalid structure!\r\n";
-+      sReport += " - Tag has invalid structure!\n";
- 
-       rv = icMaxStatus(rv, icValidateCriticalError);
-     }
-@@ -1026,14 +1026,14 @@
- 
-   default:
-     sReport += icValidateCriticalErrorMsg;
--    sprintf(buf, " - %s: Unknown profile class!\r\n", Info.GetProfileClassSigName(m_Header.deviceClass));
-+    sprintf(buf, " - %s: Unknown profile class!\n", Info.GetProfileClassSigName(m_Header.deviceClass));
-     sReport += buf;
-     rv = icMaxStatus(rv, icValidateCriticalError);
-   }
- 
-   if (!Info.IsValidSpace(m_Header.colorSpace)) {
-     sReport += icValidateCriticalErrorMsg;
--    sprintf(buf, " - %s: Unknown color space!\r\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
-+    sprintf(buf, " - %s: Unknown color space!\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
-     sReport += buf;
-     rv = icMaxStatus(rv, icValidateCriticalError);
-   }
-@@ -1041,7 +1041,7 @@
-   if (m_Header.deviceClass==icSigLinkClass) {
-     if (!Info.IsValidSpace(m_Header.pcs)) {
-       sReport += icValidateCriticalErrorMsg;
--      sprintf(buf, " - %s: Unknown pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
-+      sprintf(buf, " - %s: Unknown pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
-       sReport += buf;
-       rv = icMaxStatus(rv, icValidateCriticalError);
-     }
-@@ -1049,7 +1049,7 @@
-   else {
-     if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
-       sReport += icValidateCriticalErrorMsg;
--      sprintf(buf, " - %s: Invalid pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
-+      sprintf(buf, " - %s: Invalid pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
-       sReport += buf;
-       rv = icMaxStatus(rv, icValidateCriticalError);
-     }
-@@ -1068,7 +1068,7 @@
-   
-   default:
-     sReport += icValidateWarningMsg;
--    sprintf(buf, " - %s: Unknown platform signature.\r\n", Info.GetPlatformSigName(m_Header.platform));
-+    sprintf(buf, " - %s: Unknown platform signature.\n", Info.GetPlatformSigName(m_Header.platform));
-     sReport += buf;
-     rv = icMaxStatus(rv, icValidateWarning);
-   }
-@@ -1095,7 +1095,7 @@
- 
-   default:
-     sReport += icValidateWarningMsg;
--    sprintf(buf, " - %s: Unregisterd CMM signature.\r\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
-+    sprintf(buf, " - %s: Unregisterd CMM signature.\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
-     sReport += buf;
-     rv = icMaxStatus(rv, icValidateWarning);
-   }
-@@ -1109,7 +1109,7 @@
- 
-   default:
-     sReport += icValidateCriticalErrorMsg;
--    sprintf(buf, " - %s: Unknown rendering intent!\r\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
-+    sprintf(buf, " - %s: Unknown rendering intent!\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
-     sReport += buf;
-     rv = icMaxStatus(rv, icValidateCriticalError);
-   }
-@@ -1120,7 +1120,7 @@
-   icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
-   if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
-     sReport += icValidateNonCompliantMsg;
--    sReport += " - Non D50 Illuminant XYZ values.\r\n";
-+    sReport += " - Non D50 Illuminant XYZ values.\n";
-     rv = icMaxStatus(rv, icValidateNonCompliant);
-   }
- 
-@@ -1130,7 +1130,7 @@
-   }
-   if (sum) {
-     sReport += icValidateNonCompliantMsg;
--    sReport += " - Reserved value must be zero.\r\n";
-+    sReport += " - Reserved value must be zero.\n";
-     rv = icMaxStatus(rv, icValidateNonCompliant);
-   }
- 
-@@ -1163,7 +1163,7 @@
-     {
-       sReport += icValidateWarningMsg;
-       sReport += buf;
--      sReport += " - Tag exclusion test failed.\r\n";
-+      sReport += " - Tag exclusion test failed.\n";
-       rv = false;
-     }
-   }
-@@ -1177,7 +1177,7 @@
-       {
-         sReport += icValidateWarningMsg;
-         sReport += buf;
--        sReport += " - Tag exclusion test failed.\r\n";
-+        sReport += " - Tag exclusion test failed.\n";
-         rv = false;
-       }
-       break;
-@@ -1192,7 +1192,7 @@
-       {
-         sReport += icValidateWarningMsg;
-         sReport += buf;
--        sReport += " - Tag exclusion test failed.\r\n";
-+        sReport += " - Tag exclusion test failed.\n";
-         rv = false;
-       }
-       break;
-@@ -1234,7 +1234,7 @@
-     if (!IsTypeValid(tagsig, typesig)) {
-       sReport += icValidateNonCompliantMsg;
-       sReport += buf;
--      sprintf(buf," - %s: Invalid tag type (Might be critical!).\r\n", Info.GetTagTypeSigName(typesig));
-+      sprintf(buf," - %s: Invalid tag type (Might be critical!).\n", Info.GetTagTypeSigName(typesig));
-       sReport += buf;
-       rv = icMaxStatus(rv, icValidateNonCompliant);
-     }
-@@ -1477,7 +1477,7 @@
- {
-   if (m_Tags->size() <= 0) {
-     sReport += icValidateCriticalErrorMsg;
--    sReport += "No tags present.\r\n";
-+    sReport += "No tags present.\n";
-     return icValidateCriticalError;
-   }
- 
-@@ -1486,7 +1486,7 @@
-   if (!GetTag(icSigProfileDescriptionTag) ||
-      !GetTag(icSigCopyrightTag)) {
+*** misc/SampleICC-1.3.2/configure	Mon Aug 20 22:10:59 2007
+--- misc/build/SampleICC-1.3.2/configure	Fri Jan 25 14:23:09 2008
+***************
+*** 19991,19997 ****
+  
+  
+  
+!                                                                                                                                                                                                                                                                     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/t
 ests/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"
+  cat >confcache <<\_ACEOF
+  # This file is a shell script that caches the results of configure
+  # tests run on this system so they can be shared between configure
+--- 19991,19997 ----
+  
+  
+  
+!                                                                                                                                                                                                                                                                     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"
+  cat >confcache <<\_ACEOF
+  # This file is a shell script that caches the results of configure
+  # tests run on this system so they can be shared between configure
+***************
+*** 20571,20578 ****
+    "IccProfLib/Makefile" ) CONFIG_FILES="$CONFIG_FILES IccProfLib/Makefile" ;;
+    "Tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/Makefile" ;;
+    "Tools/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/Makefile" ;;
+-   "Tools/CmdLine/IccApplyNamedCmm/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyNamedCmm/Makefile" ;;
+-   "Tools/CmdLine/IccApplyProfiles/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyProfiles/Makefile" ;;
+    "Tools/CmdLine/IccDumpProfile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccDumpProfile/Makefile" ;;
+    "Tools/CmdLine/IccProfLibTest/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccProfLibTest/Makefile" ;;
+    "Tools/CmdLine/IccStripUnknownTags/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccStripUnknownTags/Makefile" ;;
+--- 20571,20576 ----
+***************
+*** 20579,20598 ****
+    "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
+    "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
+    "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
+!   "Contrib/CmdLine/create_CLUT_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile/Makefile" ;;
+!   "Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ;;
+!   "Contrib/CmdLine/create_display_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_display_profile/Makefile" ;;
+    "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
+-   "Contrib/Mac_OS_X/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/Makefile" ;;
+-   "Contrib/Mac_OS_X/create_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/create_probe/Makefile" ;;
+-   "Contrib/Mac_OS_X/extract_probe_data/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/extract_probe_data/Makefile" ;;
+-   "Contrib/examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/Makefile" ;;
+-   "Contrib/examples/RSR/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/RSR/Makefile" ;;
+-   "Contrib/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/Makefile" ;;
+-   "Contrib/tests/flatten_AToB_tag/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/flatten_AToB_tag/Makefile" ;;
+-   "Contrib/tests/generate_device_codes/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/generate_device_codes/Makefile" ;;
+-   "Contrib/tests/reconstruct_measurements/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/reconstruct_measurements/Makefile" ;;
+-   "Contrib/tests/round_trip_PCS_LAB/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/round_trip_PCS_LAB/Makefile" ;;
+    "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+  echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+--- 20577,20584 ----
+    "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
+    "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
+    "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
+!   "Contrib/CmdLine/create_sRGB_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_sRGB_profile/Makefile" ;;
+    "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
+    "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+  echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+*** misc/SampleICC-1.3.2/Contrib/Makefile.in	Mon Aug 20 22:10:37 2007
+--- misc/build/SampleICC-1.3.2/Contrib/Makefile.in	Fri Jan 25 14:23:09 2008
+***************
+*** 103,120 ****
+  
+  SUBDIRS = \
+  	ICC_utils \
+! 	CmdLine \
+! 	examples \
+! 	Mac_OS_X \
+! 	tests
+  
+  
+  DIST_SUBDIRS = \
+  	ICC_utils \
+! 	CmdLine \
+! 	examples \
+! 	Mac_OS_X \
+! 	tests
+  
+  subdir = Contrib
+  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+--- 103,114 ----
+  
+  SUBDIRS = \
+  	ICC_utils \
+! 	CmdLine
+  
+  
+  DIST_SUBDIRS = \
+  	ICC_utils \
+! 	CmdLine
+  
+  subdir = Contrib
+  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+*** misc/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in	Mon Aug 20 22:10:34 2007
+--- misc/build/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in	Fri Jan 25 14:23:09 2008
+***************
+*** 102,116 ****
+  install_sh = @install_sh@
+  
+  SUBDIRS = \
+! 	create_CLUT_profile \
+! 	create_CLUT_profile_from_probe \
+! 	create_display_profile
+  
+  
+  DIST_SUBDIRS = \
+! 	create_CLUT_profile \
+! 	create_CLUT_profile_from_probe \
+! 	create_display_profile
+  
+  subdir = Contrib/CmdLine
+  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+--- 102,112 ----
+  install_sh = @install_sh@
+  
+  SUBDIRS = \
+! 	create_sRGB_profile
+  
+  
+  DIST_SUBDIRS = \
+! 	create_sRGB_profile
+  
+  subdir = Contrib/CmdLine
+  mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+*** misc/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in	Mon Aug 20 22:10:35 2007
+--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in	Fri Jan 25 14:23:09 2008
+***************
+*** 133,139 ****
+  CONFIG_CLEAN_FILES =
+  LTLIBRARIES = $(lib_LTLIBRARIES)
+  
+! libICC_utils_la_LIBADD =
+  am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
+  	ICC_tool_exception.lo Vetters.lo
+  libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
+--- 133,139 ----
+  CONFIG_CLEAN_FILES =
+  LTLIBRARIES = $(lib_LTLIBRARIES)
+  
+! libICC_utils_la_LIBADD = $(LDADD)
+  am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
+  	ICC_tool_exception.lo Vetters.lo
+  libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
+*** misc/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h	Mon Aug 20 22:04:53 2007
+--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h	Fri Jan 25 14:23:09 2008
+***************
+*** 130,136 ****
+  
+    // use one of these to force desired sort order in assoc. containers of DPX
+    bool
+!   DPX::operator<(const DPX& p) const
+    {
+      return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
+    }
+--- 130,136 ----
+  
+    // use one of these to force desired sort order in assoc. containers of DPX
+    bool
+!   operator<(const DPX& p) const
+    {
+      return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
+    }
+*** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp	Mon Aug 20 22:04:54 2007
+--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp	Fri Jan 25 14:57:06 2008
+***************
+*** 1,322 ****
+! /*
+!  File:       Vetters.cpp
+!  
+!  Contains:   Utility functions to handle common argument-checking tasks, in a 
+!              way that hides platform-specific details from higher-level code.
+!  
+!  Version:    V1
+!  
+!  Copyright:  © see below
+!  */
+! 
+! /*
+!  * The ICC Software License, Version 0.1
+!  *
+!  *
+!  * Copyright (c) 2003-2006 The International Color Consortium. All rights 
+!  * reserved.
+!  *
+!  * Redistribution and use in source and binary forms, with or without
+!  * modification, are permitted provided that the following conditions
+!  * are met:
+!  *
+!  * 1. Redistributions of source code must retain the above copyright
+!  *    notice, this list of conditions and the following disclaimer. 
+!  *
+!  * 2. Redistributions in binary form must reproduce the above copyright
+!  *    notice, this list of conditions and the following disclaimer in
+!  *    the documentation and/or other materials provided with the
+!  *    distribution.
+!  *
+!  * 3. The end-user documentation included with the redistribution,
+!  *    if any, must include the following acknowledgment:  
+!  *       "This product includes software developed by the
+!  *        The International Color Consortium (www.color.org)"
+!  *    Alternately, this acknowledgment may appear in the software itself,
+!  *    if and wherever such third-party acknowledgments normally appear.
+!  *
+!  * 4. The names "ICC" and "The International Color Consortium" must
+!  *    not be used to imply that the ICC organization endorses or
+!  *    promotes products derived from this software without prior
+!  *    written permission. For written permission, please see
+!  *    <http://www.color.org/>.
+!  *
+!  *
+!  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+!  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+!  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+!  * DISCLAIMED.  IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
+!  * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+!  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+!  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+!  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+!  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+!  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+!  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+!  * SUCH DAMAGE.
+!  * ====================================================================
+!  *
+!  * This software consists of voluntary contributions made by many
+!  * individuals on behalf of the The International Color Consortium. 
+!  *
+!  *
+!  * Membership in the ICC is encouraged when this software is used for
+!  * commercial purposes. 
+!  *
+!  *  
+!  * For more information on The International Color Consortium, please
+!  * see <http://www.color.org/>.
+!  *  
+!  * 
+!  */
+! 
+! ////////////////////////////////////////////////////////////////////// 
+! // HISTORY:
+! //
+! // -Initial implementation by Joseph Goldstone sumer 2007
+! //
+! //////////////////////////////////////////////////////////////////////
+! 
+! #include "Vetters.h"
+! 
+! #include <sstream>
+! using namespace std;
+! 
+! #ifndef WIN32
+! #include <sys/errno.h>
+! #else
+! #include <string.h>
+! int strerror_r(int errnum, char *str, int strsize)
+! {
+!   const char *errstr = strerror(errnum);
+! 
+!   if (errstr) {
+!     strncpy(str, errstr, strsize);
+!     return 0;
+!   }
+! 
+!   return -1;
+! }
+! #define stat _stat
+! #endif
+! 
+! #include "ICC_tool_exception.h"
+! 
+! const char*
+! path_tail(const char* const s)
+! {
+!   const char* tail = strdup(s);
+!   const char* last_slash = strrchr(tail, '/');
+!   if (last_slash != NULL)
+!     tail = last_slash + 1;
+!   return tail;
+! }
+!     
+! void
+! vet_as_int(const char* const s, const string& name,
+!            const string& description)
+! {
+!   istringstream ss(s);
+!   int i;
+!   ss >> i;
+!   if (ss.fail())
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
+!       << " an integer.  It should be an integer representing "
+!       << description << ".";
+!     throw ICC_tool_exception(oss.str());
+!   }
+! }
+! 
+! void
+! vet_as_float(const char* const s, const string& name,
+!              const string& description)
+! {
+!   istringstream ss(s);
+!   float i;
+!   ss >> i;
+!   if (ss.fail())
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
+!       << " a floating-point number.  It should be a floating-point number"
+!       << " representing " << description << ".";
+!     throw ICC_tool_exception(oss.str());
+!   }
+! }
+! 
+! #define STRERROR_BUF_SIZE 256
+! off_t
+! get_size(const char* const s)
+! { 
+!   struct stat sb;
+!   int stat_returned = stat(s, &sb);
+!   if (stat_returned < 0)
+!   {
+!     int stat_errno = errno;
+!     char strerror_buf[STRERROR_BUF_SIZE];
+!     strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
+!     ostringstream oss;
+!     oss << "Could not access information for file `" << s << "': "
+!       << strerror_buf;
+!     throw ICC_tool_exception(oss.str());
+!   }
+!   return sb.st_size;
+! }
+! 
+! bool
+! check_mode(const char* const s, mode_t mode)
+! { 
+!   struct stat sb;
+!   int stat_returned = stat(s, &sb);
+!   if (stat_returned < 0)
+!   {
+!     int stat_errno = errno;
+!     char strerror_buf[STRERROR_BUF_SIZE];
+!     strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
+!     ostringstream oss;
+!     oss << "Could not access information for file `" << s << "': "
+!       << strerror_buf;
+!     throw ICC_tool_exception(oss.str());
+!   }
+!   return (sb.st_mode & mode) != 0;
+! }
+! 
+! bool
+! is_existent_file_pathname(const char* const s)
+! {
+!   struct stat sb;
+!   return stat(s, &sb) == 0;
+! }
+! 
+! bool
+! is_plain_file_pathname(const char* const s)
+! {
+!   return check_mode(s, S_IFREG);
+! }
+! 
+! bool
+! is_directory(const char* const s)
+! {
+!   return check_mode(s, S_IFDIR);
+! }
+! 
+! const char* const
+! containing_directory(const char* const s)
+! {
+!   if (strlen(s) == 0)
+!     throw ICC_tool_exception("name of directory passed to containing_directory"
+!                              " function was zero-length.");
+!   char* tmp = strdup(s);
+!   // lop off any trailing seperator
+!   if (tmp[strlen(tmp) - 1] == '/')
+!     tmp[strlen(tmp) - 1] = 0;
+!   if (strlen(tmp) == 0)
+!     throw ICC_tool_exception("root directory (which has no containing"
+!                              " directory) passed to containing_directory"
+!                              " function");
+!   char* idx = strrchr(tmp, '/');
+!   if (idx != NULL)
+!   {
+!     *idx = 0;
+!     return tmp;
+!   }
+!   char* current_directory = getenv("PWD");
+!   if (current_directory == NULL)
+!     throw ICC_tool_exception("pathname passed to containing_directory has no"
+!                              " embedded seperator, and there is no value for"
+!                              " PWD defined in the environment");
+!   return strdup(current_directory);
+! }
+! 
+! bool
+! is_readable_pathname(const char* const s)
+! {
+!   return check_mode(s, S_IRUSR)
+!   || check_mode(s, S_IRGRP)
+!   || check_mode(s, S_IROTH);
+! }
+! 
+! bool
+! is_writable_pathname(const char* const s)
+! {
+!   return check_mode(s, S_IWUSR)
+!   || check_mode(s, S_IWGRP)
+!   || check_mode(s, S_IWOTH);
+! }
+! 
+! bool
+! is_pathname_of_empty_file(const char* const s)
+! {
+!   return get_size(s) > 0;
+! }
+! 
+! void
+! vet_input_file_pathname(const char* const s, const string& name,
+!                         const string& description)
+! {
+!   if (! is_plain_file_pathname(s))
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+!       << " of a plain file (i.e. it is the pathname of a directory, or of a"
+!       << " symbolic link, or of some other sort of special file.)  It should be"
+!       << " " << description << ".";
+!     throw ICC_tool_exception(oss.str());
+!   }
+!   if (! is_readable_pathname(s))
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+!       << " of a readable file (i.e. you do not have permission to read that"
+!       << " file, or you do not have permission to read some directory"
+!       << " containing that file.";
+!       throw ICC_tool_exception(oss.str());
+!   }
+!   if (! is_pathname_of_empty_file(s))
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+!       << " of an existing readable file, but that file is of zero length."
+!       << " The argument should be " << description << ".";
+!     throw ICC_tool_exception(oss.str());
+!   }
+! }
+! 
+! void
+! vet_output_file_pathname(const char* const s, const string& name,
+!                          const string& description,
+!                          bool silent_overwrite_OK)
+! {
+!   const char* const container = containing_directory(s);
+!   if (! is_writable_pathname(container))
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', has a directory"
+!       << " component which is not writable."
+!       << " The argument should be " << description << ".";
+!     throw ICC_tool_exception(oss.str());
+!   }
+!   if (is_existent_file_pathname(s))
+!   {
+!     if (is_plain_file_pathname(s))
+!       if (is_writable_pathname(s))
+!       {
+!         if (! silent_overwrite_OK)
+!         {
+!           ostringstream oss;
+!           oss << "The " << name << " argument given, `" << s << "' is of an existing"
+!             << " file."
+!             << " The argument should be " << description << ".";
+!           throw ICC_tool_exception(oss.str());
+!         }
+!       } else {
+!         ostringstream oss;
+!         oss << "The " << name << " argument given, `" << s << "' is of an existing"
+!           << " file which is not writable."
+!           << " The argument should be " << description << ".";
+!         throw ICC_tool_exception(oss.str());
+!       }
+!   }
+! }
+--- 1,329 ----
+! /*
+!  File:       Vetters.cpp
+!  
+!  Contains:   Utility functions to handle common argument-checking tasks, in a 
+!              way that hides platform-specific details from higher-level code.
+!  
+!  Version:    V1
+!  
+!  Copyright:  © see below
+!  */
+! 
+! /*
+!  * The ICC Software License, Version 0.1
+!  *
+!  *
+!  * Copyright (c) 2003-2006 The International Color Consortium. All rights 
+!  * reserved.
+!  *
+!  * Redistribution and use in source and binary forms, with or without
+!  * modification, are permitted provided that the following conditions
+!  * are met:
+!  *
+!  * 1. Redistributions of source code must retain the above copyright
+!  *    notice, this list of conditions and the following disclaimer. 
+!  *
+!  * 2. Redistributions in binary form must reproduce the above copyright
+!  *    notice, this list of conditions and the following disclaimer in
+!  *    the documentation and/or other materials provided with the
+!  *    distribution.
+!  *
+!  * 3. The end-user documentation included with the redistribution,
+!  *    if any, must include the following acknowledgment:  
+!  *       "This product includes software developed by the
+!  *        The International Color Consortium (www.color.org)"
+!  *    Alternately, this acknowledgment may appear in the software itself,
+!  *    if and wherever such third-party acknowledgments normally appear.
+!  *
+!  * 4. The names "ICC" and "The International Color Consortium" must
+!  *    not be used to imply that the ICC organization endorses or
+!  *    promotes products derived from this software without prior
+!  *    written permission. For written permission, please see
+!  *    <http://www.color.org/>.
+!  *
+!  *
+!  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+!  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+!  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+!  * DISCLAIMED.  IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
+!  * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+!  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+!  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+!  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+!  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+!  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+!  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+!  * SUCH DAMAGE.
+!  * ====================================================================
+!  *
+!  * This software consists of voluntary contributions made by many
+!  * individuals on behalf of the The International Color Consortium. 
+!  *
+!  *
+!  * Membership in the ICC is encouraged when this software is used for
+!  * commercial purposes. 
+!  *
+!  *  
+!  * For more information on The International Color Consortium, please
+!  * see <http://www.color.org/>.
+!  *  
+!  * 
+!  */
+! 
+! ////////////////////////////////////////////////////////////////////// 
+! // HISTORY:
+! //
+! // -Initial implementation by Joseph Goldstone sumer 2007
+! //
+! //////////////////////////////////////////////////////////////////////
+! 
+! #include "Vetters.h"
+! 
+! #include <sstream>
+! using namespace std;
+! 
+! #ifndef WIN32
+! #ifdef sun
+! #include <errno.h>
+! #else
+! #include <sys/errno.h>
+! #endif
+! #else
+! #include <string.h>
+! #define stat _stat
+! #endif
+! 
+! #if defined WIN32 || defined sun
+! int strerror_r(int errnum, char *str, int strsize)
+! {
+!   const char *errstr = strerror(errnum);
+! 
+!   if (errstr) {
+!     strncpy(str, errstr, strsize);
+!     return 0;
+!   }
+! 
+!   return -1;
+! }
+! #endif
+! 
+! #include "ICC_tool_exception.h"
+! 
+! const char*
+! path_tail(const char* const s)
+! {
+!   const char* tail = strdup(s);
+!   const char* last_slash = strrchr(tail, '/');
+!   if (last_slash != NULL)
+!     tail = last_slash + 1;
+!   return tail;
+! }
+!     
+! void
+! vet_as_int(const char* const s, const string& name,
+!            const string& description)
+! {
+!   istringstream ss(s);
+!   int i;
+!   ss >> i;
+!   if (ss.fail())
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
+!       << " an integer.  It should be an integer representing "
+!       << description << ".";
+!     throw ICC_tool_exception(oss.str());
+!   }
+! }
+! 
+! void
+! vet_as_float(const char* const s, const string& name,
+!              const string& description)
+! {
+!   istringstream ss(s);
+!   float i;
+!   ss >> i;
+!   if (ss.fail())
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
+!       << " a floating-point number.  It should be a floating-point number"
+!       << " representing " << description << ".";
+!     throw ICC_tool_exception(oss.str());
+!   }
+! }
+! 
+! #define STRERROR_BUF_SIZE 256
+! off_t
+! get_size(const char* const s)
+! { 
+!   struct stat sb;
+!   int stat_returned = stat(s, &sb);
+!   if (stat_returned < 0)
+!   {
+!     int stat_errno = errno;
+!     char strerror_buf[STRERROR_BUF_SIZE];
+!     strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
+!     ostringstream oss;
+!     oss << "Could not access information for file `" << s << "': "
+!       << strerror_buf;
+!     throw ICC_tool_exception(oss.str());
+!   }
+!   return sb.st_size;
+! }
+! 
+! bool
+! check_mode(const char* const s, mode_t mode)
+! { 
+!   struct stat sb;
+!   int stat_returned = stat(s, &sb);
+!   if (stat_returned < 0)
+!   {
+!     int stat_errno = errno;
+!     char strerror_buf[STRERROR_BUF_SIZE];
+!     strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
+!     ostringstream oss;
+!     oss << "Could not access information for file `" << s << "': "
+!       << strerror_buf;
+!     throw ICC_tool_exception(oss.str());
+!   }
+!   return (sb.st_mode & mode) != 0;
+! }
+! 
+! bool
+! is_existent_file_pathname(const char* const s)
+! {
+!   struct stat sb;
+!   return stat(s, &sb) == 0;
+! }
+! 
+! bool
+! is_plain_file_pathname(const char* const s)
+! {
+!   return check_mode(s, S_IFREG);
+! }
+! 
+! bool
+! is_directory(const char* const s)
+! {
+!   return check_mode(s, S_IFDIR);
+! }
+! 
+! const char* const
+! containing_directory(const char* const s)
+! {
+!   if (strlen(s) == 0)
+!     throw ICC_tool_exception("name of directory passed to containing_directory"
+!                              " function was zero-length.");
+!   char* tmp = strdup(s);
+!   // lop off any trailing seperator
+!   if (tmp[strlen(tmp) - 1] == '/')
+!     tmp[strlen(tmp) - 1] = 0;
+!   if (strlen(tmp) == 0)
+!     throw ICC_tool_exception("root directory (which has no containing"
+!                              " directory) passed to containing_directory"
+!                              " function");
+!   char* idx = strrchr(tmp, '/');
+!   if (idx != NULL)
+!   {
+!     *idx = 0;
+!     return tmp;
+!   }
+!   char* current_directory = getenv("PWD");
+!   if (current_directory == NULL)
+!     throw ICC_tool_exception("pathname passed to containing_directory has no"
+!                              " embedded seperator, and there is no value for"
+!                              " PWD defined in the environment");
+!   return strdup(current_directory);
+! }
+! 
+! bool
+! is_readable_pathname(const char* const s)
+! {
+!   return check_mode(s, S_IRUSR)
+!   || check_mode(s, S_IRGRP)
+!   || check_mode(s, S_IROTH);
+! }
+! 
+! bool
+! is_writable_pathname(const char* const s)
+! {
+!   return check_mode(s, S_IWUSR)
+!   || check_mode(s, S_IWGRP)
+!   || check_mode(s, S_IWOTH);
+! }
+! 
+! bool
+! is_pathname_of_empty_file(const char* const s)
+! {
+!   return get_size(s) > 0;
+! }
+! 
+! void
+! vet_input_file_pathname(const char* const s, const string& name,
+!                         const string& description)
+! {
+!   if (! is_plain_file_pathname(s))
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+!       << " of a plain file (i.e. it is the pathname of a directory, or of a"
+!       << " symbolic link, or of some other sort of special file.)  It should be"
+!       << " " << description << ".";
+!     throw ICC_tool_exception(oss.str());
+!   }
+!   if (! is_readable_pathname(s))
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+!       << " of a readable file (i.e. you do not have permission to read that"
+!       << " file, or you do not have permission to read some directory"
+!       << " containing that file.";
+!       throw ICC_tool_exception(oss.str());
+!   }
+!   if (! is_pathname_of_empty_file(s))
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+!       << " of an existing readable file, but that file is of zero length."
+!       << " The argument should be " << description << ".";
+!     throw ICC_tool_exception(oss.str());
+!   }
+! }
+! 
+! void
+! vet_output_file_pathname(const char* const s, const string& name,
+!                          const string& description,
+!                          bool silent_overwrite_OK)
+! {
+!   const char* const container = containing_directory(s);
+!   if (! is_writable_pathname(container))
+!   {
+!     ostringstream oss;
+!     oss << "The " << name << " argument given, `" << s << "', has a directory"
+!       << " component which is not writable."
+!       << " The argument should be " << description << ".";
+!     throw ICC_tool_exception(oss.str());
+!   }
+!   if (is_existent_file_pathname(s))
+!   {
+!     if (is_plain_file_pathname(s))
+!       if (is_writable_pathname(s))
+!       {
+!         if (! silent_overwrite_OK)
+!         {
+!           ostringstream oss;
+!           oss << "The " << name << " argument given, `" << s << "' is of an existing"
+!             << " file."
+!             << " The argument should be " << description << ".";
+!           throw ICC_tool_exception(oss.str());
+!         }
+!       } else {
+!         ostringstream oss;
+!         oss << "The " << name << " argument given, `" << s << "' is of an existing"
+!           << " file which is not writable."
+!           << " The argument should be " << description << ".";
+!         throw ICC_tool_exception(oss.str());
+!       }
+!   }
+! }
+*** misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp	Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp	Fri Jan 25 14:23:09 2008
+***************
+*** 78,84 ****
+  #include "IccIO.h"
+  #include "IccUtil.h"
+  #include <stdlib.h>
+! #include <memory.h>
+  #include <string.h>
+  
+  #ifndef __max
+--- 78,84 ----
+  #include "IccIO.h"
+  #include "IccUtil.h"
+  #include <stdlib.h>
+! #include <memory>
+  #include <string.h>
+  
+  #ifndef __max
+*** misc/SampleICC-1.3.2/IccProfLib/IccIO.h	Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.h	Fri Jan 25 14:23:09 2008
+***************
+*** 79,84 ****
+--- 79,85 ----
+  #define _ICCIO_H
+  
+  #include "IccDefs.h"
++ #include "memory"
+  #include "stdio.h"
+  
+  #ifdef USESAMPLEICCNAMESPACE
+*** misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp	Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp	Fri Jan 25 14:23:09 2008
+***************
+*** 136,152 ****
+    icChar sigBuf[30];
+  
+    if (GetBAcsSig())
+!     sDescription += "ELEM_bACS\r\n";
+    else
+!     sDescription += "ELEM_eACS\r\n";
+  
+    icGetSig(sigBuf, m_signature);
+    sDescription += "  Signature = ";
+    sDescription += sigBuf;
+!   sDescription += "\r\n";
+  
+    if (m_pData) {
+!     sDescription += "\r\nData Follows:\r\n";
+  
+      icMemDump(sDescription, m_pData, m_nDataSize);
+    }
+--- 136,152 ----
+    icChar sigBuf[30];
+  
+    if (GetBAcsSig())
+!     sDescription += "ELEM_bACS\n";
+    else
+!     sDescription += "ELEM_eACS\n";
+  
+    icGetSig(sigBuf, m_signature);
+    sDescription += "  Signature = ";
+    sDescription += sigBuf;
+!   sDescription += "\n";
+  
+    if (m_pData) {
+!     sDescription += "\nData Follows:\n";
+  
+      icMemDump(sDescription, m_pData, m_nDataSize);
+    }
+*** misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp	Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp	Fri Jan 25 14:23:09 2008
+***************
+*** 218,249 ****
+    sprintf(buf, "%.8f", m_endPoint);
+    sDescription += buf;
+    }
+!   sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
+    sDescription += buf;
+  
+    switch(m_nFunctionType) {
+    case 0x0000:
+      if (m_params[1]==0.0 && m_params[2]==0.0)
+!       sprintf(buf, "Y = %.8f\r\n\r\n", m_params[3]);
+      else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
+!       sprintf(buf, "Y = X\r\n\r\n");
+      else if (m_params[0]==1.0 && m_params[2]==0.0)
+!       sprintf(buf, "Y = %.8f * X + %.8f\r\n\r\n", 
+                m_params[1], m_params[3]);
+      else
+!       sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\r\n\r\n", 
+                m_params[1], m_params[2], m_params[0], m_params[3]);
+      sDescription += buf;
+      return;
+  
+    case 0x0001:
+!     sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f)  + %.8f) + %.8f\r\n\r\n",
+              m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
+      sDescription += buf;
+      return;
+  
+    case 0x0002:
+!     sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\r\n\r\n",
+              m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
+      sDescription += buf;
+      return;
+--- 218,249 ----
+    sprintf(buf, "%.8f", m_endPoint);
+    sDescription += buf;
+    }
+!   sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
+    sDescription += buf;
+  
+    switch(m_nFunctionType) {
+    case 0x0000:
+      if (m_params[1]==0.0 && m_params[2]==0.0)
+!       sprintf(buf, "Y = %.8f\n\n", m_params[3]);
+      else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
+!       sprintf(buf, "Y = X\n\n");
+      else if (m_params[0]==1.0 && m_params[2]==0.0)
+!       sprintf(buf, "Y = %.8f * X + %.8f\n\n", 
+                m_params[1], m_params[3]);
+      else
+!       sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n", 
+                m_params[1], m_params[2], m_params[0], m_params[3]);
+      sDescription += buf;
+      return;
+  
+    case 0x0001:
+!     sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f)  + %.8f) + %.8f\n\n",
+              m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
+      sDescription += buf;
+      return;
+  
+    case 0x0002:
+!     sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
+              m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
+      sDescription += buf;
+      return;
+***************
+*** 250,260 ****
+  
+    default:
+      int i;
+!     sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
+      sDescription += buf;
+  
+      for (i=0; i<m_nParameters; i++) {
+!       sprintf(buf, "Param[%d] = %.8lf\r\n\r\n", i, m_params[i]);
+        sDescription += buf;
+      }
+    }
+--- 250,260 ----
+  
+    default:
+      int i;
+!     sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
+      sDescription += buf;
+  
+      for (i=0; i<m_nParameters; i++) {
+!       sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
+        sDescription += buf;
+      }
+    }
+***************
+*** 496,502 ****
+    if (m_nReserved || m_nReserved2) {
+      sReport += icValidateWarningMsg;
+      sReport += sSigName;
+!     sReport += " formula curve has non zero reserved data.\r\n";
+      rv = icValidateWarning;
+    }
+  
+--- 496,502 ----
+    if (m_nReserved || m_nReserved2) {
+      sReport += icValidateWarningMsg;
+      sReport += sSigName;
+!     sReport += " formula curve has non zero reserved data.\n";
+      rv = icValidateWarning;
+    }
+  
+***************
+*** 505,517 ****
+      if (!m_params || m_nParameters<4) {
+        sReport += icValidateCriticalErrorMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
+        rv = icValidateCriticalError;
+      }
+      else if (m_nParameters > 4) {
+        sReport += icValidateWarningMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
+        rv = icValidateWarning;
+      }
+      break;
+--- 505,517 ----
+      if (!m_params || m_nParameters<4) {
+        sReport += icValidateCriticalErrorMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
+        rv = icValidateCriticalError;
+      }
+      else if (m_nParameters > 4) {
+        sReport += icValidateWarningMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has too many formulaCurveSegment parameters.\n";
+        rv = icValidateWarning;
+      }
+      break;
+***************
+*** 520,532 ****
+      if (!m_params || m_nParameters<5) {
+        sReport += icValidateCriticalErrorMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
+        rv = icValidateCriticalError;
+      }
+      else if (m_nParameters > 5) {
+        sReport += icValidateWarningMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
+        rv = icValidateWarning;
+      }
+      break;
+--- 520,532 ----
+      if (!m_params || m_nParameters<5) {
+        sReport += icValidateCriticalErrorMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
+        rv = icValidateCriticalError;
+      }
+      else if (m_nParameters > 5) {
+        sReport += icValidateWarningMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has too many formulaCurveSegment parameters.\n";
+        rv = icValidateWarning;
+      }
+      break;
+***************
+*** 535,547 ****
+      if (!m_params || m_nParameters<5) {
+        sReport += icValidateCriticalErrorMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
+        rv = icValidateCriticalError;
+      }
+      else if (m_nParameters > 5) {
+        sReport += icValidateWarningMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
+        rv = icValidateWarning;
+      }
+      break;
+--- 535,547 ----
+      if (!m_params || m_nParameters<5) {
+        sReport += icValidateCriticalErrorMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
+        rv = icValidateCriticalError;
+      }
+      else if (m_nParameters > 5) {
+        sReport += icValidateWarningMsg;
+        sReport += sSigName;
+!       sReport += " formula curve has too many formulaCurveSegment parameters.\n";
+        rv = icValidateWarning;
+      }
+      break;
+***************
+*** 551,557 ****
+        icChar buf[128];
+        sReport += icValidateCriticalErrorMsg;
+        sReport += sSigName;
+!       sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\r\n", m_nFunctionType);
+        sReport += buf;
+        rv = icValidateCriticalError;
+      }
+--- 551,557 ----
+        icChar buf[128];
+        sReport += icValidateCriticalErrorMsg;
+        sReport += sSigName;
+!       sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
+        sReport += buf;
+        rv = icValidateCriticalError;
+      }
+***************
+*** 727,733 ****
+      sDescription += buf;
+      }
+  
+!     sprintf(buf, "]\r\n");
+      sDescription += buf;
+    }
+    else {
+--- 727,733 ----
+      sDescription += buf;
+      }
+  
+!     sprintf(buf, "]\n");
+      sDescription += buf;
+    }
+    else {
+***************
+*** 744,752 ****
+      sprintf(buf, "%.8f", m_endPoint);
+      sDescription += buf;
+      }
+!     sprintf(buf, "]\r\n");
+      sDescription += buf;
+!     sDescription += "IN  OUT\r\n";
+  
+      icUInt32Number i;
+  
+--- 744,752 ----
+      sprintf(buf, "%.8f", m_endPoint);
+      sDescription += buf;
+      }
+!     sprintf(buf, "]\n");
+      sDescription += buf;
+!     sDescription += "IN  OUT\n";
+  
+      icUInt32Number i;
+  
+***************
+*** 754,764 ****
+      icFloatNumber last = (icFloatNumber)(m_nCount-1);
+  
+      for (i=0; i<m_nCount; i++) {
+!       sprintf(buf, "%.8f %.8f\r\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
+        sDescription += buf;
+      }
+    }
+!   sDescription += "\r\n";
+  }
+  
+  /**
+--- 754,764 ----
+      icFloatNumber last = (icFloatNumber)(m_nCount-1);
+  
+      for (i=0; i<m_nCount; i++) {
+!       sprintf(buf, "%.8f %.8f\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
+        sDescription += buf;
+      }
+    }
+!   sDescription += "\n";
+  }
+  
+  /**
+***************
+*** 910,916 ****
+    if (m_nReserved) {
+      sReport += icValidateWarningMsg;
+      sReport += sSigName;
+!     sReport += " sampled curve has non zero reserved data.\r\n";
+      rv = icValidateWarning;
+    }
+  
+--- 910,916 ----
+    if (m_nReserved) {
+      sReport += icValidateWarningMsg;
+      sReport += sSigName;
+!     sReport += " sampled curve has non zero reserved data.\n";
+      rv = icValidateWarning;
+    }
+  
+***************
+*** 917,929 ****
+    if (m_nCount<2) {
+      sReport += icValidateCriticalErrorMsg;
+      sReport += sSigName;
+!     sReport += " sampled curve has too few sample points.\r\n";
+      rv = icValidateCriticalError;
+    }
+    else if (m_endPoint-m_startPoint == 0.0) {
+      sReport += icValidateWarningMsg;
+      sReport += sSigName;
+!     sReport += " sampled curve has a range of zero.\r\n";
+      rv = icMaxStatus(rv, icValidateWarning);
+    }
+  
+--- 917,929 ----
+    if (m_nCount<2) {
+      sReport += icValidateCriticalErrorMsg;
+      sReport += sSigName;
+!     sReport += " sampled curve has too few sample points.\n";
+      rv = icValidateCriticalError;
+    }
+    else if (m_endPoint-m_startPoint == 0.0) {
+      sReport += icValidateWarningMsg;
+      sReport += sSigName;
+!     sReport += " sampled curve has a range of zero.\n";
+      rv = icMaxStatus(rv, icValidateWarning);
+    }
+  
+***************
+*** 1054,1060 ****
+  {
+    CIccCurveSegmentList::iterator i;
+  
+!   sDescription += "BEGIN_CURVE\r\n";
+    for (i=m_list->begin(); i!=m_list->end(); i++) {
+      (*i)->Describe(sDescription);
+    }
+--- 1054,1060 ----
+  {
+    CIccCurveSegmentList::iterator i;
+  
+!   sDescription += "BEGIN_CURVE\n";
+    for (i=m_list->begin(); i!=m_list->end(); i++) {
+      (*i)->Describe(sDescription);
+    }
+***************
+*** 1342,1348 ****
+    if (m_nReserved1 || m_nReserved2) {
+      sReport += icValidateWarningMsg;
+      sReport += sSigName;
+!     sReport += " Segmented curve has non zero reserved data.\r\n";
+      rv = icValidateWarning;
+    }
+  
+--- 1342,1348 ----
+    if (m_nReserved1 || m_nReserved2) {
+      sReport += icValidateWarningMsg;
+      sReport += sSigName;
+!     sReport += " Segmented curve has non zero reserved data.\n";
+      rv = icValidateWarning;
+    }
+  
+***************
+*** 1349,1355 ****
+    if (m_list->size()==0) {
+      sReport += icValidateCriticalErrorMsg;
+      sReport += sSigName;
+!     sReport += " Has Empty CurveSegment!\r\n";
+      return icValidateCriticalError;
+    }
+  
+--- 1349,1355 ----
+    if (m_list->size()==0) {
+      sReport += icValidateCriticalErrorMsg;
+      sReport += sSigName;
+!     sReport += " Has Empty CurveSegment!\n";
+      return icValidateCriticalError;
+    }
+  
+***************
+*** 1599,1609 ****
+      icChar buf[81];
+      int i;
+  
+!     sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
+      sDescription += buf;
+  
+      for (i=0; i<m_nInputChannels; i++) {
+!       sprintf(buf, "Curve %d of %d\r\n", i+1, m_nInputChannels);
+        sDescription += buf;
+        if (m_curve[i]) {
+          m_curve[i]->Describe(sDescription);
+--- 1599,1609 ----
+      icChar buf[81];
+      int i;
+  
+!     sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
+      sDescription += buf;
+  
+      for (i=0; i<m_nInputChannels; i++) {
+!       sprintf(buf, "Curve %d of %d\n", i+1, m_nInputChannels);
+        sDescription += buf;
+        if (m_curve[i]) {
+          m_curve[i]->Describe(sDescription);
+***************
+*** 1877,1883 ****
+      sReport += " - Element ";
+      sSigName = Info.GetSigName(GetType());
+      sReport += sSigName;
+!     sReport += " Has Empty Curve Element(s)!\r\n";
+      return icValidateCriticalError;
+    }
+  
+--- 1877,1883 ----
+      sReport += " - Element ";
+      sSigName = Info.GetSigName(GetType());
+      sReport += sSigName;
+!     sReport += " Has Empty Curve Element(s)!\n";
+      return icValidateCriticalError;
+    }
+  
+***************
+*** 2042,2048 ****
+    int i, j;
+    icFloatNumber *data = m_pMatrix;
+  
+!   sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
+    sDescription += buf;
+  
+    for (j=0; j<m_nOutputChannels; j++) {
+--- 2042,2048 ----

[... 5702 lines stripped ...]


Mime
View raw message