--- ray/src/common/color.h 1997/01/31 12:39:12 2.13 +++ ray/src/common/color.h 1998/10/21 17:48:06 2.17 @@ -1,11 +1,11 @@ -/* Copyright (c) 1997 Regents of the University of California */ +/* Copyright (c) 1998 Silicon Graphics, Inc. */ -/* SCCSid "$SunId$ LBL" */ +/* SCCSid "$SunId$ SGI" */ /* * color.h - header for routines using pixel color values. * - * 12/31/85 + * Must be included after X11 headers, since they declare a BYTE type. * * Two color representations are used, one for calculation and * another for storage. Calculation is done with three floats @@ -23,7 +23,8 @@ #define COLXS 128 /* excess used for exponent */ #define WHT 3 /* used for RGBPRIMS type */ -typedef unsigned char BYTE; /* 8-bit unsigned integer */ +#undef BYTE +#define BYTE unsigned char /* 8-bit unsigned integer */ typedef BYTE COLR[4]; /* red, green, blue (or X,Y,Z), exponent */ @@ -69,8 +70,8 @@ typedef float COLORMAT[3][3]; /* color coordinate con #define CIE_y_w 0.3333 #endif -#define STDPRIMS {CIE_x_r,CIE_y_r,CIE_x_g,CIE_y_g, \ - CIE_x_b,CIE_y_b,CIE_x_w,CIE_y_w} +#define STDPRIMS {{CIE_x_r,CIE_y_r},{CIE_x_g,CIE_y_g}, \ + {CIE_x_b,CIE_y_b},{CIE_x_w,CIE_y_w}} #define CIE_D ( CIE_x_r*(CIE_y_g - CIE_y_b) + \ CIE_x_g*(CIE_y_b - CIE_y_r) + \ @@ -198,6 +199,5 @@ extern COLOR cblack, cwhite; /* black (0,0,0) and wh #ifdef BSD #define cpcolormat(md,ms) bcopy((char *)ms,(char *)md,sizeof(COLORMAT)) #else -extern char *memcpy(); -#define cpcolormat(md,ms) (void)memcpy((char *)md,(char *)ms,sizeof(COLORMAT)) +#define cpcolormat(md,ms) memcpy((char *)md,(char *)ms,sizeof(COLORMAT)) #endif