LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

setbuf

setbuf

void setbuf (FILE *stream, char buffer[]);

Purpose

Specifies how to buffer the I/O stream. The mode of the stream can be set to full or no buffering.

Note Note  Except that it returns no value, calling setbuf is equivalent to calling setvbuf with _IOFBF for bufferingMode and the constant BUFSIZ entered for bufferSize. Unless, however, buffer is NULL, in which case you should call setvbuf with the value _IONBF for bufferingMode.

Parameters

Input
Name Type Description
stream FILE * Contains a pointer to the stream that has its buffering mode specified. This stream must be associated with an open file with no operations performed on it for the function to work correctly.
Output
Name Type Description
buffer char [] Contains a pointer to the I/O buffer that is used. If NULL is entered into this parameter, the specified stream is unbuffered. For the stream to be fully buffered, the array used must be declared as a variable with at least BUFSIZ elements. The contents of this buffer at any time are indeterminate.

Return Value

None.

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Was this information helpful?