Fixup wsetlocale to use wcstring

This commit is contained in:
ridiculousfish
2012-01-31 21:06:52 -08:00
parent eef1e3e77e
commit bb19fe703a
4 changed files with 10 additions and 20 deletions

View File

@@ -296,7 +296,7 @@ static void handle_locale()
{
const env_var_t lc_all = env_get_string( L"LC_ALL" );
int i;
wchar_t *old = wcsdup(wsetlocale( LC_MESSAGES, NULL ));
const wcstring old_locale = wsetlocale( LC_MESSAGES, NULL );
/*
Array of locale constants corresponding to the local variable names defined in locale_variable
@@ -337,7 +337,8 @@ static void handle_locale()
}
}
if( wcscmp( wsetlocale( LC_MESSAGES, NULL ), old ) != 0 )
const wcstring new_locale = wsetlocale(LC_MESSAGES, NULL);
if( old_locale != new_locale )
{
/*
@@ -357,9 +358,7 @@ static void handle_locale()
{
debug( 0, _(L"Changing language to English") );
}
}
free( old );
}
}