summaryrefslogtreecommitdiff
path: root/cmp.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-08-05 14:08:20 -0400
committerJakob Kaivo <jkk@ung.org>2019-08-05 14:08:20 -0400
commit7b7798dc92170c6d1399ca0e683de892cc154b61 (patch)
treeb581ed6cf488a2ebec1ffa7c5a3fad36949218a4 /cmp.c
parentea45616fdefbc5c8945f5b3b7644920a05af3e3d (diff)
remember to setlocale()
Diffstat (limited to 'cmp.c')
-rw-r--r--cmp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmp.c b/cmp.c
index deb5d1f..a8174f5 100644
--- a/cmp.c
+++ b/cmp.c
@@ -24,6 +24,7 @@
#define _POSIX_C_SOURCE 2
#include <errno.h>
+#include <locale.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -48,6 +49,8 @@ FILE *fileopen(const char *path)
int main(int argc, char *argv[])
{
+ setlocale(LC_ALL, "");
+
int c;
enum { FIRSTONLY, ALL, SILENT } output = FIRSTONLY;