home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / stdio / setbuffe.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  821 b   |  35 lines

  1. @node setbuffer, stdio
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <stdio.h>
  6.  
  7. void setbuffer(FILE *file, char *buffer, int length);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function modifies the buffering characteristics of @var{file}. 
  13. First, if the file already has a buffer, it is freed.  If there was any
  14. pending data in it, it is lost, so this function should only be used
  15. immediately after a call to @code{fopen}.
  16.  
  17. If the @var{buffer} passed is @code{NULL}, the file is set to
  18. unbuffered.  If a non-@code{NULL} buffer is passed, it must be at least
  19. @var{size} bytes in size, and the file is set to fully buffered.
  20.  
  21. @xref{setbuf}.
  22. @xref{setlinebuf}.
  23. @xref{setvbuf}.
  24.  
  25. @subheading Return Value
  26.  
  27. None.
  28.  
  29. @subheading Example
  30.  
  31. @example
  32. setbuffer(stdout, malloc(10000), 10000);
  33. @end example
  34.  
  35.