--- ray/src/px/ciq.h 1991/11/12 16:05:31 2.1 +++ ray/src/px/ciq.h 2003/07/27 22:12:03 2.4 @@ -1,13 +1,19 @@ -/* Copyright 1988 Regents of the University of California */ +/* RCSid: $Id: ciq.h,v 2.4 2003/07/27 22:12:03 schorsch Exp $ */ -/* SCCSid "$SunId$ LBL" */ +#ifndef _RAD_CIQ_H_ +#define _RAD_CIQ_H_ #include + #include "pic.h" -#define red(i) ((i)>>7&0xf8|4) /* 5 bits red, 5 bits green, 5 bits blue */ -#define gre(i) ((i)>>2&0xf8|4) -#define blu(i) ((i)<<3&0xf8|4) +#ifdef __cplusplus +extern "C" { +#endif + +#define red(i) (((i)>>7&0xf8)|4) /* 5 bits red, 5 bits green, 5 bits blue */ +#define gre(i) (((i)>>2&0xf8)|4) +#define blu(i) (((i)<<3&0xf8)|4) #define len 32768 extern int hist[len]; /* list of frequencies or pixelvalues for coded color */ @@ -19,3 +25,10 @@ extern int n; /* number of colors in it */ #define line3alloc(xdim) (rgbpixel *)emalloc(sizeof(rgbpixel)*xdim) extern char *emalloc(); + + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_CIQ_H_ */ +