Changeset 2803 for trunk/src/kernel32/oslibdos.cpp
- Timestamp:
- Feb 16, 2000, 3:28:28 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibdos.cpp
r2687 r2803 1 /* $Id: oslibdos.cpp,v 1.1 8 2000-02-08 22:29:15 sandervl Exp $ */1 /* $Id: oslibdos.cpp,v 1.19 2000-02-16 14:25:45 sandervl Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 27 27 #include "dosqss.h" 28 28 29 #define DBG_LOCALLOG DBG_oslibdos 30 #include "dbglocal.h" 31 29 32 /*********************************** 30 33 * PH: fixups for missing os2win.h * … … 344 347 } 345 348 //****************************************************************************** 349 DWORD WIN32API GetEnvironmentVariableA(LPCSTR, LPSTR, DWORD ); 346 350 //****************************************************************************** 347 351 DWORD OSLibDosSearchPath(DWORD cmd, char *path, char *name, char *full_name, … … 377 381 case OSLIB_SEARCHENV: 378 382 { 379 PCSZ envstring; 380 CHAR szResult[CCHMAXPATH]; 381 382 if(DosScanEnv(path, &envstring) != 0) { 383 LPSTR envstring; 384 int envsize; 385 CHAR szResult[CCHMAXPATH]; 386 387 envsize = GetEnvironmentVariableA(path, NULL, 0); 388 envstring = (LPSTR)malloc(envsize+1); 389 GetEnvironmentVariableA(path, envstring, envsize); 390 if(DosSearchPath(SEARCH_IGNORENETERRS, envstring, 391 name, szResult, sizeof(szResult)) != 0) { 392 free(envstring); 383 393 return 0; 384 394 } 385 if(DosSearchPath(SEARCH_IGNORENETERRS, envstring, 386 name, szResult, sizeof(szResult)) != 0) { 387 return 0; 388 } 395 free(envstring); 389 396 strcpy(full_name, szResult); 390 397 return strlen(full_name);
Note:
See TracChangeset
for help on using the changeset viewer.