aboutsummaryrefslogtreecommitdiffhomepage
path: root/expand.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 /expand.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 'expand.cpp')
-rw-r--r--expand.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/expand.cpp b/expand.cpp
index e8e05fd5..f909bde4 100644
--- a/expand.cpp
+++ b/expand.cpp
@@ -278,7 +278,13 @@ wchar_t *expand_escape_variable( const wchar_t *in )
al_destroy( &l );
return (wchar_t *)buff.buff;
+}
+wcstring expand_escape_variable2( const wcstring &in ) {
+ wchar_t *tmp = expand_escape_variable(in.c_str());
+ wcstring result(tmp ? tmp : L"");
+ free(tmp);
+ return result;
}
/**