diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2012-12-28 16:12:51 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2012-12-28 16:12:51 +0000 |
commit | f7544cb61de7d175e1e2ec4a9c08884f9f86c8a8 (patch) | |
tree | cec617df62c3e726d7e10993ce4772fd55ebe1e5 /usr.bin/mg/main.c | |
parent | 0f802021192271d749cddd44c13880fc64a6c342 (diff) |
Respect locale for ctype purposes, e.g. display ISO Latin 1 characters;
ok stsp@ reyk@
Document that multi-byte character sets are not supported; from stsp@
Diffstat (limited to 'usr.bin/mg/main.c')
-rw-r--r-- | usr.bin/mg/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mg/main.c b/usr.bin/mg/main.c index ef4f3baa8dc..804db934d32 100644 --- a/usr.bin/mg/main.c +++ b/usr.bin/mg/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.69 2012/08/31 18:06:42 lum Exp $ */ +/* $OpenBSD: main.c,v 1.70 2012/12/28 16:12:50 naddy Exp $ */ /* This file is in the public domain. */ @@ -12,6 +12,7 @@ #include "macro.h" #include <err.h> +#include <locale.h> int thisflag; /* flags, this command */ int lastflag; /* flags, last command */ @@ -63,6 +64,8 @@ main(int argc, char **argv) argc -= optind; argv += optind; + setlocale(LC_CTYPE, ""); + maps_init(); /* Keymaps and modes. */ funmap_init(); /* Functions. */ |