26 |
|
char *hdkfile; /* holodeck file name */ |
27 |
|
char froot[256]; /* root file name */ |
28 |
|
|
29 |
– |
int nowarn = 0; /* turn warnings off? */ |
30 |
– |
|
29 |
|
int ncprocs = 0; /* desired number of compute processes */ |
30 |
|
|
31 |
|
char *outdev = NULL; /* output device name */ |
53 |
|
|
54 |
|
char *sigerr[NSIG]; /* signal error messages */ |
55 |
|
|
56 |
+ |
extern int nowarn; /* turn warnings off? */ |
57 |
+ |
|
58 |
|
extern time_t time(); |
59 |
|
|
60 |
|
|
453 |
|
int4 nextloc; |
454 |
|
/* open holodeck file */ |
455 |
|
if ((fp = fopen(hdkfile, ncprocs>0 ? "r+" : "r")) == NULL) { |
456 |
< |
sprintf(errmsg, "cannot open \"%s\" for %s", hdkfile, |
457 |
< |
ncprocs>0 ? "appending" : "reading"); |
456 |
> |
sprintf(errmsg, "cannot %s \"%s\"", |
457 |
> |
ncprocs>0 ? "append" : "read", hdkfile); |
458 |
|
error(SYSTEM, errmsg); |
459 |
|
} |
460 |
|
/* load variables from header */ |
504 |
|
p->next = freepacks; /* push onto free list */ |
505 |
|
freepacks = p; |
506 |
|
} |
507 |
+ |
#if MAXQTIME |
508 |
|
if (n2flush > 300/MAXQTIME*totqlen) { |
509 |
< |
hdflush(NULL); /* flush holodeck buffers */ |
509 |
> |
#else |
510 |
> |
if (n2flush > 50*totqlen) { |
511 |
> |
#endif |
512 |
> |
if (outdev == NULL) |
513 |
> |
hdflush(NULL); /* flush holodeck buffers */ |
514 |
> |
else |
515 |
> |
hdsync(NULL, 1); /* sync holodeck file */ |
516 |
|
n2flush = 0; |
517 |
|
} |
518 |
|
} |
557 |
|
fflush(stderr); |
558 |
|
midline = 0; |
559 |
|
} |
553 |
– |
} |
554 |
– |
|
555 |
– |
|
556 |
– |
wputs(s) /* put warning string to stderr */ |
557 |
– |
char *s; |
558 |
– |
{ |
559 |
– |
if (!nowarn) |
560 |
– |
eputs(s); |
560 |
|
} |
561 |
|
|
562 |
|
|