127 |
|
{ |
128 |
|
extern int global_packet(); |
129 |
|
register int i; |
130 |
< |
/* check output device */ |
131 |
< |
if (outdev != NULL) |
132 |
< |
open_display(outdev); |
130 |
> |
|
131 |
> |
if (outdev != NULL) /* open output device */ |
132 |
> |
disp_open(outdev); |
133 |
|
else if (ncprocs > 0) /* else use global ray feed */ |
134 |
|
init_global(); |
135 |
|
/* record end time */ |
187 |
|
register PACKET *p; |
188 |
|
time_t t; |
189 |
|
long l; |
190 |
< |
/* check display */ |
191 |
< |
if (outdev != NULL && !disp_check(idle)) |
192 |
< |
return(0); |
190 |
> |
|
191 |
> |
if (outdev != NULL) /* check display */ |
192 |
> |
if (!disp_check(idle)) |
193 |
> |
return(0); |
194 |
|
/* display only? */ |
195 |
|
if (ncprocs <= 0) |
196 |
|
return(1); |
368 |
|
{ |
369 |
|
FILE *fp; |
370 |
|
long endloc; |
371 |
< |
/* open input file */ |
372 |
< |
if ((fp = fopen(hdkfile, "r+")) == NULL) { |
373 |
< |
sprintf(errmsg, "cannot open \"%s\" for appending", hdkfile); |
371 |
> |
/* open holodeck file */ |
372 |
> |
if ((fp = fopen(hdkfile, ncprocs>0 ? "r+" : "r")) == NULL) { |
373 |
> |
sprintf(errmsg, "cannot open \"%s\" for %s", hdkfile, |
374 |
> |
ncprocs>0 ? "appending" : "reading"); |
375 |
|
error(SYSTEM, errmsg); |
376 |
|
} |
377 |
|
/* load variables from header */ |
516 |
|
{ |
517 |
|
int status = 0; |
518 |
|
|
519 |
+ |
if (outdev != NULL) /* close display */ |
520 |
+ |
disp_close(); |
521 |
|
if (hdlist[0] != NULL) { /* flush holodeck */ |
522 |
|
if (ncprocs > 0) { |
523 |
|
done_packets(flush_queue()); |