Große Umstellung. Viel hinzugefügt.
[h316.git] / pc-tools / ldc / charcount.c
1 #include <stdio.h>
2
3 main ()
4 {
5 unsigned char buf;
6 int stat[256];
7 int c;
8 for (c = 0; c < 256; c++)
9 stat[c] = 0;
10 int ret;
11 do {
12 ret = read (0, &buf, 1);
13 stat[buf]++;
14 }
15 while (ret);
16 for (c = 0; c < 256; c++)
17 printf ("%03i:%04i\n", c, stat[c]);
18
19 }