Changeset 21916 for trunk/src/kernel32/environ.cpp
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/kernel32/environ.cpp
r21355 r21916 41 41 //list of important OS/2 environment variables that must not be removed 42 42 //when creating a new process 43 static c har *lpReservedEnvStrings[] = {43 static const char *lpReservedEnvStrings[] = { 44 44 "HOSTNAME", 45 45 "TZ", … … 76 76 //TEMP is a standard environment variable in Windows, but is not always 77 77 //present in OS/2, so make sure it is. 78 if(GetEnvironmentVariableA("TEMP", szVar, sizeof(szVar)) == 0) 78 if(GetEnvironmentVariableA("TEMP", szVar, sizeof(szVar)) == 0) 79 79 { 80 80 if(GetEnvironmentVariableA("TMP", szVar, sizeof(szVar)) == 0) { … … 85 85 } 86 86 } 87 88 extern "C" { 89 87 90 //****************************************************************************** 88 91 //****************************************************************************** … … 226 229 * If the function fails, the return value is zero 227 230 * Remark : 228 * Status : 231 * Status : 229 232 * 230 233 *****************************************************************************/ … … 254 257 if ((p = strchr( src + 1, '%' )) != NULL) 255 258 { 256 len = p - src - 1; /* Length of the variable name */ 259 len = p - src - 1; /* Length of the variable name */ 257 260 if ((var = ENV_FindVariable( GetEnvironmentStringsA(), 258 261 src + 1, len )) != NULL) … … 309 312 * If the function fails, the return value is zero 310 313 * Remark : 311 * Status : 314 * Status : 312 315 * 313 316 *****************************************************************************/ … … 330 333 return ret; 331 334 } 335 336 } // extern "C" 337 332 338 //****************************************************************************** 333 339 // Create a new process environment block based on input from the application … … 340 346 char *tmpenvnew, *newenv; 341 347 int newsize = 0, len; 342 348 343 349 dprintf(("New environment:")); 344 350 while(*tmpenvold) { … … 374 380 tmpenvold += len+1; 375 381 } 382 int i; 376 383 for(i=0;i<sizeof(lpReservedEnvStrings)/sizeof(char *);i++) { 377 384 if(!ENV_FindVariable(lpEnvironment, lpReservedEnvStrings[i], strlen(lpReservedEnvStrings[i]))) {
Note:
See TracChangeset
for help on using the changeset viewer.