ReactOS
0.4.16-dev-2104-gb84fa49
setbuf.cpp
Go to the documentation of this file.
1
//
2
// setbuf.cpp
3
//
4
// Copyright (c) Microsoft Corporation. All rights reserved.
5
//
6
// Defines setbuf(), which enables or disables buffering on a stream.
7
//
8
#include <
corecrt_internal_stdio.h
>
9
10
11
12
// If the buffer is null, buffering is disabled for the stream. If the buffer is
13
// non-null, it must point to a buffer of BUFSIZ characters; the stream will be
14
// configured to use that buffer. The functionality of setbuf() is a strict
15
// subset of the functionality of setvbuf().
16
extern
"C"
void
__cdecl
setbuf
(
FILE
*
const
stream
,
char
*
const
buffer
)
17
{
18
_ASSERTE
(
stream
!=
nullptr
);
19
20
if
(
buffer
==
nullptr
)
21
{
22
setvbuf
(
stream
,
nullptr
,
_IONBF
, 0);
23
}
24
else
25
{
26
setvbuf
(
stream
,
buffer
,
_IOFBF
,
BUFSIZ
);
27
}
28
}
corecrt_internal_stdio.h
setvbuf
int CDECL setvbuf(FILE *file, char *buf, int mode, size_t size)
Definition:
file.c:5006
__cdecl
#define __cdecl
Definition:
corecrt.h:121
_ASSERTE
#define _ASSERTE(expr)
Definition:
crtdbg.h:57
BUFSIZ
#define BUFSIZ
Definition:
stdio.h:40
_IONBF
#define _IONBF
Definition:
stdio.h:30
_IOFBF
#define _IOFBF
Definition:
stdio.h:29
buffer
GLuint buffer
Definition:
glext.h:5915
setbuf
void __cdecl setbuf(FILE *const stream, char *const buffer)
Definition:
setbuf.cpp:16
_iobuf
Definition:
corecrt_wstdio.h:27
stream
Definition:
parse.h:23
sdk
lib
ucrt
stdio
setbuf.cpp
Generated on Wed Jan 7 2026 06:16:09 for ReactOS by
1.9.6