--- ray/src/common/object.h 1991/10/23 11:52:57 1.4 +++ ray/src/common/object.h 1999/01/19 16:01:54 2.7 @@ -1,6 +1,6 @@ -/* Copyright (c) 1986 Regents of the University of California */ +/* Copyright (c) 1999 Silicon Graphics, Inc. */ -/* SCCSid "$SunId$ LBL" */ +/* SCCSid "$SunId$ SGI" */ /* * object.h - header file for routines using objects and object sets. @@ -19,7 +19,7 @@ typedef struct { short nsargs; /* # of string arguments */ short nfargs; /* # of real arguments */ char **sarg; /* string arguments */ - double *farg; /* real arguments */ + FLOAT *farg; /* real arguments */ #ifdef IARGS short niargs; /* # of integer arguments */ long *iarg; /* integer arguments */ @@ -36,9 +36,9 @@ typedef struct { #ifndef OBJECT #ifdef BIGMEM -#define OBJECT int /* index to object array */ +#define OBJECT int4 /* index to object array */ #else -#define OBJECT short /* index to object array */ +#define OBJECT int2 /* index to object array */ #endif #endif @@ -48,21 +48,22 @@ typedef struct { char *oname; /* object name */ FUNARGS oargs; /* object specification */ char *os; /* object structure */ - long lastrno; /* last ray this was used with */ } OBJREC; #ifndef MAXOBJBLK #ifdef BIGMEM -#define MAXOBJBLK 4095 /* maximum number of object blocks */ +#define MAXOBJBLK 65535 /* maximum number of object blocks */ #else -#define MAXOBJBLK 511 /* maximum number of object blocks */ +#define MAXOBJBLK 63 /* maximum number of object blocks */ #endif #endif extern OBJREC *objblock[MAXOBJBLK]; /* the object blocks */ extern OBJECT nobjects; /* # of objects */ -#define objptr(obj) (objblock[(obj)>>6]+((obj)&077)) +#define OBJBLKSHFT 9 +#define OBJBLKSIZ (1<>OBJBLKSHFT]+((obj)&(OBJBLKSIZ-1))) #define OVOID (-1) /* void object */ #define VOIDID "void" /* void identifier */ @@ -73,3 +74,7 @@ extern OBJECT nobjects; /* # of objects */ */ #define MAXSET 127 /* maximum object set size */ + +OBJECT *setsave(); + +#define setfree(os) free((char *)(os))