aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.cpp
diff options
context:
space:
mode:
authorGravatar Peter Ammon <corydoras@ridiculousfish.com>2012-01-14 02:42:17 -0800
committerGravatar Peter Ammon <corydoras@ridiculousfish.com>2012-01-14 02:42:17 -0800
commita359f45df219e6a3845870ca69b4116083d787f7 (patch)
tree08454add430170b4113659caf084f9a8801f77c3 /exec.cpp
parente8b6d48ad038089e37730990212676e50a8d2352 (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.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/exec.cpp b/exec.cpp
index 8e47d54f..6a8e463e 100644
--- a/exec.cpp
+++ b/exec.cpp
@@ -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];
}