| 262 |
|
|
| 263 |
|
rholo() /* holodeck main loop */ |
| 264 |
|
{ |
| 265 |
< |
static int idle = 1; |
| 265 |
> |
static int idle = 0; |
| 266 |
|
PACKET *pl = NULL, *plend; |
| 267 |
|
register PACKET *p; |
| 268 |
|
time_t t; |
| 269 |
|
long l; |
| 270 |
< |
|
| 271 |
< |
if (outdev != NULL) /* check display */ |
| 272 |
< |
if (!disp_check(idle)) |
| 273 |
< |
return(0); |
| 274 |
< |
/* display only? */ |
| 275 |
< |
if (nprocs <= 0) { |
| 270 |
> |
/* check display */ |
| 271 |
> |
if (nprocs <= 0) |
| 272 |
|
idle = 1; |
| 273 |
< |
return(outdev != NULL); |
| 274 |
< |
} |
| 273 |
> |
if (outdev != NULL) { |
| 274 |
> |
if (!disp_check(idle)) |
| 275 |
> |
return(0); /* quit request */ |
| 276 |
> |
if (nprocs <= 0) |
| 277 |
> |
return(1); |
| 278 |
> |
} else if (idle) |
| 279 |
> |
return(0); /* all done */ |
| 280 |
|
/* check file size */ |
| 281 |
|
if (maxdisk > 0 && hdfilen(hdlist[0]->fd) >= maxdisk) { |
| 282 |
|
error(WARNING, "file limit exceeded"); |
| 489 |
|
p->next = freepacks; |
| 490 |
|
freepacks = p; |
| 491 |
|
} |
| 492 |
< |
if (n2flush > 512*RPACKSIZ*nprocs) { |
| 492 |
> |
if (n2flush > 1024*RPACKSIZ*nprocs) { |
| 493 |
|
hdflush(NULL); /* flush holodeck buffers */ |
| 494 |
|
n2flush = 0; |
| 495 |
|
} |