diff options
author | ache <ache@FreeBSD.org> | 2006-04-14 17:32:27 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2006-04-14 17:32:27 +0000 |
commit | 4997b369b97d3ea57fe417aa4c0ea30e24ef3d90 (patch) | |
tree | dd52439a6bc64218d130b47e75695ba18d43155b /games/random/random.c | |
parent | 859f7291d5e7a64b12004cc7d373dea38ca8dd80 (diff) | |
download | FreeBSD-src-4997b369b97d3ea57fe417aa4c0ea30e24ef3d90.zip FreeBSD-src-4997b369b97d3ea57fe417aa4c0ea30e24ef3d90.tar.gz |
1) Fix hang at the end of line buffer (PR 95715)
2) Localize
PR: 95715
Submitted by: Li-Lun Wang <llwang@infor.org> (slightly edited by me)
Diffstat (limited to 'games/random/random.c')
-rw-r--r-- | games/random/random.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/games/random/random.c b/games/random/random.c index 62c83ba..b7b732a 100644 --- a/games/random/random.c +++ b/games/random/random.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include <errno.h> #include <fcntl.h> #include <limits.h> +#include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -84,6 +85,9 @@ main(int argc, char *argv[]) random_type = RANDOM_TYPE_UNSET; random_exit = randomize_lines = random_type = unbuffer_output = 0; unique_output = 1; + + (void)setlocale(LC_CTYPE, ""); + while ((ch = getopt(argc, argv, "ef:hlruUw")) != -1) switch (ch) { case 'e': |