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 @@
...
@@ -55,8 +55,7 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsAddColorSpace
(
pCS
)
XcmsAddColorSpace
(
XcmsColorSpace
*
pCS
)
XcmsColorSpace
*
pCS
;
/*
/*
* DESCRIPTION
* DESCRIPTION
* DI Color Spaces are managed on a global basis.
* DI Color Spaces are managed on a global basis.
...
...
nx-X11/lib/X11/AddSF.c
View file @
e868fbbf
...
@@ -55,8 +55,7 @@
...
@@ -55,8 +55,7 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsAddFunctionSet
(
pNewFS
)
XcmsAddFunctionSet
(
XcmsFunctionSet
*
pNewFS
)
XcmsFunctionSet
*
pNewFS
;
/*
/*
* DESCRIPTION
* DESCRIPTION
* Additional Screen Color Characterization Function Sets are
* Additional Screen Color Characterization Function Sets are
...
...
nx-X11/lib/X11/CCC.c
View file @
e868fbbf
...
@@ -85,16 +85,15 @@ from The Open Group.
...
@@ -85,16 +85,15 @@ from The Open Group.
*/
*/
XcmsCCC
XcmsCCC
XcmsCreateCCC
(
dpy
,
screenNumber
,
visual
,
clientWhitePt
,
gamutCompProc
,
XcmsCreateCCC
(
gamutCompClientData
,
whitePtAdjProc
,
whitePtAdjClientData
)
Display
*
dpy
,
Display
*
dpy
;
int
screenNumber
,
int
screenNumber
;
Visual
*
visual
,
Visual
*
visual
;
XcmsColor
*
clientWhitePt
,
XcmsColor
*
clientWhitePt
;
XcmsCompressionProc
gamutCompProc
,
XcmsCompressionProc
gamutCompProc
;
XPointer
gamutCompClientData
,
XPointer
gamutCompClientData
;
XcmsWhiteAdjustProc
whitePtAdjProc
,
XcmsWhiteAdjustProc
whitePtAdjProc
;
XPointer
whitePtAdjClientData
)
XPointer
whitePtAdjClientData
;
/*
/*
* DESCRIPTION
* DESCRIPTION
* Given a Display, Screen, Visual, etc., this routine creates
* Given a Display, Screen, Visual, etc., this routine creates
...
@@ -172,9 +171,9 @@ XcmsCreateCCC(dpy, screenNumber, visual, clientWhitePt, gamutCompProc,
...
@@ -172,9 +171,9 @@ XcmsCreateCCC(dpy, screenNumber, visual, clientWhitePt, gamutCompProc,
* SYNOPSIS
* SYNOPSIS
*/
*/
XcmsCCC
XcmsCCC
XcmsDefaultCCC
(
dpy
,
screenNumber
)
XcmsDefaultCCC
(
Display
*
dpy
;
Display
*
dpy
,
int
screenNumber
;
int
screenNumber
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Given a Display and Screen, this routine creates
* Given a Display and Screen, this routine creates
...
@@ -254,8 +253,7 @@ XcmsDefaultCCC(dpy, screenNumber)
...
@@ -254,8 +253,7 @@ XcmsDefaultCCC(dpy, screenNumber)
* SYNOPSIS
* SYNOPSIS
*/
*/
void
void
XcmsFreeCCC
(
ccc
)
XcmsFreeCCC
(
XcmsCCC
ccc
)
XcmsCCC
ccc
;
/*
/*
* DESCRIPTION
* DESCRIPTION
* Frees memory associated with a Color Conversion Context
* 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:
...
@@ -712,12 +712,12 @@ Continue:
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsConvertColors
(
ccc
,
pColors_in_out
,
nColors
,
targetFormat
,
pCompressed
)
XcmsConvertColors
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
XcmsColorFormat
targetFormat
;
XcmsColorFormat
targetFormat
,
Bool
*
pCompressed
;
Bool
*
pCompressed
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Convert XcmsColor structures to another format
* Convert XcmsColor structures to another format
...
...
nx-X11/lib/X11/HVC.c
View file @
e868fbbf
...
@@ -198,6 +198,23 @@ TekHVC_ParseString(
...
@@ -198,6 +198,23 @@ TekHVC_ParseString(
&
pColor
->
spec
.
TekHVC
.
H
,
&
pColor
->
spec
.
TekHVC
.
H
,
&
pColor
->
spec
.
TekHVC
.
V
,
&
pColor
->
spec
.
TekHVC
.
V
,
&
pColor
->
spec
.
TekHVC
.
C
)
!=
3
)
{
&
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
);
return
(
XcmsFailure
);
}
}
pColor
->
format
=
XcmsTekHVCFormat
;
pColor
->
format
=
XcmsTekHVCFormat
;
...
@@ -310,11 +327,11 @@ XcmsTekHVC_ValidSpec(
...
@@ -310,11 +327,11 @@ XcmsTekHVC_ValidSpec(
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsTekHVCToCIEuvY
(
ccc
,
pHVC_WhitePt
,
pColors_in_out
,
nColors
)
XcmsTekHVCToCIEuvY
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pHVC_WhitePt
;
XcmsColor
*
pHVC_WhitePt
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Transforms an array of TekHVC color specifications, given
* Transforms an array of TekHVC color specifications, given
...
@@ -431,11 +448,11 @@ XcmsTekHVCToCIEuvY(ccc, pHVC_WhitePt, pColors_in_out, nColors)
...
@@ -431,11 +448,11 @@ XcmsTekHVCToCIEuvY(ccc, pHVC_WhitePt, pColors_in_out, nColors)
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIEuvYToTekHVC
(
ccc
,
pHVC_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCIEuvYToTekHVC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pHVC_WhitePt
;
XcmsColor
*
pHVC_WhitePt
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Transforms an array of CIECIEuvY.color specifications, given
* Transforms an array of CIECIEuvY.color specifications, given
...
...
nx-X11/lib/X11/HVCGcC.c
View file @
e868fbbf
...
@@ -65,12 +65,12 @@
...
@@ -65,12 +65,12 @@
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsTekHVCClipC
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsTekHVCClipC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
unsigned
int
i
;
unsigned
int
i
,
Bool
*
pCompressed
;
Bool
*
pCompressed
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Reduce the Chroma for a specific hue and value to
* Reduce the Chroma for a specific hue and value to
...
...
nx-X11/lib/X11/HVCGcV.c
View file @
e868fbbf
...
@@ -65,12 +65,12 @@
...
@@ -65,12 +65,12 @@
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsTekHVCClipV
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsTekHVCClipV
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
unsigned
int
i
;
unsigned
int
i
,
Bool
*
pCompressed
;
Bool
*
pCompressed
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the closest value for a specific hue and chroma.
* Return the closest value for a specific hue and chroma.
...
...
nx-X11/lib/X11/HVCGcVC.c
View file @
e868fbbf
...
@@ -73,12 +73,12 @@
...
@@ -73,12 +73,12 @@
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsTekHVCClipVC
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsTekHVCClipVC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
unsigned
int
i
;
unsigned
int
i
,
Bool
*
pCompressed
;
Bool
*
pCompressed
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* This routine will find the closest value and chroma
* This routine will find the closest value and chroma
...
...
nx-X11/lib/X11/HVCMnV.c
View file @
e868fbbf
...
@@ -69,11 +69,11 @@
...
@@ -69,11 +69,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsTekHVCQueryMinV
(
ccc
,
hue
,
chroma
,
pColor_return
)
XcmsTekHVCQueryMinV
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue
;
XcmsFloat
hue
,
XcmsFloat
chroma
;
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
...
...
nx-X11/lib/X11/HVCMxC.c
View file @
e868fbbf
...
@@ -72,11 +72,11 @@
...
@@ -72,11 +72,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsTekHVCQueryMaxC
(
ccc
,
hue
,
value
,
pColor_return
)
XcmsTekHVCQueryMaxC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue
;
XcmsFloat
hue
,
XcmsFloat
value
;
XcmsFloat
value
,
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the maximum chroma for a specific hue and value.
* Return the maximum chroma for a specific hue and value.
...
...
nx-X11/lib/X11/HVCMxV.c
View file @
e868fbbf
...
@@ -72,11 +72,11 @@
...
@@ -72,11 +72,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsTekHVCQueryMaxV
(
ccc
,
hue
,
chroma
,
pColor_return
)
XcmsTekHVCQueryMaxV
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue
;
XcmsFloat
hue
,
XcmsFloat
chroma
;
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the maximum value for a specified hue and chroma.
* Return the maximum value for a specified hue and chroma.
...
...
nx-X11/lib/X11/HVCMxVC.c
View file @
e868fbbf
...
@@ -180,10 +180,10 @@ _XcmsTekHVCQueryMaxVCRGB(
...
@@ -180,10 +180,10 @@ _XcmsTekHVCQueryMaxVCRGB(
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsTekHVCQueryMaxVC
(
ccc
,
hue
,
pColor_return
)
XcmsTekHVCQueryMaxVC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue
;
XcmsFloat
hue
,
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
...
...
nx-X11/lib/X11/HVCMxVs.c
View file @
e868fbbf
...
@@ -65,11 +65,11 @@
...
@@ -65,11 +65,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsTekHVCQueryMaxVSamples
(
ccc
,
hue
,
pColor_in_out
,
nSamples
)
XcmsTekHVCQueryMaxVSamples
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue
;
XcmsFloat
hue
,
XcmsColor
*
pColor_in_out
;
XcmsColor
*
pColor_in_out
,
unsigned
int
nSamples
;
unsigned
int
nSamples
)
/*
/*
* DESCRIPTION
* DESCRIPTION
...
...
nx-X11/lib/X11/HVCWpAj.c
View file @
e868fbbf
...
@@ -65,15 +65,14 @@
...
@@ -65,15 +65,14 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsTekHVCWhiteShiftColors
(
ccc
,
pWhitePtFrom
,
pWhitePtTo
,
destSpecFmt
,
XcmsTekHVCWhiteShiftColors
(
pColors_in_out
,
nColors
,
pCompressed
)
XcmsCCC
ccc
,
XcmsCCC
ccc
;
XcmsColor
*
pWhitePtFrom
,
XcmsColor
*
pWhitePtFrom
;
XcmsColor
*
pWhitePtTo
,
XcmsColor
*
pWhitePtTo
;
XcmsColorFormat
destSpecFmt
,
XcmsColorFormat
destSpecFmt
;
XcmsColor
*
pColors_in_out
,
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
,
unsigned
int
nColors
;
Bool
*
pCompressed
)
Bool
*
pCompressed
;
/*
/*
* DESCRIPTION
* DESCRIPTION
* Convert color specifications in an array of XcmsColor structures
* Convert color specifications in an array of XcmsColor structures
...
...
nx-X11/lib/X11/IdOfPr.c
View file @
e868fbbf
...
@@ -47,8 +47,7 @@
...
@@ -47,8 +47,7 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
XcmsColorFormat
XcmsColorFormat
XcmsFormatOfPrefix
(
prefix
)
XcmsFormatOfPrefix
(
char
*
prefix
)
char
*
prefix
;
/*
/*
* DESCRIPTION
* DESCRIPTION
* Returns the Color Space ID for the specified prefix
* 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(
...
@@ -1430,6 +1430,23 @@ XcmsLRGB_RGBi_ParseString(
&
pColor
->
spec
.
RGBi
.
red
,
&
pColor
->
spec
.
RGBi
.
red
,
&
pColor
->
spec
.
RGBi
.
green
,
&
pColor
->
spec
.
RGBi
.
green
,
&
pColor
->
spec
.
RGBi
.
blue
)
!=
3
)
{
&
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
);
return
(
XcmsFailure
);
}
}
...
@@ -1450,11 +1467,11 @@ XcmsLRGB_RGBi_ParseString(
...
@@ -1450,11 +1467,11 @@ XcmsLRGB_RGBi_ParseString(
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsCIEXYZToRGBi
(
ccc
,
pXcmsColors_in_out
,
nColors
,
pCompressed
)
XcmsCIEXYZToRGBi
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pXcmsColors_in_out
;
/* pointer to XcmsColors to convert */
XcmsColor
*
pXcmsColors_in_out
,
/* pointer to XcmsColors to convert */
unsigned
int
nColors
;
/* Number of colors */
unsigned
int
nColors
,
/* Number of colors */
Bool
*
pCompressed
;
/* pointer to an array of Bool */
Bool
*
pCompressed
)
/* pointer to an array of Bool */
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* Converts color specifications in an array of XcmsColor
...
@@ -1572,11 +1589,11 @@ XcmsCIEXYZToRGBi(ccc, pXcmsColors_in_out, nColors, pCompressed)
...
@@ -1572,11 +1589,11 @@ XcmsCIEXYZToRGBi(ccc, pXcmsColors_in_out, nColors, pCompressed)
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsRGBiToCIEXYZ
(
ccc
,
pXcmsColors_in_out
,
nColors
,
pCompressed
)
XcmsRGBiToCIEXYZ
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pXcmsColors_in_out
;
/* pointer to XcmsColors to convert */
XcmsColor
*
pXcmsColors_in_out
,
/* pointer to XcmsColors to convert */
unsigned
int
nColors
;
/* Number of colors */
unsigned
int
nColors
,
/* Number of colors */
Bool
*
pCompressed
;
/* pointer to a bit array */
Bool
*
pCompressed
)
/* pointer to a bit array */
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* Converts color specifications in an array of XcmsColor
...
@@ -1625,11 +1642,11 @@ XcmsRGBiToCIEXYZ(ccc, pXcmsColors_in_out, nColors, pCompressed)
...
@@ -1625,11 +1642,11 @@ XcmsRGBiToCIEXYZ(ccc, pXcmsColors_in_out, nColors, pCompressed)
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsRGBiToRGB
(
ccc
,
pXcmsColors_in_out
,
nColors
,
pCompressed
)
XcmsRGBiToRGB
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pXcmsColors_in_out
;
/* pointer to XcmsColors to convert */
XcmsColor
*
pXcmsColors_in_out
,
/* pointer to XcmsColors to convert */
unsigned
int
nColors
;
/* Number of colors */
unsigned
int
nColors
,
/* Number of colors */
Bool
*
pCompressed
;
/* pointer to a bit array */
Bool
*
pCompressed
)
/* pointer to a bit array */
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* Converts color specifications in an array of XcmsColor
...
...
nx-X11/lib/X11/Lab.c
View file @
e868fbbf
...
@@ -160,6 +160,23 @@ CIELab_ParseString(
...
@@ -160,6 +160,23 @@ CIELab_ParseString(
&
pColor
->
spec
.
CIELab
.
L_star
,
&
pColor
->
spec
.
CIELab
.
L_star
,
&
pColor
->
spec
.
CIELab
.
a_star
,
&
pColor
->
spec
.
CIELab
.
a_star
,
&
pColor
->
spec
.
CIELab
.
b_star
)
!=
3
)
{
&
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
);
return
(
XcmsFailure
);
}
}
pColor
->
format
=
XcmsCIELabFormat
;
pColor
->
format
=
XcmsCIELabFormat
;
...
@@ -213,11 +230,11 @@ XcmsCIELab_ValidSpec(
...
@@ -213,11 +230,11 @@ XcmsCIELab_ValidSpec(
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELabToCIEXYZ
(
ccc
,
pLab_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCIELabToCIEXYZ
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pLab_WhitePt
;
XcmsColor
*
pLab_WhitePt
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* Converts color specifications in an array of XcmsColor
...
@@ -316,11 +333,11 @@ XcmsCIELabToCIEXYZ(ccc, pLab_WhitePt, pColors_in_out, nColors)
...
@@ -316,11 +333,11 @@ XcmsCIELabToCIEXYZ(ccc, pLab_WhitePt, pColors_in_out, nColors)
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIEXYZToCIELab
(
ccc
,
pLab_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCIEXYZToCIELab
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pLab_WhitePt
;
XcmsColor
*
pLab_WhitePt
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* Converts color specifications in an array of XcmsColor
...
...
nx-X11/lib/X11/LabGcC.c
View file @
e868fbbf
...
@@ -52,12 +52,12 @@
...
@@ -52,12 +52,12 @@
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsCIELabClipab
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCIELabClipab
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
unsigned
int
i
;
unsigned
int
i
,
Bool
*
pCompressed
;
Bool
*
pCompressed
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Reduce the Chroma for a specific hue and chroma to
* Reduce the Chroma for a specific hue and chroma to
...
...
nx-X11/lib/X11/LabGcL.c
View file @
e868fbbf
...
@@ -52,12 +52,12 @@
...
@@ -52,12 +52,12 @@
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsCIELabClipL
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCIELabClipL
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
unsigned
int
i
;
unsigned
int
i
,
Bool
*
pCompressed
;
Bool
*
pCompressed
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the closest L* for a specific hue and chroma.
* Return the closest L* for a specific hue and chroma.
...
...
nx-X11/lib/X11/LabGcLC.c
View file @
e868fbbf
...
@@ -60,12 +60,12 @@
...
@@ -60,12 +60,12 @@
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsCIELabClipLab
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCIELabClipLab
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
unsigned
int
i
;
unsigned
int
i
,
Bool
*
pCompressed
;
Bool
*
pCompressed
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* This routine will find the closest L* and chroma
* This routine will find the closest L* and chroma
...
...
nx-X11/lib/X11/LabMnL.c
View file @
e868fbbf
...
@@ -60,11 +60,11 @@
...
@@ -60,11 +60,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELabQueryMinL
(
ccc
,
hue_angle
,
chroma
,
pColor_return
)
XcmsCIELabQueryMinL
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsFloat
chroma
;
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the maximum Lstar for a specified hue_angle and chroma.
* Return the maximum Lstar for a specified hue_angle and chroma.
...
...
nx-X11/lib/X11/LabMxC.c
View file @
e868fbbf
...
@@ -63,11 +63,11 @@
...
@@ -63,11 +63,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELabQueryMaxC
(
ccc
,
hue_angle
,
L_star
,
pColor_return
)
XcmsCIELabQueryMaxC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsFloat
L_star
;
XcmsFloat
L_star
,
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the maximum chroma for a specific hue_angle and L_star.
* 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 @@
...
@@ -60,11 +60,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELabQueryMaxL
(
ccc
,
hue_angle
,
chroma
,
pColor_return
)
XcmsCIELabQueryMaxL
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue_angle
;
/* hue in degrees */
XcmsFloat
hue_angle
,
/* hue in degrees */
XcmsFloat
chroma
;
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the maximum Lstar for a specified hue_angle and chroma.
* 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(
...
@@ -170,10 +170,10 @@ _XcmsCIELabQueryMaxLCRGB(
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELabQueryMaxLC
(
ccc
,
hue_angle
,
pColor_return
)
XcmsCIELabQueryMaxLC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue_angle
;
/* hue_angle in degrees */
XcmsFloat
hue_angle
,
/* hue_angle in degrees */
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
...
...
nx-X11/lib/X11/LabWpAj.c
View file @
e868fbbf
...
@@ -57,15 +57,14 @@
...
@@ -57,15 +57,14 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELabWhiteShiftColors
(
ccc
,
pWhitePtFrom
,
pWhitePtTo
,
destSpecFmt
,
XcmsCIELabWhiteShiftColors
(
pColors_in_out
,
nColors
,
pCompressed
)
XcmsCCC
ccc
,
XcmsCCC
ccc
;
XcmsColor
*
pWhitePtFrom
,
XcmsColor
*
pWhitePtFrom
;
XcmsColor
*
pWhitePtTo
,
XcmsColor
*
pWhitePtTo
;
XcmsColorFormat
destSpecFmt
,
XcmsColorFormat
destSpecFmt
;
XcmsColor
*
pColors_in_out
,
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
,
unsigned
int
nColors
;
Bool
*
pCompressed
)
Bool
*
pCompressed
;
/*
/*
* DESCRIPTION
* DESCRIPTION
* Adjust color specifications in XcmsColor structures for
* Adjust color specifications in XcmsColor structures for
...
...
nx-X11/lib/X11/Luv.c
View file @
e868fbbf
...
@@ -163,6 +163,23 @@ CIELuv_ParseString(
...
@@ -163,6 +163,23 @@ CIELuv_ParseString(
&
pColor
->
spec
.
CIELuv
.
L_star
,
&
pColor
->
spec
.
CIELuv
.
L_star
,
&
pColor
->
spec
.
CIELuv
.
u_star
,
&
pColor
->
spec
.
CIELuv
.
u_star
,
&
pColor
->
spec
.
CIELuv
.
v_star
)
!=
3
)
{
&
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
);
return
(
XcmsFailure
);
}
}
pColor
->
format
=
XcmsCIELuvFormat
;
pColor
->
format
=
XcmsCIELuvFormat
;
...
@@ -214,11 +231,11 @@ XcmsCIELuv_ValidSpec(
...
@@ -214,11 +231,11 @@ XcmsCIELuv_ValidSpec(
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELuvToCIEuvY
(
ccc
,
pLuv_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCIELuvToCIEuvY
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pLuv_WhitePt
;
XcmsColor
*
pLuv_WhitePt
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* Converts color specifications in an array of XcmsColor
...
@@ -306,11 +323,11 @@ XcmsCIELuvToCIEuvY(ccc, pLuv_WhitePt, pColors_in_out, nColors)
...
@@ -306,11 +323,11 @@ XcmsCIELuvToCIEuvY(ccc, pLuv_WhitePt, pColors_in_out, nColors)
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIEuvYToCIELuv
(
ccc
,
pLuv_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCIEuvYToCIELuv
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pLuv_WhitePt
;
XcmsColor
*
pLuv_WhitePt
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* Converts color specifications in an array of XcmsColor
...
...
nx-X11/lib/X11/LuvGcC.c
View file @
e868fbbf
...
@@ -52,12 +52,12 @@
...
@@ -52,12 +52,12 @@
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsCIELuvClipuv
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCIELuvClipuv
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
unsigned
int
i
;
unsigned
int
i
,
Bool
*
pCompressed
;
Bool
*
pCompressed
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Reduce the Chroma for a specific hue and chroma to
* Reduce the Chroma for a specific hue and chroma to
...
...
nx-X11/lib/X11/LuvGcL.c
View file @
e868fbbf
...
@@ -52,12 +52,12 @@
...
@@ -52,12 +52,12 @@
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsCIELuvClipL
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCIELuvClipL
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
unsigned
int
i
;
unsigned
int
i
,
Bool
*
pCompressed
;
Bool
*
pCompressed
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the closest L* for a specific hue and chroma.
* Return the closest L* for a specific hue and chroma.
...
...
nx-X11/lib/X11/LuvGcLC.c
View file @
e868fbbf
...
@@ -60,12 +60,12 @@
...
@@ -60,12 +60,12 @@
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsCIELuvClipLuv
(
ccc
,
pColors_in_out
,
nColors
,
i
,
pCompressed
)
XcmsCIELuvClipLuv
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
unsigned
int
i
;
unsigned
int
i
,
Bool
*
pCompressed
;
Bool
*
pCompressed
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* This routine will find the closest L* and chroma
* This routine will find the closest L* and chroma
...
...
nx-X11/lib/X11/LuvMnL.c
View file @
e868fbbf
...
@@ -60,11 +60,11 @@
...
@@ -60,11 +60,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELuvQueryMinL
(
ccc
,
hue_angle
,
chroma
,
pColor_return
)
XcmsCIELuvQueryMinL
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsFloat
chroma
;
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the maximum Lstar for a specified hue_angle and chroma.
* Return the maximum Lstar for a specified hue_angle and chroma.
...
...
nx-X11/lib/X11/LuvMxC.c
View file @
e868fbbf
...
@@ -63,11 +63,11 @@
...
@@ -63,11 +63,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELuvQueryMaxC
(
ccc
,
hue_angle
,
L_star
,
pColor_return
)
XcmsCIELuvQueryMaxC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsFloat
L_star
;
XcmsFloat
L_star
,
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the maximum chroma for a specific hue_angle and L_star.
* 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 @@
...
@@ -60,11 +60,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELuvQueryMaxL
(
ccc
,
hue_angle
,
chroma
,
pColor_return
)
XcmsCIELuvQueryMaxL
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsFloat
chroma
;
XcmsFloat
chroma
,
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Return the maximum Lstar for a specified hue_angle and chroma.
* 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(
...
@@ -170,10 +170,10 @@ _XcmsCIELuvQueryMaxLCRGB(
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELuvQueryMaxLC
(
ccc
,
hue_angle
,
pColor_return
)
XcmsCIELuvQueryMaxLC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsFloat
hue_angle
;
/* hue angle in degrees */
XcmsFloat
hue_angle
,
/* hue angle in degrees */
XcmsColor
*
pColor_return
;
XcmsColor
*
pColor_return
)
/*
/*
* DESCRIPTION
* DESCRIPTION
...
...
nx-X11/lib/X11/LuvWpAj.c
View file @
e868fbbf
...
@@ -54,15 +54,14 @@
...
@@ -54,15 +54,14 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIELuvWhiteShiftColors
(
ccc
,
pWhitePtFrom
,
pWhitePtTo
,
destSpecFmt
,
XcmsCIELuvWhiteShiftColors
(
pColors_in_out
,
nColors
,
pCompressed
)
XcmsCCC
ccc
,
XcmsCCC
ccc
;
XcmsColor
*
pWhitePtFrom
,
XcmsColor
*
pWhitePtFrom
;
XcmsColor
*
pWhitePtTo
,
XcmsColor
*
pWhitePtTo
;
XcmsColorFormat
destSpecFmt
,
XcmsColorFormat
destSpecFmt
;
XcmsColor
*
pColors_in_out
,
XcmsColor
*
pColors_in_out
;
unsigned
int
nColors
,
unsigned
int
nColors
;
Bool
*
pCompressed
)
Bool
*
pCompressed
;
/*
/*
* DESCRIPTION
* DESCRIPTION
* Adjusts color specifications in an array of XcmsColor
* Adjusts color specifications in an array of XcmsColor
...
...
nx-X11/lib/X11/OfCCC.c
View file @
e868fbbf
...
@@ -55,8 +55,8 @@
...
@@ -55,8 +55,8 @@
*/
*/
Display
*
Display
*
XcmsDisplayOfCCC
(
ccc
)
XcmsDisplayOfCCC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Queries the Display of the specified CCC.
* Queries the Display of the specified CCC.
...
@@ -78,8 +78,8 @@ XcmsDisplayOfCCC(ccc)
...
@@ -78,8 +78,8 @@ XcmsDisplayOfCCC(ccc)
*/
*/
Visual
*
Visual
*
XcmsVisualOfCCC
(
ccc
)
XcmsVisualOfCCC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Queries the Visual of the specified CCC.
* Queries the Visual of the specified CCC.
...
@@ -101,8 +101,8 @@ XcmsVisualOfCCC(ccc)
...
@@ -101,8 +101,8 @@ XcmsVisualOfCCC(ccc)
*/
*/
int
int
XcmsScreenNumberOfCCC
(
ccc
)
XcmsScreenNumberOfCCC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Queries the screen number of the specified CCC.
* Queries the screen number of the specified CCC.
...
@@ -124,8 +124,8 @@ XcmsScreenNumberOfCCC(ccc)
...
@@ -124,8 +124,8 @@ XcmsScreenNumberOfCCC(ccc)
*/
*/
XcmsColor
*
XcmsColor
*
XcmsScreenWhitePointOfCCC
(
ccc
)
XcmsScreenWhitePointOfCCC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Queries the screen white point of the specified CCC.
* Queries the screen white point of the specified CCC.
...
@@ -147,8 +147,8 @@ XcmsScreenWhitePointOfCCC(ccc)
...
@@ -147,8 +147,8 @@ XcmsScreenWhitePointOfCCC(ccc)
*/
*/
XcmsColor
*
XcmsColor
*
XcmsClientWhitePointOfCCC
(
ccc
)
XcmsClientWhitePointOfCCC
(
XcmsCCC
ccc
;
XcmsCCC
ccc
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Queries the client white point of the specified CCC.
* Queries the client white point of the specified CCC.
...
...
nx-X11/lib/X11/PrOfId.c
View file @
e868fbbf
...
@@ -47,8 +47,8 @@
...
@@ -47,8 +47,8 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
char
*
char
*
XcmsPrefixOfFormat
(
id
)
XcmsPrefixOfFormat
(
XcmsColorFormat
id
;
XcmsColorFormat
id
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Returns the color space prefix for the specified color
* Returns the color space prefix for the specified color
...
...
nx-X11/lib/X11/QBlack.c
View file @
e868fbbf
...
@@ -55,10 +55,10 @@
...
@@ -55,10 +55,10 @@
*/
*/
Status
Status
XcmsQueryBlack
(
ccc
,
target_format
,
pColor_ret
)
XcmsQueryBlack
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColorFormat
target_format
;
XcmsColorFormat
target_format
,
XcmsColor
*
pColor_ret
;
XcmsColor
*
pColor_ret
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Returns the color specification in the target format for
* Returns the color specification in the target format for
...
...
nx-X11/lib/X11/QBlue.c
View file @
e868fbbf
...
@@ -55,10 +55,10 @@
...
@@ -55,10 +55,10 @@
*/
*/
Status
Status
XcmsQueryBlue
(
ccc
,
target_format
,
pColor_ret
)
XcmsQueryBlue
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColorFormat
target_format
;
XcmsColorFormat
target_format
,
XcmsColor
*
pColor_ret
;
XcmsColor
*
pColor_ret
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Returns the color specification in the target format for
* Returns the color specification in the target format for
...
...
nx-X11/lib/X11/QGreen.c
View file @
e868fbbf
...
@@ -55,10 +55,10 @@
...
@@ -55,10 +55,10 @@
*/
*/
Status
Status
XcmsQueryGreen
(
ccc
,
target_format
,
pColor_ret
)
XcmsQueryGreen
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColorFormat
target_format
;
XcmsColorFormat
target_format
,
XcmsColor
*
pColor_ret
;
XcmsColor
*
pColor_ret
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Returns the color specification in the target format for
* Returns the color specification in the target format for
...
...
nx-X11/lib/X11/QRed.c
View file @
e868fbbf
...
@@ -55,10 +55,10 @@
...
@@ -55,10 +55,10 @@
*/
*/
Status
Status
XcmsQueryRed
(
ccc
,
target_format
,
pColor_ret
)
XcmsQueryRed
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColorFormat
target_format
;
XcmsColorFormat
target_format
,
XcmsColor
*
pColor_ret
;
XcmsColor
*
pColor_ret
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Returns the color specification in the target format for
* Returns the color specification in the target format for
...
...
nx-X11/lib/X11/QWhite.c
View file @
e868fbbf
...
@@ -55,10 +55,10 @@
...
@@ -55,10 +55,10 @@
*/
*/
Status
Status
XcmsQueryWhite
(
ccc
,
target_format
,
pColor_ret
)
XcmsQueryWhite
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColorFormat
target_format
;
XcmsColorFormat
target_format
,
XcmsColor
*
pColor_ret
;
XcmsColor
*
pColor_ret
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Returns the color specification in the target format for
* Returns the color specification in the target format for
...
...
nx-X11/lib/X11/QuCol.c
View file @
e868fbbf
...
@@ -53,11 +53,11 @@
...
@@ -53,11 +53,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsQueryColor
(
dpy
,
colormap
,
pXcmsColor_in_out
,
result_format
)
XcmsQueryColor
(
Display
*
dpy
;
Display
*
dpy
,
Colormap
colormap
;
Colormap
colormap
,
XcmsColor
*
pXcmsColor_in_out
;
XcmsColor
*
pXcmsColor_in_out
,
XcmsColorFormat
result_format
;
XcmsColorFormat
result_format
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* This routine uses XQueryColor to obtain the X RGB values
* This routine uses XQueryColor to obtain the X RGB values
...
...
nx-X11/lib/X11/QuCols.c
View file @
e868fbbf
...
@@ -52,12 +52,12 @@
...
@@ -52,12 +52,12 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsQueryColors
(
dpy
,
colormap
,
pXcmsColors_in_out
,
nColors
,
result_format
)
XcmsQueryColors
(
Display
*
dpy
;
Display
*
dpy
,
Colormap
colormap
;
Colormap
colormap
,
XcmsColor
*
pXcmsColors_in_out
;
XcmsColor
*
pXcmsColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
,
XcmsColorFormat
result_format
;
XcmsColorFormat
result_format
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* This routine uses XQueryColors to obtain the X RGB values
* This routine uses XQueryColors to obtain the X RGB values
...
...
nx-X11/lib/X11/SetCCC.c
View file @
e868fbbf
...
@@ -55,9 +55,9 @@
...
@@ -55,9 +55,9 @@
*/
*/
Status
Status
XcmsSetWhitePoint
(
ccc
,
pColor
)
XcmsSetWhitePoint
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pColor
;
XcmsColor
*
pColor
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Sets the Client White Point in the specified CCC.
* 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 @@
...
@@ -53,10 +53,10 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsStoreColor
(
dpy
,
colormap
,
pColor_in
)
XcmsStoreColor
(
Display
*
dpy
;
Display
*
dpy
,
Colormap
colormap
;
Colormap
colormap
,
XcmsColor
*
pColor_in
;
XcmsColor
*
pColor_in
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Given a device-dependent or device-independent color
* Given a device-dependent or device-independent color
...
...
nx-X11/lib/X11/StCols.c
View file @
e868fbbf
...
@@ -53,13 +53,12 @@
...
@@ -53,13 +53,12 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsStoreColors
(
dpy
,
colormap
,
pColors_in
,
XcmsStoreColors
(
nColors
,
pCompressed
)
Display
*
dpy
,
Display
*
dpy
;
Colormap
colormap
,
Colormap
colormap
;
XcmsColor
*
pColors_in
,
XcmsColor
*
pColors_in
;
unsigned
int
nColors
,
unsigned
int
nColors
;
Bool
*
pCompressed
)
Bool
*
pCompressed
;
/*
/*
* DESCRIPTION
* DESCRIPTION
* Given device-dependent or device-independent color
* 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(
...
@@ -142,6 +142,23 @@ CIEXYZ_ParseString(
&
pColor
->
spec
.
CIEXYZ
.
X
,
&
pColor
->
spec
.
CIEXYZ
.
X
,
&
pColor
->
spec
.
CIEXYZ
.
Y
,
&
pColor
->
spec
.
CIEXYZ
.
Y
,
&
pColor
->
spec
.
CIEXYZ
.
Z
)
!=
3
)
{
&
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
);
return
(
XcmsFailure
);
}
}
pColor
->
format
=
XcmsCIEXYZFormat
;
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 @@
...
@@ -47,11 +47,11 @@
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsAllocColor
(
dpy
,
colormap
,
pXcmsColor_in_out
,
result_format
)
XcmsAllocColor
(
Display
*
dpy
;
Display
*
dpy
,
Colormap
colormap
;
Colormap
colormap
,
XcmsColor
*
pXcmsColor_in_out
;
XcmsColor
*
pXcmsColor_in_out
,
XcmsColorFormat
result_format
;
XcmsColorFormat
result_format
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Given a device-dependent or device-independent color
* 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(
...
@@ -142,7 +142,7 @@ CmapRecForColormap(
visualTemplate
.
screen
=
i
;
visualTemplate
.
screen
=
i
;
visualList
=
XGetVisualInfo
(
dpy
,
VisualScreenMask
,
&
visualTemplate
,
visualList
=
XGetVisualInfo
(
dpy
,
VisualScreenMask
,
&
visualTemplate
,
&
nVisualsMatched
);
&
nVisualsMatched
);
if
(
nVisualsMatched
==
0
)
{
if
(
visualList
==
NULL
)
{
continue
;
continue
;
}
}
...
@@ -232,11 +232,11 @@ CmapRecForColormap(
...
@@ -232,11 +232,11 @@ CmapRecForColormap(
* SYNOPSIS
* SYNOPSIS
*/
*/
XcmsCmapRec
*
XcmsCmapRec
*
_XcmsAddCmapRec
(
dpy
,
cmap
,
windowID
,
visual
)
_XcmsAddCmapRec
(
Display
*
dpy
;
Display
*
dpy
,
Colormap
cmap
;
Colormap
cmap
,
Window
windowID
;
Window
windowID
,
Visual
*
visual
;
Visual
*
visual
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Create an XcmsCmapRec for the specified cmap, windowID,
* Create an XcmsCmapRec for the specified cmap, windowID,
...
@@ -408,9 +408,9 @@ _XcmsFreeClientCmaps(
...
@@ -408,9 +408,9 @@ _XcmsFreeClientCmaps(
* SYNOPSIS
* SYNOPSIS
*/
*/
XcmsCCC
XcmsCCC
XcmsCCCOfColormap
(
dpy
,
cmap
)
XcmsCCCOfColormap
(
Display
*
dpy
;
Display
*
dpy
,
Colormap
cmap
;
Colormap
cmap
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Finds the XcmsCCC associated with the specified colormap.
* Finds the XcmsCCC associated with the specified colormap.
...
@@ -476,10 +476,10 @@ XcmsCCCOfColormap(dpy, cmap)
...
@@ -476,10 +476,10 @@ XcmsCCCOfColormap(dpy, cmap)
return
(
NULL
);
return
(
NULL
);
}
}
XcmsCCC
XcmsSetCCCOfColormap
(
dpy
,
cmap
,
ccc
)
XcmsCCC
XcmsSetCCCOfColormap
(
Display
*
dpy
;
Display
*
dpy
,
Colormap
cmap
;
Colormap
cmap
,
XcmsCCC
ccc
;
XcmsCCC
ccc
)
{
{
XcmsCCC
prev_ccc
=
NULL
;
XcmsCCC
prev_ccc
=
NULL
;
XcmsCmapRec
*
pRec
;
XcmsCmapRec
*
pRec
;
...
...
nx-X11/lib/X11/cmsColNm.c
View file @
e868fbbf
...
@@ -706,7 +706,7 @@ LoadColornameDB(void)
...
@@ -706,7 +706,7 @@ LoadColornameDB(void)
{
{
int
size
;
int
size
;
FILE
*
stream
;
FILE
*
stream
;
char
*
pathname
;
c
onst
c
har
*
pathname
;
struct
stat
txt
;
struct
stat
txt
;
int
length
;
int
length
;
...
@@ -732,10 +732,17 @@ LoadColornameDB(void)
...
@@ -732,10 +732,17 @@ LoadColornameDB(void)
}
}
if
((
stream
=
_XFopenFile
(
pathname
,
"r"
))
==
NULL
)
{
if
((
stream
=
_XFopenFile
(
pathname
,
"r"
))
==
NULL
)
{
/* can't open file */
XcmsColorDbState
=
XcmsDbInitFailure
;
return
(
XcmsFailure
);
return
(
XcmsFailure
);
}
}
stringSectionSize
(
stream
,
&
nEntries
,
&
size
);
if
(
stringSectionSize
(
stream
,
&
nEntries
,
&
size
)
!=
XcmsSuccess
||
nEntries
==
0
)
{
(
void
)
fclose
(
stream
);
XcmsColorDbState
=
XcmsDbInitFailure
;
return
(
XcmsFailure
);
}
rewind
(
stream
);
rewind
(
stream
);
strings
=
(
char
*
)
Xmalloc
(
size
);
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;
...
@@ -51,8 +51,7 @@ int sqrt_loopcount;
/* for cube roots, x^3 - a = 0, x_new = x - 1/3 (x - a/x^2) */
/* for cube roots, x^3 - a = 0, x_new = x - 1/3 (x - a/x^2) */
double
double
_XcmsCubeRoot
(
a
)
_XcmsCubeRoot
(
double
a
)
double
a
;
{
{
register
double
abs_a
,
cur_guess
,
delta
;
register
double
abs_a
,
cur_guess
,
delta
;
...
@@ -96,8 +95,7 @@ _XcmsCubeRoot(a)
...
@@ -96,8 +95,7 @@ _XcmsCubeRoot(a)
/* for square roots, x^2 - a = 0, x_new = x - 1/2 (x - a/x) */
/* for square roots, x^2 - a = 0, x_new = x - 1/2 (x - a/x) */
double
double
_XcmsSquareRoot
(
a
)
_XcmsSquareRoot
(
double
a
)
double
a
;
{
{
register
double
cur_guess
,
delta
;
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(
...
@@ -503,8 +503,7 @@ static double _XcmsPolynomial(
*/
*/
double
double
_XcmsSine
(
x
)
_XcmsSine
(
double
x
)
double
x
;
{
{
double
y
;
double
y
;
double
yt2
;
double
yt2
;
...
@@ -544,8 +543,7 @@ double x;
...
@@ -544,8 +543,7 @@ double x;
* SYNOPSIS
* SYNOPSIS
*/
*/
double
double
_XcmsArcTangent
(
x
)
_XcmsArcTangent
(
double
x
)
double
x
;
/*
/*
* DESCRIPTION
* DESCRIPTION
* Computes the arctangent.
* Computes the arctangent.
...
...
nx-X11/lib/X11/uvY.c
View file @
e868fbbf
...
@@ -157,6 +157,23 @@ CIEuvY_ParseString(
...
@@ -157,6 +157,23 @@ CIEuvY_ParseString(
&
pColor
->
spec
.
CIEuvY
.
u_prime
,
&
pColor
->
spec
.
CIEuvY
.
u_prime
,
&
pColor
->
spec
.
CIEuvY
.
v_prime
,
&
pColor
->
spec
.
CIEuvY
.
v_prime
,
&
pColor
->
spec
.
CIEuvY
.
Y
)
!=
3
)
{
&
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
);
return
(
XcmsFailure
);
}
}
pColor
->
format
=
XcmsCIEuvYFormat
;
pColor
->
format
=
XcmsCIEuvYFormat
;
...
@@ -208,11 +225,11 @@ _XcmsCIEuvY_ValidSpec(
...
@@ -208,11 +225,11 @@ _XcmsCIEuvY_ValidSpec(
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIEuvYToCIEXYZ
(
ccc
,
puvY_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCIEuvYToCIEXYZ
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
puvY_WhitePt
;
XcmsColor
*
puvY_WhitePt
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* Converts color specifications in an array of XcmsColor
...
@@ -323,11 +340,11 @@ XcmsCIEuvYToCIEXYZ(ccc, puvY_WhitePt, pColors_in_out, nColors)
...
@@ -323,11 +340,11 @@ XcmsCIEuvYToCIEXYZ(ccc, puvY_WhitePt, pColors_in_out, nColors)
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIEXYZToCIEuvY
(
ccc
,
puvY_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCIEXYZToCIEuvY
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
puvY_WhitePt
;
XcmsColor
*
puvY_WhitePt
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* Converts color specifications in an array of XcmsColor
...
...
nx-X11/lib/X11/xyY.c
View file @
e868fbbf
...
@@ -156,6 +156,23 @@ CIExyY_ParseString(
...
@@ -156,6 +156,23 @@ CIExyY_ParseString(
&
pColor
->
spec
.
CIExyY
.
x
,
&
pColor
->
spec
.
CIExyY
.
x
,
&
pColor
->
spec
.
CIExyY
.
y
,
&
pColor
->
spec
.
CIExyY
.
y
,
&
pColor
->
spec
.
CIExyY
.
Y
)
!=
3
)
{
&
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
);
return
(
XcmsFailure
);
}
}
pColor
->
format
=
XcmsCIExyYFormat
;
pColor
->
format
=
XcmsCIExyYFormat
;
...
@@ -216,11 +233,11 @@ XcmsCIExyY_ValidSpec(
...
@@ -216,11 +233,11 @@ XcmsCIExyY_ValidSpec(
* SYNOPSIS
* SYNOPSIS
*/
*/
Status
Status
XcmsCIExyYToCIEXYZ
(
ccc
,
pxyY_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCIExyYToCIEXYZ
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pxyY_WhitePt
;
XcmsColor
*
pxyY_WhitePt
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* Converts color specifications in an array of XcmsColor
...
@@ -323,11 +340,11 @@ XcmsCIExyYToCIEXYZ(ccc, pxyY_WhitePt, pColors_in_out, nColors)
...
@@ -323,11 +340,11 @@ XcmsCIExyYToCIEXYZ(ccc, pxyY_WhitePt, pColors_in_out, nColors)
*/
*/
/* ARGSUSED */
/* ARGSUSED */
Status
Status
XcmsCIEXYZToCIExyY
(
ccc
,
pxyY_WhitePt
,
pColors_in_out
,
nColors
)
XcmsCIEXYZToCIExyY
(
XcmsCCC
ccc
;
XcmsCCC
ccc
,
XcmsColor
*
pxyY_WhitePt
;
XcmsColor
*
pxyY_WhitePt
,
XcmsColor
*
pColors_in_out
;
XcmsColor
*
pColors_in_out
,
unsigned
int
nColors
;
unsigned
int
nColors
)
/*
/*
* DESCRIPTION
* DESCRIPTION
* Converts color specifications in an array of XcmsColor
* 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