[dev] [PATCH] slstatus: set locale

From: Kurt Van Dijck <dev.kurt_AT_vandijck-laurijssen.be>
Date: Mon, 11 Sep 2017 20:05:21 +0200

I want my date & time printed according my locale settings.
This commit enables that

Signed-off-by: Kurt Van Dijck <dev.kurt_AT_vandijck-laurijssen.be>
---
 slstatus.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/slstatus.c b/slstatus.c
index e69423b..30a9d09 100644
--- a/slstatus.c
+++ b/slstatus.c
_AT_@ -6,6 +6,7 @@
 #include <ifaddrs.h>
 #include <limits.h>
 #include <linux/wireless.h>
+#include <locale.h>
 #include <netdb.h>
 #include <pwd.h>
 #include <signal.h>
_AT_@ -819,6 +820,7 @@ main(int argc, char *argv[])
 		usage();
 	}
 
+	setlocale(LC_ALL, "");
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = terminate;
 	sigaction(SIGINT,  &act, NULL);
-- 
1.8.5.rc3
Received on Mon Sep 11 2017 - 20:05:21 CEST

This archive was generated by hypermail 2.3.0 : Mon Sep 11 2017 - 20:12:20 CEST