Aduke.488
NET.v7bugs
utzoo!duke!trt
Wed Aug 13 09:48:33 1980
col
The buffer-flush bug in col(1) that was mentioned in previous news
is due to using an automatic (local) variable for buffering stdout:
       char fbuff[BUFSIZ];
should be changed to
       static char fbuff[BUFSIZ];
(exit() also works since main() will not return before flushing.)
Col(1) is just one of several V7 programs with this flaw.

In the Duke version of stdio one can bypass the problem with
       setbuf(stdout, SYSBUF);
where SYSBUF is a flag indicating buffering is desired.

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.