ReactOS
0.4.16-dev-424-ge4748fe
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
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
_
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
_tempbuf.c
Go to the documentation of this file.
1
/*
2
*
3
*
4
* Copyright (c) 1994
5
* Hewlett-Packard Company
6
*
7
* Copyright (c) 1996,1997
8
* Silicon Graphics Computer Systems, Inc.
9
*
10
* Copyright (c) 1997
11
* Moscow Center for SPARC Technology
12
*
13
* Copyright (c) 1999
14
* Boris Fomitchev
15
*
16
* This material is provided "as is", with absolutely no warranty expressed
17
* or implied. Any use is at your own risk.
18
*
19
* Permission to use or copy this software for any purpose is hereby granted
20
* without fee, provided the above notices are retained on all copies.
21
* Permission to modify the code and to distribute modified code is granted,
22
* provided the above notices are retained, and a notice that the code was
23
* modified is included with the above copyright notice.
24
*
25
*/
26
#ifndef _STLP_TEMPBUF_C
27
#define _STLP_TEMPBUF_C
28
29
#ifndef _STLP_INTERNAL_TEMPBUF_H
30
# include <
stl/_tempbuf.h
>
31
#endif
32
33
_STLP_BEGIN_NAMESPACE
34
35
template
<
class
_Tp>
36
pair<_Tp*, ptrdiff_t>
_STLP_CALL
37
__get_temporary_buffer
(
ptrdiff_t
__len, _Tp*)
38
{
39
if
(__len >
ptrdiff_t
(
INT_MAX
/
sizeof
(_Tp)))
40
__len =
INT_MAX
/
sizeof
(_Tp);
41
42
while
(__len > 0) {
43
_Tp* __tmp = (_Tp*)
malloc
((
size_t
)__len *
sizeof
(_Tp));
44
if
(__tmp != 0)
45
return
pair<_Tp*, ptrdiff_t>
(__tmp, __len);
46
__len /= 2;
47
}
48
49
return
pair<_Tp*, ptrdiff_t>
((_Tp*)0, 0);
50
}
51
_STLP_END_NAMESPACE
52
53
#endif
/* _STLP_TEMPBUF_C */
54
55
// Local Variables:
56
// mode:C++
57
// End:
_STLP_CALL
#define _STLP_CALL
Definition:
_bc.h:131
__get_temporary_buffer
_STLP_BEGIN_NAMESPACE pair< _Tp *, ptrdiff_t > _STLP_CALL __get_temporary_buffer(ptrdiff_t __len, _Tp *)
Definition:
_tempbuf.c:37
_tempbuf.h
malloc
#define malloc
Definition:
debug_ros.c:4
ptrdiff_t
__kernel_ptrdiff_t ptrdiff_t
Definition:
linux.h:247
_STLP_BEGIN_NAMESPACE
#define _STLP_BEGIN_NAMESPACE
Definition:
features.h:501
_STLP_END_NAMESPACE
#define _STLP_END_NAMESPACE
Definition:
features.h:503
INT_MAX
#define INT_MAX
Definition:
intsafe.h:150
pair
Definition:
_pair.h:47
sdk
include
c++
stlport
stl
_tempbuf.c
Generated on Mon Jan 6 2025 06:13:47 for ReactOS by
1.9.6