--- ray/src/common/color.h 2003/05/13 17:58:32 2.20 +++ ray/src/common/color.h 2003/10/18 04:46:24 2.27 @@ -1,4 +1,4 @@ -/* RCSid $Id: color.h,v 2.20 2003/05/13 17:58:32 greg Exp $ */ +/* RCSid $Id: color.h,v 2.27 2003/10/18 04:46:24 greg Exp $ */ /* * color.h - header for routines using pixel color values. * @@ -9,10 +9,9 @@ * for speed. Stored color values use 4 bytes which contain * three single byte mantissas and a common exponent. */ +#ifndef _RAD_COLOR_H_ +#define _RAD_COLOR_H_ -#include "copyright.h" - -#include #include #ifdef __cplusplus @@ -114,7 +113,7 @@ typedef float COLORMAT[3][3]; /* color coordinate con #define D65EFFICACY 203. /* standard illuminant D65 */ #define INCEFFICACY 160. /* illuminant A (incand.) */ #define SUNEFFICACY 208. /* illuminant B (solar dir.) */ -#define SKYEFFICACY D65EFFICACY /* skylight */ +#define SKYEFFICACY D65EFFICACY /* skylight (should be 110) */ #define DAYEFFICACY D65EFFICACY /* combined sky and solar */ #define luminance(col) (WHTEFFICACY * bright(col)) @@ -198,47 +197,9 @@ extern COLOR cblack, cwhite; /* black (0,0,0) and whi #define rgb_cie(xyz,rgb) colortrans(xyz,rgb2xyzmat,rgb) -#ifdef BSD -#define cpcolormat(md,ms) bcopy((void *)ms,(void *)md,sizeof(COLORMAT)) -#else #define cpcolormat(md,ms) memcpy((void *)md,(void *)ms,sizeof(COLORMAT)) -#endif -#ifdef NOPROTO /* defined in color.c */ -extern char *tempbuffer(); -extern int fwritecolrs(); -extern int freadcolrs(); -extern int fwritescan(); -extern int freadscan(); -extern void setcolr(); -extern void colr_color(); -extern int bigdiff(); - /* defined in spec_rgb.c */ -extern void spec_rgb(); -extern void spec_cie(); -extern void cie_rgb(); -extern int clipgamut(); -extern void colortrans(); -extern void multcolormat(); -extern void compxyz2rgbmat(); -extern void comprgb2xyzmat(); -extern void comprgb2rgbmat(); -extern void compxyzWBmat(); -extern void compxyz2rgbWBmat(); -extern void comprgb2xyzWBmat(); -extern void comprgb2rgbWBmat(); - /* defined in colrops.c */ -extern int setcolrcor(); -extern int setcolrinv(); -extern int setcolrgam(); -extern int colrs_gambs(); -extern int gambs_colrs(); -extern void shiftcolrs(); -extern void normcolrs(); - -#else - /* defined in color.c */ extern char *tempbuffer(unsigned int len); extern int fwritecolrs(COLR *scanline, int len, FILE *fp); extern int freadcolrs(COLR *scanline, int len, FILE *fp); @@ -265,16 +226,17 @@ extern void compxyz2rgbWBmat(COLORMAT mat, RGBPRIMS pr extern void comprgb2xyzWBmat(COLORMAT mat, RGBPRIMS pr); extern void comprgb2rgbWBmat(COLORMAT mat, RGBPRIMS pr1, RGBPRIMS pr2); /* defined in colrops.c */ -extern int setcolrcor(double (*f)(), double a2); -extern int setcolrinv(double (*f)(), double a2); +extern int setcolrcor(double (*f)(double, double), double a2); +extern int setcolrinv(double (*f)(double, double), double a2); extern int setcolrgam(double g); extern int colrs_gambs(COLR *scan, int len); extern int gambs_colrs(COLR *scan, int len); extern void shiftcolrs(COLR *scan, int len, int adjust); extern void normcolrs(COLR *scan, int len, int adjust); -#endif #ifdef __cplusplus } #endif +#endif /* _RAD_COLOR_H_ */ +