From 477ba6cddc0bff02cc9abcffbf559750070cbf79 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Fri, 8 May 2020 15:27:06 +0200 Subject: [PATCH] debug --- main.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/main.c b/main.c index 6fdb497..f0514f7 100644 --- a/main.c +++ b/main.c @@ -243,16 +243,13 @@ int main(int argc,char **argv,char** envp) char date[60]; time_t now ; char * locale; + char * language; + char * ptr; - char** env; - for(env=envp;*env!=0;env++) - { - char* thisEnv = *env; - printf("%s\n",thisEnv); - } - + language = getenv("LANGUAGE"); + ptr = strtok (language, ":"); locale = setlocale(LC_ALL,""); - locale = setlocale(LC_ALL,NULL); + locale = setlocale(LC_ALL,ptr); time( &now ); sprintf( date, "%s", ctime(&now)); date[strlen(date)-1] = 0;