update for HEAD-2003021201
[reactos.git] / lib / msvcrt / stdlib / senv.c
index 32c1afe..9761ebe 100644 (file)
@@ -5,52 +5,29 @@
 #define NDEBUG
 #include <msvcrt/msvcrtdbg.h>
 
-void _searchenv(const char *file,const char *var,char *path )
-{
-       char *env = getenv(var);
-       char *x;
-       char *y;
-       char *FilePart;
-
-       DPRINT("_searchenv()\n");
-       x = strchr(env,'=');
-       if ( x != NULL ) {
-               *x = 0;
-               x++;
-       }
-       y = strchr(env,';');
-       while ( y != NULL ) {
-               *y = 0;
-               if ( SearchPathA(x,file,NULL,MAX_PATH,path,&FilePart) > 0 ) {
-                       return;
-               }
-               x = y+1;
-               y = strchr(env,';');
-       }
-       return;
-}
 
-void _wsearchenv(const wchar_t *file,const wchar_t *var,wchar_t *path)
+void _searchenv(const char* file,const char* var,char* path)
 {
-       wchar_t *env = _wgetenv(var);
-       wchar_t *x;
-       wchar_t *y;
-       wchar_t *FilePart;
+    char* env = getenv(var);
+    char* x;
+    char* y;
+    char* FilePart;
+
+    DPRINT("_searchenv()\n");
 
-       DPRINT("_searchenw()\n");
-       x = wcschr(env,L'=');
-       if ( x != NULL ) {
-               *x = 0;
-               x++;
-       }
-       y = wcschr(env,L';');
-       while ( y != NULL ) {
-               *y = 0;
-               if ( SearchPathW(x,file,NULL,MAX_PATH,path,&FilePart) > 0 ) {
-                       return;
-               }
-               x = y+1;
-               y = wcschr(env,L';');
-       }
-       return;
+    x = strchr(env,'=');
+    if ( x != NULL ) {
+        *x = 0;
+        x++;
+    }
+    y = strchr(env,';');
+    while ( y != NULL ) {
+        *y = 0;
+        if ( SearchPathA(x,file,NULL,MAX_PATH,path,&FilePart) > 0 ) {
+            return;
+        }
+        x = y+1;
+        y = strchr(env,';');
+    }
+    return;
 }