Made locale aware.
This commit is contained in:
parent
e283e215ae
commit
66dab29703
|
@ -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]++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue