git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git]
/
lib
/
crtdll
/
stdlib
/
senv.c
1
#include <crtdll/stdlib.h>
2
#include <windows.h>
3
#include <crtdll/string.h>
4
5
void _searchenv(const char *file,const char *var,char *path )
6
{
7
char *env = getenv(var);
8
9
char *x;
10
char *y;
11
char *FilePart;
12
x = strchr(env,'=');
13
if ( x != NULL ) {
14
*x = 0;
15
x++;
16
}
17
y = strchr(env,';');
18
while ( y != NULL ) {
19
*y = 0;
20
if ( SearchPathA(x,file,NULL,MAX_PATH,path,&FilePart) > 0 ) {
21
return;
22
}
23
x = y+1;
24
y = strchr(env,';');
25
}
26
return;
27
28
}