Changeset 41670 in vbox
- Timestamp:
- Jun 12, 2012 2:26:17 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/iprt/env.h (modified) (1 diff)
-
include/iprt/err.h (modified) (1 diff)
-
src/VBox/Runtime/generic/env-generic.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/env.h
r28800 r41670 55 55 * environment array. 56 56 * 57 * @returns IPRT status code. Typical error is VERR_NO_MEMORY. 57 * @returns IPRT status code. Typical error is VERR_NO_MEMORY. Another 58 * possible return code is VWRN_NO_TRANSLATION if EnvToClone is RTENV_DEFAULT 59 * and there was no translation available for one environment variable. In 60 * that case, the resulting environment will contain fewer elements than the 61 * original environment. 58 62 * 59 63 * @param pEnv Where to store the handle of the new environment block. -
trunk/include/iprt/err.h
r40372 r41670 757 757 /** Error while characters translation (unicode and so). */ 758 758 #define VERR_NO_TRANSLATION (-58) 759 /** Error while characters translation (unicode and so). */ 760 #define VWRN_NO_TRANSLATION 58 759 761 /** Encountered unicode code point which is reserved for use as endian indicator (0xffff or 0xfffe). */ 760 762 #define VERR_CODE_POINT_ENDIAN_INDICATOR (-59) -
trunk/src/VBox/Runtime/generic/env-generic.cpp
r36576 r41670 240 240 { 241 241 /* ASSUMES the default environment is in the current codepage. */ 242 for (size_t iVar = 0; iVar < cVars; iVar++) 243 { 244 int rc2 = RTStrCurrentCPToUtf8(&pIntEnv->papszEnv[iVar], papszEnv[iVar]); 242 bool fNoTranslation = false; 243 size_t iDst = 0; 244 for (size_t iSrc = 0; iSrc < cVars; iSrc++) 245 { 246 int rc2 = RTStrCurrentCPToUtf8(&pIntEnv->papszEnv[iDst], papszEnv[iSrc]); 247 if (rc2 == VERR_NO_TRANSLATION) 248 { 249 fNoTranslation = true; 250 continue; 251 } 245 252 if (RT_FAILURE(rc2)) 246 253 { 247 pIntEnv->cVars = i Var;254 pIntEnv->cVars = iDst; 248 255 RTEnvDestroy(pIntEnv); 249 256 return rc2; 250 257 } 251 } 258 iDst++; 259 } 260 pIntEnv->cVars = iDst; 261 if (fNoTranslation) 262 rc = VWRN_NO_TRANSLATION; 252 263 } 253 264 else
Note:
See TracChangeset
for help on using the changeset viewer.

