Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
e868fbbf
Commit
e868fbbf
authored
Aug 27, 2016
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update xcms files to libX11 1.3.4
parent
27492905
Show whitespace changes
Inline
Side-by-side
Showing
64 changed files
with
433 additions
and
320 deletions
+433
-320
AddDIC.c
nx-X11/lib/X11/AddDIC.c
+1
-2
AddSF.c
nx-X11/lib/X11/AddSF.c
+1
-2
CCC.c
nx-X11/lib/X11/CCC.c
+13
-15
CvColW.c
nx-X11/lib/X11/CvColW.c
+0
-0
CvCols.c
nx-X11/lib/X11/CvCols.c
+6
-6
HVC.c
nx-X11/lib/X11/HVC.c
+27
-10
HVCGcC.c
nx-X11/lib/X11/HVCGcC.c
+6
-6
HVCGcV.c
nx-X11/lib/X11/HVCGcV.c
+6
-6
HVCGcVC.c
nx-X11/lib/X11/HVCGcVC.c
+6
-6
HVCMnV.c
nx-X11/lib/X11/HVCMnV.c
+5
-5
HVCMxC.c
nx-X11/lib/X11/HVCMxC.c
+5
-5
HVCMxV.c
nx-X11/lib/X11/HVCMxV.c
+5
-5
HVCMxVC.c
nx-X11/lib/X11/HVCMxVC.c
+4
-4
HVCMxVs.c
nx-X11/lib/X11/HVCMxVs.c
+5
-5
HVCWpAj.c
nx-X11/lib/X11/HVCWpAj.c
+8
-9
IdOfPr.c
nx-X11/lib/X11/IdOfPr.c
+1
-2
LRGB.c
nx-X11/lib/X11/LRGB.c
+32
-15
Lab.c
nx-X11/lib/X11/Lab.c
+27
-10
LabGcC.c
nx-X11/lib/X11/LabGcC.c
+6
-6
LabGcL.c
nx-X11/lib/X11/LabGcL.c
+6
-6
LabGcLC.c
nx-X11/lib/X11/LabGcLC.c
+6
-6
LabMnL.c
nx-X11/lib/X11/LabMnL.c
+5
-5
LabMxC.c
nx-X11/lib/X11/LabMxC.c
+5
-5
LabMxL.c
nx-X11/lib/X11/LabMxL.c
+5
-5
LabMxLC.c
nx-X11/lib/X11/LabMxLC.c
+4
-4
LabWpAj.c
nx-X11/lib/X11/LabWpAj.c
+8
-9
Luv.c
nx-X11/lib/X11/Luv.c
+27
-10
LuvGcC.c
nx-X11/lib/X11/LuvGcC.c
+6
-6
LuvGcL.c
nx-X11/lib/X11/LuvGcL.c
+6
-6
LuvGcLC.c
nx-X11/lib/X11/LuvGcLC.c
+6
-6
LuvMnL.c
nx-X11/lib/X11/LuvMnL.c
+5
-5
LuvMxC.c
nx-X11/lib/X11/LuvMxC.c
+5
-5
LuvMxL.c
nx-X11/lib/X11/LuvMxL.c
+5
-5
LuvMxLC.c
nx-X11/lib/X11/LuvMxLC.c
+4
-4
LuvWpAj.c
nx-X11/lib/X11/LuvWpAj.c
+8
-9
OfCCC.c
nx-X11/lib/X11/OfCCC.c
+10
-10
PrOfId.c
nx-X11/lib/X11/PrOfId.c
+2
-2
QBlack.c
nx-X11/lib/X11/QBlack.c
+4
-4
QBlue.c
nx-X11/lib/X11/QBlue.c
+4
-4
QGreen.c
nx-X11/lib/X11/QGreen.c
+4
-4
QRed.c
nx-X11/lib/X11/QRed.c
+4
-4
QWhite.c
nx-X11/lib/X11/QWhite.c
+4
-4
QuCol.c
nx-X11/lib/X11/QuCol.c
+5
-5
QuCols.c
nx-X11/lib/X11/QuCols.c
+6
-6
SetCCC.c
nx-X11/lib/X11/SetCCC.c
+3
-3
SetGetCols.c
nx-X11/lib/X11/SetGetCols.c
+0
-0
StCol.c
nx-X11/lib/X11/StCol.c
+4
-4
StCols.c
nx-X11/lib/X11/StCols.c
+6
-7
UNDEFINED.c
nx-X11/lib/X11/UNDEFINED.c
+0
-0
XRGB.c
nx-X11/lib/X11/XRGB.c
+0
-0
XYZ.c
nx-X11/lib/X11/XYZ.c
+17
-0
Xcmsint.h
nx-X11/lib/X11/Xcmsint.h
+0
-0
cmsAllCol.c
nx-X11/lib/X11/cmsAllCol.c
+5
-5
cmsAllNCol.c
nx-X11/lib/X11/cmsAllNCol.c
+0
-0
cmsCmap.c
nx-X11/lib/X11/cmsCmap.c
+13
-13
cmsColNm.c
nx-X11/lib/X11/cmsColNm.c
+9
-2
cmsGlobls.c
nx-X11/lib/X11/cmsGlobls.c
+0
-0
cmsInt.c
nx-X11/lib/X11/cmsInt.c
+0
-0
cmsLkCol.c
nx-X11/lib/X11/cmsLkCol.c
+0
-0
cmsMath.c
nx-X11/lib/X11/cmsMath.c
+2
-4
cmsProp.c
nx-X11/lib/X11/cmsProp.c
+0
-0
cmsTrig.c
nx-X11/lib/X11/cmsTrig.c
+2
-4
uvY.c
nx-X11/lib/X11/uvY.c
+27
-10
xyY.c
nx-X11/lib/X11/xyY.c
+27
-10
No files found.
nx-X11/lib/X11/AddDIC.c
View file @
e868fbbf
...
...
@@ -55,8 +55,7 @@
* SYNOPSIS
*/
Status
XcmsAddColorSpace
(
pCS
)
XcmsColorSpace
*
pCS
;
XcmsAddColorSpace
(
XcmsColorSpace
*
pCS
)
/*
* DESCRIPTION
* DI Color Spaces are managed on a global basis.
...
...
nx-X11/lib/X11/AddSF.c
View file @
e868fbbf
...
...
@@ -55,8 +55,7 @@
* SYNOPSIS
*/
Status
XcmsAddFunctionSet
(
pNewFS
)
XcmsFunctionSet
*
pNewFS
;
XcmsAddFunctionSet
(
XcmsFunctionSet
*
pNewFS
)
/*
* DESCRIPTION
* Additional Screen Color Characterization Function Sets are
...
...
nx-X11/lib/X11/CCC.c
View file @
e868fbbf
...
...
@@ -85,16 +85,15 @@ from The Open Group.
*/
XcmsCCC
XcmsCreateCCC
(
dpy
,
screenNumber
,
visual
,
clientWhitePt
,
gamutCompProc
,
gamutCompClientData
,
whitePtAdjProc
,
whitePtAdjClientData
)
Display
*
dpy
;
int
screenNumber
;
Visual
*
visual
;
XcmsColor
*
clientWhitePt
;
XcmsCompressionProc
gamutCompProc
;
XPointer
gamutCompClientData
;
XcmsWhiteAdjustProc
whitePtAdjProc
;
XPointer
whitePtAdjClientData
;
XcmsCreateCCC
(
Display
*
dpy
,
int
screenNumber
,
Visual
*
visual
,
XcmsColor
*
clientWhitePt
,
XcmsCompressionProc
gamutCompProc
,
XPointer
gamutCompClientData
,
XcmsWhiteAdjustProc
whitePtAdjProc
,
XPointer
whitePtAdjClientData
)
/*
* DESCRIPTION
* Given a Display, Screen, Visual, etc., this routine creates
...
...
@@ -172,9 +171,9 @@ XcmsCreateCCC(dpy, screenNumber, visual, clientWhitePt, gamutCompProc,
* SYNOPSIS
*/
XcmsCCC
XcmsDefaultCCC
(
dpy
,
screenNumber
)
Display
*
dpy
;
int
screenNumber
;
XcmsDefaultCCC
(
Display
*
dpy
,
int
screenNumber
)
/*
* DESCRIPTION
* Given a Display and Screen, this routine creates
...
...
@@ -254,8 +253,7 @@ XcmsDefaultCCC(dpy, screenNumber)
* SYNOPSIS
*/
void
XcmsFreeCCC
(
ccc
)
XcmsCCC
ccc
;
XcmsFreeCCC
(
XcmsCCC
ccc
)
/*
* DESCRIPTION
* Frees memory associated with a Color Conversion Context
...
...
nx-X11/lib/X11/CvColW.c
View file @
e868fbbf
nx-X11/lib/X11/CvCols.c
View file @
e868fbbf
...
...
@@ -712,12 +712,12 @@ Continue:
* SYNOPSIS
*/
Status
XcmsConvertColors
(
ccc
,
pColors_in_out
,
nColors
,
targetFormat
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsColorFormat
targetFormat
;
Bool
*
pCompressed
;
XcmsConvertColors
(
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
XcmsColorFormat
targetFormat
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Convert XcmsColor structures to another format
...
...
nx-X11/lib/X11/HVC.c
View file @
e868fbbf
...
...
@@ -198,6 +198,23 @@ TekHVC_ParseString(
&
pColor
->
spec
.
TekHVC
.
H
,
&
pColor
->
spec
.
TekHVC
.
V
,
&
pColor
->
spec
.
TekHVC
.
C
)
!=
3
)
{
char
*
s
;
/* Maybe failed due to locale */
int
f
;
if
((
s
=
strdup
(
spec
)))
{
for
(
f
=
0
;
s
[
f
];
++
f
)
if
(
s
[
f
]
==
'.'
)
s
[
f
]
=
','
;
else
if
(
s
[
f
]
==
','
)
s
[
f
]
=
'.'
;
if
(
sscanf
(
s
+
n
+
1
,
"%lf/%lf/%lf"
,
&
pColor
->
spec
.
TekHVC
.
H
,
&
pColor
->
spec
.
TekHVC
.
V
,
&
pColor
->
spec
.
TekHVC
.
C
)
!=
3
)
{
free
(
s
);
return
(
XcmsFailure
);
}
free
(
s
);
}
else
return
(
XcmsFailure
);
}
pColor
->
format
=
XcmsTekHVCFormat
;
...
...
@@ -310,11 +327,11 @@ XcmsTekHVC_ValidSpec(
* SYNOPSIS
*/
Status
XcmsTekHVCToCIEuvY
(
ccc
,
pHVC_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCCC
ccc
;
XcmsColor
*
pHVC_WhitePt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsTekHVCToCIEuvY
(
XcmsCCC
ccc
,
XcmsColor
*
pHVC_WhitePt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
)
/*
* DESCRIPTION
* Transforms an array of TekHVC color specifications, given
...
...
@@ -431,11 +448,11 @@ XcmsTekHVCToCIEuvY(ccc, pHVC_WhitePt, pColors_in_out, nColors)
* SYNOPSIS
*/
Status
XcmsCIEuvYToTekHVC
(
ccc
,
pHVC_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCCC
ccc
;
XcmsColor
*
pHVC_WhitePt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsCIEuvYToTekHVC
(
XcmsCCC
ccc
,
XcmsColor
*
pHVC_WhitePt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
)
/*
* DESCRIPTION
* Transforms an array of CIECIEuvY.color specifications, given
...
...
nx-X11/lib/X11/HVCGcC.c
View file @
e868fbbf
...
...
@@ -65,12 +65,12 @@
*/
/* ARGSUSED */
Status
XcmsTekHVCClipC
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
unsigned
int
i
;
Bool
*
pCompressed
;
XcmsTekHVCClipC
(
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
unsigned
int
i
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Reduce the Chroma for a specific hue and value to
...
...
nx-X11/lib/X11/HVCGcV.c
View file @
e868fbbf
...
...
@@ -65,12 +65,12 @@
*/
/* ARGSUSED */
Status
XcmsTekHVCClipV
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
unsigned
int
i
;
Bool
*
pCompressed
;
XcmsTekHVCClipV
(
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
unsigned
int
i
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Return the closest value for a specific hue and chroma.
...
...
nx-X11/lib/X11/HVCGcVC.c
View file @
e868fbbf
...
...
@@ -73,12 +73,12 @@
*/
/* ARGSUSED */
Status
XcmsTekHVCClipVC
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
unsigned
int
i
;
Bool
*
pCompressed
;
XcmsTekHVCClipVC
(
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
unsigned
int
i
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* This routine will find the closest value and chroma
...
...
nx-X11/lib/X11/HVCMnV.c
View file @
e868fbbf
...
...
@@ -69,11 +69,11 @@
* SYNOPSIS
*/
Status
XcmsTekHVCQueryMinV
(
ccc
,
hue
,
chroma
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue
;
XcmsFloat
chroma
;
XcmsColor
*
pColor_return
;
XcmsTekHVCQueryMinV
(
XcmsCCC
ccc
,
XcmsFloat
hue
,
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
...
...
nx-X11/lib/X11/HVCMxC.c
View file @
e868fbbf
...
...
@@ -72,11 +72,11 @@
* SYNOPSIS
*/
Status
XcmsTekHVCQueryMaxC
(
ccc
,
hue
,
value
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue
;
XcmsFloat
value
;
XcmsColor
*
pColor_return
;
XcmsTekHVCQueryMaxC
(
XcmsCCC
ccc
,
XcmsFloat
hue
,
XcmsFloat
value
,
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
* Return the maximum chroma for a specific hue and value.
...
...
nx-X11/lib/X11/HVCMxV.c
View file @
e868fbbf
...
...
@@ -72,11 +72,11 @@
* SYNOPSIS
*/
Status
XcmsTekHVCQueryMaxV
(
ccc
,
hue
,
chroma
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue
;
XcmsFloat
chroma
;
XcmsColor
*
pColor_return
;
XcmsTekHVCQueryMaxV
(
XcmsCCC
ccc
,
XcmsFloat
hue
,
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
* Return the maximum value for a specified hue and chroma.
...
...
nx-X11/lib/X11/HVCMxVC.c
View file @
e868fbbf
...
...
@@ -180,10 +180,10 @@ _XcmsTekHVCQueryMaxVCRGB(
* SYNOPSIS
*/
Status
XcmsTekHVCQueryMaxVC
(
ccc
,
hue
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue
;
XcmsColor
*
pColor_return
;
XcmsTekHVCQueryMaxVC
(
XcmsCCC
ccc
,
XcmsFloat
hue
,
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
...
...
nx-X11/lib/X11/HVCMxVs.c
View file @
e868fbbf
...
...
@@ -65,11 +65,11 @@
* SYNOPSIS
*/
Status
XcmsTekHVCQueryMaxVSamples
(
ccc
,
hue
,
pColor_in_out
,
nSamples
)
XcmsCCC
ccc
;
XcmsFloat
hue
;
XcmsColor
*
pColor_in_out
;
unsigned
int
nSamples
;
XcmsTekHVCQueryMaxVSamples
(
XcmsCCC
ccc
,
XcmsFloat
hue
,
XcmsColor
*
pColor_in_out
,
unsigned
int
nSamples
)
/*
* DESCRIPTION
...
...
nx-X11/lib/X11/HVCWpAj.c
View file @
e868fbbf
...
...
@@ -65,15 +65,14 @@
* SYNOPSIS
*/
Status
XcmsTekHVCWhiteShiftColors
(
ccc
,
pWhitePtFrom
,
pWhitePtTo
,
destSpecFmt
,
pColors_in_out
,
nColors
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pWhitePtFrom
;
XcmsColor
*
pWhitePtTo
;
XcmsColorFormat
destSpecFmt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
Bool
*
pCompressed
;
XcmsTekHVCWhiteShiftColors
(
XcmsCCC
ccc
,
XcmsColor
*
pWhitePtFrom
,
XcmsColor
*
pWhitePtTo
,
XcmsColorFormat
destSpecFmt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Convert color specifications in an array of XcmsColor structures
...
...
nx-X11/lib/X11/IdOfPr.c
View file @
e868fbbf
...
...
@@ -47,8 +47,7 @@
* SYNOPSIS
*/
XcmsColorFormat
XcmsFormatOfPrefix
(
prefix
)
char
*
prefix
;
XcmsFormatOfPrefix
(
char
*
prefix
)
/*
* DESCRIPTION
* Returns the Color Space ID for the specified prefix
...
...
nx-X11/lib/X11/LRGB.c
View file @
e868fbbf
...
...
@@ -1430,6 +1430,23 @@ XcmsLRGB_RGBi_ParseString(
&
pColor
->
spec
.
RGBi
.
red
,
&
pColor
->
spec
.
RGBi
.
green
,
&
pColor
->
spec
.
RGBi
.
blue
)
!=
3
)
{
char
*
s
;
/* Maybe failed due to locale */
int
f
;
if
((
s
=
strdup
(
spec
)))
{
for
(
f
=
0
;
s
[
f
];
++
f
)
if
(
s
[
f
]
==
'.'
)
s
[
f
]
=
','
;
else
if
(
s
[
f
]
==
','
)
s
[
f
]
=
'.'
;
if
(
sscanf
(
s
+
n
+
1
,
"%lf/%lf/%lf"
,
&
pColor
->
spec
.
RGBi
.
red
,
&
pColor
->
spec
.
RGBi
.
green
,
&
pColor
->
spec
.
RGBi
.
blue
)
!=
3
)
{
free
(
s
);
return
(
XcmsFailure
);
}
free
(
s
);
}
else
return
(
XcmsFailure
);
}
...
...
@@ -1450,11 +1467,11 @@ XcmsLRGB_RGBi_ParseString(
*/
/* ARGSUSED */
Status
XcmsCIEXYZToRGBi
(
ccc
,
pXcmsColors_in_out
,
nColors
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pXcmsColors_in_out
;
/* pointer to XcmsColors to convert */
unsigned
int
nColors
;
/* Number of colors */
Bool
*
pCompressed
;
/* pointer to an array of Bool */
XcmsCIEXYZToRGBi
(
XcmsCCC
ccc
,
XcmsColor
*
pXcmsColors_in_out
,
/* pointer to XcmsColors to convert */
unsigned
int
nColors
,
/* Number of colors */
Bool
*
pCompressed
)
/* pointer to an array of Bool */
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
@@ -1572,11 +1589,11 @@ XcmsCIEXYZToRGBi(ccc, pXcmsColors_in_out, nColors, pCompressed)
*/
/* ARGSUSED */
Status
XcmsRGBiToCIEXYZ
(
ccc
,
pXcmsColors_in_out
,
nColors
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pXcmsColors_in_out
;
/* pointer to XcmsColors to convert */
unsigned
int
nColors
;
/* Number of colors */
Bool
*
pCompressed
;
/* pointer to a bit array */
XcmsRGBiToCIEXYZ
(
XcmsCCC
ccc
,
XcmsColor
*
pXcmsColors_in_out
,
/* pointer to XcmsColors to convert */
unsigned
int
nColors
,
/* Number of colors */
Bool
*
pCompressed
)
/* pointer to a bit array */
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
@@ -1625,11 +1642,11 @@ XcmsRGBiToCIEXYZ(ccc, pXcmsColors_in_out, nColors, pCompressed)
*/
/* ARGSUSED */
Status
XcmsRGBiToRGB
(
ccc
,
pXcmsColors_in_out
,
nColors
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pXcmsColors_in_out
;
/* pointer to XcmsColors to convert */
unsigned
int
nColors
;
/* Number of colors */
Bool
*
pCompressed
;
/* pointer to a bit array */
XcmsRGBiToRGB
(
XcmsCCC
ccc
,
XcmsColor
*
pXcmsColors_in_out
,
/* pointer to XcmsColors to convert */
unsigned
int
nColors
,
/* Number of colors */
Bool
*
pCompressed
)
/* pointer to a bit array */
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
nx-X11/lib/X11/Lab.c
View file @
e868fbbf
...
...
@@ -160,6 +160,23 @@ CIELab_ParseString(
&
pColor
->
spec
.
CIELab
.
L_star
,
&
pColor
->
spec
.
CIELab
.
a_star
,
&
pColor
->
spec
.
CIELab
.
b_star
)
!=
3
)
{
char
*
s
;
/* Maybe failed due to locale */
int
f
;
if
((
s
=
strdup
(
spec
)))
{
for
(
f
=
0
;
s
[
f
];
++
f
)
if
(
s
[
f
]
==
'.'
)
s
[
f
]
=
','
;
else
if
(
s
[
f
]
==
','
)
s
[
f
]
=
'.'
;
if
(
sscanf
(
s
+
n
+
1
,
"%lf/%lf/%lf"
,
&
pColor
->
spec
.
CIELab
.
L_star
,
&
pColor
->
spec
.
CIELab
.
a_star
,
&
pColor
->
spec
.
CIELab
.
b_star
)
!=
3
)
{
free
(
s
);
return
(
XcmsFailure
);
}
free
(
s
);
}
else
return
(
XcmsFailure
);
}
pColor
->
format
=
XcmsCIELabFormat
;
...
...
@@ -213,11 +230,11 @@ XcmsCIELab_ValidSpec(
* SYNOPSIS
*/
Status
XcmsCIELabToCIEXYZ
(
ccc
,
pLab_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCCC
ccc
;
XcmsColor
*
pLab_WhitePt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsCIELabToCIEXYZ
(
XcmsCCC
ccc
,
XcmsColor
*
pLab_WhitePt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
)
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
@@ -316,11 +333,11 @@ XcmsCIELabToCIEXYZ(ccc, pLab_WhitePt, pColors_in_out, nColors)
* SYNOPSIS
*/
Status
XcmsCIEXYZToCIELab
(
ccc
,
pLab_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCCC
ccc
;
XcmsColor
*
pLab_WhitePt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsCIEXYZToCIELab
(
XcmsCCC
ccc
,
XcmsColor
*
pLab_WhitePt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
)
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
nx-X11/lib/X11/LabGcC.c
View file @
e868fbbf
...
...
@@ -52,12 +52,12 @@
*/
/* ARGSUSED */
Status
XcmsCIELabClipab
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
unsigned
int
i
;
Bool
*
pCompressed
;
XcmsCIELabClipab
(
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
unsigned
int
i
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Reduce the Chroma for a specific hue and chroma to
...
...
nx-X11/lib/X11/LabGcL.c
View file @
e868fbbf
...
...
@@ -52,12 +52,12 @@
*/
/* ARGSUSED */
Status
XcmsCIELabClipL
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
unsigned
int
i
;
Bool
*
pCompressed
;
XcmsCIELabClipL
(
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
unsigned
int
i
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Return the closest L* for a specific hue and chroma.
...
...
nx-X11/lib/X11/LabGcLC.c
View file @
e868fbbf
...
...
@@ -60,12 +60,12 @@
*/
/* ARGSUSED */
Status
XcmsCIELabClipLab
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
unsigned
int
i
;
Bool
*
pCompressed
;
XcmsCIELabClipLab
(
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
unsigned
int
i
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* This routine will find the closest L* and chroma
...
...
nx-X11/lib/X11/LabMnL.c
View file @
e868fbbf
...
...
@@ -60,11 +60,11 @@
* SYNOPSIS
*/
Status
XcmsCIELabQueryMinL
(
ccc
,
hue_angle
,
chroma
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
chroma
;
XcmsColor
*
pColor_return
;
XcmsCIELabQueryMinL
(
XcmsCCC
ccc
,
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
* Return the maximum Lstar for a specified hue_angle and chroma.
...
...
nx-X11/lib/X11/LabMxC.c
View file @
e868fbbf
...
...
@@ -63,11 +63,11 @@
* SYNOPSIS
*/
Status
XcmsCIELabQueryMaxC
(
ccc
,
hue_angle
,
L_star
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
L_star
;
XcmsColor
*
pColor_return
;
XcmsCIELabQueryMaxC
(
XcmsCCC
ccc
,
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsFloat
L_star
,
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
* Return the maximum chroma for a specific hue_angle and L_star.
...
...
nx-X11/lib/X11/LabMxL.c
View file @
e868fbbf
...
...
@@ -60,11 +60,11 @@
* SYNOPSIS
*/
Status
XcmsCIELabQueryMaxL
(
ccc
,
hue_angle
,
chroma
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue_angle
;
/* hue in degrees */
XcmsFloat
chroma
;
XcmsColor
*
pColor_return
;
XcmsCIELabQueryMaxL
(
XcmsCCC
ccc
,
XcmsFloat
hue_angle
,
/* hue in degrees */
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
* Return the maximum Lstar for a specified hue_angle and chroma.
...
...
nx-X11/lib/X11/LabMxLC.c
View file @
e868fbbf
...
...
@@ -170,10 +170,10 @@ _XcmsCIELabQueryMaxLCRGB(
* SYNOPSIS
*/
Status
XcmsCIELabQueryMaxLC
(
ccc
,
hue_angle
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue_angle
;
/* hue_angle in degrees */
XcmsColor
*
pColor_return
;
XcmsCIELabQueryMaxLC
(
XcmsCCC
ccc
,
XcmsFloat
hue_angle
,
/* hue_angle in degrees */
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
...
...
nx-X11/lib/X11/LabWpAj.c
View file @
e868fbbf
...
...
@@ -57,15 +57,14 @@
* SYNOPSIS
*/
Status
XcmsCIELabWhiteShiftColors
(
ccc
,
pWhitePtFrom
,
pWhitePtTo
,
destSpecFmt
,
pColors_in_out
,
nColors
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pWhitePtFrom
;
XcmsColor
*
pWhitePtTo
;
XcmsColorFormat
destSpecFmt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
Bool
*
pCompressed
;
XcmsCIELabWhiteShiftColors
(
XcmsCCC
ccc
,
XcmsColor
*
pWhitePtFrom
,
XcmsColor
*
pWhitePtTo
,
XcmsColorFormat
destSpecFmt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Adjust color specifications in XcmsColor structures for
...
...
nx-X11/lib/X11/Luv.c
View file @
e868fbbf
...
...
@@ -163,6 +163,23 @@ CIELuv_ParseString(
&
pColor
->
spec
.
CIELuv
.
L_star
,
&
pColor
->
spec
.
CIELuv
.
u_star
,
&
pColor
->
spec
.
CIELuv
.
v_star
)
!=
3
)
{
char
*
s
;
/* Maybe failed due to locale */
int
f
;
if
((
s
=
strdup
(
spec
)))
{
for
(
f
=
0
;
s
[
f
];
++
f
)
if
(
s
[
f
]
==
'.'
)
s
[
f
]
=
','
;
else
if
(
s
[
f
]
==
','
)
s
[
f
]
=
'.'
;
if
(
sscanf
(
s
+
n
+
1
,
"%lf/%lf/%lf"
,
&
pColor
->
spec
.
CIELuv
.
L_star
,
&
pColor
->
spec
.
CIELuv
.
u_star
,
&
pColor
->
spec
.
CIELuv
.
v_star
)
!=
3
)
{
free
(
s
);
return
(
XcmsFailure
);
}
free
(
s
);
}
else
return
(
XcmsFailure
);
}
pColor
->
format
=
XcmsCIELuvFormat
;
...
...
@@ -214,11 +231,11 @@ XcmsCIELuv_ValidSpec(
* SYNOPSIS
*/
Status
XcmsCIELuvToCIEuvY
(
ccc
,
pLuv_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCCC
ccc
;
XcmsColor
*
pLuv_WhitePt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsCIELuvToCIEuvY
(
XcmsCCC
ccc
,
XcmsColor
*
pLuv_WhitePt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
)
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
@@ -306,11 +323,11 @@ XcmsCIELuvToCIEuvY(ccc, pLuv_WhitePt, pColors_in_out, nColors)
* SYNOPSIS
*/
Status
XcmsCIEuvYToCIELuv
(
ccc
,
pLuv_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCCC
ccc
;
XcmsColor
*
pLuv_WhitePt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsCIEuvYToCIELuv
(
XcmsCCC
ccc
,
XcmsColor
*
pLuv_WhitePt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
)
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
nx-X11/lib/X11/LuvGcC.c
View file @
e868fbbf
...
...
@@ -52,12 +52,12 @@
*/
/* ARGSUSED */
Status
XcmsCIELuvClipuv
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
unsigned
int
i
;
Bool
*
pCompressed
;
XcmsCIELuvClipuv
(
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
unsigned
int
i
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Reduce the Chroma for a specific hue and chroma to
...
...
nx-X11/lib/X11/LuvGcL.c
View file @
e868fbbf
...
...
@@ -52,12 +52,12 @@
*/
/* ARGSUSED */
Status
XcmsCIELuvClipL
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
unsigned
int
i
;
Bool
*
pCompressed
;
XcmsCIELuvClipL
(
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
unsigned
int
i
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Return the closest L* for a specific hue and chroma.
...
...
nx-X11/lib/X11/LuvGcLC.c
View file @
e868fbbf
...
...
@@ -60,12 +60,12 @@
*/
/* ARGSUSED */
Status
XcmsCIELuvClipLuv
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
unsigned
int
i
;
Bool
*
pCompressed
;
XcmsCIELuvClipLuv
(
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
unsigned
int
i
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* This routine will find the closest L* and chroma
...
...
nx-X11/lib/X11/LuvMnL.c
View file @
e868fbbf
...
...
@@ -60,11 +60,11 @@
* SYNOPSIS
*/
Status
XcmsCIELuvQueryMinL
(
ccc
,
hue_angle
,
chroma
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
chroma
;
XcmsColor
*
pColor_return
;
XcmsCIELuvQueryMinL
(
XcmsCCC
ccc
,
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
* Return the maximum Lstar for a specified hue_angle and chroma.
...
...
nx-X11/lib/X11/LuvMxC.c
View file @
e868fbbf
...
...
@@ -63,11 +63,11 @@
* SYNOPSIS
*/
Status
XcmsCIELuvQueryMaxC
(
ccc
,
hue_angle
,
L_star
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
L_star
;
XcmsColor
*
pColor_return
;
XcmsCIELuvQueryMaxC
(
XcmsCCC
ccc
,
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsFloat
L_star
,
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
* Return the maximum chroma for a specific hue_angle and L_star.
...
...
nx-X11/lib/X11/LuvMxL.c
View file @
e868fbbf
...
...
@@ -60,11 +60,11 @@
* SYNOPSIS
*/
Status
XcmsCIELuvQueryMaxL
(
ccc
,
hue_angle
,
chroma
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
chroma
;
XcmsColor
*
pColor_return
;
XcmsCIELuvQueryMaxL
(
XcmsCCC
ccc
,
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
* Return the maximum Lstar for a specified hue_angle and chroma.
...
...
nx-X11/lib/X11/LuvMxLC.c
View file @
e868fbbf
...
...
@@ -170,10 +170,10 @@ _XcmsCIELuvQueryMaxLCRGB(
* SYNOPSIS
*/
Status
XcmsCIELuvQueryMaxLC
(
ccc
,
hue_angle
,
pColor_return
)
XcmsCCC
ccc
;
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsColor
*
pColor_return
;
XcmsCIELuvQueryMaxLC
(
XcmsCCC
ccc
,
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsColor
*
pColor_return
)
/*
* DESCRIPTION
...
...
nx-X11/lib/X11/LuvWpAj.c
View file @
e868fbbf
...
...
@@ -54,15 +54,14 @@
* SYNOPSIS
*/
Status
XcmsCIELuvWhiteShiftColors
(
ccc
,
pWhitePtFrom
,
pWhitePtTo
,
destSpecFmt
,
pColors_in_out
,
nColors
,
pCompressed
)
XcmsCCC
ccc
;
XcmsColor
*
pWhitePtFrom
;
XcmsColor
*
pWhitePtTo
;
XcmsColorFormat
destSpecFmt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
Bool
*
pCompressed
;
XcmsCIELuvWhiteShiftColors
(
XcmsCCC
ccc
,
XcmsColor
*
pWhitePtFrom
,
XcmsColor
*
pWhitePtTo
,
XcmsColorFormat
destSpecFmt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Adjusts color specifications in an array of XcmsColor
...
...
nx-X11/lib/X11/OfCCC.c
View file @
e868fbbf
...
...
@@ -55,8 +55,8 @@
*/
Display
*
XcmsDisplayOfCCC
(
ccc
)
XcmsCCC
ccc
;
XcmsDisplayOfCCC
(
XcmsCCC
ccc
)
/*
* DESCRIPTION
* Queries the Display of the specified CCC.
...
...
@@ -78,8 +78,8 @@ XcmsDisplayOfCCC(ccc)
*/
Visual
*
XcmsVisualOfCCC
(
ccc
)
XcmsCCC
ccc
;
XcmsVisualOfCCC
(
XcmsCCC
ccc
)
/*
* DESCRIPTION
* Queries the Visual of the specified CCC.
...
...
@@ -101,8 +101,8 @@ XcmsVisualOfCCC(ccc)
*/
int
XcmsScreenNumberOfCCC
(
ccc
)
XcmsCCC
ccc
;
XcmsScreenNumberOfCCC
(
XcmsCCC
ccc
)
/*
* DESCRIPTION
* Queries the screen number of the specified CCC.
...
...
@@ -124,8 +124,8 @@ XcmsScreenNumberOfCCC(ccc)
*/
XcmsColor
*
XcmsScreenWhitePointOfCCC
(
ccc
)
XcmsCCC
ccc
;
XcmsScreenWhitePointOfCCC
(
XcmsCCC
ccc
)
/*
* DESCRIPTION
* Queries the screen white point of the specified CCC.
...
...
@@ -147,8 +147,8 @@ XcmsScreenWhitePointOfCCC(ccc)
*/
XcmsColor
*
XcmsClientWhitePointOfCCC
(
ccc
)
XcmsCCC
ccc
;
XcmsClientWhitePointOfCCC
(
XcmsCCC
ccc
)
/*
* DESCRIPTION
* Queries the client white point of the specified CCC.
...
...
nx-X11/lib/X11/PrOfId.c
View file @
e868fbbf
...
...
@@ -47,8 +47,8 @@
* SYNOPSIS
*/
char
*
XcmsPrefixOfFormat
(
id
)
XcmsColorFormat
id
;
XcmsPrefixOfFormat
(
XcmsColorFormat
id
)
/*
* DESCRIPTION
* Returns the color space prefix for the specified color
...
...
nx-X11/lib/X11/QBlack.c
View file @
e868fbbf
...
...
@@ -55,10 +55,10 @@
*/
Status
XcmsQueryBlack
(
ccc
,
target_format
,
pColor_ret
)
XcmsCCC
ccc
;
XcmsColorFormat
target_format
;
XcmsColor
*
pColor_ret
;
XcmsQueryBlack
(
XcmsCCC
ccc
,
XcmsColorFormat
target_format
,
XcmsColor
*
pColor_ret
)
/*
* DESCRIPTION
* Returns the color specification in the target format for
...
...
nx-X11/lib/X11/QBlue.c
View file @
e868fbbf
...
...
@@ -55,10 +55,10 @@
*/
Status
XcmsQueryBlue
(
ccc
,
target_format
,
pColor_ret
)
XcmsCCC
ccc
;
XcmsColorFormat
target_format
;
XcmsColor
*
pColor_ret
;
XcmsQueryBlue
(
XcmsCCC
ccc
,
XcmsColorFormat
target_format
,
XcmsColor
*
pColor_ret
)
/*
* DESCRIPTION
* Returns the color specification in the target format for
...
...
nx-X11/lib/X11/QGreen.c
View file @
e868fbbf
...
...
@@ -55,10 +55,10 @@
*/
Status
XcmsQueryGreen
(
ccc
,
target_format
,
pColor_ret
)
XcmsCCC
ccc
;
XcmsColorFormat
target_format
;
XcmsColor
*
pColor_ret
;
XcmsQueryGreen
(
XcmsCCC
ccc
,
XcmsColorFormat
target_format
,
XcmsColor
*
pColor_ret
)
/*
* DESCRIPTION
* Returns the color specification in the target format for
...
...
nx-X11/lib/X11/QRed.c
View file @
e868fbbf
...
...
@@ -55,10 +55,10 @@
*/
Status
XcmsQueryRed
(
ccc
,
target_format
,
pColor_ret
)
XcmsCCC
ccc
;
XcmsColorFormat
target_format
;
XcmsColor
*
pColor_ret
;
XcmsQueryRed
(
XcmsCCC
ccc
,
XcmsColorFormat
target_format
,
XcmsColor
*
pColor_ret
)
/*
* DESCRIPTION
* Returns the color specification in the target format for
...
...
nx-X11/lib/X11/QWhite.c
View file @
e868fbbf
...
...
@@ -55,10 +55,10 @@
*/
Status
XcmsQueryWhite
(
ccc
,
target_format
,
pColor_ret
)
XcmsCCC
ccc
;
XcmsColorFormat
target_format
;
XcmsColor
*
pColor_ret
;
XcmsQueryWhite
(
XcmsCCC
ccc
,
XcmsColorFormat
target_format
,
XcmsColor
*
pColor_ret
)
/*
* DESCRIPTION
* Returns the color specification in the target format for
...
...
nx-X11/lib/X11/QuCol.c
View file @
e868fbbf
...
...
@@ -53,11 +53,11 @@
* SYNOPSIS
*/
Status
XcmsQueryColor
(
dpy
,
colormap
,
pXcmsColor_in_out
,
result_format
)
Display
*
dpy
;
Colormap
colormap
;
XcmsColor
*
pXcmsColor_in_out
;
XcmsColorFormat
result_format
;
XcmsQueryColor
(
Display
*
dpy
,
Colormap
colormap
,
XcmsColor
*
pXcmsColor_in_out
,
XcmsColorFormat
result_format
)
/*
* DESCRIPTION
* This routine uses XQueryColor to obtain the X RGB values
...
...
nx-X11/lib/X11/QuCols.c
View file @
e868fbbf
...
...
@@ -52,12 +52,12 @@
* SYNOPSIS
*/
Status
XcmsQueryColors
(
dpy
,
colormap
,
pXcmsColors_in_out
,
nColors
,
result_format
)
Display
*
dpy
;
Colormap
colormap
;
XcmsColor
*
pXcmsColors_in_out
;
unsigned
int
nColors
;
XcmsColorFormat
result_format
;
XcmsQueryColors
(
Display
*
dpy
,
Colormap
colormap
,
XcmsColor
*
pXcmsColors_in_out
,
unsigned
int
nColors
,
XcmsColorFormat
result_format
)
/*
* DESCRIPTION
* This routine uses XQueryColors to obtain the X RGB values
...
...
nx-X11/lib/X11/SetCCC.c
View file @
e868fbbf
...
...
@@ -55,9 +55,9 @@
*/
Status
XcmsSetWhitePoint
(
ccc
,
pColor
)
XcmsCCC
ccc
;
XcmsColor
*
pColor
;
XcmsSetWhitePoint
(
XcmsCCC
ccc
,
XcmsColor
*
pColor
)
/*
* DESCRIPTION
* Sets the Client White Point in the specified CCC.
...
...
nx-X11/lib/X11/SetGetCols.c
View file @
e868fbbf
nx-X11/lib/X11/StCol.c
View file @
e868fbbf
...
...
@@ -53,10 +53,10 @@
* SYNOPSIS
*/
Status
XcmsStoreColor
(
dpy
,
colormap
,
pColor_in
)
Display
*
dpy
;
Colormap
colormap
;
XcmsColor
*
pColor_in
;
XcmsStoreColor
(
Display
*
dpy
,
Colormap
colormap
,
XcmsColor
*
pColor_in
)
/*
* DESCRIPTION
* Given a device-dependent or device-independent color
...
...
nx-X11/lib/X11/StCols.c
View file @
e868fbbf
...
...
@@ -53,13 +53,12 @@
* SYNOPSIS
*/
Status
XcmsStoreColors
(
dpy
,
colormap
,
pColors_in
,
nColors
,
pCompressed
)
Display
*
dpy
;
Colormap
colormap
;
XcmsColor
*
pColors_in
;
unsigned
int
nColors
;
Bool
*
pCompressed
;
XcmsStoreColors
(
Display
*
dpy
,
Colormap
colormap
,
XcmsColor
*
pColors_in
,
unsigned
int
nColors
,
Bool
*
pCompressed
)
/*
* DESCRIPTION
* Given device-dependent or device-independent color
...
...
nx-X11/lib/X11/UNDEFINED.c
View file @
e868fbbf
nx-X11/lib/X11/XRGB.c
View file @
e868fbbf
nx-X11/lib/X11/XYZ.c
View file @
e868fbbf
...
...
@@ -142,6 +142,23 @@ CIEXYZ_ParseString(
&
pColor
->
spec
.
CIEXYZ
.
X
,
&
pColor
->
spec
.
CIEXYZ
.
Y
,
&
pColor
->
spec
.
CIEXYZ
.
Z
)
!=
3
)
{
char
*
s
;
/* Maybe failed due to locale */
int
f
;
if
((
s
=
strdup
(
spec
)))
{
for
(
f
=
0
;
s
[
f
];
++
f
)
if
(
s
[
f
]
==
'.'
)
s
[
f
]
=
','
;
else
if
(
s
[
f
]
==
','
)
s
[
f
]
=
'.'
;
if
(
sscanf
(
s
+
n
+
1
,
"%lf/%lf/%lf"
,
&
pColor
->
spec
.
CIEXYZ
.
X
,
&
pColor
->
spec
.
CIEXYZ
.
Y
,
&
pColor
->
spec
.
CIEXYZ
.
Z
)
!=
3
)
{
free
(
s
);
return
(
XcmsFailure
);
}
free
(
s
);
}
else
return
(
XcmsFailure
);
}
pColor
->
format
=
XcmsCIEXYZFormat
;
...
...
nx-X11/lib/X11/Xcmsint.h
View file @
e868fbbf
nx-X11/lib/X11/cmsAllCol.c
View file @
e868fbbf
...
...
@@ -47,11 +47,11 @@
* SYNOPSIS
*/
Status
XcmsAllocColor
(
dpy
,
colormap
,
pXcmsColor_in_out
,
result_format
)
Display
*
dpy
;
Colormap
colormap
;
XcmsColor
*
pXcmsColor_in_out
;
XcmsColorFormat
result_format
;
XcmsAllocColor
(
Display
*
dpy
,
Colormap
colormap
,
XcmsColor
*
pXcmsColor_in_out
,
XcmsColorFormat
result_format
)
/*
* DESCRIPTION
* Given a device-dependent or device-independent color
...
...
nx-X11/lib/X11/cmsAllNCol.c
View file @
e868fbbf
nx-X11/lib/X11/cmsCmap.c
View file @
e868fbbf
...
...
@@ -142,7 +142,7 @@ CmapRecForColormap(
visualTemplate
.
screen
=
i
;
visualList
=
XGetVisualInfo
(
dpy
,
VisualScreenMask
,
&
visualTemplate
,
&
nVisualsMatched
);
if
(
nVisualsMatched
==
0
)
{
if
(
visualList
==
NULL
)
{
continue
;
}
...
...
@@ -232,11 +232,11 @@ CmapRecForColormap(
* SYNOPSIS
*/
XcmsCmapRec
*
_XcmsAddCmapRec
(
dpy
,
cmap
,
windowID
,
visual
)
Display
*
dpy
;
Colormap
cmap
;
Window
windowID
;
Visual
*
visual
;
_XcmsAddCmapRec
(
Display
*
dpy
,
Colormap
cmap
,
Window
windowID
,
Visual
*
visual
)
/*
* DESCRIPTION
* Create an XcmsCmapRec for the specified cmap, windowID,
...
...
@@ -408,9 +408,9 @@ _XcmsFreeClientCmaps(
* SYNOPSIS
*/
XcmsCCC
XcmsCCCOfColormap
(
dpy
,
cmap
)
Display
*
dpy
;
Colormap
cmap
;
XcmsCCCOfColormap
(
Display
*
dpy
,
Colormap
cmap
)
/*
* DESCRIPTION
* Finds the XcmsCCC associated with the specified colormap.
...
...
@@ -476,10 +476,10 @@ XcmsCCCOfColormap(dpy, cmap)
return
(
NULL
);
}
XcmsCCC
XcmsSetCCCOfColormap
(
dpy
,
cmap
,
ccc
)
Display
*
dpy
;
Colormap
cmap
;
XcmsCCC
ccc
;
XcmsCCC
XcmsSetCCCOfColormap
(
Display
*
dpy
,
Colormap
cmap
,
XcmsCCC
ccc
)
{
XcmsCCC
prev_ccc
=
NULL
;
XcmsCmapRec
*
pRec
;
...
...
nx-X11/lib/X11/cmsColNm.c
View file @
e868fbbf
...
...
@@ -706,7 +706,7 @@ LoadColornameDB(void)
{
int
size
;
FILE
*
stream
;
char
*
pathname
;
c
onst
c
har
*
pathname
;
struct
stat
txt
;
int
length
;
...
...
@@ -732,10 +732,17 @@ LoadColornameDB(void)
}
if
((
stream
=
_XFopenFile
(
pathname
,
"r"
))
==
NULL
)
{
/* can't open file */
XcmsColorDbState
=
XcmsDbInitFailure
;
return
(
XcmsFailure
);
}
stringSectionSize
(
stream
,
&
nEntries
,
&
size
);
if
(
stringSectionSize
(
stream
,
&
nEntries
,
&
size
)
!=
XcmsSuccess
||
nEntries
==
0
)
{
(
void
)
fclose
(
stream
);
XcmsColorDbState
=
XcmsDbInitFailure
;
return
(
XcmsFailure
);
}
rewind
(
stream
);
strings
=
(
char
*
)
Xmalloc
(
size
);
...
...
nx-X11/lib/X11/cmsGlobls.c
View file @
e868fbbf
nx-X11/lib/X11/cmsInt.c
View file @
e868fbbf
nx-X11/lib/X11/cmsLkCol.c
View file @
e868fbbf
nx-X11/lib/X11/cmsMath.c
View file @
e868fbbf
...
...
@@ -51,8 +51,7 @@ int sqrt_loopcount;
/* for cube roots, x^3 - a = 0, x_new = x - 1/3 (x - a/x^2) */
double
_XcmsCubeRoot
(
a
)
double
a
;
_XcmsCubeRoot
(
double
a
)
{
register
double
abs_a
,
cur_guess
,
delta
;
...
...
@@ -96,8 +95,7 @@ _XcmsCubeRoot(a)
/* for square roots, x^2 - a = 0, x_new = x - 1/2 (x - a/x) */
double
_XcmsSquareRoot
(
a
)
double
a
;
_XcmsSquareRoot
(
double
a
)
{
register
double
cur_guess
,
delta
;
...
...
nx-X11/lib/X11/cmsProp.c
View file @
e868fbbf
nx-X11/lib/X11/cmsTrig.c
View file @
e868fbbf
...
...
@@ -503,8 +503,7 @@ static double _XcmsPolynomial(
*/
double
_XcmsSine
(
x
)
double
x
;
_XcmsSine
(
double
x
)
{
double
y
;
double
yt2
;
...
...
@@ -544,8 +543,7 @@ double x;
* SYNOPSIS
*/
double
_XcmsArcTangent
(
x
)
double
x
;
_XcmsArcTangent
(
double
x
)
/*
* DESCRIPTION
* Computes the arctangent.
...
...
nx-X11/lib/X11/uvY.c
View file @
e868fbbf
...
...
@@ -157,6 +157,23 @@ CIEuvY_ParseString(
&
pColor
->
spec
.
CIEuvY
.
u_prime
,
&
pColor
->
spec
.
CIEuvY
.
v_prime
,
&
pColor
->
spec
.
CIEuvY
.
Y
)
!=
3
)
{
char
*
s
;
/* Maybe failed due to locale */
int
f
;
if
((
s
=
strdup
(
spec
)))
{
for
(
f
=
0
;
s
[
f
];
++
f
)
if
(
s
[
f
]
==
'.'
)
s
[
f
]
=
','
;
else
if
(
s
[
f
]
==
','
)
s
[
f
]
=
'.'
;
if
(
sscanf
(
s
+
n
+
1
,
"%lf/%lf/%lf"
,
&
pColor
->
spec
.
CIEuvY
.
u_prime
,
&
pColor
->
spec
.
CIEuvY
.
v_prime
,
&
pColor
->
spec
.
CIEuvY
.
Y
)
!=
3
)
{
free
(
s
);
return
(
XcmsFailure
);
}
free
(
s
);
}
else
return
(
XcmsFailure
);
}
pColor
->
format
=
XcmsCIEuvYFormat
;
...
...
@@ -208,11 +225,11 @@ _XcmsCIEuvY_ValidSpec(
* SYNOPSIS
*/
Status
XcmsCIEuvYToCIEXYZ
(
ccc
,
puvY_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCCC
ccc
;
XcmsColor
*
puvY_WhitePt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsCIEuvYToCIEXYZ
(
XcmsCCC
ccc
,
XcmsColor
*
puvY_WhitePt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
)
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
@@ -323,11 +340,11 @@ XcmsCIEuvYToCIEXYZ(ccc, puvY_WhitePt, pColors_in_out, nColors)
* SYNOPSIS
*/
Status
XcmsCIEXYZToCIEuvY
(
ccc
,
puvY_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCCC
ccc
;
XcmsColor
*
puvY_WhitePt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsCIEXYZToCIEuvY
(
XcmsCCC
ccc
,
XcmsColor
*
puvY_WhitePt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
)
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
nx-X11/lib/X11/xyY.c
View file @
e868fbbf
...
...
@@ -156,6 +156,23 @@ CIExyY_ParseString(
&
pColor
->
spec
.
CIExyY
.
x
,
&
pColor
->
spec
.
CIExyY
.
y
,
&
pColor
->
spec
.
CIExyY
.
Y
)
!=
3
)
{
char
*
s
;
/* Maybe failed due to locale */
int
f
;
if
((
s
=
strdup
(
spec
)))
{
for
(
f
=
0
;
s
[
f
];
++
f
)
if
(
s
[
f
]
==
'.'
)
s
[
f
]
=
','
;
else
if
(
s
[
f
]
==
','
)
s
[
f
]
=
'.'
;
if
(
sscanf
(
s
+
n
+
1
,
"%lf/%lf/%lf"
,
&
pColor
->
spec
.
CIExyY
.
x
,
&
pColor
->
spec
.
CIExyY
.
y
,
&
pColor
->
spec
.
CIExyY
.
Y
)
!=
3
)
{
free
(
s
);
return
(
XcmsFailure
);
}
free
(
s
);
}
else
return
(
XcmsFailure
);
}
pColor
->
format
=
XcmsCIExyYFormat
;
...
...
@@ -216,11 +233,11 @@ XcmsCIExyY_ValidSpec(
* SYNOPSIS
*/
Status
XcmsCIExyYToCIEXYZ
(
ccc
,
pxyY_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCCC
ccc
;
XcmsColor
*
pxyY_WhitePt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsCIExyYToCIEXYZ
(
XcmsCCC
ccc
,
XcmsColor
*
pxyY_WhitePt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
)
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
@@ -323,11 +340,11 @@ XcmsCIExyYToCIEXYZ(ccc, pxyY_WhitePt, pColors_in_out, nColors)
*/
/* ARGSUSED */
Status
XcmsCIEXYZToCIExyY
(
ccc
,
pxyY_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCCC
ccc
;
XcmsColor
*
pxyY_WhitePt
;
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
;
XcmsCIEXYZToCIExyY
(
XcmsCCC
ccc
,
XcmsColor
*
pxyY_WhitePt
,
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
)
/*
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment