55 |
|
|
56 |
|
typedef struct { |
57 |
|
uint32 nrm; /* number of beam rays bundled in memory */ |
58 |
< |
unsigned long tick; /* clock tick for LRU replacement */ |
58 |
> |
uint32 tick; /* clock tick for LRU replacement */ |
59 |
|
} BEAM; /* followed by nrm RAYVAL's */ |
60 |
|
|
61 |
|
#define hdbray(bp) ((RAYVAL *)((bp)+1)) |
132 |
|
|
133 |
|
#define HOLOFMT "Holodeck" /* file format identifier */ |
134 |
|
#define HOLOVERS 0 /* file format version number */ |
135 |
< |
#define HOLOMAGIC (323+sizeof(off_t)+8*HOLOVERS) /* file magic number */ |
135 |
> |
#define HOLOMAGIC (324+sizeof(BEAMI)+16*HOLOVERS) /* file magic number */ |
136 |
|
|
137 |
|
/* |
138 |
|
* A holodeck file consists of an information header terminated by a |
139 |
|
* blank line, with "FORMAT=Holodeck" somewhere in it. |
140 |
|
* The first integer after the information header is the |
141 |
|
* above magic number, which includes the file format version number. |
142 |
< |
* The first longword after the magic number is a pointer to the pointer |
143 |
< |
* just before the SECOND holodeck section, or 0 if there is only one. |
142 |
> |
* The first longword (off_t) after the magic number is a pointer to the |
143 |
> |
* pointer just before the SECOND holodeck section, or 0 if there is only one. |
144 |
|
* This longword is immediately followed by the first holodeck |
145 |
|
* section header and directory. |
146 |
|
* Similarly, every holodeck section in the file is preceeded by |
173 |
|
extern void hddone(HOLO *hp); |
174 |
|
extern int hdsync(HOLO *hp, int all); |
175 |
|
extern off_t hdfilen(int fd); |
176 |
< |
extern off_t hdfiluse(int fd, int all); |
176 |
> |
extern off_t hdfiluse(int fd); |
177 |
|
extern RAYVAL * hdnewrays(HOLO *hp, int i, int nr); |
178 |
|
extern BEAM * hdgetbeam(HOLO *hp, int i); |
179 |
|
extern void hdloadbeams(HDBEAMI *hb, int n, void (*bf)(BEAM *bp, HDBEAMI *hb)); |