78 |
|
eputs(": cannot open\n"); |
79 |
|
quit(1); |
80 |
|
} |
81 |
< |
initfile(fp, fname, 0); |
81 |
> |
#ifdef getc_unlocked /* avoid stupid semaphores */ |
82 |
> |
flockfile(fp); |
83 |
> |
#endif |
84 |
> |
initfile(fp, fname, 0); |
85 |
|
while (nextc != EOF) |
86 |
|
getstatement(); |
87 |
|
if (fname != NULL) |
88 |
|
fclose(fp); |
89 |
+ |
#ifdef getc_unlocked |
90 |
+ |
else |
91 |
+ |
funlockfile(fp); |
92 |
+ |
#endif |
93 |
|
} |
94 |
|
|
95 |
|
|
376 |
|
else |
377 |
|
dclear(vp->name); |
378 |
|
} |
379 |
< |
if (lvl >= 1) { |
380 |
< |
for (ep = outchan; ep != NULL; ep = ep->sibling) |
379 |
> |
if (lvl >= 1) |
380 |
> |
while (outchan != NULL) { |
381 |
> |
ep = outchan; |
382 |
> |
outchan = ep->sibling; |
383 |
> |
ep->sibling = NULL; |
384 |
|
epfree(ep); |
385 |
< |
outchan = NULL; |
376 |
< |
} |
385 |
> |
} |
386 |
|
} |
387 |
|
|
388 |
|
|
452 |
|
/* if fn is NULL then relink all */ |
453 |
|
for (i = 0; i < NHASH; i++) |
454 |
|
for (vp = hashtbl[i]; vp != NULL; vp = vp->next) |
455 |
< |
if (vp->lib != NULL || fn == NULL || !strcmp(fn, vp->name)) |
455 |
> |
if ((vp->lib != NULL) | (fn == NULL) || !strcmp(fn, vp->name)) |
456 |
|
vp->lib = liblookup(vp->name); |
457 |
|
} |
458 |
|
|
478 |
|
vp->next = ln->next; |
479 |
|
} |
480 |
|
freestr(ln->name); |
481 |
< |
efree((char *)ln); |
481 |
> |
efree(ln); |
482 |
|
} |
483 |
|
|
484 |
|
|
630 |
|
{ |
631 |
|
EPNODE *ep1, *ep2; |
632 |
|
|
633 |
< |
if (!isalpha(nextc) && nextc != CNTXMARK) |
633 |
> |
if (!isalpha(nextc) & (nextc != CNTXMARK)) |
634 |
|
syntax("illegal variable name"); |
635 |
|
|
636 |
|
ep1 = newnode(); |
659 |
|
curfunc = ep1; |
660 |
|
} |
661 |
|
|
662 |
< |
if (nextc != '=' && nextc != ':') |
662 |
> |
if ((nextc != '=') & (nextc != ':')) |
663 |
|
syntax("'=' or ':' expected"); |
664 |
|
|
665 |
|
ep2 = newnode(); |