projects
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
188873ae30557cac8e0f9e683c835bdf47ed31ee
[reactos.git]
/
reactos
/
lib
/
crtdll
/
stdlib
/
putenv.c
1
#include <precomp.h>
2
#include <msvcrt/stdlib.h>
3
#include <msvcrt/string.h>
4
5
6
7
int
putenv
(
const char
*
val
)
8
{
9
10
char
buffer
[
1024
];
11
char
*
epos
;
12
13
strcpy
(
buffer
,
val
);
14
15
16
epos
=
strchr
(
buffer
,
'='
);
17
if
(
epos
==
NULL
)
18
return
-
1
;
19
20
*
epos
=
0
;
21
22
return
SetEnvironmentVariableA
(
buffer
,
epos
+
1
);
23
}