Made locale aware.

This commit is contained in:
hjp 2000-01-19 11:31:57 +00:00
parent e283e215ae
commit 66dab29703
1 changed files with 2 additions and 0 deletions

View File

@ -1,4 +1,5 @@
#include <ctype.h> #include <ctype.h>
#include <locale.h>
#include <stdio.h> #include <stdio.h>
#include <limits.h> #include <limits.h>
@ -7,6 +8,7 @@ long hist[UCHAR_MAX+1];
int main (int argc, char **argv) { int main (int argc, char **argv) {
int c; int c;
setlocale(LC_ALL, "");
while ((c = getchar()) != EOF) { while ((c = getchar()) != EOF) {
hist[c]++; hist[c]++;
} }