| 332 | } |
| 333 | |
| 334 | TCHAR * CUT_Str::tgetenv(const TCHAR *varname) |
| 335 | { |
| 336 | #if _MSC_VER >= 1400 |
| 337 | TCHAR* retval; |
| 338 | size_t requiredSize; |
| 339 | // Get required length |
| 340 | _tgetenv_s( &requiredSize, NULL, 0, varname); |
| 341 | retval = new TCHAR[requiredSize]; |
| 342 | if (!_tgetenv_s( &requiredSize, retval, requiredSize, varname )) |
| 343 | return retval; |
| 344 | else |
| 345 | { |
| 346 | delete [] retval; |
| 347 | return NULL; |
| 348 | } |
| 349 | |
| 350 | #else |
| 351 | return _tgetenv(varname); |
| 352 | #endif |
| 353 | } |
| 354 | |
| 355 | // v4.2 these internal mbstowcs and wcstombs are called by the AC and WC macros below. |
| 356 | // For translation to wide char with code page selection (i.e CP_UTF8) see cvtcpy above. |
nothing calls this directly
no outgoing calls
no test coverage detected