diff --git a/main/gbx/gb_error.c b/main/gbx/gb_error.c index 874c94c01..acbf8e121 100644 --- a/main/gbx/gb_error.c +++ b/main/gbx/gb_error.c @@ -721,7 +721,7 @@ void ERROR_warning(const char *warning, ...) fflush(NULL); - fprintf(stderr, "gbx" GAMBAS_VERSION_STRING ": warning: "); + fprintf(stderr, "gbx" GAMBAS_VERSION_STRING " [%d]: warning: ", getpid()); vfprintf(stderr, warning, args); va_end(args); diff --git a/main/gbx/gbx_local.c b/main/gbx/gbx_local.c index 96c4269b0..9ef56581f 100644 --- a/main/gbx/gbx_local.c +++ b/main/gbx/gbx_local.c @@ -593,7 +593,7 @@ const char *LOCAL_get_lang(void) if (!lang || !*lang) lang = getenv("LANG"); if (!lang || !*lang) - lang = "en_US"; + lang = "C"; _lang = STRING_new_zero(lang); } @@ -610,7 +610,7 @@ void LOCAL_set_lang(const char *lang) THROW(E_ARG); #ifdef DEBUG_LANG - fprintf(stderr, "******** LOCAL_set_lang: %s ********\n", lang); + fprintf(stderr, "******** LOCAL_set_lang: %s\n", lang ? lang : "(null)"); #endif if (lang && *lang) @@ -622,6 +622,10 @@ void LOCAL_set_lang(const char *lang) STRING_free(&_lang); lang = LOCAL_get_lang(); + #ifdef DEBUG_LANG + fprintf(stderr, "lang = %s\n", lang); + #endif + my_setenv("LANG", lang, env_LANG); my_setenv("LC_ALL", lang, env_LC_ALL);