--- ray/src/hd/holo.h 1998/08/12 17:54:15 3.15 +++ ray/src/hd/holo.h 1998/12/04 11:37:47 3.18 @@ -15,6 +15,10 @@ #define HDMAX 128 /* maximum active holodeck sections */ #endif +#ifndef MAXDIRSE +#define MAXDIRSE 32 /* maximum seeks per directory write */ +#endif + #define DCINF (unsigned)((1L<<16)-1) /* special value for infinity */ #define DCLIN (unsigned)(1L<<11) /* linear depth limit */ @@ -65,10 +69,12 @@ typedef struct holo { FVECT xv[3]; /* side vectors (second) */ int2 grid[3]; /* grid resolution (third) */ int fd; /* file descriptor */ - short dirty; /* beam index needs update to file */ + struct { + int s, n; /* dirty section start, length */ + } dirseg[MAXDIRSE+1]; /* dirty beam index segments */ + short dirty; /* number of dirty segments */ double tlin; /* linear range for depth encoding */ FVECT wg[3]; /* wall grid vectors (derived) */ - double wo[6]; /* wall grid offsets (derived) */ int wi[6]; /* wall super-indices (derived) */ char *priv; /* pointer to private client data */ BEAM **bl; /* beam pointers (memory cache) */ @@ -86,8 +92,8 @@ typedef struct { #define bnrays(hp,i) ((hp)->bl[i]!=NULL ? (hp)->bl[i]->nrm : (hp)->bi[i].nrd) -#define hdflush(hp) (hdfreebeam(hp,0) && hdsync(hp,0)) -#define hdclobber(hp) (hdkillbeam(hp,0) && hdsync(hp,0)) +#define hdflush(hp) (hdfreebeam(hp,0), hdsync(hp,0)) +#define hdclobber(hp) (hdkillbeam(hp,0), hdsync(hp,0)) extern HOLO *hdinit(), *hdalloc(); extern BEAM *hdgetbeam();