diff options
author | Peter Ammon <corydoras@ridiculousfish.com> | 2012-01-14 02:42:17 -0800 |
---|---|---|
committer | Peter Ammon <corydoras@ridiculousfish.com> | 2012-01-14 02:42:17 -0800 |
commit | a359f45df219e6a3845870ca69b4116083d787f7 (patch) | |
tree | 08454add430170b4113659caf084f9a8801f77c3 /exec.cpp | |
parent | e8b6d48ad038089e37730990212676e50a8d2352 (diff) |
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
Diffstat (limited to 'exec.cpp')
-rw-r--r-- | exec.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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]; } |