ReactOS
0.4.16-dev-1097-g530d26a
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
_getbuf.cpp
Go to the documentation of this file.
1
2
//
3
// _getbuf.cpp
4
//
5
// Copyright (c) Microsoft Corporation. All rights reserved.
6
//
7
// Defines __acrt_stdio_allocate_buffer_nolock(), which allocates a buffer for a stream.
8
//
9
#include <
corecrt_internal_stdio.h
>
10
11
12
13
// Allocates a buffer for the provided stream. This function assumes that the
14
// caller has already checked to ensure that the stream does not already have a
15
// buffer.
16
extern
"C"
void
__cdecl
__acrt_stdio_allocate_buffer_nolock
(
FILE
*
const
public_stream)
17
{
18
_ASSERTE
(public_stream !=
nullptr
);
19
20
__crt_stdio_stream
const
stream
(public_stream);
21
22
#ifndef CRTDLL
23
++
_cflush
;
// Force the library pre-termination procedure to run
24
#endif
25
26
// Try to get a big buffer:
27
stream
->_base = _calloc_crt_t(
char
,
_INTERNAL_BUFSIZ
).detach();
28
if
(
stream
->_base !=
nullptr
)
29
{
30
stream
.set_flags(
_IOBUFFER_CRT
);
31
stream
->_bufsiz =
_INTERNAL_BUFSIZ
;
32
}
33
// If we couldn't get a big buffer, use single character buffering:
34
else
35
{
36
stream
.set_flags(
_IOBUFFER_NONE
);
37
stream
->_base =
reinterpret_cast<
char
*
>
(&
stream
->_charbuf);
38
stream
->_bufsiz = 2;
39
}
40
41
stream
->_ptr =
stream
->_base;
42
stream
->_cnt = 0;
43
}
_cflush
int _cflush
Definition:
_file.cpp:53
__acrt_stdio_allocate_buffer_nolock
void __cdecl __acrt_stdio_allocate_buffer_nolock(FILE *const public_stream)
Definition:
_getbuf.cpp:16
__cdecl
#define __cdecl
Definition:
accygwin.h:79
__crt_stdio_stream
Definition:
corecrt_internal_stdio.h:197
_INTERNAL_BUFSIZ
#define _INTERNAL_BUFSIZ
Definition:
corecrt_internal_lowio.h:27
corecrt_internal_stdio.h
_IOBUFFER_CRT
@ _IOBUFFER_CRT
Definition:
corecrt_internal_stdio.h:86
_IOBUFFER_NONE
@ _IOBUFFER_NONE
Definition:
corecrt_internal_stdio.h:90
_ASSERTE
#define _ASSERTE(expr)
Definition:
crtdbg.h:114
_iobuf
Definition:
mbstring.h:19
stream
Definition:
parse.h:23
sdk
lib
ucrt
stdio
_getbuf.cpp
Generated on Tue May 6 2025 06:14:51 for ReactOS by
1.9.6