--- ray/src/cv/rad2mgf.c 1998/10/14 14:48:04 2.15 +++ ray/src/cv/rad2mgf.c 2003/10/22 02:06:34 2.20 @@ -1,16 +1,16 @@ -/* Copyright (c) 1995 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: rad2mgf.c,v 2.20 2003/10/22 02:06:34 greg Exp $"; #endif - /* * Convert Radiance scene description to MGF */ +#include "platform.h" #include "standard.h" #include #include +#include + #include "object.h" #include "color.h" #include "lookup.h" @@ -22,8 +22,6 @@ int o_instance(), o_illum(); int o_plastic(), o_metal(), o_glass(), o_dielectric(), o_mirror(), o_trans(), o_light(); -extern int free(); - LUTAB rmats = LU_SINIT(free,NULL); /* defined material table */ LUTAB rdispatch = LU_SINIT(NULL,NULL); /* function dispatch table */ @@ -265,7 +263,7 @@ char *id; *cp2++ = 'O'; } for (cp = id; cp < end; *cp2++ = *cp++) { - if (*cp < '!' | *cp > '~') /* limit to visible chars */ + if ((*cp < '!') | (*cp > '~')) /* limit to visible chars */ *cp = '?'; diff += *cp != *cp2; } @@ -290,6 +288,7 @@ init() /* initialize dispatch table and output */ add2dispatch("tube", o_cylinder); add2dispatch("ring", o_ring); add2dispatch("instance", o_instance); + add2dispatch("mesh", o_instance); add2dispatch("plastic", o_plastic); add2dispatch("plastic2", o_plastic); add2dispatch("metal", o_metal); @@ -430,7 +429,7 @@ FUNARGS *fa; register char *cp; register int i; - if (fa->nfargs < 9 | fa->nfargs % 3) + if ((fa->nfargs < 9) | (fa->nfargs % 3)) return(-1); setmat(mod); setobj(id); @@ -535,7 +534,7 @@ register FUNARGS *fa; int -o_instance(mod, typ, id, fa) /* convert an instance */ +o_instance(mod, typ, id, fa) /* convert an instance (or mesh) */ char *mod, *typ, *id; FUNARGS *fa; {