| 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) |
| 216 |
|
/* prepare output */ |
| 217 |
|
if (outspec != NULL) { |
| 218 |
|
sprintf(fname, outspec, fn); |
| 219 |
< |
if (freopen(fname, "w", stdout) == NULL) { |
| 219 |
> |
if (freopen(fname, "wb", stdout) == NULL) { |
| 220 |
|
sprintf(errmsg, "cannot open output \"%s\"", fname); |
| 221 |
|
error(SYSTEM, errmsg); |
| 222 |
|
} |
| 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) { |
| 287 |
|
int n; |
| 288 |
|
off_t nextloc; |
| 289 |
|
/* open holodeck file */ |
| 290 |
< |
if ((fp = fopen(hdkfile, "r")) == NULL) { |
| 290 |
> |
if ((fp = fopen(hdkfile, "rb")) == NULL) { |
| 291 |
|
sprintf(errmsg, "cannot open \"%s\" for reading", hdkfile); |
| 292 |
|
error(SYSTEM, errmsg); |
| 293 |
|
} |
| 317 |
|
|
| 318 |
|
|
| 319 |
|
void |
| 320 |
< |
eputs(s) /* put error message to stderr */ |
| 321 |
< |
register char *s; |
| 320 |
> |
eputs(const char *s) /* put error message to stderr */ |
| 321 |
|
{ |
| 322 |
|
static int midline = 0; |
| 323 |
|
|