From: Christophe CURIS <[email protected]>

These functions have both an input and an output color, marked the
input color as const to help distinguish.
---
 wrlib/color.c   |    4 ++--
 wrlib/convert.c |    2 +-
 wrlib/wraster.h |    6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/wrlib/color.c b/wrlib/color.c
index c0c7719..085c461 100644
--- a/wrlib/color.c
+++ b/wrlib/color.c
@@ -37,7 +37,7 @@
 #define MIN3(a,b,c)    MIN(MIN(a,b), c)
 #define MAX3(a,b,c)    MAX(MAX(a,b), c)
 
-void RHSVtoRGB(RHSVColor * hsv, RColor * rgb)
+void RHSVtoRGB(const RHSVColor * hsv, RColor * rgb)
 {
        int h = hsv->hue % 360;
        int s = hsv->saturation;
@@ -89,7 +89,7 @@ void RHSVtoRGB(RHSVColor * hsv, RColor * rgb)
        }
 }
 
-void RRGBtoHSV(RColor * rgb, RHSVColor * hsv)
+void RRGBtoHSV(const RColor * rgb, RHSVColor * hsv)
 {
        int h, s, v;
        int max = MAX3(rgb->red, rgb->green, rgb->blue);
diff --git a/wrlib/convert.c b/wrlib/convert.c
index 2b0d415..f690e1f 100644
--- a/wrlib/convert.c
+++ b/wrlib/convert.c
@@ -921,7 +921,7 @@ int RConvertImageMask(RContext * context, RImage * image, 
Pixmap * pixmap, Pixma
        return True;
 }
 
-Bool RGetClosestXColor(RContext * context, RColor * color, XColor * retColor)
+Bool RGetClosestXColor(RContext * context, const RColor * color, XColor * 
retColor)
 {
        if (context->vclass == TrueColor) {
                unsigned short rmask, gmask, bmask;
diff --git a/wrlib/wraster.h b/wrlib/wraster.h
index f01f33d..30dfe92 100644
--- a/wrlib/wraster.h
+++ b/wrlib/wraster.h
@@ -308,7 +308,7 @@ RContext *RCreateContext(Display *dpy, int screen_number,
 
 void RDestroyContext(RContext *context);
 
-Bool RGetClosestXColor(RContext *context, RColor *color, XColor *retColor);
+Bool RGetClosestXColor(RContext *context, const RColor *color, XColor 
*retColor);
 
 /*
  * RImage creation
@@ -407,8 +407,8 @@ void ROperateSegments(RImage *image, int operation, const 
RSegment *segs, int ns
 /*
  * Color convertion
  */
-void RRGBtoHSV(RColor *color, RHSVColor *hsv);
-void RHSVtoRGB(RHSVColor *hsv, RColor *rgb);
+void RRGBtoHSV(const RColor *color, RHSVColor *hsv);
+void RHSVtoRGB(const RHSVColor *hsv, RColor *rgb);
 
 /*
  * Painting
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to