home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Bug_Fixes / Net.v7bugs / 0008 < prev    next >
Encoding:
Text File  |  1981-05-28  |  537 b   |  17 lines

  1. Aduke.488
  2. NET.v7bugs
  3. utzoo!duke!trt
  4. Wed Aug 13 09:48:33 1980
  5. col
  6. The buffer-flush bug in col(1) that was mentioned in previous news
  7. is due to using an automatic (local) variable for buffering stdout:
  8.     char fbuff[BUFSIZ];
  9. should be changed to
  10.     static char fbuff[BUFSIZ];
  11. (exit() also works since main() will not return before flushing.)
  12. Col(1) is just one of several V7 programs with this flaw.
  13.  
  14. In the Duke version of stdio one can bypass the problem with
  15.     setbuf(stdout, SYSBUF);
  16. where SYSBUF is a flag indicating buffering is desired.
  17.