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

@@ -204,8 +204,8 @@ static int calc_prompt_width( const wchar_t *prompt )
{
if( prompt[j+1] == L'k' )
{
wcstring term_name = env_get_string( L"TERM" );
if( !term_name.empty() && wcsstr( term_name.c_str(), L"screen" ) == term_name )
const env_var_t term_name = env_get_string( L"TERM" );
if( !term_name.missing() && wcsstr( term_name.c_str(), L"screen" ) == term_name )
{
const wchar_t *end;
j+=2;