From 4bdec3f2e9025964ab810f832ff768fa32c1e173 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 19 Jul 2017 13:25:10 +0200 Subject: lr: use setlocale. This will enable date stamp formatting for %A, %C, %T as known from date(1). Note that LC_COLLATE and LC_CTYPE is not respected, as we continue to use strcmp. Closes #12. --- lr.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lr.c') diff --git a/lr.c b/lr.c index fbf0f8a..3277bed 100644 --- a/lr.c +++ b/lr.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -1936,6 +1937,8 @@ main(int argc, char *argv[]) now = time(0); status = 0; + setlocale(LC_ALL, ""); + while ((c = getopt(argc, argv, "01AC:DFGHLQST:Udf:lho:st:x")) != -1) switch(c) { case '0': format = zero_format; input_delim = 0; Qflag++; break; -- cgit 1.4.1