[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-distro-pkg-dev
Subject: changeset in /hg/icedtea6: 2009-03-24 Lillian Angel <langel@re...
From: langel () redhat ! com (Lillian Angel)
Date: 2009-03-24 18:25:59
Message-ID: hg.294a48a8e60a.1237919159.2873452341184383832 () icedtea ! classpath ! org
[Download RAW message or body]
changeset 294a48a8e60a in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=294a48a8e60a
description:
2009-03-24 Lillian Angel <langel at redhat.com>
* patches/icedtea-lcms.patch: Reworked to patch lcms sources with most
recent upstream version (1.18).
diffstat:
2 files changed, 6294 insertions(+), 102 deletions(-)
ChangeLog | 5
patches/icedtea-lcms.patch | 6391 +++++++++++++++++++++++++++++++++++++++++++-
diffs (truncated from 6627 to 500 lines):
diff -r e091113be80d -r 294a48a8e60a ChangeLog
--- a/ChangeLog Tue Mar 24 14:15:51 2009 +0000
+++ b/ChangeLog Tue Mar 24 14:25:53 2009 -0400
@@ -1,3 +1,8 @@ 2009-03-24 Andrew John Hughes <ahughes
+2009-03-24 Lillian Angel <langel at redhat.com>
+
+ * patches/icedtea-lcms.patch: Reworked to patch lcms sources with most
+ recent upstream version (1.18).
+
2009-03-24 Andrew John Hughes <ahughes at redhat.com>
* patches/icedtea-6536193.patch,
diff -r e091113be80d -r 294a48a8e60a patches/icedtea-lcms.patch
--- a/patches/icedtea-lcms.patch Tue Mar 24 14:15:51 2009 +0000
+++ b/patches/icedtea-lcms.patch Tue Mar 24 14:25:53 2009 -0400
@@ -1,49 +1,1931 @@
---- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/lcms.h 2008-11-25 \
04:06:04.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/lcms.h 2009-03-20 \
11:12:53.000000000 -0400
-@@ -1445,7 +1445,17 @@
+diff -bBruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c \
openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c +--- \
openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2008-11-25 \
04:06:03.000000000 -0500 ++++ \
openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2009-03-24 \
14:11:33.000000000 -0400 +@@ -29,7 +29,7 @@
+ //
+ //
+ // Little cms
+-// Copyright (C) 1998-2006 Marti Maria
++// Copyright (C) 1998-2007 Marti Maria
+ //
+ // Permission is hereby granted, free of charge, to any person obtaining
+ // a copy of this software and associated documentation files (the "Software"),
+@@ -51,7 +51,7 @@
+
+
+
+-// CIECAM 02 appearance model
++// CIECAM 02 appearance model. Many thanks to Jordi Vilar for the debugging.
+
+ #include "lcms.h"
+
+@@ -196,6 +196,10 @@
+ clr.RGBpa[i] = (400.0 * temp) / (temp + 27.13) + 0.1;
+ }
+ }
++
++ clr.A = (((2.0 * clr.RGBpa[0]) + clr.RGBpa[1] +
++ (clr.RGBpa[2] / 20.0)) - 0.305) * pMod->Nbb;
++
+ return clr;
+ }
+
+@@ -249,9 +253,6 @@
+ clr.H = 300 + ((100*((clr.h - 237.53)/1.2)) / temp);
+ }
+
+- clr.A = (((2.0 * clr.RGBpa[0]) + clr.RGBpa[1] +
+- (clr.RGBpa[2] / 20.0)) - 0.305) * pMod->Nbb;
+-
+ clr.J = 100.0 * pow((clr.A / pMod->adoptedWhite.A),
+ (pMod->c * pMod->z));
+
+@@ -395,7 +396,7 @@
+ LPcmsCIECAM02 lpMod;
+
+
+- if((lpMod = (LPcmsCIECAM02) malloc(sizeof(cmsCIECAM02))) == NULL) {
++ if((lpMod = (LPcmsCIECAM02) _cmsMalloc(sizeof(cmsCIECAM02))) == NULL) {
+ return (LCMSHANDLE) NULL;
+ }
+
+@@ -449,14 +450,19 @@
+ lpMod -> z = compute_z(lpMod);
+ lpMod -> Nbb = computeNbb(lpMod);
+ lpMod -> FL = computeFL(lpMod);
++
++ if (lpMod -> D == D_CALCULATE ||
++ lpMod -> D == D_CALCULATE_DISCOUNT) {
++
+ lpMod -> D = computeD(lpMod);
++ }
++
+ lpMod -> Ncb = lpMod -> Nbb;
+
+ lpMod -> adoptedWhite = XYZtoCAT02(lpMod -> adoptedWhite);
+ lpMod -> adoptedWhite = ChromaticAdaptation(lpMod -> adoptedWhite, lpMod);
+ lpMod -> adoptedWhite = CAT02toHPE(lpMod -> adoptedWhite);
+ lpMod -> adoptedWhite = NonlinearCompression(lpMod -> adoptedWhite, lpMod);
+- lpMod -> adoptedWhite = ComputeCorrelates(lpMod -> adoptedWhite, lpMod);
+
+ return (LCMSHANDLE) lpMod;
+
+@@ -465,7 +471,7 @@
+ void LCMSEXPORT cmsCIECAM02Done(LCMSHANDLE hModel)
+ {
+ LPcmsCIECAM02 lpMod = (LPcmsCIECAM02) (LPSTR) hModel;
+- if (lpMod) free(lpMod);
++ if (lpMod) _cmsFree(lpMod);
+ }
+
+
+diff -bBruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c \
openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c +--- \
openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c 2008-11-25 \
04:06:03.000000000 -0500 ++++ \
openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c 2009-03-24 \
14:16:55.000000000 -0400 +@@ -29,7 +29,7 @@
+ //
+ //
+ // Little cms
+-// Copyright (C) 1998-2006 Marti Maria
++// Copyright (C) 1998-2007 Marti Maria
+ //
+ // Permission is hereby granted, free of charge, to any person obtaining
+ // a copy of this software and associated documentation files (the "Software"),
+@@ -174,7 +174,7 @@
+ LCMSAPI void LCMSEXPORT cmsCIECAM97sDone(LCMSHANDLE hModel)
+ {
+ LPcmsCIECAM97s lpMod = (LPcmsCIECAM97s) (LPSTR) hModel;
+- if (lpMod) free(lpMod);
++ if (lpMod) _cmsFree(lpMod);
+ }
+
+ // Partial discounting for adaptation degree computation
+@@ -331,7 +331,7 @@
+ LPcmsCIECAM97s lpMod;
+ VEC3 tmp;
+
+- if((lpMod = (LPcmsCIECAM97s) malloc(sizeof(cmsCIECAM97s))) == NULL) {
++ if((lpMod = (LPcmsCIECAM97s) _cmsMalloc(sizeof(cmsCIECAM97s))) == NULL) {
+ return (LCMSHANDLE) NULL;
+ }
+
+@@ -449,7 +449,7 @@
+
+ // RGB_subw = [MlamRigg][WP/YWp]
+ #ifdef USE_CIECAM97s2
+- MAT3eval(&lpMod -> RGB_subw, &lpMod -> MlamRigg, (LPVEC3) &lpMod -> WP);
++ MAT3eval(&lpMod -> RGB_subw, &lpMod -> MlamRigg, &lpMod -> WP);
+ #else
+ VEC3divK(&tmp, (LPVEC3) &lpMod -> WP, lpMod->WP.Y);
+ MAT3eval(&lpMod -> RGB_subw, &lpMod -> MlamRigg, &tmp);
+diff -bBruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c \
openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c +--- \
openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2008-11-25 \
04:06:03.000000000 -0500 ++++ \
openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2009-03-24 \
14:17:09.000000000 -0400 +@@ -29,7 +29,7 @@
+ //
+ //
+ // Little cms
+-// Copyright (C) 1998-2006 Marti Maria
++// Copyright (C) 1998-2007 Marti Maria
+ //
+ // Permission is hereby granted, free of charge, to any person obtaining
+ // a copy of this software and associated documentation files (the "Software"),
+@@ -65,22 +65,25 @@
+ // Persistence
+ LCMSAPI LCMSHANDLE LCMSEXPORT cmsIT8LoadFromFile(const char* cFileName);
+ LCMSAPI LCMSHANDLE LCMSEXPORT cmsIT8LoadFromMem(void *Ptr, size_t len);
+-LCMSAPI BOOL LCMSEXPORT cmsIT8SaveToFile(LCMSHANDLE IT8, const char* \
cFileName); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SaveToFile(LCMSHANDLE IT8, \
const char* cFileName); +
+ // Properties
+ LCMSAPI const char* LCMSEXPORT cmsIT8GetSheetType(LCMSHANDLE hIT8);
+-LCMSAPI BOOL LCMSEXPORT cmsIT8SetSheetType(LCMSHANDLE hIT8, const char* \
Type); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetSheetType(LCMSHANDLE hIT8, const \
char* Type); +
+-LCMSAPI BOOL LCMSEXPORT cmsIT8SetComment(LCMSHANDLE hIT8, const char* \
cComment); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetComment(LCMSHANDLE hIT8, \
const char* cComment); +
+-LCMSAPI BOOL LCMSEXPORT cmsIT8SetPropertyStr(LCMSHANDLE hIT8, const \
char* cProp, const char *Str); +-LCMSAPI BOOL LCMSEXPORT \
cmsIT8SetPropertyDbl(LCMSHANDLE hIT8, const char* cProp, double Val); +-LCMSAPI BOOL \
LCMSEXPORT cmsIT8SetPropertyHex(LCMSHANDLE hIT8, const char* cProp, int Val); \
+-LCMSAPI BOOL LCMSEXPORT cmsIT8SetPropertyUncooked(LCMSHANDLE hIT8, const \
char* Key, const char* Buffer); ++LCMSAPI LCMSBOOL LCMSEXPORT \
cmsIT8SetPropertyStr(LCMSHANDLE hIT8, const char* cProp, const char *Str); ++LCMSAPI \
LCMSBOOL LCMSEXPORT cmsIT8SetPropertyDbl(LCMSHANDLE hIT8, const char* cProp, \
double Val); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetPropertyHex(LCMSHANDLE \
hIT8, const char* cProp, int Val); ++LCMSAPI LCMSBOOL LCMSEXPORT \
cmsIT8SetPropertyMulti(LCMSHANDLE hIT8, const char* cProp, const char* cSubProp, \
const char *Val); ++LCMSAPI LCMSBOOL LCMSEXPORT \
cmsIT8SetPropertyUncooked(LCMSHANDLE hIT8, const char* Key, const char* Buffer); +
+ LCMSAPI const char* LCMSEXPORT cmsIT8GetProperty(LCMSHANDLE hIT8, const char* \
cProp); + LCMSAPI double LCMSEXPORT cmsIT8GetPropertyDbl(LCMSHANDLE hIT8, \
const char* cProp); +-LCMSAPI int LCMSEXPORT \
cmsIT8EnumProperties(LCMSHANDLE IT8, char ***PropertyNames); ++LCMSAPI const char* \
LCMSEXPORT cmsIT8GetPropertyMulti(LCMSHANDLE hIT8, const char* cProp, const char \
*cSubProp); ++LCMSAPI int LCMSEXPORT cmsIT8EnumProperties(LCMSHANDLE IT8, \
const char ***PropertyNames); ++LCMSAPI int LCMSEXPORT \
cmsIT8EnumPropertyMulti(LCMSHANDLE hIT8, const char* cProp, const char*** \
SubpropertyNames); +
+ // Datasets
+
+@@ -89,10 +92,10 @@
+ LCMSAPI const char* LCMSEXPORT cmsIT8GetDataRowCol(LCMSHANDLE IT8, int row, int \
col); + LCMSAPI double LCMSEXPORT cmsIT8GetDataRowColDbl(LCMSHANDLE IT8, int \
col, int row); +
+-LCMSAPI BOOL LCMSEXPORT cmsIT8SetDataRowCol(LCMSHANDLE hIT8, int row, \
int col, ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetDataRowCol(LCMSHANDLE hIT8, \
int row, int col, + const char* \
Val); +
+-LCMSAPI BOOL LCMSEXPORT cmsIT8SetDataRowColDbl(LCMSHANDLE hIT8, int row, \
int col, ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetDataRowColDbl(LCMSHANDLE hIT8, \
int row, int col, + double Val);
+
+ LCMSAPI const char* LCMSEXPORT cmsIT8GetData(LCMSHANDLE IT8, const char* \
cPatch, const char* cSample); +@@ -100,15 +103,15 @@
+
+ LCMSAPI double LCMSEXPORT cmsIT8GetDataDbl(LCMSHANDLE IT8, const char* \
cPatch, const char* cSample); +
+-LCMSAPI BOOL LCMSEXPORT cmsIT8SetData(LCMSHANDLE IT8, const char* \
cPatch, ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetData(LCMSHANDLE IT8, const \
char* cPatch, + const char* cSample,
+ const char *Val);
+
+-LCMSAPI BOOL LCMSEXPORT cmsIT8SetDataDbl(LCMSHANDLE hIT8, const char* \
cPatch, ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetDataDbl(LCMSHANDLE hIT8, const \
char* cPatch, + const char* cSample,
+ double Val);
+
+-LCMSAPI BOOL LCMSEXPORT cmsIT8SetDataFormat(LCMSHANDLE IT8, int n, const \
char *Sample); ++LCMSAPI LCMSBOOL LCMSEXPORT cmsIT8SetDataFormat(LCMSHANDLE \
IT8, int n, const char *Sample); + LCMSAPI int LCMSEXPORT \
cmsIT8EnumDataFormat(LCMSHANDLE IT8, char ***SampleNames); +
+ LCMSAPI void LCMSEXPORT cmsIT8DefineDblFormat(LCMSHANDLE IT8, const \
char* Formatter); +@@ -126,7 +129,7 @@
+ // #define STRICT_CGATS 1
+
+ #define MAXID 128 // Max lenght of identifier
+-#define MAXSTR 255 // Max lenght of string
++#define MAXSTR 1024 // Max lenght of string
+ #define MAXTABLES 255 // Max Number of tables in a single stream
+ #define MAXINCLUDE 20 // Max number of nested includes
+
+@@ -137,6 +140,9 @@
+
+ #ifndef NON_WINDOWS
+ #include <io.h>
++#define DIR_CHAR '\\'
++#else
++#define DIR_CHAR '/'
#endif
- }
-
--
-+LCMS_INLINE void* _cmsCalloc(size_t nmemb, size_t size)
+
+ // Symbols
+@@ -160,6 +166,7 @@
+ SEND_DATA,
+ SEND_DATA_FORMAT,
+ SKEYWORD,
++ SDATA_FORMAT_ID,
+ SINCLUDE
+
+ } SYMBOL;
+@@ -171,7 +178,8 @@
+ WRITE_UNCOOKED,
+ WRITE_STRINGIFY,
+ WRITE_HEXADECIMAL,
+- WRITE_BINARY
++ WRITE_BINARY,
++ WRITE_PAIR
+
+ } WRITEMODE;
+
+@@ -181,6 +189,8 @@
+
+ struct _KeyVal* Next;
+ char* Keyword; // Name of variable
++ struct _KeyVal* NextSubkey; // If key is a dictionary, points to the \
next item ++ char* Subkey; // If key is a dictionary, points \
to the subkey name + char* Value; // Points to value
+ WRITEMODE WriteAs; // How to write the value
+
+@@ -220,7 +230,12 @@
+
+ } TABLE, *LPTABLE;
+
++// File stream being parsed
+
++typedef struct _FileContext {
++ char FileName[MAX_PATH]; // File name if being readed from \
file ++ FILE* Stream; // File stream or NULL if holded \
in memory ++ } FILECTX, *LPFILECTX;
+
+ // This struct hold all information about an openened
+ // IT8 handler. Only one dataset is allowed.
+@@ -257,9 +272,9 @@
+ char* Source; // Points to loc. being parsed
+ int lineno; // line counter for error reporting
+
+- char FileName[MAX_PATH]; // File name if being readed from \
file +- FILE* Stream[MAXINCLUDE]; // File stream or NULL if holded \
in memory ++ LPFILECTX FileStack[MAXINCLUDE]; // Stack of files being \
parsed + int IncludeSP; // Include Stack Pointer
++
+ char* MemoryBlock; // The stream if holded in memory
+
+ char DoubleFormatter[MAXID]; // Printf-like 'double' formatter
+@@ -298,6 +313,7 @@
+ {".INCLUDE", SINCLUDE},
+ {"BEGIN_DATA", SBEGIN_DATA },
+ {"BEGIN_DATA_FORMAT", SBEGIN_DATA_FORMAT },
++ {"DATA_FORMAT_IDENTIFIER", SDATA_FORMAT_ID},
+ {"END_DATA", SEND_DATA},
+ {"END_DATA_FORMAT", SEND_DATA_FORMAT},
+ {"KEYWORD", SKEYWORD}
+@@ -308,49 +324,94 @@
+
+ // Predefined properties
+
+-static const char* PredefinedProperties[] = {
++// A property
++typedef struct {
++ const char *id;
++ WRITEMODE as;
++ } PROPERTY;
++
++static PROPERTY PredefinedProperties[] = {
+
+- "NUMBER_OF_FIELDS", // Required - NUMBER OF FIELDS
+- "NUMBER_OF_SETS", // Required - NUMBER OF SETS
+- "ORIGINATOR", // Required - Identifies the specific system, \
organization or individual that created the data file. +- "FILE_DESCRIPTOR", \
// Required - Describes the purpose or contents of the data file. +- \
"CREATED", // Required - Indicates date of creation of the data file. +- \
"DESCRIPTOR", // Required - Describes the purpose or contents of the data \
file. +- "DIFFUSE_GEOMETRY", // The diffuse geometry used. Allowed values \
are "sphere" or "opal". +- "MANUFACTURER",
+- "MANUFACTURE", // Some broken Fuji targets does store this value
+- "PROD_DATE", // Identifies year and month of production of the \
target in the form yyyy:mm. +- "SERIAL", // Uniquely identifies \
individual physical target. ++ {"NUMBER_OF_FIELDS", WRITE_UNCOOKED}, // \
Required - NUMBER OF FIELDS ++ {"NUMBER_OF_SETS", WRITE_UNCOOKED}, // \
Required - NUMBER OF SETS ++ {"ORIGINATOR", WRITE_STRINGIFY}, // \
Required - Identifies the specific system, organization or individual that created \
the data file. ++ {"FILE_DESCRIPTOR", WRITE_STRINGIFY}, // Required - \
Describes the purpose or contents of the data file. ++ {"CREATED", \
WRITE_STRINGIFY}, // Required - Indicates date of creation of the data file. ++ \
{"DESCRIPTOR", WRITE_STRINGIFY}, // Required - Describes the purpose or \
contents of the data file. ++ {"DIFFUSE_GEOMETRY", WRITE_STRINGIFY}, // The \
diffuse geometry used. Allowed values are "sphere" or "opal". ++ \
{"MANUFACTURER", WRITE_STRINGIFY}, ++ {"MANUFACTURE", \
WRITE_STRINGIFY}, // Some broken Fuji targets does store this value ++ \
{"PROD_DATE", WRITE_STRINGIFY}, // Identifies year and month of production \
of the target in the form yyyy:mm. ++ {"SERIAL", WRITE_STRINGIFY}, \
// Uniquely identifies individual physical target. +
+- "MATERIAL", // Identifies the material on which the target was \
produced using a code ++ {"MATERIAL", WRITE_STRINGIFY}, // \
Identifies the material on which the target was produced using a code + \
// uniquely identifying th e material. This is intend ed to be used for IT8.7 + \
// physical targets only (i.e . IT8.7/1 a nd IT8.7/2). +
+- "INSTRUMENTATION", // Used to report the specific instrumentation used \
(manufacturer and ++ {"INSTRUMENTATION", WRITE_STRINGIFY}, // Used to \
report the specific instrumentation used (manufacturer and + \
// model number) to generate the data reported. This data will often + \
// provide more information about the particular data collected than an + \
// extensive list of specific details. This is particularly important for + \
// spectral data or data derived from spectrophotometry. +
+- "MEASUREMENT_SOURCE", // Illumination used for spectral measurements. This \
data helps provide ++ {"MEASUREMENT_SOURCE", WRITE_STRINGIFY}, // Illumination \
used for spectral measurements. This data helps provide + \
// a guide to the potential for issues of paper fluorescence, etc. +
+- "PRINT_CONDITIONS", // Used to define the characteristics of the printed \
sheet being reported. ++ {"PRINT_CONDITIONS", WRITE_STRINGIFY}, // Used to \
define the characteristics of the printed sheet being reported. + \
// Where standard conditions have been defined (e.g., SWOP at nominal) + \
// named conditions may suffice. Otherwise, detailed information is + \
// needed. +
+- "SAMPLE_BACKING", // Identifies the backing material used behind the \
sample during +- // measurement. Allowed values are \
?black?, ?white?, or "na". ++ {"SAMPLE_BACKING", WRITE_STRINGIFY}, // \
Identifies the backing material used behind the sample during ++ \
// measurement. Allowed values are ?black?, ?white?, or {"na". +
+- "CHISQ_DOF" // Degrees of freedom associated with the Chi \
squared statistic ++ {"CHISQ_DOF", WRITE_STRINGIFY}, // Degrees of \
freedom associated with the Chi squared statistic ++
++// new in recent specs:
++ {"MEASUREMENT_GEOMETRY", WRITE_STRINGIFY}, // The type of measurement, \
either reflection or transmission, should be indicated ++ \
// along with details of the geometry and the aperture size and shape. For example, \
++ // for transmission measurements it is important to \
identify 0/diffuse, diffuse/0, ++ // opal or \
integrating sphere, etc. For reflection it is important to identify 0/45, ++ \
// 45/0, sphere (specular included or excluded), etc. ++
++ {"FILTER", WRITE_STRINGIFY}, // Identifies the use of physical \
filter(s) during measurement. Typically used to ++ // \
denote the use of filters such as none, D65, Red, Green or Blue. ++
++ {"POLARIZATION", WRITE_STRINGIFY}, // Identifies the use of a \
physical polarization filter during measurement. Allowed ++ \
// values are {"yes?, ?white?, ?none? or ?na?. ++
++ {"WEIGHTING_FUNCTION", WRITE_PAIR}, // Indicates such functions as: the \
CIE standard observer functions used in the ++ // \
calculation of various data parameters (2 degree and 10 degree), CIE standard ++ \
// illuminant functions used in the calculation of various data parameters (e.g., \
D50, ++ // D65, etc.), density status response, etc. If \
used there shall be at least one ++ // name-value pair \
following the WEIGHTING_FUNCTION tag/keyword. The first attribute ++ \
// in the set shall be {"name" and shall identify the particular parameter used. ++ \
// The second shall be {"value" and shall provide the value associated with that \
name. ++ // For ASCII data, a string containing the \
Name and Value attribute pairs shall follow ++ // the \
weighting function keyword. A semi-colon separates attribute pairs from each ++ \
// other and within the attribute the name and value are separated by a comma. ++
++ {"COMPUTATIONAL_PARAMETER", WRITE_PAIR}, // Parameter that is used in \
computing a value from measured data. Name is the name ++ \
// of the calculation, parameter is the name of the parameter used in the calculation \
++ // and value is the value of the parameter.
++
++ {"TARGET_TYPE", WRITE_STRINGIFY}, // The type of target being \
measured, e.g. IT8.7/1, IT8.7/3, user defined, etc. ++
++ {"COLORANT", WRITE_STRINGIFY}, // Identifies the colorant(s) used \
in creating the target. ++
++ {"TABLE_DESCRIPTOR", WRITE_STRINGIFY}, // Describes the purpose or \
contents of a data table. ++
++ {"TABLE_NAME", WRITE_STRINGIFY} // Provides a short name for a \
data table. + };
+
+-#define NUMPREDEFINEDPROPS (sizeof(PredefinedProperties)/sizeof(char *))
++#define NUMPREDEFINEDPROPS (sizeof(PredefinedProperties)/sizeof(PROPERTY))
+
+
+ // Predefined sample types on dataset
+ static const char* PredefinedSampleID[] = {
++ "SAMPLE_ID", // Identifies sample that data represents
++ "STRING", // Identifies label, or other non-machine readable value. \
++ // Value must begin and end with a " symbol
+
+ "CMYK_C", // Cyan component of CMYK data expressed as a percentage
+ "CMYK_M", // Magenta component of CMYK data expressed as a \
percentage +@@ -378,7 +439,7 @@
+ "LAB_B", // b* component of Lab data
+ "LAB_C", // C*ab component of Lab data
+ "LAB_H", // hab component of Lab data
+- "LAB_DE" // CIE dE
++ "LAB_DE", // CIE dE
+ "LAB_DE_94", // CIE dE using CIE 94
+ "LAB_DE_CMC", // dE using CMC
+ "LAB_DE_2000", // CIE dE using CIE DE 2000
+@@ -388,7 +449,7 @@
+ "STDEV_Y", // Standard deviation of Y (tristimulus data)
+ "STDEV_Z", // Standard deviation of Z (tristimulus data)
+ "STDEV_L", // Standard deviation of L*
+- "STDEV_A" // Standard deviation of a*
++ "STDEV_A", // Standard deviation of a*
+ "STDEV_B", // Standard deviation of b*
+ "STDEV_DE", // Standard deviation of CIE dE
+ "CHI_SQD_PAR"}; // The average of the standard deviations of L*, a* and \
b*. It is +@@ -397,9 +458,13 @@
+
+ #define NUMPREDEFINEDSAMPLEID (sizeof(PredefinedSampleID)/sizeof(char *))
+
++//Forward declaration of some internal functions
++static
++void* AllocChunk(LPIT8 it8, size_t size);
++
+ // Checks if c is a separator
+ static
+-BOOL isseparator(int c)
++LCMSBOOL isseparator(int c)
+ {
+ return (c == ' ') || (c == '\t') || (c == '\r');
+ }
+@@ -405,49 +470,107 @@
+ }
+
+ // Checks whatever if c is a valid identifier char
+-
+ static
+-BOOL ismiddle(int c)
++LCMSBOOL ismiddle(int c)
+ {
+ return (!isseparator(c) && (c != '#') && (c !='\"') && (c != '\'') && (c > 32) \
&& (c < 127)); + }
+
+ // Checks whatsever if c is a valid identifier middle char.
+ static
+-BOOL isidchar(int c)
++LCMSBOOL isidchar(int c)
+ {
+ return isalnum(c) || ismiddle(c);
+ }
+
+ // Checks whatsever if c is a valid identifier first char.
+ static
+-BOOL isfirstidchar(int c)
++LCMSBOOL isfirstidchar(int c)
+ {
+ return !isdigit(c) && ismiddle(c);
+ }
+
++// checks whether the supplied path looks like an absolute path
++// NOTE: this function doesn't checks if the path exists or even if it's legal
++static
++LCMSBOOL isabsolutepath(const char *path)
+{
-+ size_t alloc = nmemb * size;
-+ if (size == 0) {
-+ return malloc(0);
++ if(path == NULL)
++ return FALSE;
++
++ if(path[0] == DIR_CHAR)
++ return TRUE;
++
++#ifndef NON_WINDOWS
++ if(isalpha(path[0]) && path[1] == ':')
++ return TRUE;
++#endif
++ return FALSE;
++}
++
++// Makes a file path based on a given reference path
++// NOTE: buffer is assumed to point to at least MAX_PATH bytes
++// NOTE: both relPath and basePath are assumed to be no more than MAX_PATH \
characters long (including the null terminator!)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic