Go to the first, previous, next, last section, table of contents.


setlinebuf

Syntax

#include <stdio.h>

void setlinebuf(FILE *file);

Description

This function modifies the buffering characteristics of file. First, if the file already has a buffer, it is freed. If there was any pending data in it, it is lost, so this function should only be used immediately after a call to fopen.

Next, a buffer is allocated and the file is set to line buffering.

See section setbuf. See section setlinebuf. See section setvbuf.

Return Value

None.

Portability

not ANSI, not POSIX

Example

setlinebuf(stderr);


Go to the first, previous, next, last section, table of contents.