--- ray/src/cv/tmesh2rad.c 2003/03/04 01:42:29 2.11 +++ ray/src/cv/tmesh2rad.c 2003/07/27 22:12:02 2.14 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: tmesh2rad.c,v 2.11 2003/03/04 01:42:29 greg Exp $"; +static const char RCSid[] = "$Id: tmesh2rad.c,v 2.14 2003/07/27 22:12:02 schorsch Exp $"; #endif /* * Convert a trianglular mesh into a Radiance description. @@ -52,7 +52,7 @@ typedef struct { VERTEX *vlist = NULL; /* our vertex list */ int nverts = 0; /* number of vertices in our list */ -#define novert(i) ((i)<0|(i)>=nverts || !(vlist[i].flags&V_DEFINED)) +#define novert(i) (((i)<0)|((i)>=nverts) || !(vlist[i].flags&V_DEFINED)) #define CHUNKSIZ 128 /* vertex allocation chunk size */ @@ -203,7 +203,7 @@ register VERTEX *v1, *v2, *v3; static int ntri = 0; int flatness = ISFLAT; BARYCCM bvecs; - FLOAT bvm[3][3]; + RREAL bvm[3][3]; register int i; /* compute barycentric coordinates */ if (v1->flags & v2->flags & v3->flags & (V_HASINDX|V_HASNORM)) @@ -270,7 +270,7 @@ double x, y, z; if (vlist == NULL) vlist = (VERTEX *)malloc(nverts*sizeof(VERTEX)); else - vlist = (VERTEX *)realloc((char *)vlist, + vlist = (VERTEX *)realloc((void *)vlist, nverts*sizeof(VERTEX)); if (vlist == NULL) { fprintf(stderr,