| 10 |
|
#include "platform.h" |
| 11 |
|
#include "rterror.h" |
| 12 |
|
#include "rholo.h" |
| 13 |
– |
#include "view.h" |
| 13 |
|
|
| 14 |
|
char *progname; /* our program name */ |
| 15 |
|
char *hdkfile; /* holodeck file name */ |
| 182 |
|
|
| 183 |
|
static void |
| 184 |
|
render_frame( /* render frame from beam values */ |
| 185 |
< |
register PACKHEAD *bl, |
| 185 |
> |
PACKHEAD *bl, |
| 186 |
|
int nb |
| 187 |
|
) |
| 188 |
|
{ |
| 189 |
< |
register HDBEAMI *bil; |
| 190 |
< |
register int i; |
| 189 |
> |
HDBEAMI *bil; |
| 190 |
> |
int i; |
| 191 |
|
|
| 192 |
|
if (nb <= 0) return; |
| 193 |
|
if ((bil = (HDBEAMI *)malloc(nb*sizeof(HDBEAMI))) == NULL) |
| 250 |
|
{ |
| 251 |
|
int lastr = -1, nunrend = 0; |
| 252 |
|
int32 lastp, lastrp; |
| 253 |
< |
register int32 p; |
| 254 |
< |
register double d; |
| 253 |
> |
int32 p; |
| 254 |
> |
double d; |
| 255 |
|
/* compute final pixel values */ |
| 256 |
|
for (p = hres*vres; p--; ) { |
| 257 |
|
if (myweight[p] <= FTINY) { |
| 285 |
|
int fd; |
| 286 |
|
FILE *fp; |
| 287 |
|
int n; |
| 288 |
< |
int32 nextloc; |
| 288 |
> |
off_t nextloc; |
| 289 |
|
/* open holodeck file */ |
| 290 |
|
if ((fp = fopen(hdkfile, "r")) == NULL) { |
| 291 |
|
sprintf(errmsg, "cannot open \"%s\" for reading", hdkfile); |
| 303 |
|
fd = dup(fileno(fp)); /* dup file descriptor */ |
| 304 |
|
fclose(fp); /* done with stdio */ |
| 305 |
|
for (n = 0; nextloc > 0L; n++) { /* initialize each section */ |
| 306 |
< |
lseek(fd, (off_t)nextloc, SEEK_SET); |
| 306 |
> |
lseek(fd, nextloc, SEEK_SET); |
| 307 |
|
read(fd, (char *)&nextloc, sizeof(nextloc)); |
| 308 |
|
hdinit(fd, NULL); |
| 309 |
|
} |
| 318 |
|
|
| 319 |
|
void |
| 320 |
|
eputs(s) /* put error message to stderr */ |
| 321 |
< |
register char *s; |
| 321 |
> |
char *s; |
| 322 |
|
{ |
| 323 |
|
static int midline = 0; |
| 324 |
|
|