Redesign new environment variables to use env_var_t instead of wcstring

Migrate uses of empty() to missing() to distinguish between empty variable and unset variable
This commit is contained in:
Peter Ammon
2012-01-14 02:42:17 -08:00
parent e8b6d48ad0
commit a359f45df2
17 changed files with 132 additions and 159 deletions

View File

@@ -1740,16 +1740,15 @@ int exec_subshell( const wchar_t *cmd,
int prev_subshell = is_subshell;
int status, prev_status;
io_data_t *io_buffer;
const wchar_t *ifs;
char sep=0;
CHECK( cmd, -1 );
// ifs = env_get(L"IFS");
ifs = env_get_string(L"IFS").empty()?NULL:env_get_string(L"IFS").c_str();
const env_var_t ifs = env_get_string(L"IFS").empty()?NULL:env_get_string(L"IFS").c_str();
if( ifs && ifs[0] )
if( ! ifs.missing_or_empty() )
{
if( ifs[0] < 128 )
if( ifs.at(0) < 128 )
{
sep = '\n';//ifs[0];
}