[hackers] [slstatus] slstatus: set locale || Kurt Van Dijck

From: <git_AT_suckless.org>
Date: Sat, 16 Sep 2017 14:13:09 +0200 (CEST)

commit fb1f1dea2e8e4d11f3e213d18c2b03fd76751255
Author: Kurt Van Dijck <dev.kurt_AT_vandijck-laurijssen.be>
AuthorDate: Mon Sep 11 20:05:21 2017 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Sat Sep 16 14:10:35 2017 +0200

    slstatus: set locale
    
    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>

diff --git a/slstatus.c b/slstatus.c
index cbc35a4..cddc79a 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_@ -841,6 +842,7 @@ main(int argc, char *argv[])
                 usage();
         }
 
+ setlocale(LC_ALL, "");
         memset(&act, 0, sizeof(act));
         act.sa_handler = terminate;
         sigaction(SIGINT, &act, NULL);
Received on Sat Sep 16 2017 - 14:13:09 CEST

This archive was generated by hypermail 2.3.0 : Sat Sep 16 2017 - 14:24:35 CEST