ReactOS
0.4.16-dev-470-g91b8923
putenv.c
Go to the documentation of this file.
1
/*
2
* COPYRIGHT: See COPYING in the top level directory
3
* PROJECT: ReactOS system libraries
4
* FILE: lib/sdk/crt/stdlib/putenv.c
5
* PURPOSE: Unknown
6
* PROGRAMER: Unknown
7
* UPDATE HISTORY:
8
* 25/11/05: Added license header
9
*/
10
#include <precomp.h>
11
12
/* misc/environ.c */
13
int
SetEnv
(
const
wchar_t
*
option
);
14
15
/*
16
* @implemented
17
*/
18
int
_putenv
(
const
char
*
val
)
19
{
20
int
size
,
result
;
21
wchar_t
*woption;
22
23
size
=
MultiByteToWideChar
(
CP_ACP
, 0,
val
, -1,
NULL
, 0);
24
woption =
malloc
(
size
*
sizeof
(
wchar_t
));
25
if
(woption ==
NULL
)
26
return
-1;
27
MultiByteToWideChar
(
CP_ACP
, 0,
val
, -1, woption,
size
);
28
result
=
SetEnv
(woption);
29
free
(woption);
30
return
result
;
31
}
free
#define free
Definition:
debug_ros.c:5
malloc
#define malloc
Definition:
debug_ros.c:4
NULL
#define NULL
Definition:
types.h:112
CP_ACP
#define CP_ACP
Definition:
compat.h:109
MultiByteToWideChar
#define MultiByteToWideChar
Definition:
compat.h:110
size
GLsizeiptr size
Definition:
glext.h:5919
val
GLuint GLfloat * val
Definition:
glext.h:7180
result
GLuint64EXT * result
Definition:
glext.h:11304
_putenv
int _putenv(const char *val)
Definition:
putenv.c:18
SetEnv
int SetEnv(const wchar_t *option)
Definition:
environ.c:210
option
Definition:
getopt.h:109
sdk
lib
crt
stdlib
putenv.c
Generated on Wed Jan 15 2025 06:13:38 for ReactOS by
1.9.6