96 |
|
char fmt[MAXFMTLEN]; |
97 |
|
int i; |
98 |
|
|
99 |
< |
if (!strncmp(s, "NCOMP=", 6) && atoi(s+6) != 3) { |
99 |
> |
if (isncomp(s) && ncompval(s) != 3) { |
100 |
|
ip->err = "unexpected # components (must be 3)"; |
101 |
|
return(-1); |
102 |
|
} |
495 |
|
|
496 |
|
if (!cm) |
497 |
|
return(0); |
498 |
+ |
#ifdef getc_unlocked |
499 |
+ |
flockfile(fp); |
500 |
+ |
#endif |
501 |
|
mp = cm->cmem; |
502 |
|
switch (dtype) { |
503 |
|
case DTascii: |
549 |
|
fputs("Unsupported data type in cm_write()!\n", stderr); |
550 |
|
return(0); |
551 |
|
} |
552 |
+ |
#ifdef getc_unlocked |
553 |
+ |
funlockfile(fp); |
554 |
+ |
#endif |
555 |
|
return(fflush(fp) == 0); |
556 |
|
} |