Fixed several gcc2 compile errors by moving variable declarations to the top of functions.
This commit is contained in:
parent
5e8594c409
commit
2d594c9bf1
2 changed files with 29 additions and 32 deletions
14
src/i18n.c
14
src/i18n.c
|
|
@ -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.)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue