Fixed several gcc2 compile errors by moving variable declarations to the top of functions.

This commit is contained in:
Scott McCreary 2010-04-29 20:01:24 +00:00
parent 5e8594c409
commit 2d594c9bf1
2 changed files with 29 additions and 32 deletions

View file

@ -597,22 +597,20 @@ static const char *language_to_locale(const char *langstr)
static void set_langint_from_locale_string(const char *restrict loc)
{
char *baseloc = strdup(loc);
char *dot = strchr(baseloc, '.');
size_t len_baseloc = strlen(baseloc);
int found = 0;
int i;
if (!loc)
return;
char *baseloc = strdup(loc);
char *dot = strchr(baseloc, '.');
if(dot)
*dot = '\0';
size_t len_baseloc = strlen(baseloc);
/* Which, if any, of the locales is it? */
int found = 0;
int i;
for (i = 0; i < NUM_LANGS && found == 0; i++)
{
// Case-insensitive (both "pt_BR" and "pt_br" work, etc.)